@threadlabs/looma 0.47.0 → 0.47.2

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 (120) hide show
  1. package/components/ui-button/ui-button.html +3 -7
  2. package/components/ui-combobox/ui-combobox.html +23 -4
  3. package/components/ui-combobox/ui-combobox.js +6 -0
  4. package/components/ui-icon-button/ui-icon-button.html +3 -8
  5. package/components/ui-top-bar/ui-top-bar.html +32 -2
  6. package/components/ui-top-bar/ui-top-bar.js +60 -0
  7. package/dist/index.js +4 -3
  8. package/docs/README.md +1 -1
  9. package/docs/catalog.json +67 -12
  10. package/docs/customizer-render.mjs +3 -3
  11. package/docs/customizer.js +1 -7
  12. package/docs/theme.mjs +43 -12
  13. package/package.json +1 -1
  14. package/styles/ui-button.css +3 -7
  15. package/styles/ui-combobox.css +40 -6
  16. package/styles/ui-icon-button.css +3 -8
  17. package/styles/ui-top-bar.css +24 -1
  18. package/vanilla/UiCombobox.d.ts +1 -0
  19. package/vanilla/UiCombobox.js +88 -82
  20. package/vanilla/UiTopBar.d.ts +1 -0
  21. package/vanilla/UiTopBar.js +50 -13
  22. package/vue/UiButton.vue +3 -7
  23. package/vue/UiCombobox.d.ts +6 -0
  24. package/vue/UiCombobox.vue +76 -9
  25. package/vue/UiIconButton.vue +3 -8
  26. package/vue/UiTopBar.d.ts +17 -1
  27. package/vue/UiTopBar.vue +171 -3
  28. package/vue/chunks/UiAffordanceScope.js +1 -1
  29. package/vue/chunks/UiAvatar.js +1 -1
  30. package/vue/chunks/UiAvatarGroup.js +1 -1
  31. package/vue/chunks/UiBadge.js +1 -1
  32. package/vue/chunks/UiBreadcrumbItem.js +1 -1
  33. package/vue/chunks/UiBreadcrumbs.js +1 -1
  34. package/vue/chunks/UiButton.js +2 -2
  35. package/vue/chunks/UiCallout.js +1 -1
  36. package/vue/chunks/UiCard.js +1 -1
  37. package/vue/chunks/UiCheckbox.js +1 -1
  38. package/vue/chunks/UiCluster.js +1 -1
  39. package/vue/chunks/UiColorPicker.js +1 -1
  40. package/vue/chunks/UiCombobox.js +74 -53
  41. package/vue/chunks/UiContainer.js +1 -1
  42. package/vue/chunks/UiContextMenu.js +1 -1
  43. package/vue/chunks/UiCover.js +1 -1
  44. package/vue/chunks/UiCurveEditor.js +1 -1
  45. package/vue/chunks/UiCycleButton.js +1 -1
  46. package/vue/chunks/UiDescriptionItem.js +1 -1
  47. package/vue/chunks/UiDescriptionList.js +1 -1
  48. package/vue/chunks/UiDialog.js +1 -1
  49. package/vue/chunks/UiDisclosure.js +1 -1
  50. package/vue/chunks/UiEditable.js +1 -1
  51. package/vue/chunks/UiEditorBlockActions.js +1 -1
  52. package/vue/chunks/UiEditorChipEditor.js +1 -1
  53. package/vue/chunks/UiEditorCodeLanguage.js +1 -1
  54. package/vue/chunks/UiEditorFootnoteEditor.js +1 -1
  55. package/vue/chunks/UiEditorImageToolbar.js +1 -1
  56. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  57. package/vue/chunks/UiEditorLinkCard.js +1 -1
  58. package/vue/chunks/UiEditorLinkForm.js +1 -1
  59. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  60. package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
  61. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  62. package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
  63. package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
  64. package/vue/chunks/UiEditorSurface.js +1 -1
  65. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  66. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  67. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  68. package/vue/chunks/UiEditorToolbar.js +1 -1
  69. package/vue/chunks/UiFloatingActionButton.js +1 -1
  70. package/vue/chunks/UiFormField.js +1 -1
  71. package/vue/chunks/UiGrid.js +1 -1
  72. package/vue/chunks/UiIcon.js +1 -1
  73. package/vue/chunks/UiIconButton.js +2 -2
  74. package/vue/chunks/UiImage.js +1 -1
  75. package/vue/chunks/UiInput.js +1 -1
  76. package/vue/chunks/UiInputGroup.js +1 -1
  77. package/vue/chunks/UiLightEditor.js +1 -1
  78. package/vue/chunks/UiList.js +1 -1
  79. package/vue/chunks/UiListItem.js +1 -1
  80. package/vue/chunks/UiListbox.js +1 -1
  81. package/vue/chunks/UiMenu.js +1 -1
  82. package/vue/chunks/UiMenuGroup.js +1 -1
  83. package/vue/chunks/UiMenuItem.js +1 -1
  84. package/vue/chunks/UiMeter.js +1 -1
  85. package/vue/chunks/UiNavItem.js +1 -1
  86. package/vue/chunks/UiNumberInput.js +1 -1
  87. package/vue/chunks/UiPageHeader.js +1 -1
  88. package/vue/chunks/UiPagination.js +1 -1
  89. package/vue/chunks/UiPopover.js +1 -1
  90. package/vue/chunks/UiRadio.js +1 -1
  91. package/vue/chunks/UiRadioGroup.js +1 -1
  92. package/vue/chunks/UiReel.js +1 -1
  93. package/vue/chunks/UiScrollArea.js +1 -1
  94. package/vue/chunks/UiSearchResultRow.js +1 -1
  95. package/vue/chunks/UiSearchShell.js +1 -1
  96. package/vue/chunks/UiSection.js +1 -1
  97. package/vue/chunks/UiSelect.js +1 -1
  98. package/vue/chunks/UiSeparator.js +1 -1
  99. package/vue/chunks/UiSidebar.js +1 -1
  100. package/vue/chunks/UiSiteHeader.js +1 -1
  101. package/vue/chunks/UiSkeleton.js +1 -1
  102. package/vue/chunks/UiSlider.js +1 -1
  103. package/vue/chunks/UiSpinner.js +1 -1
  104. package/vue/chunks/UiStack.js +1 -1
  105. package/vue/chunks/UiStatusMessage.js +1 -1
  106. package/vue/chunks/UiSwatch.js +1 -1
  107. package/vue/chunks/UiSwitch.js +1 -1
  108. package/vue/chunks/UiSwitcher.js +1 -1
  109. package/vue/chunks/UiTable.js +1 -1
  110. package/vue/chunks/UiTabs.js +1 -1
  111. package/vue/chunks/UiText.js +1 -1
  112. package/vue/chunks/UiTextarea.js +1 -1
  113. package/vue/chunks/UiToast.js +1 -1
  114. package/vue/chunks/UiToastRegion.js +1 -1
  115. package/vue/chunks/UiTooltip.js +1 -1
  116. package/vue/chunks/UiTopBar.js +105 -17
  117. package/vue/chunks/UiTree.js +1 -1
  118. package/vue/chunks/UiTreeItem.js +1 -1
  119. package/vue/chunks/props.js +1 -1
  120. package/vue/components.css +77 -38
