@kerfjs/ui 5.0.0-beta.53 → 5.0.0-beta.55

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 (152) hide show
  1. package/README.md +4 -2
  2. package/ai/application-ui-diagnostic-ids-v1.json +1 -0
  3. package/ai/component-catalog-v2.json +138 -5
  4. package/ai/component-catalog-v2.schema.json +2 -1
  5. package/ai/component-catalog.json +208 -16
  6. package/ai/public-api-signatures-v1.md +462 -39
  7. package/ai/skill.md +28 -20
  8. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  9. package/analyzer/index.mjs +48 -0
  10. package/analyzer/loud-pairs.d.mts +49 -0
  11. package/analyzer/loud-pairs.mjs +357 -0
  12. package/dist/app-tab.d.ts +7 -5
  13. package/dist/app-tab.js +1 -1
  14. package/dist/browser/popup-menu.js +3 -0
  15. package/dist/catalog-resources.d.ts +1 -1
  16. package/dist/catalog.d.ts +10 -4
  17. package/dist/catalog.js +243 -300
  18. package/dist/catalog.js.map +1 -1
  19. package/dist/{chunk-7IUSV4XG.js → chunk-24PHKUR3.js} +2 -2
  20. package/dist/chunk-24PHKUR3.js.map +1 -0
  21. package/dist/{chunk-EKYZCRCX.js → chunk-3CGQ7ZNO.js} +54 -22
  22. package/dist/chunk-3CGQ7ZNO.js.map +1 -0
  23. package/dist/{chunk-UKKSMZYT.js → chunk-46263QLK.js} +51 -1
  24. package/dist/chunk-46263QLK.js.map +1 -0
  25. package/dist/chunk-4BIMLITI.js +92 -0
  26. package/dist/chunk-4BIMLITI.js.map +1 -0
  27. package/dist/{chunk-NDUGJ4TU.js → chunk-5NDQABWK.js} +1 -1
  28. package/dist/{chunk-NDUGJ4TU.js.map → chunk-5NDQABWK.js.map} +1 -1
  29. package/dist/{chunk-ZK5EGVFP.js → chunk-5OLVUEND.js} +12 -2
  30. package/dist/chunk-5OLVUEND.js.map +1 -0
  31. package/dist/{chunk-CMUIXJZM.js → chunk-BSKEH3UC.js} +2 -2
  32. package/dist/{chunk-CMUIXJZM.js.map → chunk-BSKEH3UC.js.map} +1 -1
  33. package/dist/chunk-EAX2GSS4.js +384 -0
  34. package/dist/chunk-EAX2GSS4.js.map +1 -0
  35. package/dist/chunk-KH6VUGHU.js +399 -0
  36. package/dist/chunk-KH6VUGHU.js.map +1 -0
  37. package/dist/{chunk-BJJKFVWW.js → chunk-LZXQVUGN.js} +2 -2
  38. package/dist/chunk-LZXQVUGN.js.map +1 -0
  39. package/dist/chunk-N7FHFNT6.js +55 -0
  40. package/dist/chunk-N7FHFNT6.js.map +1 -0
  41. package/dist/{chunk-CCMKJWLX.js → chunk-NE5JAOQS.js} +7 -7
  42. package/dist/chunk-NE5JAOQS.js.map +1 -0
  43. package/dist/chunk-PSHUSWQH.js +18 -0
  44. package/dist/chunk-PSHUSWQH.js.map +1 -0
  45. package/dist/{chunk-KPNTVB7A.js → chunk-R754MHXX.js} +3 -3
  46. package/dist/{chunk-KPNTVB7A.js.map → chunk-R754MHXX.js.map} +1 -1
  47. package/dist/{chunk-HJKRCKDR.js → chunk-RNRUVPJ3.js} +4 -2
  48. package/dist/chunk-RNRUVPJ3.js.map +1 -0
  49. package/dist/{chunk-VOCPXGQN.js → chunk-VHADGP3B.js} +9 -8
  50. package/dist/chunk-VHADGP3B.js.map +1 -0
  51. package/dist/chunk-XQV2B4IL.js +14 -0
  52. package/dist/chunk-XQV2B4IL.js.map +1 -0
  53. package/dist/collapsible-panel.d.ts +46 -15
  54. package/dist/collapsible-panel.js +42 -10
  55. package/dist/collapsible-panel.js.map +1 -1
  56. package/dist/floating-toolbar.d.ts +5 -2
  57. package/dist/floating-toolbar.js +1 -1
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.js +20 -18
  60. package/dist/list-header.js +1 -1
  61. package/dist/list-inset-text.d.ts +7 -1
  62. package/dist/list-inset-text.js +2 -1
  63. package/dist/panel-toolbar-BFQxFITu.d.ts +52 -0
  64. package/dist/popup-menu-register.d.ts +9 -0
  65. package/dist/popup-menu-register.js +30 -0
  66. package/dist/popup-menu-register.js.map +1 -0
  67. package/dist/popup-menu.d.ts +71 -0
  68. package/dist/popup-menu.js +3 -0
  69. package/dist/popup-menu.js.map +1 -0
  70. package/dist/resizable-region.d.ts +4 -1
  71. package/dist/resizable-region.js +1 -1
  72. package/dist/split-view.js +1 -1
  73. package/dist/state-banner.js +1 -1
  74. package/dist/styles/catalog/components/catalog-example.css +0 -16
  75. package/dist/styles/catalog/components/catalog-stage.css +8 -13
  76. package/dist/styles/catalog/components/catalog.css +8 -18
  77. package/dist/styles/catalog.css +0 -5
  78. package/dist/styles/collapsible-panel.css +88 -10
  79. package/dist/styles/floating-toolbar.css +11 -6
  80. package/dist/styles/popup-menu.css +12 -0
  81. package/dist/styles/resizable-region.css +81 -13
  82. package/dist/styles/state-banner.css +13 -4
  83. package/dist/styles/styles.css +1 -0
  84. package/dist/styles/tab-bar.css +31 -3
  85. package/dist/styles/toolbar-control-group.css +13 -0
  86. package/dist/styles/toolbar.css +43 -2
  87. package/dist/styles/workbench.css +503 -10
  88. package/dist/text.js +1 -1
  89. package/dist/token-search-field.d.ts +10 -1
  90. package/dist/token-search-field.js +1 -1
  91. package/dist/{types-CEsieBZi.d.ts → types-D6vzj-VT.d.ts} +15 -0
  92. package/dist/wire-catalog.d.ts +13 -1
  93. package/dist/wire-catalog.js +18 -3
  94. package/dist/wire-catalog.js.map +1 -1
  95. package/dist/wire-resizable-regions.d.ts +2 -1
  96. package/dist/wire-resizable-regions.js +2 -1
  97. package/dist/wire-sidebar.js +6 -3
  98. package/dist/wire-sidebar.js.map +1 -1
  99. package/dist/wire-tab-bars.js +1 -1
  100. package/dist/wire-token-search-fields.js +1 -1
  101. package/dist/wire-workbench.d.ts +109 -0
  102. package/dist/wire-workbench.js +6 -0
  103. package/dist/wire-workbench.js.map +1 -0
  104. package/dist/workbench.d.ts +166 -6
  105. package/dist/workbench.js +11 -104
  106. package/dist/workbench.js.map +1 -1
  107. package/docs/accessibility.md +66 -10
  108. package/docs/app-layouts.md +12 -1
  109. package/docs/catalog.md +27 -9
  110. package/docs/collapsible-panel.md +114 -1
  111. package/docs/component-contract.md +2 -2
  112. package/docs/component-selection.md +41 -23
  113. package/docs/design/templates/state-banner/danger-dark.svg +1 -1
  114. package/docs/design/templates/state-banner/danger.svg +1 -1
  115. package/docs/design/templates/state-banner/info-dark.svg +1 -1
  116. package/docs/design/templates/state-banner/info.svg +1 -1
  117. package/docs/design/templates/state-banner/success-dark.svg +1 -1
  118. package/docs/design/templates/state-banner/success.svg +1 -1
  119. package/docs/design/templates/state-banner/warning-dark.svg +1 -1
  120. package/docs/design/templates/state-banner/warning.svg +1 -1
  121. package/docs/design/templates/state-banner-dark.svg +1 -1
  122. package/docs/design/templates/state-banner.svg +1 -1
  123. package/docs/document-baseline.md +4 -0
  124. package/docs/layout.md +10 -1
  125. package/docs/recipes.md +48 -39
  126. package/docs/surface-scaffold.md +1 -1
  127. package/docs/type-contracts.md +2 -1
  128. package/docs/ui-analyzer.md +94 -19
  129. package/docs/ui-doctor.md +6 -0
  130. package/docs/ux-demo.md +7 -3
  131. package/docs/webawesome-theme.md +11 -2
  132. package/docs/workbench.md +388 -8
  133. package/llms.txt +13 -8
  134. package/package.json +17 -2
  135. package/ux-demo/recipes/app-shell.tsx +141 -223
  136. package/ux-demo/recipes/collapsible-sidebar.tsx +48 -78
  137. package/ux-demo/recipes/list-detail-dialog.tsx +150 -54
  138. package/ux-demo/recipes/mount-recipe.ts +0 -5
  139. package/ux-demo/recipes/types.ts +0 -1
  140. package/dist/chunk-7IUSV4XG.js.map +0 -1
  141. package/dist/chunk-BJJKFVWW.js.map +0 -1
  142. package/dist/chunk-CCMKJWLX.js.map +0 -1
  143. package/dist/chunk-EKYZCRCX.js.map +0 -1
  144. package/dist/chunk-HJKRCKDR.js.map +0 -1
  145. package/dist/chunk-UKKSMZYT.js.map +0 -1
  146. package/dist/chunk-VOCPXGQN.js.map +0 -1
  147. package/dist/chunk-ZK5EGVFP.js.map +0 -1
  148. package/dist/styles/catalog/components/catalog-detail.css +0 -35
  149. package/dist/styles/catalog/components/catalog-resource-footer.css +0 -37
  150. package/dist/styles/catalog/components/catalog-secondary-sections.css +0 -38
  151. package/dist/styles/catalog/components/catalog-section-list.css +0 -22
  152. package/dist/styles/catalog/components/catalog-sidebar.css +0 -82