package/docs/README.md CHANGED
@@ -124,7 +124,7 @@ The starting themes make different choices within the same controls:
124
124
 
125
125
  The summary stays above the editor and updates as decisions change; Undo, Redo and Reset remain available there. Optional accent swatches offer None inside the picker, without a separate mode selector.
126
126
 
127
- A refined preset keeps its name with “customized” beside it. **Reset material** resets only material and light; **Reset palette** resets only the palette. Status color relationships offer **Semantic colors**, **Less color**, and **Primary + icons**. **Reset status colors** restores the selected status relationship without changing brand colors, type, or material; advanced per-status relationships remain available. These family choices are recorded in the recipe's optional `presets` mapping. The `values` mapping remains the complete source of the generated theme; a preset is a named combination of those values.
127
+ A refined preset keeps its name with “customized” beside it. The shared toolbar provides Undo, Redo, and a single Reset for the theme. Cmd/Ctrl+Z and Cmd/Ctrl+Shift+Z also undo and redo theme changes, including while a dropdown has focus; text fields retain their native editing history. Status color relationships offer **Semantic colors**, **Less color**, and **Primary + icons**, with advanced per-status relationships available. These family choices are recorded in the recipe's optional `presets` mapping. The `values` mapping remains the complete source of the generated theme; a preset is a named combination of those values.
128
128
 
129
129
  Number controls accept arithmetic such as `1rem / 1.2` or `150ms * 2`, calculate on entry and show the result. Unit changes preserve the quantity. Sliders include exact entry, and curve handles support dragging and arrow keys alongside numeric coordinates. LightEditor keeps its coordinate fields under **Exact position**. Light and curve drags preserve the grab offset; Escape or pointer cancellation restores the gesture start without creating a saved edit.
130
130
 
package/docs/catalog.json CHANGED
@@ -463,7 +463,7 @@
463
463
  ],
464
464
  "schemaVersion": 1,
465
465
  "package": "@threadlabs/looma",
466
- "version": "0.47.0",
466
+ "version": "0.47.2",
467
467
  "groups": [
468
468
  {
469
469
  "id": "layout",
@@ -2915,8 +2915,7 @@
2915
2915
  {
2916
2916
  "name": "--ui-surface-highlight",
2917
2917
  "fallbacks": [
2918
- "none",
2919
- "linear-gradient(transparent, transparent)"
2918
+ "none"
2920
2919
  ]
2921
2920
  },
2922
2921
  {
@@ -5262,6 +5261,12 @@
5262
5261
  {
5263
5262
  "name": "--ui-accent-solid"
5264
5263
  },
5264
+ {
5265
+ "name": "--ui-badge-min-block-size",
5266
+ "fallbacks": [
5267
+ "1.5rem"
5268
+ ]
5269
+ },
5265
5270
  {
5266
5271
  "name": "--ui-border-default"
5267
5272
  },
@@ -5632,6 +5637,13 @@
5632
5637
  "type": "boolean",
5633
5638
  "default": false
5634
5639
  },
5640
+ {
5641
+ "name": "max-rows",
5642
+ "property": "maxRows",
5643
+ "description": "Visible rows of selected items and typing space in multiple mode. More than one lets the field grow and wrap before extra rows scroll vertically inside it. One or less keeps the single horizontally scrolling row; single-selection fields are unchanged.",
5644
+ "type": "integer",
5645
+ "default": 1
5646
+ },
5635
5647
  {
5636
5648
  "name": "multiple",
5637
5649
  "property": "multiple",
@@ -5881,6 +5893,12 @@
5881
5893
  "type": "boolean",
5882
5894
  "default": false
5883
5895
  },
5896
+ {
5897
+ "name": "maxRows",
5898
+ "description": "Visible rows of selected items and typing space in multiple mode. More than one lets the field grow and wrap before extra rows scroll vertically inside it. One or less keeps the single horizontally scrolling row; single-selection fields are unchanged.",
5899
+ "type": "number",
5900
+ "default": 1
5901
+ },
5884
5902
  {
5885
5903
  "name": "multiple",
5886
5904
  "description": "Lets the user choose several options. Each choice becomes a removable badge before the input, the list stays open between picks, and choosing a checked option removes it. items-change then reports the whole list of items, and selected-values-change the list of their values; use selectedValues or items, not value, in this mode.",
@@ -6836,6 +6854,16 @@
6836
6854
  "resizable": false,
6837
6855
  "bindings": "",
6838
6856
  "frameworks": {}
6857
+ },
6858
+ {
6859
+ "id": "@threadlabs/looma/ui-combobox/08-multiple-rows",
6860
+ "name": "08-multiple-rows",
6861
+ "title": "Wrap selected items before scrolling",
6862
+ "description": "maxRows lets a multiple field grow through three rows before additional selections scroll vertically inside the field. The input remains reachable by keyboard.",
6863
+ "markup": "<ui-container fill>\n <ui-combobox label=\"Topics\" multiple max-rows=\"3\" disclosure placeholder=\"Add a topic…\">\n <option value=\"research\" selected>Research and discovery</option>\n <option value=\"design\" selected>Interface design</option>\n <option value=\"content\" selected>Content strategy</option>\n <option value=\"accessibility\" selected>Accessibility review</option>\n <option value=\"delivery\">Delivery</option>\n </ui-combobox>\n</ui-container>",
6864
+ "resizable": false,
6865
+ "bindings": "",
6866
+ "frameworks": {}
6839
6867
  }
6840
6868
  ]
6841
6869
  },
@@ -10478,13 +10506,6 @@
10478
10506
  {
10479
10507
  "name": "--ui-surface-default"
10480
10508
  },
10481
- {
10482
- "name": "--ui-surface-highlight",
10483
- "fallbacks": [
10484
- "none",
10485
- "linear-gradient(transparent, transparent)"
10486
- ]
10487
- },
10488
10509
  {
10489
10510
  "name": "--ui-text"
10490
10511
  },
@@ -22488,9 +22509,18 @@
22488
22509
  {
22489
22510
  "name": "--ui-border-width"
22490
22511
  },
22512
+ {
22513
+ "name": "--ui-motion-ease"
22514
+ },
22515
+ {
22516
+ "name": "--ui-motion-fast"
22517
+ },
22491
22518
  {
22492
22519
  "name": "--ui-space-1"
22493
22520
  },
22521
+ {
22522
+ "name": "--ui-space-2"
22523
+ },
22494
22524
  {
22495
22525
  "name": "--ui-space-3"
22496
22526
  },
@@ -22502,8 +22532,23 @@
22502
22532
  }
22503
22533
  ]
22504
22534
  },
22505
- "attributes": [],
22506
- "properties": [],
22535
+ "attributes": [
22536
+ {
22537
+ "name": "title-for",
22538
+ "property": "titleFor",
22539
+ "description": "The ID of the page heading represented by the default title slot. While that heading is visible below the sticky bar, its duplicate title is concealed. After the heading scrolls above the bar, the single-line title slides up and fades in. Leading and action slots stay available, and the bar keeps its size. Omit it for an always-visible title. Reduced motion removes the transition.",
22540
+ "type": "string",
22541
+ "default": ""
22542
+ }
22543
+ ],
22544
+ "properties": [
22545
+ {
22546
+ "name": "titleFor",
22547
+ "description": "The ID of the page heading represented by the default title slot. While that heading is visible below the sticky bar, its duplicate title is concealed. After the heading scrolls above the bar, the single-line title slides up and fades in. Leading and action slots stay available, and the bar keeps its size. Omit it for an always-visible title. Reduced motion removes the transition.",
22548
+ "type": "string",
22549
+ "default": ""
22550
+ }
22551
+ ],
22507
22552
  "events": [],
22508
22553
  "slots": [
22509
22554
  {
@@ -22552,6 +22597,16 @@
22552
22597
  "resizable": false,
22553
22598
  "bindings": "",
22554
22599
  "frameworks": {}
22600
+ },
22601
+ {
22602
+ "id": "@threadlabs/looma/ui-top-bar/02-scroll-title",
22603
+ "name": "02-scroll-title",
22604
+ "title": "Reveal the title after its heading",
22605
+ "description": "Scroll the document past its heading. The sticky title slides up and fades in once the heading leaves the visible reading area, and disappears when the heading returns. Reduced motion removes that transition.",
22606
+ "markup": "<ui-stack height=\"256\" gap=\"none\">\n <ui-scroll-area fill>\n <ui-top-bar title-for=\"top-bar-example-heading\">\n <ui-button slot=\"leading\" size=\"sm\">Back</ui-button>\n A document with a long descriptive title\n <ui-button slot=\"actions\" size=\"sm\">Save</ui-button>\n </ui-top-bar>\n <ui-container fill>\n <ui-stack gap=\"m\">\n <ui-text as=\"h2\" variant=\"heading\" id=\"top-bar-example-heading\">A document with a long descriptive title</ui-text>\n <ui-text>The heading labels the document while it is visible. Navigation and actions stay available.</ui-text>\n <ui-text>Scroll to keep reading the document and its supporting notes.</ui-text>\n <ui-text>The toolbar keeps the same height as the heading leaves the reading area.</ui-text>\n <ui-text>Return to the beginning to show the full heading again.</ui-text>\n <ui-text>The duplicate toolbar title is concealed while the heading is visible.</ui-text>\n </ui-stack>\n </ui-container>\n </ui-scroll-area>\n</ui-stack>",
22607
+ "resizable": false,
22608
+ "bindings": "",
22609
+ "frameworks": {}
22555
22610
  }
22556
22611
  ]
22557
22612
  },