@@ -1,4 +1,4 @@
1
- export { ListHeader } from './chunk-KPNTVB7A.js';
1
+ export { ListHeader } from './chunk-R754MHXX.js';
2
2
 
3
3
 
4
4
 
@@ -2,6 +2,10 @@ import * as kerfjs from 'kerfjs';
2
2
  import { S as Sides } from './divider-sides-BzB6rphT.js';
3
3
  import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
4
4
 
5
+ type ListInsetTextRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
6
+ 'data-component'?: never;
7
+ 'data-sides'?: never;
8
+ }>;
5
9
  interface ListInsetTextProps {
6
10
  /** Text (or inline content) that carries no margin, border, or padding of its own. */
7
11
  children: KerfUiContent | string;
@@ -15,6 +19,8 @@ interface ListInsetTextProps {
15
19
  */
16
20
  horizontalOnly?: boolean;
17
21
  className?: string;
22
+ /** Safe `data-*` metadata; component-owned structural attributes stay protected. */
23
+ rootAttributes?: ListInsetTextRootAttributes;
18
24
  /** Native named-slot assignment when composed inside a web component. */
19
25
  slot?: string;
20
26
  }
@@ -26,6 +32,6 @@ interface ListInsetTextProps {
26
32
  * Pass `horizontalOnly` to keep the horizontal inset but drop the vertical box
27
33
  * space for tight text layout.
28
34
  */
29
- declare function ListInsetText({ children, sides, horizontalOnly, className, slot, }: ListInsetTextProps): kerfjs.SafeHtml;
35
+ declare function ListInsetText({ children, sides, horizontalOnly, className, rootAttributes, slot, }: ListInsetTextProps): kerfjs.SafeHtml;
30
36
 
31
37
  export { ListInsetText, type ListInsetTextProps, Sides };
@@ -1,3 +1,4 @@
1
- export { ListInsetText } from './chunk-ZK5EGVFP.js';
1
+ export { ListInsetText } from './chunk-5OLVUEND.js';
2
+
2
3
 
3
4
  //# sourceMappingURL=list-inset-text.js.map
@@ -0,0 +1,52 @@
1
+ import { LucideIcon } from './lucide-icon.js';
2
+ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
3
+
4
+ /** Which edge a collapsible panel docks to. */
5
+ type PanelSide = 'left' | 'right' | 'bottom';
6
+ /**
7
+ * The standard collapse/expand icon for a panel `side` and `collapsed` state,
8
+ * so every app's sidebars and drawers use one recognizable convention:
9
+ * `PanelLeft*` for a left rail, `PanelRight*` for a right rail, `PanelBottom*`
10
+ * for a bottom drawer — the `Close` glyph while open, the `Open` glyph while
11
+ * collapsed. Exposed so an app can render its own toggle affordance.
12
+ */
13
+ declare function collapsiblePanelToggleIcon(side: PanelSide, collapsed: boolean): {
14
+ icon: Parameters<typeof LucideIcon>[0]['icon'];
15
+ name: string;
16
+ };
17
+ /**
18
+ * The standard collapse toggle a panel toolbar renders. The app handles the
19
+ * button's `data-action` and flips its own `collapsed` flag.
20
+ */
21
+ interface PanelToggle {
22
+ /** The `data-action` the toggle button carries. */
23
+ action: string;
24
+ /** The panel's short name, for the accessible "Show …" / "Hide …" label. */
25
+ name: string;
26
+ }
27
+ /**
28
+ * A collapsible panel's top toolbar, composed so its groups follow the
29
+ * panel's open state.
30
+ *
31
+ * - `title` (a `ToolbarText`) and `panelOnly` groups lead the toolbar and are
32
+ * available only while the panel is open.
33
+ * - `constant` groups stay available either way: they trail the panel's
34
+ * toolbar while it is open and move to the work area's toolbar while it is
35
+ * collapsed.
36
+ * - `toggle` is always the last group: in the panel's toolbar while it is
37
+ * open, and right after the `constant` groups in the work area's toolbar
38
+ * while it is collapsed.
39
+ *
40
+ * `constant` content renders in both places while the panel is collapsed (the
41
+ * panel's copy is inert), so give it no `id`s.
42
+ */
43
+ interface PanelToolbar {
44
+ /** Accessible name of the panel's toolbar. */
45
+ label: string;
46
+ title?: KerfUiContent;
47
+ panelOnly?: KerfUiContent;
48
+ constant?: KerfUiContent;
49
+ toggle?: PanelToggle;
50
+ }
51
+
52
+ export { type PanelSide as P, type PanelToolbar as a, type PanelToggle as b, collapsiblePanelToggleIcon as c };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Marker export for tests and tooling; importing this module registers the
3
+ * Web Awesome elements a `PopupMenu` renders (`wa-dropdown`,
4
+ * `wa-dropdown-item`, `wa-button`, and `wa-divider`) and routes a keyboard
5
+ * choice through the item's click so delegated `data-action`s run.
6
+ */
7
+ declare const popupMenuElementsRegistered = true;
8
+
9
+ export { popupMenuElementsRegistered };
@@ -0,0 +1,30 @@
1
+ import '@awesome.me/webawesome/dist/components/button/button.js';
2
+ import '@awesome.me/webawesome/dist/components/divider/divider.js';
3
+ import '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';
4
+ import WaDropdown from '@awesome.me/webawesome/dist/components/dropdown/dropdown.js';
5
+
6
+ // src/popup-menu-register.ts
7
+
8
+ // src/install-popup-menu-keyboard.ts
9
+ var installed = /* @__PURE__ */ new WeakSet();
10
+ function installPopupMenuKeyboard(prototype) {
11
+ if (installed.has(prototype)) return;
12
+ installed.add(prototype);
13
+ const target = prototype;
14
+ const makeSelection = target.makeSelection;
15
+ target.makeSelection = function(item, event) {
16
+ if (event instanceof KeyboardEvent && this.classList.contains("kui-popup-menu") && !item.disabled) {
17
+ item.click();
18
+ return;
19
+ }
20
+ makeSelection.call(this, item, event);
21
+ };
22
+ }
23
+
24
+ // src/popup-menu-register.ts
25
+ installPopupMenuKeyboard(WaDropdown.prototype);
26
+ var popupMenuElementsRegistered = true;
27
+
28
+ export { popupMenuElementsRegistered };
29
+
30
+ //# sourceMappingURL=popup-menu-register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/install-popup-menu-keyboard.ts","../src/popup-menu-register.ts"],"names":[],"mappings":";;;;;;;;AAOA,IAAM,SAAA,uBAAgB,OAAA,EAAgB;AAW/B,SAAS,yBAAyB,SAAA,EAAyB;AAChE,EAAA,IAAI,SAAA,CAAU,GAAA,CAAI,SAAS,CAAA,EAAG;AAC9B,EAAA,SAAA,CAAU,IAAI,SAAS,CAAA;AACvB,EAAA,MAAM,MAAA,GAAS,SAAA;AACf,EAAA,MAAM,gBAAgB,MAAA,CAAO,aAAA;AAC7B,EAAA,MAAA,CAAO,aAAA,GAAgB,SAAmC,IAAA,EAAM,KAAA,EAAa;AAC3E,IAAA,IACE,KAAA,YAAiB,iBACjB,IAAA,CAAK,SAAA,CAAU,SAAS,gBAAgB,CAAA,IACxC,CAAC,IAAA,CAAK,QAAA,EACN;AACA,MAAA,IAAA,CAAK,KAAA,EAAM;AACX,MAAA;AAAA,IACF;AACA,IAAA,aAAA,CAAc,IAAA,CAAK,IAAA,EAAM,IAAA,EAAM,KAAK,CAAA;AAAA,EACtC,CAAA;AACF;;;AC1BA,wBAAA,CAAyB,WAAW,SAAS,CAAA;AAQtC,IAAM,2BAAA,GAA8B","file":"popup-menu-register.js","sourcesContent":["interface PopupMenuDropdown extends HTMLElement {\n makeSelection(\n item: HTMLElement & { disabled?: boolean },\n event?: Event,\n ): void;\n}\n\nconst installed = new WeakSet<object>();\n\n/**\n * Route a keyboard choice in a `PopupMenu` through the item's click. Web Awesome\n * selects a pointer choice from the item's click event but a keyboard choice\n * (Enter or Space) directly, so delegated `data-action` click handlers would\n * never run for keyboard users. Clicking the item makes Web Awesome select it\n * exactly as it does for a pointer — one `wa-select`, then close and focus\n * return — while the click reaches the application's delegation. Raw\n * `wa-dropdown`s outside `PopupMenu` are unaffected.\n */\nexport function installPopupMenuKeyboard(prototype: object): void {\n if (installed.has(prototype)) return;\n installed.add(prototype);\n const target = prototype as PopupMenuDropdown;\n const makeSelection = target.makeSelection;\n target.makeSelection = function (this: PopupMenuDropdown, item, event): void {\n if (\n event instanceof KeyboardEvent &&\n this.classList.contains('kui-popup-menu') &&\n !item.disabled\n ) {\n item.click();\n return;\n }\n makeSelection.call(this, item, event);\n };\n}\n","import '@awesome.me/webawesome/dist/components/button/button.js';\nimport '@awesome.me/webawesome/dist/components/divider/divider.js';\nimport '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';\n\nimport WaDropdown from '@awesome.me/webawesome/dist/components/dropdown/dropdown.js';\n\nimport { installPopupMenuKeyboard } from './install-popup-menu-keyboard.js';\n\ninstallPopupMenuKeyboard(WaDropdown.prototype);\n\n/**\n * Marker export for tests and tooling; importing this module registers the\n * Web Awesome elements a `PopupMenu` renders (`wa-dropdown`,\n * `wa-dropdown-item`, `wa-button`, and `wa-divider`) and routes a keyboard\n * choice through the item's click so delegated `data-action`s run.\n */\nexport const popupMenuElementsRegistered = true;\n"]}
@@ -0,0 +1,71 @@
1
+ import { SafeHtml } from 'kerfjs';
2
+ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
3
+
4
+ type PopupMenuPlacement = 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end';
5
+ type PopupMenuDataAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
6
+ 'data-action'?: never;
7
+ 'data-component'?: never;
8
+ 'data-key'?: never;
9
+ 'data-morph-skip-children'?: never;
10
+ }>;
11
+ /** One command in the menu. */
12
+ interface PopupMenuItem {
13
+ kind?: 'item';
14
+ label: string;
15
+ /** Delegated `data-action` the app handles when the item is chosen. */
16
+ action?: string;
17
+ /** Native `wa-dropdown-item` value, reported by its `wa-select` event. */
18
+ value?: string;
19
+ /** Leading icon, typically a `LucideIcon`; it is placed in the item's icon slot. */
20
+ icon?: SafeHtml;
21
+ disabled?: boolean;
22
+ /** Application `data-*` metadata such as a record id. */
23
+ attributes?: PopupMenuDataAttributes;
24
+ }
25
+ /** A labeled group heading; items that follow it belong to the group. */
26
+ interface PopupMenuHeading {
27
+ kind: 'heading';
28
+ label: string;
29
+ }
30
+ /** A separator between groups of items. */
31
+ interface PopupMenuDivider {
32
+ kind: 'divider';
33
+ }
34
+ type PopupMenuEntry = PopupMenuItem | PopupMenuHeading | PopupMenuDivider;
35
+ type PopupMenuTriggerName = {
36
+ /** Visible trigger text, which is also its accessible name. */
37
+ text: string;
38
+ label?: never;
39
+ } | {
40
+ text?: never;
41
+ /**
42
+ * Accessible name of an icon-only trigger, rendered as visually hidden
43
+ * slotted text (a Web Awesome button takes its name from its content).
44
+ */
45
+ label: string;
46
+ };
47
+ type PopupMenuProps = PopupMenuTriggerName & {
48
+ /** Trigger icon, typically a `LucideIcon`, before any visible text. */
49
+ icon?: KerfUiContent;
50
+ items: readonly PopupMenuEntry[];
51
+ /** Where the menu opens relative to its trigger. Defaults to `bottom-start`. */
52
+ placement?: PopupMenuPlacement;
53
+ /** Show the disclosure caret after the trigger content. Defaults to true. */
54
+ caret?: boolean;
55
+ disabled?: boolean;
56
+ /** Application `data-*` metadata on the menu root. */
57
+ rootAttributes?: PopupMenuDataAttributes;
58
+ /** Native named-slot assignment when composed inside a web component. */
59
+ slot?: string;
60
+ };
61
+ /**
62
+ * An action menu: a trigger button that opens a list of commands. Renders the
63
+ * `wa-dropdown` root directly, so a `single` `ToolbarControlGroup` (with
64
+ * `nestedDropdown`) or a `PopupSurface` sizes and insets it as usual. Items
65
+ * dispatch through delegated `data-action`s; the app owns the commands and any
66
+ * open-state reaction. Import `@kerfjs/ui/popup-menu/register` once to register
67
+ * the Web Awesome elements.
68
+ */
69
+ declare function PopupMenu({ text, label, icon, items, placement, caret, disabled, rootAttributes, slot, }: PopupMenuProps): SafeHtml;
70
+
71
+ export { PopupMenu, type PopupMenuDivider, type PopupMenuEntry, type PopupMenuHeading, type PopupMenuItem, type PopupMenuPlacement, type PopupMenuProps };
@@ -0,0 +1,3 @@
1
+ export { PopupMenu } from './chunk-4BIMLITI.js';
2
+
3
+ //# sourceMappingURL=popup-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"popup-menu.js"}
@@ -17,6 +17,9 @@ interface ResizableRegionProps {
17
17
  max: number;
18
18
  axis?: ResizableRegionAxis;
19
19
  edge?: ResizableRegionEdge;
20
+ /** Snap the track to zero. The region renders `inert` and `aria-hidden`
21
+ * while collapsed, so neither Tab nor assistive technology reaches it or
22
+ * lands on an empty landmark; `restoreControl` renders outside the region. */
20
23
  collapsed?: boolean;
21
24
  transitioning?: boolean;
22
25
  /** Whether the separator line is painted. The resize hit target remains available. */
@@ -29,7 +32,7 @@ interface ResizableRegionProps {
29
32
  presentation?: ResizableRegionPresentation;
30
33
  /** Always-available control rendered while collapsed, outside the clipped region. */
31
34
  restoreControl?: SafeHtml;
32
- /** Safe-area-aware viewport corner for `restoreControl`. */
35
+ /** Safe-area-aware corner of the region's container (not the viewport) for `restoreControl`. */
33
36
  restorePosition?: ResizableRegionRestorePosition;
34
37
  /** Fill the available inline track and hide the separator below a container breakpoint. */
35
38
  responsiveFillAt?: ResizableRegionResponsiveFillAt;
@@ -1,3 +1,3 @@
1
- export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-VOCPXGQN.js';
1
+ export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-VHADGP3B.js';
2
2
 
3
3
  //# sourceMappingURL=resizable-region.js.map
@@ -1,5 +1,5 @@
1
1
  import { NavStack } from './chunk-DQA5FMOX.js';
2
- import { ResizableRegion } from './chunk-VOCPXGQN.js';
2
+ import { ResizableRegion } from './chunk-VHADGP3B.js';
3
3
 
4
4
 
5
5
 
@@ -1,4 +1,4 @@
1
- export { StateBanner } from './chunk-BJJKFVWW.js';
1
+ export { StateBanner } from './chunk-LZXQVUGN.js';
2
2
 
3
3
 
4
4
 
@@ -8,19 +8,6 @@
8
8
  gap: 0.5rem;
9
9
  }
10
10
 
11
- .kui-catalog-example__note {
12
- margin: 0;
13
- padding-block: var(--kui-layout-item-padding, 0.5rem);
14
- padding-inline: calc(
15
- var(--kui-layout-inline-margin, 0.5rem) +
16
- var(--kui-layout-item-padding, 0.5rem)
17
- );
18
- box-sizing: border-box;
19
- border: 1px solid transparent;
20
- color: var(--kui-color-text-quiet);
21
- font-size: var(--kui-font-xs);
22
- }
23
-
24
11
  .kui-catalog-example__viewport {
25
12
  position: relative;
26
13
  max-width: 100%;
@@ -139,9 +126,6 @@
139
126
 
140
127
  .kui-catalog-example__compact-fallback {
141
128
  display: none;
142
- margin: 0;
143
- color: var(--kui-color-text-quiet);
144
- font-size: var(--kui-font-s);
145
129
  }
146
130
 
147
131
  @media ((max-width: 52rem)) {
@@ -1,13 +1,18 @@
1
+ /* The preview stage fills the work area's scroller — and grows with a taller
2
+ specimen, never shrinking under it — behind a transparency checkerboard,
3
+ so a specimen's own surface (or lack of one) stays visible. */
1
4
  .kui-catalog__stage {
2
- width: 100%;
3
- min-height: 0;
4
5
  flex: 1 0 auto;
6
+ background-color: var(--kui-color-surface-lowered);
7
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%238e8e93' fill-opacity='.12' d='M0 0h12v12H0zM12 12h12v12H12z'/%3E%3C/svg%3E");
8
+ background-size: 1.5rem 1.5rem;
5
9
  }
6
10
 
11
+ /* The centered specimen canvas, at the catalog's reading measure. */
7
12
  .kui-catalog__canvas {
8
13
  position: relative;
9
14
  display: grid;
10
- width: min(100%, var(--kui-catalog-content-measure, 70rem));
15
+ width: min(100%, 70rem);
11
16
  min-width: 0;
12
17
  min-height: 100%;
13
18
  margin-inline: auto;
@@ -48,13 +53,3 @@
48
53
  .kui-catalog__geometry-margin {
49
54
  background: color-mix(in srgb, #f6a94c 55%, transparent);
50
55
  }
51
-
52
- @media (max-width: 52rem) {
53
- .kui-catalog__stage {
54
- min-height: 24rem;
55
- }
56
-
57
- .kui-catalog__canvas {
58
- min-height: 16rem;
59
- }
60
- }
@@ -1,22 +1,12 @@
1
+ /* The catalog fills its container, which must have a definite height (the
2
+ `document.css` baseline's `.kui-app-root`, as for any Workbench). */
1
3
  .kui-catalog {
2
- --kui-catalog-sidebar-width: 18rem;
3
- --kui-catalog-content-measure: 70rem;
4
-
5
- display: grid;
6
- height: 100vh;
7
- grid-template-columns: var(--kui-catalog-sidebar-width) minmax(0, 1fr);
8
- overflow: hidden;
9
- }
10
-
11
- .kui-catalog[data-sidebar-collapsed="true"] {
12
- grid-template-columns: 0 minmax(0, 1fr);
4
+ height: 100%;
13
5
  }
14
6
 
15
- @media (max-width: 52rem) {
16
- .kui-catalog,
17
- .kui-catalog[data-sidebar-collapsed="true"] {
18
- height: auto;
19
- min-height: 100vh;
20
- grid-template-columns: 1fr;
21
- }
7
+ /* The brand mark, sized to sit inside a toolbar group. */
8
+ .kui-catalog__mark {
9
+ display: block;
10
+ width: 2.125rem;
11
+ height: 2.125rem;
22
12
  }
@@ -1,10 +1,5 @@
1
1
  /* Public compatibility entrypoint. Each catalog component owns its styles. */
2
2
  @import "./catalog/components/catalog.css";
3
- @import "./catalog/components/catalog-sidebar.css";
4
- @import "./catalog/components/catalog-section-list.css";
5
- @import "./catalog/components/catalog-secondary-sections.css";
6
- @import "./catalog/components/catalog-detail.css";
7
3
  @import "./catalog/components/catalog-stage.css";
8
- @import "./catalog/components/catalog-resource-footer.css";
9
4
  @import "./catalog/components/catalog-example.css";
10
5
  @import "./catalog/components/catalog-example-stack.css";
@@ -25,6 +25,12 @@
25
25
  --kui-edge-inset-inline-end,
26
26
  var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
27
27
  );
28
+ /* The content keeps its fixed expanded size (collapsing slides it rather
29
+ than squeezing it), so a flex parent must never shrink the track below
30
+ that size: a shrunk track only clips the content's trailing edge (a
31
+ rail's row badges, a drawer's last row). The panel holds its size and
32
+ the sibling work area gives way. */
33
+ flex-shrink: 0;
28
34
  overflow: hidden;
29
35
  background: var(--kui-color-surface);
30
36
  }
@@ -265,37 +271,109 @@
265
271
  display: none;
266
272
  }
267
273
 
274
+ /* A collapsed panel's restore control floats in a corner of the panel's own
275
+ container, never of the viewport, so a panel embedded in a page cannot float
276
+ it over page content outside that container. The container becomes the
277
+ corner's containing block and isolates its stacking only while a restore
278
+ control is shown, at zero specificity so an app's own positioning of that
279
+ container wins. The corner is inset from the container's edges plus the
280
+ unsafe area of each edge it reaches. The control belongs to the layer
281
+ beneath open overlays, two below the overlay z-index and so below the
282
+ compact overlay's backdrop: an open overlay covers it as it covers the rest
283
+ of the page, the Workbench rule. A collapsed overlay passes pointer events
284
+ through, so the control is usable again as soon as the overlay closes. */
285
+ :where(:has(> .kui-collapsible-panel__restore)) {
286
+ position: relative;
287
+ isolation: isolate;
288
+ anchor-scope: --kui-restore-drawer;
289
+ }
290
+
291
+ /* An expanded bottom drawer beside the collapsed panel — a direct child of
292
+ that container or of one of its direct children (the app's work-area
293
+ column) — owns the container's bottom, so the corner floats above the
294
+ drawer's top edge instead of over it. The drawer publishes that edge as an
295
+ anchor; a drawer nested deeper, inside the work area's own content, belongs
296
+ to another layout and is scoped out. Without anchor positioning the corner
297
+ keeps the container's bottom edge. */
298
+ .kui-collapsible-panel--bottom[data-presentation="inline"]:not(
299
+ [data-collapsed="true"],
300
+ [data-collapsible-overlay="true"] *,
301
+ [data-collapsible-responsive="hidden"] *
302
+ ) {
303
+ anchor-name: --kui-restore-drawer;
304
+ }
305
+
306
+ :where(:has(> .kui-collapsible-panel__restore)) > * > * > * {
307
+ anchor-scope: --kui-restore-drawer;
308
+ }
309
+
268
310
  .kui-collapsible-panel__restore {
269
- position: fixed;
270
- z-index: var(--kui-collapsible-panel-restore-z, 42);
311
+ --_kui-collapsible-panel-restore-inset: var(
312
+ --kui-collapsible-panel-restore-inset,
313
+ 1rem
314
+ );
315
+ /* The corner owns the inset, so a FloatingToolbar composed here floats
316
+ from this point instead of adding its own inset on top. */
317
+ --kui-floating-toolbar-inset: 0px;
318
+ position: absolute;
319
+ z-index: var(
320
+ --kui-collapsible-panel-restore-z,
321
+ calc(var(--kui-collapsible-panel-overlay-z, 40) - 2)
322
+ );
323
+ position-visibility: always;
271
324
  inset-block-end: calc(
272
- var(--kui-collapsible-panel-restore-inset, 1rem) +
273
- var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
325
+ var(--_kui-collapsible-panel-restore-inset) +
326
+ var(
327
+ --kui-edge-inset-block-end,
328
+ var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
329
+ )
330
+ );
331
+ /* Above an expanded drawer's top edge when one is in scope (see above). */
332
+ inset-block-end: calc(
333
+ var(--_kui-collapsible-panel-restore-inset) +
334
+ anchor(
335
+ --kui-restore-drawer top,
336
+ var(
337
+ --kui-edge-inset-block-end,
338
+ var(--kui-safe-area-block-end, env(safe-area-inset-bottom, 0px))
339
+ )
340
+ )
274
341
  );
275
342
  }
276
343
 
277
344
  .kui-collapsible-panel__restore[data-position="bottom-start"] {
278
345
  inset-inline-start: calc(
279
- var(--kui-collapsible-panel-restore-inset, 1rem) +
280
- var(--kui-safe-area-inline-start, env(safe-area-inset-left, 0px))
346
+ var(--_kui-collapsible-panel-restore-inset) +
347
+ var(
348
+ --kui-edge-inset-inline-start,
349
+ var(--kui-safe-area-inline-start, env(safe-area-inset-left, 0px))
350
+ )
281
351
  );
282
352
  }
283
353
 
284
354
  .kui-collapsible-panel__restore[data-position="bottom-end"] {
285
355
  inset-inline-end: calc(
286
- var(--kui-collapsible-panel-restore-inset, 1rem) +
287
- var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
356
+ var(--_kui-collapsible-panel-restore-inset) +
357
+ var(
358
+ --kui-edge-inset-inline-end,
359
+ var(--kui-safe-area-inline-end, env(safe-area-inset-right, 0px))
360
+ )
288
361
  );
289
362
  }
290
363
 
291
364
  /* A button does not stretch between its insets the way a div does, so the
292
- backdrop sizes itself to its containing block explicitly. */
365
+ backdrop sizes itself to its containing block explicitly. It sits one below
366
+ the overlay z-index, so an app that moves the overlay moves the backdrop
367
+ with it, and the restore controls stay beneath both. */
293
368
  .kui-collapsible-panel__backdrop {
294
369
  position: fixed;
295
370
  inset: 0;
296
371
  width: 100%;
297
372
  height: 100%;
298
- z-index: var(--kui-collapsible-panel-backdrop-z, 39);
373
+ z-index: var(
374
+ --kui-collapsible-panel-backdrop-z,
375
+ calc(var(--kui-collapsible-panel-overlay-z, 40) - 1)
376
+ );
299
377
  border: 0;
300
378
  padding: 0;
301
379
  background: var(--kui-color-scrim, rgb(0 0 0 / 32%));
@@ -1,7 +1,12 @@
1
1
  .kui-floating-toolbar {
2
2
  /* Inset from the container edges: a top toolbar sits 8px in, so this floats an
3
- extra 8px past that (--kui-space-m = 16px). Override the token to reposition. */
4
- --kui-floating-toolbar-inset: var(--kui-space-m, 1rem);
3
+ extra 8px past that (--kui-space-m = 16px). Override the token to reposition,
4
+ on the toolbar or on an ancestor composition boundary: a Workbench restore
5
+ corner sets it to 0 because the corner already owns the inset. */
6
+ --_kui-floating-toolbar-inset: var(
7
+ --kui-floating-toolbar-inset,
8
+ var(--kui-space-m, 1rem)
9
+ );
5
10
 
6
11
  /* Floats above the main content of its nearest positioned ancestor. z-index
7
12
  stays low so it never covers dialogs/overlays (it is not top-layer). Forced
@@ -15,19 +20,19 @@
15
20
  }
16
21
 
17
22
  .kui-floating-toolbar[data-position^="bottom"] {
18
- inset-block-end: var(--kui-floating-toolbar-inset);
23
+ inset-block-end: var(--_kui-floating-toolbar-inset);
19
24
  }
20
25
 
21
26
  .kui-floating-toolbar[data-position^="top"] {
22
- inset-block-start: var(--kui-floating-toolbar-inset);
27
+ inset-block-start: var(--_kui-floating-toolbar-inset);
23
28
  }
24
29
 
25
30
  .kui-floating-toolbar[data-position$="-end"] {
26
- inset-inline-end: var(--kui-floating-toolbar-inset);
31
+ inset-inline-end: var(--_kui-floating-toolbar-inset);
27
32
  }
28
33
 
29
34
  .kui-floating-toolbar[data-position$="-start"] {
30
- inset-inline-start: var(--kui-floating-toolbar-inset);
35
+ inset-inline-start: var(--_kui-floating-toolbar-inset);
31
36
  }
32
37
 
33
38
  /* The centered edges span from the middle rather than an inline edge. */
@@ -0,0 +1,12 @@
1
+ /* An icon-only trigger's accessible name: Web Awesome names its button from the
2
+ slotted content, so the label is present but visually hidden. */
3
+ .kui-popup-menu__label {
4
+ position: absolute;
5
+ width: 1px;
6
+ height: 1px;
7
+ padding: 0;
8
+ overflow: hidden;
9
+ clip: rect(0, 0, 0, 0);
10
+ white-space: nowrap;
11
+ clip-path: inset(50%);
12
+ }