@@ -77,9 +77,9 @@ export function customizerResource(site, input = defaultRecipe()) {
77
77
  const materialSurfaces = `<ui-grid columns="2" min="sm"><ui-card variant="elevated" data-material-standard><ui-stack gap="s"><ui-text weight="medium" size="md">Everyday surface</ui-text><ui-text variant="caption">A restrained lift for ordinary content.</ui-text><ui-button variant="outline" tone="neutral">Read memo</ui-button></ui-stack></ui-card><ui-card variant="elevated" treatment="expressive" data-material-expressive><ui-stack gap="s"><ui-text weight="medium" size="md">Expressive surface</ui-text><ui-text variant="caption">Finish, edge light, glow and the decorative rim.</ui-text><ui-button variant="solid" tone="accent">Join briefing</ui-button></ui-stack></ui-card></ui-grid><ui-cluster><ui-button id="material-popover-trigger" variant="outline" tone="accent">Open popover</ui-button><ui-popover for="material-popover-trigger"><ui-stack gap="s"><ui-text size="md">Floating material</ui-text><ui-text variant="caption">Adjust glass, separation and translucency with this open.</ui-text></ui-stack></ui-popover><ui-button id="material-dialog-trigger" variant="outline" tone="neutral">Open dialog</ui-button><ui-dialog id="material-preview-dialog" for="material-dialog-trigger" label="Surface and light"><ui-text size="md">Compare the backdrop, content plane and frame as the material changes.</ui-text><ui-button slot="actions" variant="solid" commandfor="material-preview-dialog" command="close">Done</ui-button></ui-dialog></ui-cluster>`;
78
78
  const materialSample = `<ui-card treatment="expressive"><ui-stack gap="m"><ui-text variant="heading" as="h3">Fellowship briefing</ui-text><ui-text>Content stays readable while the rim reveals the scene.</ui-text><ui-input label="Office search" placeholder="Search the Fellowship office"></ui-input><ui-action-bar><ui-button slot="secondary" preset="standard">Keep draft</ui-button><ui-button slot="primary" preset="primary">Send briefing</ui-button></ui-action-bar></ui-stack></ui-card>`;
79
79
  const lightEditor = `<ui-light-editor data-light-editor x="${recipe.values['light-x']}" y="${recipe.values['light-y']}" label="Theme light position"><ui-stack gap="s"><ui-text variant="heading">Move the light</ui-text><ui-button preset="primary">Material response</ui-button></ui-stack></ui-light-editor>`;
80
- const materialView = editor('material', `<ui-stack>${materialSample}${materialSurfaces}</ui-stack>`, `<div class="settings-section"><ui-cluster align="end">${renderPreset('material', 'refinement')}<ui-button size="sm" data-action="restore-material" aria-label="Reset material">Reset</ui-button></ui-cluster></div>${fieldsFor(['finish','translucency','glassiness'])}<div class="settings-section"><ui-cluster gap="xs"><ui-text weight="medium">Lighting</ui-text><ui-icon-button id="help-lighting" size="sm" label="About lighting"><ui-icon name="help"></ui-icon></ui-icon-button><ui-tooltip for="help-lighting" trigger="click"><span data-material-dependencies></span></ui-tooltip></ui-cluster></div><ui-stack gap="s" data-glass-hint hidden><ui-text variant="caption">No transmission to blur.</ui-text><ui-button size="sm" data-action="use-glass">Use frosted glass</ui-button></ui-stack><div class="settings-section">${lightEditor}<div class="settings-grid">${fieldsFor(['light-color','light-spread','light-strength','edge-light','glow','outer-depth','inner-depth','surface-separation'])}</div></div><div class="settings-section"><ui-disclosure summary="Try floating surfaces"><ui-stack>${documentationCard('ui-card','/04-expressive-surface')}${documentationCard('ui-tooltip')}${documentationCard('ui-popover')}${documentationCard('ui-dialog')}</ui-stack></ui-disclosure></div>`);
80
+ const materialView = editor('material', `<ui-stack>${materialSample}${materialSurfaces}</ui-stack>`, `<div class="settings-section">${renderPreset('material', 'refinement')}</div>${fieldsFor(['finish','translucency','glassiness'])}<div class="settings-section"><ui-cluster gap="xs"><ui-text weight="medium">Lighting</ui-text><ui-icon-button id="help-lighting" size="sm" label="About lighting"><ui-icon name="help"></ui-icon></ui-icon-button><ui-tooltip for="help-lighting" trigger="click"><span data-material-dependencies></span></ui-tooltip></ui-cluster></div><ui-stack gap="s" data-glass-hint hidden><ui-text variant="caption">No transmission to blur.</ui-text><ui-button size="sm" data-action="use-glass">Use frosted glass</ui-button></ui-stack><div class="settings-section">${lightEditor}<div class="settings-grid">${fieldsFor(['light-color','light-spread','light-strength','edge-light','glow','outer-depth','inner-depth','surface-separation'])}</div></div><div class="settings-section"><ui-disclosure summary="Try floating surfaces"><ui-stack>${documentationCard('ui-card','/04-expressive-surface')}${documentationCard('ui-tooltip')}${documentationCard('ui-popover')}${documentationCard('ui-dialog')}</ui-stack></ui-disclosure></div>`);
81
81
  const statusControls = ['success','danger','warning','info'].map(role => fieldsFor([role + '-source'])).join('');
82
- const paletteView = refinement('palette', `<div class="refinement-layout"><div class="controls-panel"><ui-card padding="sm"><ui-stack gap="s"><ui-cluster align="end">${renderPreset('palette', 'refinement')}<ui-button size="sm" data-action="restore-palette" aria-label="Reset palette">Reset</ui-button></ui-cluster><ui-cluster gap="xs"><ui-text weight="medium">Base colors</ui-text>${help('base-colors','base colors',['action','canvas','surface','text'].map(id => { const f=themeFields.find(field=>field.id===id); return f.label+': '+f.description; }).join(' '),true)}</ui-cluster><div class="color-row" data-base-colors>${fieldsFor(['action','canvas','surface','text'])}</div><ui-cluster gap="xs"><ui-text weight="medium">Supporting accents</ui-text>${help('supporting-colors','supporting accents','Optional second and third accents. Choose None inside a picker to leave it unset. Components use these only when that accent is chosen.',true)}</ui-cluster><div class="color-row" data-supporting-colors>${fieldsFor(['secondary-action','tertiary-action'])}</div><ui-text weight="medium">Use colors for</ui-text><div class="settings-grid">${fieldsFor(['selection-accent','focus-accent','link-accent'])}</div><ui-text weight="medium">Neutrals & borders</ui-text><div class="settings-grid">${fieldsFor(['neutral-source','neutral-strength','neutral-border-contrast'])}</div><ui-text weight="medium">Status colors</ui-text><ui-cluster>${renderPreset('status', 'refinement')}<ui-button size="sm" data-action="restore-status" aria-label="Reset status colors">Reset</ui-button></ui-cluster><div class="settings-grid">${statusControls}${fieldsFor(['status-chroma'])}</div><ui-disclosure summary="Color character"><div class="settings-grid">${fieldsFor(['warmth','color-intensity'])}</div>${paletteRelationships}</ui-disclosure></ui-stack></ui-card></div><div class="palette-preview"><ui-stack>${paletteDetails}</ui-stack></div></div>`);
82
+ const paletteView = refinement('palette', `<div class="refinement-layout"><div class="controls-panel"><ui-card padding="sm"><ui-stack gap="s">${renderPreset('palette', 'refinement')}<ui-cluster gap="xs"><ui-text weight="medium">Base colors</ui-text>${help('base-colors','base colors',['action','canvas','surface','text'].map(id => { const f=themeFields.find(field=>field.id===id); return f.label+': '+f.description; }).join(' '),true)}</ui-cluster><div class="color-row" data-base-colors>${fieldsFor(['action','canvas','surface','text'])}</div><ui-cluster gap="xs"><ui-text weight="medium">Supporting accents</ui-text>${help('supporting-colors','supporting accents','Optional second and third accents. Choose None inside a picker to leave it unset. Components use these only when that accent is chosen.',true)}</ui-cluster><div class="color-row" data-supporting-colors>${fieldsFor(['secondary-action','tertiary-action'])}</div><ui-text weight="medium">Use colors for</ui-text><div class="settings-grid">${fieldsFor(['selection-accent','focus-accent','link-accent'])}</div><ui-text weight="medium">Neutrals & borders</ui-text><div class="settings-grid">${fieldsFor(['neutral-source','neutral-strength','neutral-border-contrast'])}</div><ui-text weight="medium">Status colors</ui-text>${renderPreset('status', 'refinement')}<div class="settings-grid">${statusControls}${fieldsFor(['status-chroma'])}</div><ui-disclosure summary="Color character"><div class="settings-grid">${fieldsFor(['warmth','color-intensity'])}</div>${paletteRelationships}</ui-disclosure></ui-stack></ui-card></div><div class="palette-preview"><ui-stack>${paletteDetails}</ui-stack></div></div>`);
83
83
  const options = site.catalog.groups.map(group => `<optgroup label="${escape(group.label)}">${examples.filter(example => example.category === group.id).map(example => `<option value="${escape(example.id)}" data-description="${escape(example.category + ' · ' + example.tag)}" data-example="${escape(JSON.stringify(example))}" data-search="${escape(`${example.title} ${example.tag} ${example.description} ${example.exampleTitle}`.toLocaleLowerCase())}">${escape(example.title)} · ${escape(example.exampleTitle)}</option>`).join('')}</optgroup>`).join('');
84
84
  const links = ['ui-menu','ui-menu-item','ui-tooltip','ui-icon-button','ui-action-bar','ui-stack','ui-grid','ui-cluster','ui-form-field','ui-input','ui-select','ui-color-picker','ui-button','ui-disclosure','ui-textarea','ui-number-input','ui-slider','ui-curve-editor','ui-card','ui-text','ui-light-editor','ui-combobox','ui-checkbox','ui-badge','ui-icon','ui-callout','ui-popover','ui-dialog','ui-list','ui-list-item'].map(tag => `<link rel="component" href="@threadlabs/looma/components/${tag}/${tag}.html">`).join('\n');
85
85
  return `${links}\n${exampleResources(site.catalog.components.flatMap(component => component.examples), site.catalog)}\n<link rel="component" href="./card.html">\n<link rel="component" href="./preview-choice.html">\n<template component="looma-customizer" module="./customizer.js"><defs>
@@ -135,7 +135,7 @@ export function customizerResource(site, input = defaultRecipe()) {
135
135
  .examples { min-inline-size: 0; }
136
136
  .refinement-layout { display: grid !important; grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr); gap: var(--ui-space-6) !important; align-items: start !important; }
137
137
  [data-refinement-view] { scroll-margin-block-start: calc(var(--_editor-chrome-height, 4.25rem) + var(--_customizer-summary-height, 8rem) + var(--ui-space-2)); }
138
- .palette-preview, .editor-preview { position: sticky; inset-block-start: calc(var(--_editor-chrome-height, 4.25rem) + var(--_customizer-summary-height, 8rem) + var(--ui-space-2)); max-block-size: calc(100dvh - var(--_editor-chrome-height, 4.25rem) - var(--ui-space-4)); overflow: auto; padding: max(var(--ui-space-2), calc(var(--ui-focus-width) * 2)) !important; }
138
+ .palette-preview, .editor-preview { position: sticky; inset-block-start: calc(var(--_editor-chrome-height, 4.25rem) + var(--_customizer-summary-height, 8rem) + var(--ui-space-2)); max-block-size: calc(100dvh - var(--_editor-chrome-height, 4.25rem) - var(--ui-space-4)); overflow: auto; }
139
139
  .spacing-samples { display: flex !important; align-items: center !important; gap: 0 !important; padding-block: var(--ui-space-3) !important; }
140
140
  .spacing-samples > span { display: block !important; block-size: var(--ui-space-1); inline-size: var(--ui-space-1); border-radius: 50%; background: var(--ui-accent); }
141
141
  .spacing-samples > span:nth-child(2) { margin-inline-start: var(--ui-space-2) !important; }
@@ -138,7 +138,6 @@ export function connect(host) {
138
138
  const muted = Boolean(origin && Object.keys(Object.values(presets)[0].values).every(key => origin.values[key] === recipe.values[key]));
139
139
  componentRegistry.update(select, { muted });
140
140
  }
141
- componentRegistry.update(root.querySelector(`[data-action="restore-${family}"]`), { disabled: state.id === 'custom' || !state.customized });
142
141
  }
143
142
  for (const control of root.querySelectorAll('[data-font-picker]')) {
144
143
  control.querySelector('option[value=custom]').textContent = recipe.values[control.dataset.fontPicker].split(',')[0].replaceAll('"', '').trim();
@@ -305,11 +304,6 @@ export function connect(host) {
305
304
  }
306
305
  case 'back': navigate(''); break;
307
306
  case 'use-glass': show(applyRefinement(recipe, 'material', 'glass')); sayApplied('Frosted glass applied. Your colors and type are unchanged.'); break;
308
- case 'restore-material': case 'restore-palette': case 'restore-status': {
309
- const family = button.dataset.action.slice(8), state = refinementState(recipe, family);
310
- if (state.id !== 'custom') { show(applyRefinement(recipe, family, state.id)); sayApplied(`${{ material: 'Material', palette: 'Palette', status: 'Status color' }[family]} preset restored; other theme decisions are unchanged.`); }
311
- break;
312
- }
313
307
  case 'add': {
314
308
  const option = [...root.querySelectorAll('[data-add-example] option')].find(option => option.value === selectedExample);
315
309
  if (!option) break;
@@ -396,7 +390,7 @@ export function connect(host) {
396
390
  const synchronize = () => { if (!pending && theme && JSON.stringify(recipe) !== JSON.stringify(theme.recipe)) show(theme.recipe, false); };
397
391
  const cancel = event => { if (event.target.matches('[data-light-editor], [data-editor-kind="curve"]')) { flush(false); say('Drag cancelled; the previous value is restored.'); } };
398
392
  const keyboard = event => {
399
- if (!(event.ctrlKey || event.metaKey) || event.key.toLowerCase() !== 'z' || event.target.closest?.('input,textarea,select,[contenteditable="true"]')) return;
393
+ if (!(event.ctrlKey || event.metaKey) || event.key.toLowerCase() !== 'z' || event.target.closest?.('input,textarea,[contenteditable="true"]')) return;
400
394
  event.preventDefault(); flush(); theme?.[event.shiftKey ? 'redo' : 'undo'](); show(theme?.recipe ?? recipe, false);
401
395
  };
402
396
  const remove = event => {
package/docs/theme.mjs CHANGED
@@ -266,8 +266,8 @@ const alphaSurface = (fill, background, alpha) => {
266
266
  };
267
267
  const luminanceContrast = (a, b) => (Math.max(a, b) + .05) / (Math.min(a, b) + .05);
268
268
  const contrast = (a, b) => luminanceContrast(luminance(a), luminance(b));
269
- // Bound both material stops for opaque ink. The shade scales each sRGB channel
270
- // down, so the darkest mixtures lie on its segment with the reflected light.
269
+ // Bound opaque ink against the complete sRGB gradient. Different chromatic
270
+ // stops can mix darker than either endpoint, so inspect the interior as well.
271
271
  function materialLuminances(start, end) {
272
272
  const a = rgb(start), b = rgb(end);
273
273
  const at = t => channelLuminance(a.map((n, i) => n + (b[i] - n) * t));
@@ -282,16 +282,37 @@ function materialContrast(start, end, ink) {
282
282
  const [minimum, maximum] = materialLuminances(start, end);
283
283
  return ink < minimum ? luminanceContrast(minimum, ink) : ink > maximum ? luminanceContrast(maximum, ink) : 1;
284
284
  }
285
- function materialColours(fill, text, light, minimum = 4.55) {
285
+ // Darker colored paint needs more saturation to avoid a muddy shadow. Keep
286
+ // chroma before moving hue; a bounded hue adjustment recovers colorfulness when
287
+ // the requested shade otherwise loses it at the sRGB gamut boundary.
288
+ function chromaticRecession([l, c, h], lightness) {
289
+ const depth = Math.max(0, l - lightness);
290
+ if (c < .01) return fromLch([lightness, c * lightness / (l || 1), h]);
291
+ const target = c * (1 + depth * .5), minimum = c * (1 + depth * .25) - .002;
292
+ let best = fromLch([lightness, target, h]), bestChroma = toLch(best)[1];
293
+ for (let offset = 1; offset <= 12 && bestChroma < minimum; offset++) {
294
+ for (const direction of [-1, 1]) {
295
+ const candidate = fromLch([lightness, target, h + offset * direction]), chroma = toLch(candidate)[1];
296
+ if (chroma > bestChroma + .0005) { best = candidate; bestChroma = chroma; }
297
+ }
298
+ }
299
+ return best;
300
+ }
301
+
302
+ function materialColours(fill, text, light, minimum = 4.55, minimumRange = 0) {
286
303
  const labels = (Array.isArray(text) ? text : [text]).map(label => typeof label === 'number' ? label : luminance(label));
287
304
  const [l, c, h] = toLch(fill), [lightness] = toLch(light);
288
- // Recede perceptually while retaining relative saturation and hue. Scaling
289
- // L and C together scales linear RGB, keeping every shade channel <= fill.
305
+ // Content surfaces retain restrained lighting. Filled pigment gains chroma
306
+ // as it recedes, so a darker gold reads as colored material rather than brown.
290
307
  const response = 1 - .75 * l;
291
308
  let depth = .05 * response;
292
- const shaded = amount => amount === 0 ? fill : fromLch([Math.max(0, l - amount), c * Math.max(0, l - amount) / (l || 1), h]);
309
+ const shaded = amount => {
310
+ if (amount === 0) return fill;
311
+ const lightness = Math.max(0, l - amount);
312
+ return minimumRange ? chromaticRecession([l, c, h], lightness) : fromLch([lightness, c * lightness / (l || 1), h]);
313
+ };
293
314
  while (depth > 0 && labels.some(label => luminanceContrast(luminance(shaded(depth)), label) < minimum)) depth = Math.max(0, depth - .001);
294
- const shade = shaded(depth);
315
+ let shade = shaded(depth);
295
316
  // Lift chroma with lightness, plus a small pigment-dependent saturation boost,
296
317
  // so the broad reflection stays colored instead of becoming a white wash.
297
318
  const [, tintChroma, tintHue] = toLch(mix(light, fill, .18));
@@ -309,6 +330,15 @@ function materialColours(fill, text, light, minimum = 4.55) {
309
330
  };
310
331
  while (amount > 0 && !readableReflection(amount)) amount = Math.max(0, amount - .005);
311
332
  const reflection = mix(target, fill, amount);
333
+ // Bright saturated pigments have little reflection headroom in sRGB. Keep
334
+ // their material visible through a deeper chromatic shade rather than a
335
+ // white wash, bounded by the label's contrast across the complete gradient.
336
+ while (depth + .002 <= .16 && colourDistance(reflection, shade) < minimumRange * lightness) {
337
+ const candidate = shaded(depth + .002);
338
+ if (labels.some(label => materialContrast(reflection, candidate, label) < minimum)) break;
339
+ depth += .002;
340
+ shade = candidate;
341
+ }
312
342
  // A tiny specular peak is allowed to brighten separately from the chromatic
313
343
  // body reflection. Keep the same quantization margin as every material stop.
314
344
  let glare = .55 * lightness;
@@ -344,11 +374,12 @@ const actionBoundary = (fill, surfaces, ink, amplitude) => {
344
374
 
345
375
  // Adjust semantic ink in lightness before sacrificing its hue or chroma. Mixing
346
376
  // amber toward black also removes its color, making a readable warning look brown.
347
- function readableTone(seed, surfaces, minimum, endpoint) {
377
+ function readableTone(seed, surfaces, minimum, endpoint, chromatic = false) {
348
378
  const [l, c, h] = toLch(seed), end = toLch(endpoint)[0];
349
379
  const backgrounds = surfaces.map(surface => typeof surface === 'number' ? surface : luminance(surface));
350
380
  for (let step = 0; step <= 256; step++) {
351
- const next = fromLch([l + (end - l) * step / 256, c, h]);
381
+ const lightness = l + (end - l) * step / 256;
382
+ const next = chromatic && lightness < l ? chromaticRecession([l, c, h], lightness) : fromLch([lightness, c, h]);
352
383
  if (backgrounds.every(background => luminanceContrast(luminance(next), background) >= minimum)) return next;
353
384
  }
354
385
  return endpoint;
@@ -439,7 +470,7 @@ export function deriveTheme(input, { mode } = {}) {
439
470
  tokens[`--ui-${tone}`] = fill;
440
471
  tokens[`--ui-on-${tone}`] = onFill;
441
472
  tokens[`--ui-${tone}-on-strong`] = onFill;
442
- for (const [part, colour] of Object.entries(materialColours(fill, onFill, values['light-color']))) tokens[`--ui-${tone}-${part}`] = colour;
473
+ for (const [part, colour] of Object.entries(materialColours(fill, onFill, values['light-color'], 4.55, .14))) tokens[`--ui-${tone}-${part}`] = colour;
443
474
  const stateTarget = onFill === '#000000' ? '#ffffff' : '#000000';
444
475
  const [fillL, fillC, fillH] = toLch(fill);
445
476
  const hoverStep = .035 + .08 * Math.max(0, 1 - fillL / .5);
@@ -538,7 +569,7 @@ export function deriveTheme(input, { mode } = {}) {
538
569
  for (const [role, fill, labels] of [
539
570
  ['surface', tokens['--ui-surface-raised'], [tokens['--ui-text'], tokens['--ui-text-secondary'], ...Object.keys(tones).map(tone => tokens[`--ui-${tone}-subtle-text`])]],
540
571
  ['neutral', tokens['--ui-neutral-surface'], tokens['--ui-text']],
541
- ]) for (const [part, colour] of Object.entries(materialColours(fill, labels, values['light-color']))) tokens[`--ui-${role}-${part}`] = colour;
572
+ ]) for (const [part, colour] of Object.entries(materialColours(fill, labels, values['light-color'], 4.55, role === 'neutral' ? .14 : 0))) tokens[`--ui-${role}-${part}`] = colour;
542
573
  const neutralShift = toLch(tokens['--ui-neutral-hover'])[0] - toLch(tokens['--ui-neutral-surface'])[0];
543
574
  for (const part of ['reflection', 'shade']) {
544
575
  const [l, c, h] = toLch(tokens[`--ui-neutral-${part}`]);
@@ -556,7 +587,7 @@ export function deriveTheme(input, { mode } = {}) {
556
587
  ...[.08, .12].flatMap(alpha => materialLuminances(alphaSurface(pigment, reflection, alpha * tonalOpacity), alphaSurface(pigment, shade, alpha * tonalOpacity))),
557
588
  ...[.08, .12, .18].map(alpha => alphaSurface(pigment, surface, alpha * tonalOpacity))];
558
589
  });
559
- tokens[`--ui-${tone}-outline-border`] = readableTone(pigment, backgrounds, borderMinimum, ink);
590
+ tokens[`--ui-${tone}-outline-border`] = readableTone(pigment, backgrounds, borderMinimum, ink, true);
560
591
  tokens[`--ui-${tone}-subtle-text`] = readableTone(tokens[`--ui-${tone}-subtle-text`], [...readingSurfaces, ...backgrounds], 4.5, ink);
561
592
  tokens[`--ui-${tone}-soft-border`] = alphaSurface(tokens[`--ui-${tone}-subtle-text`], tokens[`--ui-${tone}-soft`], .25);
562
593
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.47.0",
3
+ "version": "0.47.2",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -212,14 +212,11 @@
212
212
  }
213
213
 
214
214
  :scope:where([data-component~="ui-button"])[data-appearance="outline"]:not([data-tone="neutral"]) {
215
- --_outline-highlight: var(--ui-surface-highlight, linear-gradient(transparent, transparent));
216
215
  --_outline-wash: var(--_tone-wash);
217
216
  border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
218
217
  background-color: var(--ui-button-surface, transparent);
219
218
  box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
220
- background-image:
221
- linear-gradient(var(--_outline-wash), var(--_outline-wash)),
222
- var(--_outline-highlight);
219
+ background-image: linear-gradient(var(--_outline-wash), var(--_outline-wash));
223
220
  }
224
221
 
225
222
  :scope:where([data-component~="ui-button"])[data-appearance="outline"]:not([data-tone="neutral"]):hover:not(:disabled, [aria-disabled="true"]) {
@@ -345,15 +342,14 @@
345
342
  :scope:where([data-component~="ui-button"])[data-tone="neutral"][data-appearance="outline"] {
346
343
  border-color: var(--ui-button-border, var(--ui-control-border));
347
344
  background-color: var(--ui-button-surface, transparent);
345
+ background-image: none;
348
346
  box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
349
347
  }
350
348
  :scope:where([data-component~="ui-button"])[data-tone="neutral"][data-appearance="outline"]:hover:not(:disabled, [aria-disabled="true"]) {
351
349
  border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
352
350
  background-color: var(--ui-button-hover-surface, transparent);
353
351
  --_outline-wash: var(--ui-neutral-wash-hover);
354
- background-image:
355
- linear-gradient(var(--_outline-wash), var(--_outline-wash)),
356
- var(--ui-surface-highlight, linear-gradient(transparent, transparent));
352
+ background-image: linear-gradient(var(--_outline-wash), var(--_outline-wash));
357
353
  }
358
354
  :scope:where([data-component~="ui-button"])[data-tone="neutral"][data-appearance="outline"]:active:not(:disabled, [aria-disabled="true"]) {
359
355
  background-image: none;
@@ -283,6 +283,7 @@
283
283
  /* Multiple mode keeps one control height. Chips and the input scroll within the entry,
284
284
  while the clear and disclosure controls remain fixed at the end of the field. */
285
285
  :scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"] .field {
286
+ --_item-row: 1.75rem;
286
287
  align-items: center !important;
287
288
  min-block-size: var(--_ui-combobox-item-min-block-size, var(--_row));
288
289
  padding: var(--ui-space-1) !important;
@@ -300,24 +301,39 @@
300
301
  max-block-size: none;
301
302
  flex: 1 0 var(--_ui-combobox-item-input-min-inline-size, 5rem);
302
303
  width: auto;
303
- min-block-size: 1.75rem;
304
+ min-block-size: var(--_item-row);
304
305
  padding: var(--ui-space-0-5) var(--ui-space-1) !important;
305
306
  }
306
307
  /* Size variants keep their control height as selections are added. */
307
308
  :scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=sm"] .field {
309
+ --_item-row: calc(var(--_row) - 2 * var(--ui-border-width) - 2 * var(--ui-space-0-5));
308
310
  min-block-size: 0;
309
311
  padding: var(--ui-space-0-5) !important;
310
312
  }
311
313
  :scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=sm"] input {
312
- min-block-size: calc(var(--_row) - 2 * var(--ui-border-width) - 2 * var(--ui-space-0-5));
314
+ min-block-size: var(--_item-row);
313
315
  padding: 0 var(--ui-space-1) !important;
314
316
  }
315
317
  /* A large multiple field starts at the large control height, as sm starts at the small one. */
316
318
  :scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=lg"] .field {
319
+ --_item-row: calc(var(--ui-control-size-lg) - 2 * var(--ui-border-width) - 2 * var(--ui-space-1));
317
320
  min-block-size: 0;
318
321
  }
319
322
  :scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=lg"] input {
320
- min-block-size: calc(var(--ui-control-size-lg) - 2 * var(--ui-border-width) - 2 * var(--ui-space-1));
323
+ min-block-size: var(--_item-row);
324
+ }
325
+ /* Grow through the requested rows, then keep the typing row in a bounded field.
326
+ The entry owns its scroll; clear/disclosure actions remain outside it. */
327
+ :scope:where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"] .entry.multiline {
328
+ --_entry-row: max(var(--ui-badge-min-block-size, 1.5rem), var(--_item-row));
329
+ flex-wrap: wrap !important;
330
+ align-content: flex-start !important;
331
+ max-block-size: calc(var(--_max-rows) * var(--_entry-row) + (var(--_max-rows) - 1) * var(--ui-space-1));
332
+ overflow-x: hidden;
333
+ overflow-y: auto;
334
+ }
335
+ .entry.multiline .item {
336
+ min-block-size: var(--_entry-row);
321
337
  }
322
338
  .item {
323
339
  appearance: none;
@@ -361,6 +377,8 @@
361
377
  while the clear and disclosure controls remain fixed at the end of the field. */
362
378
  /* Size variants keep their control height as selections are added. */
363
379
  /* A large multiple field starts at the large control height, as sm starts at the small one. */
380
+ /* Grow through the requested rows, then keep the typing row in a bounded field.
381
+ The entry owns its scroll; clear/disclosure actions remain outside it. */
364
382
 
365
383
  /* A component that sets its display still honours the hidden attribute on its root. */
366
384
  }
@@ -638,6 +656,7 @@
638
656
  /* Multiple mode keeps one control height. Chips and the input scroll within the entry,
639
657
  while the clear and disclosure controls remain fixed at the end of the field. */
640
658
  :where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"] .field:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-combobox"]))) {
659
+ --_item-row: 1.75rem;
641
660
  align-items: center !important;
642
661
  min-block-size: var(--_ui-combobox-item-min-block-size, var(--_row));
643
662
  padding: var(--ui-space-1) !important;
@@ -655,24 +674,39 @@
655
674
  max-block-size: none;
656
675
  flex: 1 0 var(--_ui-combobox-item-input-min-inline-size, 5rem);
657
676
  width: auto;
658
- min-block-size: 1.75rem;
677
+ min-block-size: var(--_item-row);
659
678
  padding: var(--ui-space-0-5) var(--ui-space-1) !important;
660
679
  }
661
680
  /* Size variants keep their control height as selections are added. */
662
681
  :where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=sm"] .field:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-combobox"]))) {
682
+ --_item-row: calc(var(--_row) - 2 * var(--ui-border-width) - 2 * var(--ui-space-0-5));
663
683
  min-block-size: 0;
664
684
  padding: var(--ui-space-0-5) !important;
665
685
  }
666
686
  :where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=sm"] input:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-combobox"]))) {
667
- min-block-size: calc(var(--_row) - 2 * var(--ui-border-width) - 2 * var(--ui-space-0-5));
687
+ min-block-size: var(--_item-row);
668
688
  padding: 0 var(--ui-space-1) !important;
669
689
  }
670
690
  /* A large multiple field starts at the large control height, as sm starts at the small one. */
671
691
  :where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=lg"] .field:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-combobox"]))) {
692
+ --_item-row: calc(var(--ui-control-size-lg) - 2 * var(--ui-border-width) - 2 * var(--ui-space-1));
672
693
  min-block-size: 0;
673
694
  }
674
695
  :where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"]:where([data-component~="ui-combobox"])[data-ui-combobox-state~="size=lg"] input:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-combobox"]))) {
675
- min-block-size: calc(var(--ui-control-size-lg) - 2 * var(--ui-border-width) - 2 * var(--ui-space-1));
696
+ min-block-size: var(--_item-row);
697
+ }
698
+ /* Grow through the requested rows, then keep the typing row in a bounded field.
699
+ The entry owns its scroll; clear/disclosure actions remain outside it. */
700
+ :where([data-component~="ui-combobox"])[data-ui-combobox-state~="multiple"] .entry.multiline:where(:scope, :not([data-component], [data-slotted]:not([data-slotted~="ui-combobox"]))) {
701
+ --_entry-row: max(var(--ui-badge-min-block-size, 1.5rem), var(--_item-row));
702
+ flex-wrap: wrap !important;
703
+ align-content: flex-start !important;
704
+ max-block-size: calc(var(--_max-rows) * var(--_entry-row) + (var(--_max-rows) - 1) * var(--ui-space-1));
705
+ overflow-x: hidden;
706
+ overflow-y: auto;
707
+ }
708
+ .entry.multiline:where(:scope, :scope *) .item {
709
+ min-block-size: var(--_entry-row);
676
710
  }
677
711
  .item:where(:scope, :scope *) {
678
712
  appearance: none;
@@ -369,7 +369,7 @@
369
369
  :scope:where([data-component~="ui-icon-button"])[data-appearance="outline"] {
370
370
  border-color: var(--ui-icon-button-border, var(--_icon-button-border, var(--ui-control-border, var(--ui-border-strong))));
371
371
  background-color: var(--ui-icon-button-outline-surface, var(--_icon-button-outline-surface, var(--ui-surface-default)));
372
- background-image: var(--ui-surface-highlight, none);
372
+ background-image: none;
373
373
  color: var(--ui-icon-button-outline-text, var(--_icon-button-text, var(--ui-text-primary)));
374
374
  box-shadow: var(--ui-neutral-shadow);
375
375
  }
@@ -399,13 +399,10 @@
399
399
  }
400
400
 
401
401
  :scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:not([data-tone="neutral"]) {
402
- --_outline-highlight: var(--ui-surface-highlight, linear-gradient(transparent, transparent));
403
402
  --_outline-wash: var(--_tone-wash);
404
403
  border-color: var(--ui-icon-button-border, var(--_tone-outline-border));
405
404
  background-color: var(--ui-icon-button-outline-surface, transparent);
406
- background-image:
407
- linear-gradient(var(--_outline-wash), var(--_outline-wash)),
408
- var(--_outline-highlight);
405
+ background-image: linear-gradient(var(--_outline-wash), var(--_outline-wash));
409
406
  }
410
407
 
411
408
  :scope:where([data-component~="ui-icon-button"])[data-appearance="outline"]:not([data-tone="neutral"]):hover:enabled:not([aria-disabled="true"]) {
@@ -420,9 +417,7 @@
420
417
  :scope:where([data-component~="ui-icon-button"])[data-tone="neutral"][data-appearance="outline"]:hover:enabled:not([aria-disabled="true"]) {
421
418
  background-color: var(--ui-icon-button-hover-surface, transparent);
422
419
  --_outline-wash: var(--ui-neutral-wash-hover);
423
- background-image:
424
- linear-gradient(var(--_outline-wash), var(--_outline-wash)),
425
- var(--ui-surface-highlight, linear-gradient(transparent, transparent));
420
+ background-image: linear-gradient(var(--_outline-wash), var(--_outline-wash));
426
421
  }
427
422
  :scope:where([data-component~="ui-icon-button"])[data-tone="neutral"][data-appearance="outline"]:active:enabled:not([aria-disabled="true"]) {
428
423
  background-color: var(--ui-icon-button-active-surface, var(--ui-neutral-active));
@@ -41,6 +41,26 @@
41
41
  min-inline-size: 0;
42
42
  flex: 1;
43
43
  }
44
+ .title.scroll-title {
45
+ overflow: hidden;
46
+ white-space: nowrap;
47
+ text-overflow: ellipsis;
48
+ opacity: 1;
49
+ transform: translateY(0);
50
+ transition: opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);
51
+ }
52
+ .title.scroll-title.concealed {
53
+ opacity: 0;
54
+ transform: translateY(var(--ui-space-2));
55
+ pointer-events: none;
56
+ }
57
+ @media (prefers-reduced-motion: reduce) {
58
+ .title.scroll-title,
59
+ .title.scroll-title.concealed {
60
+ transition: none;
61
+ transform: none;
62
+ }
63
+ }
44
64
 
45
65
  /* An unused region takes no space, so it adds no gap. */
46
66
  .leading:empty,
@@ -55,7 +75,10 @@
55
75
  }
56
76
  }
57
77
  @scope ([data-component~="ui-top-bar"]) to ([data-component]) {
58
- /* An unused region takes no space, so it adds no gap. */
78
+ @media (prefers-reduced-motion: reduce) {
79
+ }
80
+
81
+ /* An unused region takes no space, so it adds no gap. */
59
82
 
60
83
  /* A component that sets its display still honours the hidden attribute on its root. */
61
84
  }
@@ -35,6 +35,7 @@ export interface UiComboboxProps {
35
35
  label?: string | null;
36
36
  labelVisibility?: "visible" | "sr-only" | null;
37
37
  loading?: boolean | null;
38
+ maxRows?: number | null;
38
39
  multiple?: boolean | null;
39
40
  muted?: boolean | null;
40
41
  name?: string | null;