@kerfjs/ui 5.0.0-beta.134 → 5.0.0-beta.136
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.
- package/README.md +19 -0
- package/ai/component-catalog.json +3 -1
- package/ai/components/popup-menu.md +1 -1
- package/ai/public-api-signatures-v1.md +63 -12
- package/ai/skill.md +10 -0
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/catalog-library.d.ts +2 -2
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +3 -3
- package/dist/catalog.js +3 -3
- package/dist/{chunk-IXT2ARIM.js → chunk-6FQFZVRV.js} +2 -2
- package/dist/{chunk-IXT2ARIM.js.map → chunk-6FQFZVRV.js.map} +1 -1
- package/dist/{chunk-LH5V6XGH.js → chunk-7G6BSG4B.js} +1 -1
- package/dist/{chunk-LH5V6XGH.js.map → chunk-7G6BSG4B.js.map} +1 -1
- package/dist/{chunk-42NLFCIN.js → chunk-AUYGZ3UP.js} +32 -3
- package/dist/chunk-AUYGZ3UP.js.map +1 -0
- package/dist/{chunk-XNSYDA6G.js → chunk-B4UWDIUL.js} +5 -5
- package/dist/{chunk-XNSYDA6G.js.map → chunk-B4UWDIUL.js.map} +1 -1
- package/dist/{chunk-QNB5DKKP.js → chunk-LMBSIRGQ.js} +2 -2
- package/dist/{chunk-QNB5DKKP.js.map → chunk-LMBSIRGQ.js.map} +1 -1
- package/dist/{chunk-YRQ4KKLG.js → chunk-NPPL3NXM.js} +16 -2
- package/dist/chunk-NPPL3NXM.js.map +1 -0
- package/dist/{chunk-MPT6Y7Z2.js → chunk-QOZABB23.js} +29 -1
- package/dist/chunk-QOZABB23.js.map +1 -0
- package/dist/{chunk-EI55KWHP.js → chunk-QWB4FEWD.js} +2 -1
- package/dist/chunk-QWB4FEWD.js.map +1 -0
- package/dist/{chunk-ZDI5I2HT.js → chunk-RMGHAIV5.js} +3 -3
- package/dist/{chunk-ZDI5I2HT.js.map → chunk-RMGHAIV5.js.map} +1 -1
- package/dist/{chunk-QWAAR5JX.js → chunk-ZS4WBHQG.js} +3 -3
- package/dist/{chunk-QWAAR5JX.js.map → chunk-ZS4WBHQG.js.map} +1 -1
- package/dist/collapsible-panel.js +2 -2
- package/dist/column-explorer.js +1 -1
- package/dist/{compose-B_GFfFhm.d.ts → compose-Qkitwg3x.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.js +2 -2
- package/dist/list-header.d.ts +41 -1
- package/dist/list-header.js +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +2 -2
- package/dist/pane.js +1 -1
- package/dist/popup-menu.d.ts +12 -1
- package/dist/popup-menu.js +1 -1
- package/dist/split-view.js +1 -1
- package/dist/styles/backdrop-image.css +26 -0
- package/dist/styles/color-picker.css +4 -0
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +15 -0
- package/dist/styles/components/collections/list-header/list-header.css +60 -4
- package/dist/styles/components/forms/color-picker/color-picker.css +4 -0
- package/dist/styles/components/layout/pane/pane.css +6 -0
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +12 -0
- package/dist/styles/components/navigation/paged-view/paged-view.css +4 -0
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +6 -0
- package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +22 -0
- package/dist/styles/components/surfaces/scroll-effect/scroll-effect.css +4 -0
- package/dist/styles/components/typography/text/text.css +6 -3
- package/dist/styles/content-item.css +26 -0
- package/dist/styles/foundation.css +28 -4
- package/dist/styles/list-header.css +60 -4
- package/dist/styles/nav-stack.css +12 -0
- package/dist/styles/paged-view.css +4 -0
- package/dist/styles/pane.css +6 -0
- package/dist/styles/scroll-effect.css +4 -0
- package/dist/styles/tab-navigator.css +6 -0
- package/dist/styles/text.css +6 -3
- package/dist/styles/toolbar-control-group.css +15 -0
- package/dist/styles/webawesome.css +19 -0
- package/dist/{types-CuKf5G87.d.ts → types-PGGOsJug.d.ts} +2 -1
- package/dist/wire-catalog.d.ts +1 -1
- package/dist/wire-search-fields.js +1 -1
- package/dist/wire-tag-fields.js +1 -1
- package/dist/workbench-dialog.js +1 -1
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +1 -1
- package/docs/component-selection.md +7 -0
- package/docs/design/sketch/README.md +6 -3
- package/docs/design/sketch/unified/README.md +1 -1
- package/docs/design/templates.md +1 -1
- package/docs/workbench.md +6 -1
- package/package.json +1 -1
- package/dist/chunk-42NLFCIN.js.map +0 -1
- package/dist/chunk-EI55KWHP.js.map +0 -1
- package/dist/chunk-MPT6Y7Z2.js.map +0 -1
- package/dist/chunk-YRQ4KKLG.js.map +0 -1
package/README.md
CHANGED
|
@@ -43,6 +43,12 @@ while the `ui` job checks the package. A failing browser job uploads its report
|
|
|
43
43
|
and per-test evidence for 14 days as
|
|
44
44
|
`ui-browser-failure-<browser>-<run>-<attempt>`.
|
|
45
45
|
|
|
46
|
+
For a catalog's **Increased contrast** display preview, set
|
|
47
|
+
`data-kui-contrast="more"` on the document root and remove it when the preview
|
|
48
|
+
is off. Kerf's foundation tokens, Web Awesome bridge, and component contrast
|
|
49
|
+
rules then match `prefers-contrast: more` without changing the OS preference.
|
|
50
|
+
The OS preference still applies after the preview attribute is removed.
|
|
51
|
+
|
|
46
52
|
When authoring a component gallery, follow the single
|
|
47
53
|
[Catalog demo authoring contract](./docs/catalog.md#catalog-demo-authoring-contract)
|
|
48
54
|
for focused-versus-composition modes, helper nesting, specimen selection,
|
|
@@ -903,6 +909,19 @@ import "@kerfjs/ui/popup-menu/register";
|
|
|
903
909
|
`select/register` defines the form-associated `kui-select` root and wires every `Select` in the document; `popup-menu/register` wires every `PopupMenu` (opening, keyboard navigation, submenus, the `kui-menu-select` event, and focus return). That boundary keeps custom-element and document-listener side effects out of bundles that use unrelated components. Automated consumer-bundle tests enforce it, and also prove that no public entry except `@kerfjs/ui/webawesome.css` pulls in Web Awesome. Either registration also installs help tags: an icon-only Select, PopupMenu, or `aria-label`-named `<button>` in a `ToolbarControlGroup` shows its name in an `aria-hidden` tooltip on hover and keyboard focus. A toolbar with icon-only buttons but neither control imports `@kerfjs/ui/help-tags/register`, which registers only the tooltip.
|
|
904
910
|
|
|
905
911
|
`PopupMenu` items may include `submenu` children, `checked` choices, a leading `icon`, trailing `details`, `disabledReason`, and a `danger` tone. The app owns choice state and dispatches each item's `action`. For a right-click menu, set `context: true`, a `label`, and `anchor={pointSignal.value}`; the app's `contextmenu` handler stores `{ x: event.clientX, y: event.clientY }` in that signal and calls `openPopupMenu(menu)`. The menu renders its own zero-footprint anchor host and keeps the point across re-renders, so it needs no wrapper or CSS (`openPopupMenuAt(menu, x, y, { placement? })` still opens a menu rendered without `anchor`); `closePopupMenu(menu)` closes it programmatically. See [component selection](docs/component-selection.md#popup-menu-migration) for examples.
|
|
912
|
+
For a rendered PopupMenu root, `isPopupMenuOpen(root)` reads its current open
|
|
913
|
+
state. To observe dismissal, listen for native `toggle` in capture mode and
|
|
914
|
+
pass the event to `closedPopupMenuRoot(event)`. It returns the root only after
|
|
915
|
+
its own panel closes, never when a nested submenu closes. By then Kerf has
|
|
916
|
+
reset open state and, when appropriate, returned focus to the opener:
|
|
917
|
+
|
|
918
|
+
```ts
|
|
919
|
+
app.addEventListener('toggle', (event) => {
|
|
920
|
+
const root = closedPopupMenuRoot(event);
|
|
921
|
+
if (root) onMenuDismissed(root);
|
|
922
|
+
}, true);
|
|
923
|
+
```
|
|
924
|
+
|
|
906
925
|
Use `label` for a visible label or `ariaLabel` for a visually hidden name. A
|
|
907
926
|
nonempty visible label takes precedence when both are supplied. Kerf names the
|
|
908
927
|
native trigger without adding visible label spacing; this also works with
|
|
@@ -8743,7 +8743,9 @@
|
|
|
8743
8743
|
"PopupMenu",
|
|
8744
8744
|
"openPopupMenu",
|
|
8745
8745
|
"openPopupMenuAt",
|
|
8746
|
-
"closePopupMenu"
|
|
8746
|
+
"closePopupMenu",
|
|
8747
|
+
"isPopupMenuOpen",
|
|
8748
|
+
"closedPopupMenuRoot"
|
|
8747
8749
|
],
|
|
8748
8750
|
"useWhen": [
|
|
8749
8751
|
"Offer a short list of commands behind one trigger, such as a toolbar sort or More menu.",
|
|
@@ -25,7 +25,7 @@ A typed action menu with nested choices, selected state, and optional pointer-an
|
|
|
25
25
|
|
|
26
26
|
## Imports
|
|
27
27
|
|
|
28
|
-
- JavaScript: `@kerfjs/ui/popup-menu` — exports `PopupMenu`, `openPopupMenu`, `openPopupMenuAt`, `closePopupMenu`.
|
|
28
|
+
- JavaScript: `@kerfjs/ui/popup-menu` — exports `PopupMenu`, `openPopupMenu`, `openPopupMenuAt`, `closePopupMenu`, `isPopupMenuOpen`, `closedPopupMenuRoot`.
|
|
29
29
|
- CSS: the browser build of `@kerfjs/ui/popup-menu` pulls its CSS automatically; import `@kerfjs/ui/popup-menu.css` manually only without the `browser` export condition.
|
|
30
30
|
- Theme CSS: import `@kerfjs/ui/webawesome.css` once.
|
|
31
31
|
- Registration: import `@kerfjs/ui/popup-menu/register` once (a side effect).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.136` and `kerfjs@5.0.0-beta.136`. This bounded reference covers only APIs used by the seven-task corpus. It is interface evidence, not an implementation or runtime guarantee.
|
|
4
4
|
|
|
5
5
|
## `@kerfjs/ui/css-values`
|
|
6
6
|
|
|
@@ -791,6 +791,17 @@ declare function openPopupMenuAt(menu: PopupMenuElement, x: number, y: number, o
|
|
|
791
791
|
declare function openPopupMenu(menu: PopupMenuElement): void;
|
|
792
792
|
/** Close an open PopupMenu, and any submenu it shows. */
|
|
793
793
|
declare function closePopupMenu(menu: PopupMenuElement): void;
|
|
794
|
+
/** Whether a rendered PopupMenu root is open, for trigger or context menus. */
|
|
795
|
+
declare function isPopupMenuOpen(menu: PopupMenuElement): boolean;
|
|
796
|
+
/**
|
|
797
|
+
* Return the PopupMenu root whose own panel just closed, or undefined for an
|
|
798
|
+
* opening, submenu closure, or unrelated event. Native `toggle` does not
|
|
799
|
+
* bubble: observe it with a capture listener on an ancestor (such as the app
|
|
800
|
+
* root), then pass each event here. The controller resets open state during
|
|
801
|
+
* `beforetoggle`; a focus return, when appropriate, precedes the closed
|
|
802
|
+
* `toggle` notification.
|
|
803
|
+
*/
|
|
804
|
+
declare function closedPopupMenuRoot(event: Event): PopupMenuElement | undefined;
|
|
794
805
|
/**
|
|
795
806
|
* An action menu: a trigger button that opens a list of commands in the top
|
|
796
807
|
* layer. A `single` `ToolbarControlGroup` (with `nestedDropdown`) or a
|
|
@@ -804,7 +815,7 @@ declare function closePopupMenu(menu: PopupMenuElement): void;
|
|
|
804
815
|
*/
|
|
805
816
|
declare function PopupMenu({ text, label, icon, triggerContent, items, placement, caret, disabled, emphasis, size, rootAttributes, slot, context, anchor, popupNote, }: PopupMenuProps): SafeHtml;
|
|
806
817
|
|
|
807
|
-
export { PopupMenu, type PopupMenuAnchor, type PopupMenuDivider, type PopupMenuElement, type PopupMenuEmphasis, type PopupMenuEntry, type PopupMenuHeading, type PopupMenuItem, type PopupMenuPlacement, type PopupMenuProps, type PopupMenuSize, closePopupMenu, openPopupMenu, openPopupMenuAt };
|
|
818
|
+
export { PopupMenu, type PopupMenuAnchor, type PopupMenuDivider, type PopupMenuElement, type PopupMenuEmphasis, type PopupMenuEntry, type PopupMenuHeading, type PopupMenuItem, type PopupMenuPlacement, type PopupMenuProps, type PopupMenuSize, closePopupMenu, closedPopupMenuRoot, isPopupMenuOpen, openPopupMenu, openPopupMenuAt };
|
|
808
819
|
```
|
|
809
820
|
|
|
810
821
|
## `@kerfjs/ui/list-header`
|
|
@@ -908,6 +919,21 @@ type ListHeaderNoOverflow = {
|
|
|
908
919
|
overflowDisabled?: never;
|
|
909
920
|
overflowTriggerAttributes?: never;
|
|
910
921
|
};
|
|
922
|
+
type ListHeaderTrailingAction = {
|
|
923
|
+
action: string;
|
|
924
|
+
actionLabel: string;
|
|
925
|
+
actionIcon: SafeHtml;
|
|
926
|
+
actionDisabled?: boolean;
|
|
927
|
+
disabledReason?: string;
|
|
928
|
+
triggerAttributes?: ListHeaderTriggerAttributes;
|
|
929
|
+
} | {
|
|
930
|
+
action?: never;
|
|
931
|
+
actionLabel?: never;
|
|
932
|
+
actionIcon?: never;
|
|
933
|
+
actionDisabled?: never;
|
|
934
|
+
disabledReason?: never;
|
|
935
|
+
triggerAttributes?: never;
|
|
936
|
+
};
|
|
911
937
|
type ListHeaderModeProps = ({
|
|
912
938
|
/** Render the title as a controlled disclosure trigger. */
|
|
913
939
|
toggle: true;
|
|
@@ -919,7 +945,22 @@ type ListHeaderModeProps = ({
|
|
|
919
945
|
actionLabel?: never;
|
|
920
946
|
actionDisabled?: boolean;
|
|
921
947
|
disabledReason?: string;
|
|
948
|
+
titleAction?: never;
|
|
949
|
+
titleActionLabel?: never;
|
|
950
|
+
titleActionDisabled?: never;
|
|
951
|
+
titleDisabledReason?: never;
|
|
952
|
+
titleTriggerAttributes?: never;
|
|
922
953
|
} & ListHeaderOverflowProps) | ({
|
|
954
|
+
/** Render the title as a named action inside a native heading. */
|
|
955
|
+
titleAction: string;
|
|
956
|
+
titleActionLabel: string;
|
|
957
|
+
titleActionDisabled?: boolean;
|
|
958
|
+
titleDisabledReason?: string;
|
|
959
|
+
titleTriggerAttributes?: ListHeaderTriggerAttributes;
|
|
960
|
+
toggle?: false;
|
|
961
|
+
headingLevel?: HeadingLevel;
|
|
962
|
+
expanded?: never;
|
|
963
|
+
} & ListHeaderTrailingAction & ListHeaderNoOverflow) | ({
|
|
923
964
|
/** Render a separately named trailing action. */
|
|
924
965
|
toggle?: false;
|
|
925
966
|
/**
|
|
@@ -933,6 +974,11 @@ type ListHeaderModeProps = ({
|
|
|
933
974
|
expanded?: never;
|
|
934
975
|
actionDisabled?: boolean;
|
|
935
976
|
disabledReason?: string;
|
|
977
|
+
titleAction?: never;
|
|
978
|
+
titleActionLabel?: never;
|
|
979
|
+
titleActionDisabled?: never;
|
|
980
|
+
titleDisabledReason?: never;
|
|
981
|
+
titleTriggerAttributes?: never;
|
|
936
982
|
} & ListHeaderNoOverflow) | ({
|
|
937
983
|
/** Render a passive section heading. */
|
|
938
984
|
toggle?: false;
|
|
@@ -947,6 +993,11 @@ type ListHeaderModeProps = ({
|
|
|
947
993
|
expanded?: never;
|
|
948
994
|
actionDisabled?: never;
|
|
949
995
|
disabledReason?: never;
|
|
996
|
+
titleAction?: never;
|
|
997
|
+
titleActionLabel?: never;
|
|
998
|
+
titleActionDisabled?: never;
|
|
999
|
+
titleDisabledReason?: never;
|
|
1000
|
+
titleTriggerAttributes?: never;
|
|
950
1001
|
} & ListHeaderNoOverflow);
|
|
951
1002
|
type ListHeaderIndicatorProps = {
|
|
952
1003
|
count: number;
|
|
@@ -962,7 +1013,7 @@ type ListHeaderIndicatorProps = {
|
|
|
962
1013
|
status?: string | SafeHtml | undefined;
|
|
963
1014
|
};
|
|
964
1015
|
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps & ListHeaderModeProps;
|
|
965
|
-
declare function ListHeader({ label, size, headingLevel, count, countLabel, badge, status, density, divider, inline, width, wrap, leadingEdge, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, overflowAction, overflowLabel, overflowIcon, overflowDisabled, overflowTriggerAttributes, placeholder, rootAttributes, triggerAttributes, controls, slot, }: ListHeaderProps): SafeHtml;
|
|
1016
|
+
declare function ListHeader({ label, size, headingLevel, count, countLabel, badge, status, density, divider, inline, width, wrap, leadingEdge, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, titleAction, titleActionLabel, titleActionDisabled, titleDisabledReason, titleTriggerAttributes, expanded, toggle, overflowAction, overflowLabel, overflowIcon, overflowDisabled, overflowTriggerAttributes, placeholder, rootAttributes, triggerAttributes, controls, slot, }: ListHeaderProps): SafeHtml;
|
|
966
1017
|
|
|
967
1018
|
export { ListHeader, type ListHeaderProps };
|
|
968
1019
|
```
|
|
@@ -2633,12 +2684,12 @@ interface PaneProps {
|
|
|
2633
2684
|
slot?: string;
|
|
2634
2685
|
}
|
|
2635
2686
|
/**
|
|
2636
|
-
* A pane's configuration, apart from its content and styling hooks: the props a
|
|
2687
|
+
* A pane's configuration, apart from its content and root styling hooks: the props a
|
|
2637
2688
|
* composite that renders a `Pane` for the app (a Workbench panel or work area,
|
|
2638
2689
|
* or a CollapsiblePanel) forwards, so the app configures that pane instead of
|
|
2639
2690
|
* styling it. An omitted or `undefined` field keeps the composite's default.
|
|
2640
2691
|
*/
|
|
2641
|
-
type PaneConfig = Pick<PaneProps, 'contentElement' | 'contentLabel' | 'separators' | 'safeAreaEdges' | 'chromeDividers' | 'compactChrome' | 'compactChromeOpen' | 'headerPresentation' | 'scrollEdge' | 'scrollEdgeDistance' | 'appearance' | 'background' | 'tint' | 'deepInset' | 'scrollClearance' | 'tabIndex' | 'outlined' | 'anchorName' | 'scrollAnchoring'>;
|
|
2692
|
+
type PaneConfig = Pick<PaneProps, 'contentElement' | 'contentLabel' | 'contentClassName' | 'separators' | 'safeAreaEdges' | 'chromeDividers' | 'compactChrome' | 'compactChromeOpen' | 'headerPresentation' | 'scrollEdge' | 'scrollEdgeDistance' | 'appearance' | 'background' | 'tint' | 'deepInset' | 'scrollClearance' | 'tabIndex' | 'outlined' | 'anchorName' | 'scrollAnchoring'>;
|
|
2642
2693
|
/**
|
|
2643
2694
|
* An unpadded application column with optional fixed header/footer slots and one
|
|
2644
2695
|
* scrolling vertical content owner. Separator lines are independently opt-in on
|
|
@@ -3666,10 +3717,10 @@ export { DEFAULT_BREAKPOINTS, type DeviceBreakpoints, type DeviceClass, type Dev
|
|
|
3666
3717
|
```ts
|
|
3667
3718
|
import * as kerfjs from 'kerfjs';
|
|
3668
3719
|
import { SafeHtml } from 'kerfjs';
|
|
3669
|
-
import { d as CatalogProps } from './types-
|
|
3670
|
-
export { c as CatalogBackgroundStyle, e as CatalogBrand, a as CatalogEntry, f as CatalogRelated, C as CatalogResource, b as CatalogSecondaryGroup, g as CatalogSection, h as CatalogSettingsConfig, i as CatalogStageRootAttributes, j as CatalogTagFilter, k as CatalogUxReview } from './types-
|
|
3720
|
+
import { d as CatalogProps } from './types-PGGOsJug.js';
|
|
3721
|
+
export { c as CatalogBackgroundStyle, e as CatalogBrand, a as CatalogEntry, f as CatalogRelated, C as CatalogResource, b as CatalogSecondaryGroup, g as CatalogSection, h as CatalogSettingsConfig, i as CatalogStageRootAttributes, j as CatalogTagFilter, k as CatalogUxReview } from './types-PGGOsJug.js';
|
|
3671
3722
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3672
|
-
export { C as CatalogPackage, a as CatalogPackageEntry, b as CatalogPreview, c as CatalogReference, d as ComposedCatalog, e as catalogEntryId, f as composeCatalog } from './compose-
|
|
3723
|
+
export { C as CatalogPackage, a as CatalogPackageEntry, b as CatalogPreview, c as CatalogReference, d as ComposedCatalog, e as catalogEntryId, f as composeCatalog } from './compose-Qkitwg3x.js';
|
|
3673
3724
|
import './toolbar.js';
|
|
3674
3725
|
import './extension-attributes-CnqvBmj3.js';
|
|
3675
3726
|
import './sides-BPSWde0A.js';
|
|
@@ -3824,10 +3875,10 @@ export { Catalog, CatalogExample, type CatalogExampleAlign, type CatalogExampleP
|
|
|
3824
3875
|
## `@kerfjs/ui/catalog-library`
|
|
3825
3876
|
|
|
3826
3877
|
```ts
|
|
3827
|
-
import { C as CatalogPackage } from './compose-
|
|
3878
|
+
import { C as CatalogPackage } from './compose-Qkitwg3x.js';
|
|
3828
3879
|
import './semantic-content-BbzjvSu9.js';
|
|
3829
3880
|
import 'kerfjs';
|
|
3830
|
-
import './types-
|
|
3881
|
+
import './types-PGGOsJug.js';
|
|
3831
3882
|
import './toolbar.js';
|
|
3832
3883
|
import './extension-attributes-CnqvBmj3.js';
|
|
3833
3884
|
import './sides-BPSWde0A.js';
|
|
@@ -3855,7 +3906,7 @@ export { kerfCatalogPackage };
|
|
|
3855
3906
|
## `@kerfjs/ui/catalog-resources`
|
|
3856
3907
|
|
|
3857
3908
|
```ts
|
|
3858
|
-
import { C as CatalogResource } from './types-
|
|
3909
|
+
import { C as CatalogResource } from './types-PGGOsJug.js';
|
|
3859
3910
|
import './toolbar.js';
|
|
3860
3911
|
import 'kerfjs';
|
|
3861
3912
|
import './semantic-content-BbzjvSu9.js';
|
|
@@ -3913,7 +3964,7 @@ export { type CatalogGuidanceKind, type CatalogResourceKind, type CatalogResourc
|
|
|
3913
3964
|
|
|
3914
3965
|
```ts
|
|
3915
3966
|
import { Signal } from 'kerfjs';
|
|
3916
|
-
import { c as CatalogBackgroundStyle } from './types-
|
|
3967
|
+
import { c as CatalogBackgroundStyle } from './types-PGGOsJug.js';
|
|
3917
3968
|
import './toolbar.js';
|
|
3918
3969
|
import './semantic-content-BbzjvSu9.js';
|
|
3919
3970
|
import './extension-attributes-CnqvBmj3.js';
|
package/ai/skill.md
CHANGED
|
@@ -115,6 +115,9 @@ Put its controls in `ToolbarControlGroup material="glass"` groups, and add
|
|
|
115
115
|
60px) to fade a backing in gradually as content scrolls beneath the bar (it
|
|
116
116
|
stays clear otherwise); give the opening `BackdropImage` `underChrome` so its artwork runs beneath the clear header. A clear bar draws no divider and turns opaque under reduced
|
|
117
117
|
transparency, increased contrast, and forced colors on its own.
|
|
118
|
+
For a catalog preview, set `data-kui-contrast="more"` on the document root
|
|
119
|
+
while its increased-contrast toggle is on, and remove the attribute when off;
|
|
120
|
+
the OS `prefers-contrast: more` behavior remains active independently.
|
|
118
121
|
|
|
119
122
|
### Core dialogs as bottom sheets
|
|
120
123
|
|
|
@@ -649,6 +652,13 @@ For `Select`, mark an unavailable choice with `disabled` and optionally `disable
|
|
|
649
652
|
|
|
650
653
|
For nested action menus, use `PopupMenuItem.submenu` with item, heading, and divider entries; headings and dividers do not enter keyboard navigation. Items support `checked`, `icon`, `details`, `disabledReason`, and `tone`. The app owns choice state. For a right-click menu, use `PopupMenu` with `context: true` and `anchor` (a signal holding the pointer's `{ x, y }` client coordinates); the `contextmenu` handler sets that signal and calls `openPopupMenu(menu)`. Its `placement` applies at that point (`top-start` opens above it), with the same viewport flip. The menu owns its zero-footprint anchor host and keeps the point across re-renders, so never wrap it in a fixed/1px/z-index anchor element or re-apply the point after a render; `openPopupMenuAt(menu, x, y)` is only for a menu rendered without `anchor`. Call `closePopupMenu` for programmatic dismissal. `openPopupMenuAt` also opens a button-triggered `PopupMenu` (one without `context`) at the pointer for one opening (`bottom-start`, or pass `{ placement: 'top-start' }` as a fourth argument to open above the point; the flip still applies); it returns to its trigger once closed, so a row's visible overflow menu doubles as its context menu. For a row's trailing "…" overflow menu, pass `ListActionRow` a `trailingMenu: { label, icon, items, placement?, disabled? }` instead of the `trailingAction*` props; never compose a `PopupMenu` next to or inside a `ListItem`.
|
|
651
654
|
|
|
655
|
+
Use `isPopupMenuOpen(root)` to read a rendered root's open state. To observe
|
|
656
|
+
root dismissal, capture native `toggle` on an ancestor and pass the event to
|
|
657
|
+
`closedPopupMenuRoot(event)`; it returns the root only when the root panel
|
|
658
|
+
closes, not when a submenu closes. The controller has reset open state and
|
|
659
|
+
handled focus return before that closed toggle notification. Do not inspect
|
|
660
|
+
PopupMenu's private trigger or panel class names in app code.
|
|
661
|
+
|
|
652
662
|
## Select lifecycle ownership
|
|
653
663
|
|
|
654
664
|
Import `@kerfjs/ui/select/register` once. It defines the form-associated
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Web Awesome JSX signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from the emitted `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from the emitted `@kerfjs/ui@5.0.0-beta.136` declaration boundary. Import `@kerfjs/ui/webawesome` for type effects when authoring direct `wa-*` JSX. The module emits no runtime behavior and does not register custom elements.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { KerfCustomElement } from 'kerfjs/jsx-runtime';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as CatalogPackage } from './compose-
|
|
1
|
+
import { C as CatalogPackage } from './compose-Qkitwg3x.js';
|
|
2
2
|
import './semantic-content-BbzjvSu9.js';
|
|
3
3
|
import 'kerfjs';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-PGGOsJug.js';
|
|
5
5
|
import './toolbar.js';
|
|
6
6
|
import './extension-attributes-CnqvBmj3.js';
|
|
7
7
|
import './sides-BPSWde0A.js';
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { SafeHtml } from 'kerfjs';
|
|
3
|
-
import { d as CatalogProps } from './types-
|
|
4
|
-
export { c as CatalogBackgroundStyle, e as CatalogBrand, a as CatalogEntry, f as CatalogRelated, C as CatalogResource, b as CatalogSecondaryGroup, g as CatalogSection, h as CatalogSettingsConfig, i as CatalogStageRootAttributes, j as CatalogTagFilter, k as CatalogUxReview } from './types-
|
|
3
|
+
import { d as CatalogProps } from './types-PGGOsJug.js';
|
|
4
|
+
export { c as CatalogBackgroundStyle, e as CatalogBrand, a as CatalogEntry, f as CatalogRelated, C as CatalogResource, b as CatalogSecondaryGroup, g as CatalogSection, h as CatalogSettingsConfig, i as CatalogStageRootAttributes, j as CatalogTagFilter, k as CatalogUxReview } from './types-PGGOsJug.js';
|
|
5
5
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
6
|
-
export { C as CatalogPackage, a as CatalogPackageEntry, b as CatalogPreview, c as CatalogReference, d as ComposedCatalog, e as catalogEntryId, f as composeCatalog } from './compose-
|
|
6
|
+
export { C as CatalogPackage, a as CatalogPackageEntry, b as CatalogPreview, c as CatalogReference, d as ComposedCatalog, e as catalogEntryId, f as composeCatalog } from './compose-Qkitwg3x.js';
|
|
7
7
|
import './toolbar.js';
|
|
8
8
|
import './extension-attributes-CnqvBmj3.js';
|
|
9
9
|
import './sides-BPSWde0A.js';
|
package/dist/catalog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Workbench } from './chunk-
|
|
1
|
+
import { Workbench } from './chunk-B4UWDIUL.js';
|
|
2
2
|
import { uxReviewCaptureUrl } from './chunk-6C6DLP3W.js';
|
|
3
3
|
export { UX_REVIEW_PROJECT_PATH, loadUxReviewProject, uxReviewCaptureUrl } from './chunk-6C6DLP3W.js';
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ import { Switch } from './chunk-PIYFVFPL.js';
|
|
|
6
6
|
import { SearchField } from './chunk-T7M5FKCE.js';
|
|
7
7
|
import { Row } from './chunk-BQHGXQVA.js';
|
|
8
8
|
import { ListInsetText } from './chunk-BLBMUD2W.js';
|
|
9
|
-
import { PopupMenu } from './chunk-
|
|
9
|
+
import { PopupMenu } from './chunk-NPPL3NXM.js';
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -28,7 +28,7 @@ import { ListItem } from './chunk-UWLJ7UEK.js';
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
import { ListHeader } from './chunk-
|
|
31
|
+
import { ListHeader } from './chunk-AUYGZ3UP.js';
|
|
32
32
|
import { Text } from './chunk-OW2ODKHN.js';
|
|
33
33
|
|
|
34
34
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NavStack } from './chunk-
|
|
1
|
+
import { NavStack } from './chunk-ZS4WBHQG.js';
|
|
2
2
|
import { ResizableRegion } from './chunk-6OH734CG.js';
|
|
3
3
|
import { remify, pct } from './chunk-IQSRHXZR.js';
|
|
4
4
|
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
@@ -153,4 +153,4 @@ function SplitView({
|
|
|
153
153
|
|
|
154
154
|
export { SplitView };
|
|
155
155
|
|
|
156
|
-
//# sourceMappingURL=chunk-
|
|
156
|
+
//# sourceMappingURL=chunk-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OAAA;AAAA,MAEd,QAAA,EAAA;AAAA;AAAA,GACH;AAEF,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,oBAAoB,CAAA;AAAA,MAC7D,KAAA,EAAO,CAAA,eAAA,EAAkB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC1C,EAAA;AAAA,MACA,gBAAA,EAAe,YAAA;AAAA,MACf,iBAAA,EAAgB,OAAA;AAAA,MAChB,YAAA,EAAY,KAAA;AAAA,MACZ,KAAA,EAAO,cAAA;AAAA,MACP,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,iCAAA;AAAA,YACN,mBAAA,EAAiB,IAAA;AAAA,YACjB,cAAY,WAAA,IAAe,MAAA;AAAA,YAE1B,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GACF;AAEJ","file":"chunk-IXT2ARIM.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport { pct, remify } from '../../../shared/styles/css-values.js';\nimport {\n NavStack,\n type NavStackProps,\n type NavStackView,\n} from '../../navigation/nav-stack/nav-stack.js';\nimport {\n ResizableRegion,\n type ResizableRegionProps,\n} from '../resizable-region/resizable-region.js';\n\n/**\n * The roomy list pane's `ResizableRegion`: its committed `size` and `min` /\n * `max` limits, plus the region configuration that forwards unchanged\n * (`separator`, `handleIcon`, `contentOverflow`, and collapse:\n * `collapsed`, `transitioning`, `collapseMotion`, `restoreControl`,\n * `restorePosition`). Omitted options keep the region's defaults.\n */\nexport interface SplitViewResizable extends Pick<\n ResizableRegionProps,\n | 'separator'\n | 'handleIcon'\n | 'contentOverflow'\n | 'collapsed'\n | 'transitioning'\n | 'collapseMotion'\n | 'restoreControl'\n | 'restorePosition'\n> {\n size: number;\n min: number;\n max: number;\n}\n\n/**\n * One compact view's top- and bottom-toolbar content and pinned footer (see\n * `NavStackView`).\n */\nexport type SplitViewCompactViewToolbars = Pick<\n NavStackView,\n 'toolbar' | 'bottomToolbar' | 'footer'\n>;\n\n/**\n * The compact `NavStack`'s configuration: its toolbar configuration, back\n * control, persistent bottom toolbar, chrome dividers, and chrome and\n * bottom-toolbar presentations forward to the stack, and `list` / `detail`\n * give each view its own toolbar groups.\n */\nexport interface SplitViewCompactStack extends Pick<\n NavStackProps,\n | 'toolbarConfig'\n | 'backIcon'\n | 'backText'\n | 'hideToolbar'\n | 'bottomToolbar'\n | 'chromeDividers'\n | 'chromePresentation'\n | 'bottomToolbarPresentation'\n> {\n /** Toolbar content for the list (root) view. */\n list?: SplitViewCompactViewToolbars;\n /** Toolbar content for the pushed detail view. */\n detail?: SplitViewCompactViewToolbars;\n}\n\n/**\n * The fixed list column's width: a size in CSS pixels, or that size capped\n * at a fraction of the SplitView's own width so a narrow container (a\n * dialog, a small window) always leaves the detail in view.\n */\nexport type SplitViewListWidth =\n | number\n | {\n /** Preferred width in CSS pixels. */\n size: number;\n /** Largest share of the SplitView's width, greater than 0 and at most 1. */\n maxFraction?: number;\n };\n\n/** The list-width custom property value for a fixed split. */\nfunction listWidthValue(listWidth: SplitViewListWidth): string {\n const { size, maxFraction } =\n typeof listWidth === 'number'\n ? { size: listWidth, maxFraction: undefined }\n : listWidth;\n if (!Number.isFinite(size) || size <= 0)\n throw new RangeError(\n 'SplitView listWidth size must be a positive number of pixels',\n );\n if (\n maxFraction !== undefined &&\n (!Number.isFinite(maxFraction) || maxFraction <= 0 || maxFraction > 1)\n )\n throw new RangeError(\n 'SplitView listWidth maxFraction must be greater than 0 and at most 1',\n );\n const preferred = remify(size);\n return maxFraction === undefined\n ? preferred\n : `min(${preferred}, ${pct(maxFraction * 100)})`;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: KerfUiContent;\n /** The detail (secondary) pane. */\n detail: KerfUiContent;\n /**\n * Compact (\"one pane at a time\") classes — a handset or portrait tablet.\n * Derive from `deviceClass().value.compact`. When true the split collapses to\n * a `NavStack`: the list is the root and the detail is pushed over it.\n */\n compact?: boolean;\n /** In compact mode, whether the detail is currently pushed over the list. */\n detailActive?: boolean;\n /** Title/label for the list (compact NavStack root + region label). */\n listTitle?: string;\n /** Title/label for the detail (compact NavStack pushed view + region label). */\n detailTitle?: string;\n /** Back label for the compact NavStack (default \"Back\"). */\n backLabel?: string;\n /** Compact NavStack configuration and per-view toolbars. */\n compactStack?: SplitViewCompactStack;\n /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n /**\n * The fixed split's list column width (default 320px). A number is CSS\n * pixels; `{ size, maxFraction }` caps it at that share of the SplitView's\n * width. A resizable split sizes its list with `resizable` instead.\n */\n listWidth?: SplitViewListWidth;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\nconst SPLIT_VIEW_PROTECTED = new Set([\n 'data-component',\n 'data-resizable',\n 'data-split-mode',\n]);\n\n/**\n * A list-detail split. On roomy classes it shows both panes side\n * by side with an optional resizable separator; on compact classes it collapses\n * to a `NavStack` (list → detail). See `docs/23-app-layouts.md` §3.2. Compose the\n * resizable wiring with `wireResizableRegions` and the compact back with\n * `wireNavStack`.\n */\nexport function SplitView({\n id,\n label,\n list,\n detail,\n compact = false,\n detailActive = false,\n listTitle = '',\n detailTitle = '',\n backLabel = 'Back',\n compactStack = {},\n resizable,\n listWidth,\n className = '',\n slot,\n rootAttributes = {},\n}: SplitViewProps) {\n if (listWidth !== undefined && resizable)\n throw new RangeError(\n 'SplitView listWidth applies to a fixed split; size a resizable list with resizable.size, min, and max',\n );\n const listWidthStyle =\n listWidth === undefined\n ? undefined\n : `--kui-split-view-list-width:${listWidthValue(listWidth)}`;\n if (compact) {\n const listView: NavStackView = {\n ...compactStack.list,\n key: 'list',\n toolbar: { ...compactStack.list?.toolbar, title: listTitle },\n content: list,\n };\n const views: NavStackView[] = detailActive\n ? [\n listView,\n {\n ...compactStack.detail,\n key: 'detail',\n toolbar: { ...compactStack.detail?.toolbar, title: detailTitle },\n content: detail,\n },\n ]\n : [listView];\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view kui-split-view--compact ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"compact\"\n slot={slot}\n >\n <NavStack\n id={`${id}-stack`}\n label={label}\n views={views}\n backLabel={backLabel}\n backIcon={compactStack.backIcon}\n backText={compactStack.backText}\n toolbarConfig={compactStack.toolbarConfig}\n hideToolbar={compactStack.hideToolbar}\n bottomToolbar={compactStack.bottomToolbar}\n chromeDividers={compactStack.chromeDividers}\n chromePresentation={compactStack.chromePresentation}\n bottomToolbarPresentation={compactStack.bottomToolbarPresentation}\n />\n </div>\n );\n }\n const listPane = resizable ? (\n <ResizableRegion\n id={`${id}-list`}\n label={listTitle || 'List'}\n size={resizable.size}\n min={resizable.min}\n max={resizable.max}\n separator={resizable.separator}\n handleIcon={resizable.handleIcon}\n contentOverflow={resizable.contentOverflow}\n collapsed={resizable.collapsed}\n transitioning={resizable.transitioning}\n collapseMotion={resizable.collapseMotion}\n restoreControl={resizable.restoreControl}\n restorePosition={resizable.restorePosition}\n >\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"true\"\n >\n {list}\n </div>\n </ResizableRegion>\n ) : (\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"false\"\n >\n {list}\n </div>\n );\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"split\"\n aria-label={label}\n style={listWidthStyle}\n slot={slot}\n >\n {listPane}\n <div\n class=\"kui-split-view__detail kui-pane\"\n data-split-detail\n aria-label={detailTitle || undefined}\n >\n {detail}\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/split-view/split-view.tsx"],"names":[],"mappings":";;;;;;AAsFA,SAAS,eAAe,SAAA,EAAuC;AAC7D,EAAA,MAAM,EAAE,IAAA,EAAM,WAAA,EAAY,GACxB,OAAO,SAAA,KAAc,QAAA,GACjB,EAAE,IAAA,EAAM,SAAA,EAAW,WAAA,EAAa,MAAA,EAAU,GAC1C,SAAA;AACN,EAAA,IAAI,CAAC,MAAA,CAAO,QAAA,CAAS,IAAI,KAAK,IAAA,IAAQ,CAAA;AACpC,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,IACE,WAAA,KAAgB,WACf,CAAC,MAAA,CAAO,SAAS,WAAW,CAAA,IAAK,WAAA,IAAe,CAAA,IAAK,WAAA,GAAc,CAAA,CAAA;AAEpE,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,MAAM,SAAA,GAAY,OAAO,IAAI,CAAA;AAC7B,EAAA,OAAO,WAAA,KAAgB,SACnB,SAAA,GACA,CAAA,IAAA,EAAO,SAAS,CAAA,EAAA,EAAK,GAAA,CAAI,WAAA,GAAc,GAAG,CAAC,CAAA,CAAA,CAAA;AACjD;AAyCA,IAAM,oBAAA,uBAA2B,GAAA,CAAI;AAAA,EACnC,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF,CAAC,CAAA;AASM,SAAS,SAAA,CAAU;AAAA,EACxB,EAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,GAAU,KAAA;AAAA,EACV,YAAA,GAAe,KAAA;AAAA,EACf,SAAA,GAAY,EAAA;AAAA,EACZ,WAAA,GAAc,EAAA;AAAA,EAC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AA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAM,+BAAA;AAAA,MACN,iBAAA,EAAe,IAAA;AAAA,MACf,gBAAA,EAAe,OAAA;AAAA,MAEd,QAAA,EAAA;AAAA;AAAA,GACH;AAEF,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,oBAAoB,CAAA;AAAA,MAC7D,KAAA,EAAO,CAAA,eAAA,EAAkB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC1C,EAAA;AAAA,MACA,gBAAA,EAAe,YAAA;AAAA,MACf,iBAAA,EAAgB,OAAA;AAAA,MAChB,YAAA,EAAY,KAAA;AAAA,MACZ,KAAA,EAAO,cAAA;AAAA,MACP,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,iCAAA;AAAA,YACN,mBAAA,EAAiB,IAAA;AAAA,YACjB,cAAY,WAAA,IAAe,MAAA;AAAA,YAE1B,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GACF;AAEJ","file":"chunk-6FQFZVRV.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport { pct, remify } from '../../../shared/styles/css-values.js';\nimport {\n NavStack,\n type NavStackProps,\n type NavStackView,\n} from '../../navigation/nav-stack/nav-stack.js';\nimport {\n ResizableRegion,\n type ResizableRegionProps,\n} from '../resizable-region/resizable-region.js';\n\n/**\n * The roomy list pane's `ResizableRegion`: its committed `size` and `min` /\n * `max` limits, plus the region configuration that forwards unchanged\n * (`separator`, `handleIcon`, `contentOverflow`, and collapse:\n * `collapsed`, `transitioning`, `collapseMotion`, `restoreControl`,\n * `restorePosition`). Omitted options keep the region's defaults.\n */\nexport interface SplitViewResizable extends Pick<\n ResizableRegionProps,\n | 'separator'\n | 'handleIcon'\n | 'contentOverflow'\n | 'collapsed'\n | 'transitioning'\n | 'collapseMotion'\n | 'restoreControl'\n | 'restorePosition'\n> {\n size: number;\n min: number;\n max: number;\n}\n\n/**\n * One compact view's top- and bottom-toolbar content and pinned footer (see\n * `NavStackView`).\n */\nexport type SplitViewCompactViewToolbars = Pick<\n NavStackView,\n 'toolbar' | 'bottomToolbar' | 'footer'\n>;\n\n/**\n * The compact `NavStack`'s configuration: its toolbar configuration, back\n * control, persistent bottom toolbar, chrome dividers, and chrome and\n * bottom-toolbar presentations forward to the stack, and `list` / `detail`\n * give each view its own toolbar groups.\n */\nexport interface SplitViewCompactStack extends Pick<\n NavStackProps,\n | 'toolbarConfig'\n | 'backIcon'\n | 'backText'\n | 'hideToolbar'\n | 'bottomToolbar'\n | 'chromeDividers'\n | 'chromePresentation'\n | 'bottomToolbarPresentation'\n> {\n /** Toolbar content for the list (root) view. */\n list?: SplitViewCompactViewToolbars;\n /** Toolbar content for the pushed detail view. */\n detail?: SplitViewCompactViewToolbars;\n}\n\n/**\n * The fixed list column's width: a size in CSS pixels, or that size capped\n * at a fraction of the SplitView's own width so a narrow container (a\n * dialog, a small window) always leaves the detail in view.\n */\nexport type SplitViewListWidth =\n | number\n | {\n /** Preferred width in CSS pixels. */\n size: number;\n /** Largest share of the SplitView's width, greater than 0 and at most 1. */\n maxFraction?: number;\n };\n\n/** The list-width custom property value for a fixed split. */\nfunction listWidthValue(listWidth: SplitViewListWidth): string {\n const { size, maxFraction } =\n typeof listWidth === 'number'\n ? { size: listWidth, maxFraction: undefined }\n : listWidth;\n if (!Number.isFinite(size) || size <= 0)\n throw new RangeError(\n 'SplitView listWidth size must be a positive number of pixels',\n );\n if (\n maxFraction !== undefined &&\n (!Number.isFinite(maxFraction) || maxFraction <= 0 || maxFraction > 1)\n )\n throw new RangeError(\n 'SplitView listWidth maxFraction must be greater than 0 and at most 1',\n );\n const preferred = remify(size);\n return maxFraction === undefined\n ? preferred\n : `min(${preferred}, ${pct(maxFraction * 100)})`;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: KerfUiContent;\n /** The detail (secondary) pane. */\n detail: KerfUiContent;\n /**\n * Compact (\"one pane at a time\") classes — a handset or portrait tablet.\n * Derive from `deviceClass().value.compact`. When true the split collapses to\n * a `NavStack`: the list is the root and the detail is pushed over it.\n */\n compact?: boolean;\n /** In compact mode, whether the detail is currently pushed over the list. */\n detailActive?: boolean;\n /** Title/label for the list (compact NavStack root + region label). */\n listTitle?: string;\n /** Title/label for the detail (compact NavStack pushed view + region label). */\n detailTitle?: string;\n /** Back label for the compact NavStack (default \"Back\"). */\n backLabel?: string;\n /** Compact NavStack configuration and per-view toolbars. */\n compactStack?: SplitViewCompactStack;\n /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n /**\n * The fixed split's list column width (default 320px). A number is CSS\n * pixels; `{ size, maxFraction }` caps it at that share of the SplitView's\n * width. A resizable split sizes its list with `resizable` instead.\n */\n listWidth?: SplitViewListWidth;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\nconst SPLIT_VIEW_PROTECTED = new Set([\n 'data-component',\n 'data-resizable',\n 'data-split-mode',\n]);\n\n/**\n * A list-detail split. On roomy classes it shows both panes side\n * by side with an optional resizable separator; on compact classes it collapses\n * to a `NavStack` (list → detail). See `docs/23-app-layouts.md` §3.2. Compose the\n * resizable wiring with `wireResizableRegions` and the compact back with\n * `wireNavStack`.\n */\nexport function SplitView({\n id,\n label,\n list,\n detail,\n compact = false,\n detailActive = false,\n listTitle = '',\n detailTitle = '',\n backLabel = 'Back',\n compactStack = {},\n resizable,\n listWidth,\n className = '',\n slot,\n rootAttributes = {},\n}: SplitViewProps) {\n if (listWidth !== undefined && resizable)\n throw new RangeError(\n 'SplitView listWidth applies to a fixed split; size a resizable list with resizable.size, min, and max',\n );\n const listWidthStyle =\n listWidth === undefined\n ? undefined\n : `--kui-split-view-list-width:${listWidthValue(listWidth)}`;\n if (compact) {\n const listView: NavStackView = {\n ...compactStack.list,\n key: 'list',\n toolbar: { ...compactStack.list?.toolbar, title: listTitle },\n content: list,\n };\n const views: NavStackView[] = detailActive\n ? [\n listView,\n {\n ...compactStack.detail,\n key: 'detail',\n toolbar: { ...compactStack.detail?.toolbar, title: detailTitle },\n content: detail,\n },\n ]\n : [listView];\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view kui-split-view--compact ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"compact\"\n slot={slot}\n >\n <NavStack\n id={`${id}-stack`}\n label={label}\n views={views}\n backLabel={backLabel}\n backIcon={compactStack.backIcon}\n backText={compactStack.backText}\n toolbarConfig={compactStack.toolbarConfig}\n hideToolbar={compactStack.hideToolbar}\n bottomToolbar={compactStack.bottomToolbar}\n chromeDividers={compactStack.chromeDividers}\n chromePresentation={compactStack.chromePresentation}\n bottomToolbarPresentation={compactStack.bottomToolbarPresentation}\n />\n </div>\n );\n }\n const listPane = resizable ? (\n <ResizableRegion\n id={`${id}-list`}\n label={listTitle || 'List'}\n size={resizable.size}\n min={resizable.min}\n max={resizable.max}\n separator={resizable.separator}\n handleIcon={resizable.handleIcon}\n contentOverflow={resizable.contentOverflow}\n collapsed={resizable.collapsed}\n transitioning={resizable.transitioning}\n collapseMotion={resizable.collapseMotion}\n restoreControl={resizable.restoreControl}\n restorePosition={resizable.restorePosition}\n >\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"true\"\n >\n {list}\n </div>\n </ResizableRegion>\n ) : (\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"false\"\n >\n {list}\n </div>\n );\n return (\n <div\n {...filterDataAttributes(rootAttributes, SPLIT_VIEW_PROTECTED)}\n class={`kui-split-view ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"split\"\n aria-label={label}\n style={listWidthStyle}\n slot={slot}\n >\n {listPane}\n <div\n class=\"kui-split-view__detail kui-pane\"\n data-split-detail\n aria-label={detailTitle || undefined}\n >\n {detail}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/pane/pane.tsx"],"names":[],"mappings":";;;;;;;AAiCA,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACtC,gBAAA;AAAA,EACA,uBAAA;AAAA,EACA,WAAA;AAAA,EACA,uBAAA;AAAA,EACA,qBAAA;AAAA,EACA,qBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0BAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,uBAAA;AAAA,EACA,0BAAA;AAAA,EACA,sBAAA;AAAA,EACA,kBAAA;AAAA,EACA,2BAAA;AAAA,EACA,qBAAA;AAAA,EACA,4BAAA;AAAA,EACA,0BAAA;AAAA,EACA,6BAAA;AAAA,EACA,2BAAA;AAAA,EACA,4BAAA;AAAA,EACA,0BAAA;AAAA,EACA,6BAAA;AAAA,EACA;AACF,CAAC,CAAA;AAED,IAAM,YAAA,GAA6C;AAAA,EACjD,aAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAiRA,SAAS,WAAA,CACP,OAAA,EACA,QAAA,EACA,SAAA,EACA,KAAA,EACA;AACA,EAAA,MAAM,UAAA,GAAa;AAAA,IACjB,KAAA,EAAO,CAAA,8BAAA,EAAiC,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,IACzD,YAAA,EAAc;AAAA,GAChB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EAAA,IAAA,EAAK,CAAA;AAC7D,EAAA,IAAI,YAAY,MAAA,EAAQ,2BAAQ,MAAA,EAAA,EAAM,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC3D,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,UAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACpC","file":"chunk-LH5V6XGH.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nimport {\n type ScrollEdge,\n scrollEdgeAttributes,\n} from '../../../shared/layout/scroll-edge.js';\nimport {\n type AnchorName,\n checkedAnchorName,\n} from '../../../shared/styles/anchor-name.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport {\n joinStyles,\n type SurfaceTint,\n surfaceTintAttributes,\n type SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n\n/**\n * Logical pane sides: where a {@link Pane} can show a separator and where it can\n * compensate for a device safe-area inset.\n */\nexport type PaneSeparatorSide =\n 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\n\n/** Semantic root elements supported by {@link Pane}. */\nexport type PaneElement = 'article' | 'aside' | 'div' | 'main' | 'section';\n\n/** Semantic elements supported by the scrolling content slot. */\nexport type PaneContentElement = 'div' | 'main' | 'nav' | 'section';\n\nconst paneProtectedAttributes = new Set([\n 'data-component',\n 'data-scroll-anchoring',\n 'data-fill',\n 'data-chrome-placement',\n 'data-compact-header',\n 'data-compact-footer',\n 'data-compact-header-open',\n 'data-compact-footer-open',\n 'data-chrome-dividers',\n 'data-appearance',\n 'data-background',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n 'data-deep-inset',\n 'data-outlined',\n 'data-scroll-clearance',\n 'data-header-presentation',\n 'data-header-material',\n 'data-scroll-edge',\n 'data-scroll-edge-distance',\n 'data-header-overlay',\n 'data-separator-block-start',\n 'data-separator-block-end',\n 'data-separator-inline-start',\n 'data-separator-inline-end',\n 'data-safe-area-block-start',\n 'data-safe-area-block-end',\n 'data-safe-area-inline-start',\n 'data-safe-area-inline-end',\n]);\n\nconst allPaneSides: readonly PaneSeparatorSide[] = [\n 'block-start',\n 'block-end',\n 'inline-start',\n 'inline-end',\n];\n\ntype PaneRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-fill'?: never;\n 'data-separator-block-start'?: never;\n 'data-separator-block-end'?: never;\n 'data-separator-inline-start'?: never;\n 'data-separator-inline-end'?: never;\n 'data-safe-area-block-start'?: never;\n 'data-safe-area-block-end'?: never;\n 'data-safe-area-inline-start'?: never;\n 'data-safe-area-inline-end'?: never;\n 'data-chrome-placement'?: never;\n 'data-chrome-dividers'?: never;\n 'data-appearance'?: never;\n 'data-background'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n 'data-deep-inset'?: never;\n 'data-outlined'?: never;\n 'data-scroll-clearance'?: never;\n 'data-header-presentation'?: never;\n 'data-header-material'?: never;\n 'data-scroll-edge'?: never;\n 'data-scroll-edge-distance'?: never;\n 'data-header-overlay'?: never;\n 'data-compact-header'?: never;\n 'data-compact-footer'?: never;\n 'data-compact-header-open'?: never;\n 'data-compact-footer-open'?: never;\n }\n>;\n\n/** How a Pane's header and footer relate to its scrolling content. */\nexport type PaneChromePlacement = 'fixed' | 'auto';\n\n/**\n * How a header or footer behaves when the pane's container presents\n * compactly (a `NavStack` view, a `TabNavigator` scene, a full-screen dialog,\n * or a compact `Workbench`): `fixed` stays docked and shrinks the content\n * area; `scroll` sits inline with the content (a footer settles at the end\n * and scrolls past when the content is longer); `overlay` lies over the\n * content on the chrome material, shown only while the app opens it.\n */\nexport type PaneCompactChrome = 'fixed' | 'scroll' | 'overlay';\n\n/** The compact chrome policy for a Pane's header and footer. */\nexport interface PaneCompactChromePolicy {\n header?: PaneCompactChrome;\n footer?: PaneCompactChrome;\n}\n\n/**\n * When a Pane draws the divider between its pinned header or footer and its\n * scrolling content: `scroll` while content is scrolled away beneath that\n * chrome, as `wireScrollDividers` reports; `always`; or `none`.\n */\nexport type PaneChromeDividers = 'scroll' | 'always' | 'none';\n\n/**\n * How a Pane's header relates to its scrolling content: `docked` in its own\n * row above the content, or `overlay` laid over the content's top edge on the\n * translucent chrome material, so content scrolls visibly beneath it.\n * `clear` lays it over\n * the same edge fully transparent, for chrome over imagery: legibility comes\n * from glass control groups or a scrim, and with `scrollEdge=\"material\"` the\n * chrome material fades in once content scrolls beneath it.\n */\nexport type PaneHeaderPresentation = 'docked' | 'overlay' | 'clear';\n\n/** Background treatment of the Pane's scrolling work surface. */\nexport type PaneAppearance = 'default' | 'sunken';\n\n/** Whether a Pane's scrolling content keeps the browser's scroll anchoring. */\nexport type PaneScrollAnchoring = 'auto' | 'none';\n\nexport interface PaneProps {\n /** Optional fixed chrome above the scrolling content, arranged vertically. */\n header?: KerfUiContent;\n /** The pane's primary vertical, scrolling content stack. */\n children?: KerfUiContent;\n /** Optional fixed chrome below the scrolling content. */\n footer?: KerfUiContent;\n /**\n * Fill the height of a parent with a definite height, such as an app root\n * (`.kui-app-root`), a `SizedRegion`, or a grid cell, or take the rest of a\n * flex column. The header and footer stay pinned and the content scrolls\n * between them, as in a NavStack view or Workbench region (which fill their\n * Pane without this prop). Defaults to false: the pane takes its content's\n * height.\n */\n fill?: boolean;\n /**\n * Whether the header and footer stay pinned around the scrolling content.\n * `fixed` (default) always pins them. `auto` pins them while the pane is\n * tall enough, and below 480px of height (30rem, so it scales with the text\n * size) lets the whole pane scroll as one column, so tall chrome can never\n * squeeze the content to nothing.\n */\n chromePlacement?: PaneChromePlacement;\n /**\n * The divider under the header and over the footer, where they meet the\n * scrolling content. Omitted defaults to `scroll` for a plain pane and\n * `always` for `appearance=\"sunken\"`. `scroll` shows the header's divider only\n * while the content is scrolled down, and the footer's only while more\n * content lies below — never when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane; unwired, neither shows. `always` shows both; `none` neither.\n * The line is drawn inside the chrome, so no state moves the content.\n */\n chromeDividers?: PaneChromeDividers;\n /**\n * `docked` (default) gives the header its own row above the scrolling\n * content. `overlay` lays the header over the content's top edge on the\n * translucent chrome material (`--kui-chrome-material`, opaque under\n * `prefers-reduced-transparency`, forced colors, or without\n * `backdrop-filter`), so content scrolls visibly beneath it. Once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane it measures the header and publishes its height as the\n * `--kui-scroll-clearance-block-start` context, which the content adds to\n * its block-start padding and `scroll-padding` without any\n * `scrollClearance` prop, so the first item, and anything focused or\n * scrolled into view, rests clear of the header. Until then, and with\n * `chromePlacement=\"auto\"`, the header stays docked. Keep overlay header\n * text in the normal text color: quiet text can fall below AA over the\n * content passing beneath it.\n */\n /**\n * What the header and footer do when the pane's container presents\n * compactly (default `fixed`); roomy containers ignore it. The container\n * interprets it, so set it on panes inside a `NavStack`, `TabNavigator`,\n * full-screen dialog, or `Workbench`.\n */\n compactChrome?: PaneCompactChromePolicy;\n /**\n * Which `overlay` compact chrome is showing. The app owns it and flips it\n * from a control the person can reach while the chrome is hidden.\n */\n compactChromeOpen?: { header?: boolean; footer?: boolean };\n headerPresentation?: PaneHeaderPresentation;\n /**\n * With `headerPresentation=\"clear\"`, `material` fades the chrome material\n * in behind the header once content scrolls beneath it (default `none`).\n */\n scrollEdge?: ScrollEdge;\n /**\n * The scroll distance, in CSS pixels, over which the scroll edge fades in\n * (default 60).\n */\n scrollEdgeDistance?: number;\n /** Paint the scrolling work surface with the shared lowered-surface color. */\n appearance?: PaneAppearance;\n /**\n * Paint the whole pane, header and footer included, in an app-chosen color\n * (`uiColor('surface-raised')`, `fillColor('#1f2a44')`, or `colorVar(…)`\n * from `@kerfjs/ui/css-values`). It replaces the appearance's fill: a sunken\n * pane drops its lowered color and grain. Omitted, the pane keeps its\n * default (transparent, or the sunken surface). Forced colors paint\n * `Canvas`. Keep text at AA over the color; a dark color needs a matching\n * tint or dark tones for its content.\n */\n background?: CssColor;\n /**\n * A scoped tint: `{ color, scheme }`, the app's color and the scheme it\n * belongs to. The pane paints the tinted surface (unless `background` is\n * set) and its whole subtree, chrome material and quiet fills included,\n * re-derives its surface and text tokens from the color with lightness\n * clamped to keep text at WCAG AA. Without relative color syntax, or under\n * `prefers-contrast: more`, the scope keeps the plain palette in the\n * declared scheme.\n */\n tint?: SurfaceTint;\n /**\n * Scope this surface and its subtree to the light or dark palette, whatever\n * the page's scheme (a light card on a dark page). A `tint` already sets\n * its scheme; pass `scheme` alone for the plain palette, or with a tint\n * only when they agree.\n */\n scheme?: SurfaceTintScheme;\n /**\n * Clear chrome that lies over the scrolling content's block-start and/or\n * block-end edge, such as a `DialogSurface` floating footer over a filling\n * Pane. The content scroller adds the inherited\n * `--kui-scroll-clearance-block-*` context that chrome publishes to its block\n * padding and `scroll-padding`, so content scrolls visibly beneath the chrome\n * while its first and last items (and anything focused or scrolled into\n * view) can still rest clear of it. Defaults to none.\n */\n scrollClearance?: ScrollClearance;\n /** Add 8px to every side of scrolling content (default: false). */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the Pane root. */\n tabIndex?: 0 | -1;\n /**\n * Names the Pane root as a CSS anchor (`anchor-name`): a dashed ident such\n * as `--app-main`. A surface that docks to a named anchor, such as a\n * `PopoverDialogSurface` with the same `anchorName`, then docks to this\n * pane, so the app names its main column without CSS. A Workbench work\n * area, panel, or NavStack view takes it through its `PaneConfig`.\n */\n anchorName?: AnchorName;\n /**\n * The scrolling content's CSS scroll anchoring (`overflow-anchor`). `auto`\n * (the default) keeps the browser's anchoring, which holds visible content\n * still when something above it grows or shrinks. `none` opts the pane\n * out: use it for a pane whose own edits insert or remove rows above the\n * reader, where Safari can apply a late anchoring jump on an unrelated\n * reflow, such as an inspector. A Workbench panel, work area, or NavStack\n * view takes it through its `PaneConfig`.\n */\n scrollAnchoring?: PaneScrollAnchoring;\n /** Keep the standard focus outline visible, such as for a drop target. */\n outlined?: boolean;\n /** Root semantics. Defaults to `div`. */\n element?: PaneElement;\n /** Scrolling content semantics. Defaults to `div`. */\n contentElement?: PaneContentElement;\n /** Independent logical-edge separator lines. Defaults to none. */\n separators?: readonly PaneSeparatorSide[];\n /**\n * Sides on which the pane may compensate for a device safe-area inset.\n * Defaults to every side: the pane pads its slots for each side that still\n * reaches an unsafe screen edge, as its surrounding layout reports, while its\n * background and separators paint through. List only the sides an app-owned\n * layout places at a screen edge, or pass `[]` to opt out.\n */\n safeAreaEdges?: readonly PaneSeparatorSide[];\n id?: string;\n /** Accessible name for a landmark root such as `aside` or `main`. */\n label?: string;\n /** Accessible name for a landmark scrolling slot such as `nav`. */\n contentLabel?: string;\n className?: string;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n /** Safe `data-*` metadata; Pane-owned structural attributes remain protected. */\n rootAttributes?: PaneRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A pane's configuration, apart from its content and styling hooks: the props a\n * composite that renders a `Pane` for the app (a Workbench panel or work area,\n * or a CollapsiblePanel) forwards, so the app configures that pane instead of\n * styling it. An omitted or `undefined` field keeps the composite's default.\n */\nexport type PaneConfig = Pick<\n PaneProps,\n | 'contentElement'\n | 'contentLabel'\n | 'separators'\n | 'safeAreaEdges'\n | 'chromeDividers'\n | 'compactChrome'\n | 'compactChromeOpen'\n | 'headerPresentation'\n | 'scrollEdge'\n | 'scrollEdgeDistance'\n | 'appearance'\n | 'background'\n | 'tint'\n | 'deepInset'\n | 'scrollClearance'\n | 'tabIndex'\n | 'outlined'\n | 'anchorName'\n | 'scrollAnchoring'\n>;\n\nfunction paneContent(\n element: PaneContentElement,\n children: KerfUiContent,\n className: string,\n label: string | undefined,\n) {\n const attributes = {\n class: `kui-pane__content kui-content ${className}`.trim(),\n 'aria-label': label,\n };\n if (element === 'main') return <main {...attributes}>{children}</main>;\n if (element === 'nav') return <nav {...attributes}>{children}</nav>;\n if (element === 'section')\n return <section {...attributes}>{children}</section>;\n return <div {...attributes}>{children}</div>;\n}\n\n/**\n * An unpadded application column with optional fixed header/footer slots and one\n * scrolling vertical content owner. Separator lines are independently opt-in on\n * each logical edge, so the same component works as a sidebar, main area,\n * inspector, or dialog column.\n */\nexport function Pane({\n header,\n children,\n footer,\n fill = false,\n chromePlacement = 'fixed',\n chromeDividers,\n compactChrome = {},\n compactChromeOpen = {},\n headerPresentation = 'docked',\n scrollEdge = 'none',\n scrollEdgeDistance,\n appearance = 'default',\n background,\n tint,\n scheme,\n deepInset = false,\n scrollClearance,\n tabIndex,\n anchorName,\n scrollAnchoring = 'auto',\n outlined = false,\n element = 'div',\n contentElement = 'div',\n separators = [],\n safeAreaEdges = allPaneSides,\n id,\n label,\n contentLabel,\n className = '',\n headerClassName = '',\n contentClassName = '',\n footerClassName = '',\n rootAttributes = {},\n slot,\n}: PaneProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n paneProtectedAttributes,\n );\n const content = paneContent(\n contentElement,\n children,\n contentClassName,\n contentLabel,\n );\n const resolvedChromeDividers =\n chromeDividers ?? (appearance === 'sunken' ? 'always' : 'scroll');\n if (appearance === 'sunken' && background === undefined)\n ensureSunkenTexture();\n const tinted = surfaceTintAttributes(tint, scheme);\n const clearHeader = headerPresentation === 'clear' && header !== undefined;\n const body = (\n <>\n {header === undefined ? null : (\n <header\n class={`kui-pane__header kui-pane__toolbar ${headerClassName}`.trim()}\n >\n {header}\n </header>\n )}\n {content}\n {footer === undefined ? null : (\n <footer class={`kui-pane__footer ${footerClassName}`.trim()}>\n {footer}\n </footer>\n )}\n </>\n );\n const attributes = {\n ...safeRootAttributes,\n class: `kui-pane ${tinted.className} ${className}`\n .replace(/\\s+/g, ' ')\n .trim(),\n id,\n 'data-component': 'pane',\n 'data-fill': fill ? 'true' : undefined,\n 'data-appearance': appearance === 'sunken' ? 'sunken' : undefined,\n 'data-background': background === undefined ? undefined : '',\n 'data-kui-tint': tinted['data-kui-tint'],\n 'data-kui-tint-accent': tinted['data-kui-tint-accent'],\n 'data-kui-scheme': tinted['data-kui-scheme'],\n style: joinStyles(\n background === undefined\n ? undefined\n : `--_kui-pane-background:${background}`,\n tinted.style,\n anchorName === undefined\n ? undefined\n : `anchor-name:${checkedAnchorName(anchorName, 'Pane anchorName')}`,\n ),\n 'data-deep-inset': deepInset ? 'true' : undefined,\n 'data-outlined': outlined ? 'true' : undefined,\n 'data-scroll-anchoring': scrollAnchoring === 'none' ? 'none' : undefined,\n 'data-scroll-clearance': scrollClearance,\n 'data-header-presentation':\n headerPresentation !== 'docked' && header !== undefined\n ? 'overlay'\n : undefined,\n 'data-header-material': clearHeader ? 'clear' : undefined,\n ...scrollEdgeAttributes(scrollEdge, scrollEdgeDistance, clearHeader),\n 'data-chrome-placement': chromePlacement === 'auto' ? 'auto' : undefined,\n 'data-compact-header':\n header !== undefined && compactChrome.header !== 'fixed'\n ? compactChrome.header\n : undefined,\n 'data-compact-footer':\n footer !== undefined && compactChrome.footer !== 'fixed'\n ? compactChrome.footer\n : undefined,\n 'data-compact-header-open':\n compactChrome.header === 'overlay' && compactChromeOpen.header\n ? ''\n : undefined,\n 'data-compact-footer-open':\n compactChrome.footer === 'overlay' && compactChromeOpen.footer\n ? ''\n : undefined,\n 'data-chrome-dividers':\n resolvedChromeDividers === 'always' || resolvedChromeDividers === 'none'\n ? resolvedChromeDividers\n : undefined,\n 'data-separator-block-start': String(separators.includes('block-start')),\n 'data-separator-block-end': String(separators.includes('block-end')),\n 'data-separator-inline-start': String(separators.includes('inline-start')),\n 'data-separator-inline-end': String(separators.includes('inline-end')),\n 'data-safe-area-block-start': String(safeAreaEdges.includes('block-start')),\n 'data-safe-area-block-end': String(safeAreaEdges.includes('block-end')),\n 'data-safe-area-inline-start': String(\n safeAreaEdges.includes('inline-start'),\n ),\n 'data-safe-area-inline-end': String(safeAreaEdges.includes('inline-end')),\n 'aria-label': label,\n tabindex: tabIndex,\n slot,\n };\n\n if (element === 'article') return <article {...attributes}>{body}</article>;\n if (element === 'aside') return <aside {...attributes}>{body}</aside>;\n if (element === 'main') return <main {...attributes}>{body}</main>;\n if (element === 'section') return <section {...attributes}>{body}</section>;\n return <div {...attributes}>{body}</div>;\n}\n\nexport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nexport type { ScrollEdge } from '../../../shared/layout/scroll-edge.js';\nexport type {\n SurfaceTint,\n SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/pane/pane.tsx"],"names":[],"mappings":";;;;;;;AAiCA,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACtC,gBAAA;AAAA,EACA,uBAAA;AAAA,EACA,WAAA;AAAA,EACA,uBAAA;AAAA,EACA,qBAAA;AAAA,EACA,qBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0BAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,uBAAA;AAAA,EACA,0BAAA;AAAA,EACA,sBAAA;AAAA,EACA,kBAAA;AAAA,EACA,2BAAA;AAAA,EACA,qBAAA;AAAA,EACA,4BAAA;AAAA,EACA,0BAAA;AAAA,EACA,6BAAA;AAAA,EACA,2BAAA;AAAA,EACA,4BAAA;AAAA,EACA,0BAAA;AAAA,EACA,6BAAA;AAAA,EACA;AACF,CAAC,CAAA;AAED,IAAM,YAAA,GAA6C;AAAA,EACjD,aAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAk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;AAAA,IACV;AAAA,GACF;AAEA,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,IAAI,YAAY,OAAA,EAAS,2BAAQ,OAAA,EAAA,EAAO,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC7D,EAAA,IAAI,YAAY,MAAA,EAAQ,2BAAQ,MAAA,EAAA,EAAM,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC3D,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,UAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACpC","file":"chunk-7G6BSG4B.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nimport {\n type ScrollEdge,\n scrollEdgeAttributes,\n} from '../../../shared/layout/scroll-edge.js';\nimport {\n type AnchorName,\n checkedAnchorName,\n} from '../../../shared/styles/anchor-name.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport {\n joinStyles,\n type SurfaceTint,\n surfaceTintAttributes,\n type SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n\n/**\n * Logical pane sides: where a {@link Pane} can show a separator and where it can\n * compensate for a device safe-area inset.\n */\nexport type PaneSeparatorSide =\n 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\n\n/** Semantic root elements supported by {@link Pane}. */\nexport type PaneElement = 'article' | 'aside' | 'div' | 'main' | 'section';\n\n/** Semantic elements supported by the scrolling content slot. */\nexport type PaneContentElement = 'div' | 'main' | 'nav' | 'section';\n\nconst paneProtectedAttributes = new Set([\n 'data-component',\n 'data-scroll-anchoring',\n 'data-fill',\n 'data-chrome-placement',\n 'data-compact-header',\n 'data-compact-footer',\n 'data-compact-header-open',\n 'data-compact-footer-open',\n 'data-chrome-dividers',\n 'data-appearance',\n 'data-background',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n 'data-deep-inset',\n 'data-outlined',\n 'data-scroll-clearance',\n 'data-header-presentation',\n 'data-header-material',\n 'data-scroll-edge',\n 'data-scroll-edge-distance',\n 'data-header-overlay',\n 'data-separator-block-start',\n 'data-separator-block-end',\n 'data-separator-inline-start',\n 'data-separator-inline-end',\n 'data-safe-area-block-start',\n 'data-safe-area-block-end',\n 'data-safe-area-inline-start',\n 'data-safe-area-inline-end',\n]);\n\nconst allPaneSides: readonly PaneSeparatorSide[] = [\n 'block-start',\n 'block-end',\n 'inline-start',\n 'inline-end',\n];\n\ntype PaneRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-fill'?: never;\n 'data-separator-block-start'?: never;\n 'data-separator-block-end'?: never;\n 'data-separator-inline-start'?: never;\n 'data-separator-inline-end'?: never;\n 'data-safe-area-block-start'?: never;\n 'data-safe-area-block-end'?: never;\n 'data-safe-area-inline-start'?: never;\n 'data-safe-area-inline-end'?: never;\n 'data-chrome-placement'?: never;\n 'data-chrome-dividers'?: never;\n 'data-appearance'?: never;\n 'data-background'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n 'data-deep-inset'?: never;\n 'data-outlined'?: never;\n 'data-scroll-clearance'?: never;\n 'data-header-presentation'?: never;\n 'data-header-material'?: never;\n 'data-scroll-edge'?: never;\n 'data-scroll-edge-distance'?: never;\n 'data-header-overlay'?: never;\n 'data-compact-header'?: never;\n 'data-compact-footer'?: never;\n 'data-compact-header-open'?: never;\n 'data-compact-footer-open'?: never;\n }\n>;\n\n/** How a Pane's header and footer relate to its scrolling content. */\nexport type PaneChromePlacement = 'fixed' | 'auto';\n\n/**\n * How a header or footer behaves when the pane's container presents\n * compactly (a `NavStack` view, a `TabNavigator` scene, a full-screen dialog,\n * or a compact `Workbench`): `fixed` stays docked and shrinks the content\n * area; `scroll` sits inline with the content (a footer settles at the end\n * and scrolls past when the content is longer); `overlay` lies over the\n * content on the chrome material, shown only while the app opens it.\n */\nexport type PaneCompactChrome = 'fixed' | 'scroll' | 'overlay';\n\n/** The compact chrome policy for a Pane's header and footer. */\nexport interface PaneCompactChromePolicy {\n header?: PaneCompactChrome;\n footer?: PaneCompactChrome;\n}\n\n/**\n * When a Pane draws the divider between its pinned header or footer and its\n * scrolling content: `scroll` while content is scrolled away beneath that\n * chrome, as `wireScrollDividers` reports; `always`; or `none`.\n */\nexport type PaneChromeDividers = 'scroll' | 'always' | 'none';\n\n/**\n * How a Pane's header relates to its scrolling content: `docked` in its own\n * row above the content, or `overlay` laid over the content's top edge on the\n * translucent chrome material, so content scrolls visibly beneath it.\n * `clear` lays it over\n * the same edge fully transparent, for chrome over imagery: legibility comes\n * from glass control groups or a scrim, and with `scrollEdge=\"material\"` the\n * chrome material fades in once content scrolls beneath it.\n */\nexport type PaneHeaderPresentation = 'docked' | 'overlay' | 'clear';\n\n/** Background treatment of the Pane's scrolling work surface. */\nexport type PaneAppearance = 'default' | 'sunken';\n\n/** Whether a Pane's scrolling content keeps the browser's scroll anchoring. */\nexport type PaneScrollAnchoring = 'auto' | 'none';\n\nexport interface PaneProps {\n /** Optional fixed chrome above the scrolling content, arranged vertically. */\n header?: KerfUiContent;\n /** The pane's primary vertical, scrolling content stack. */\n children?: KerfUiContent;\n /** Optional fixed chrome below the scrolling content. */\n footer?: KerfUiContent;\n /**\n * Fill the height of a parent with a definite height, such as an app root\n * (`.kui-app-root`), a `SizedRegion`, or a grid cell, or take the rest of a\n * flex column. The header and footer stay pinned and the content scrolls\n * between them, as in a NavStack view or Workbench region (which fill their\n * Pane without this prop). Defaults to false: the pane takes its content's\n * height.\n */\n fill?: boolean;\n /**\n * Whether the header and footer stay pinned around the scrolling content.\n * `fixed` (default) always pins them. `auto` pins them while the pane is\n * tall enough, and below 480px of height (30rem, so it scales with the text\n * size) lets the whole pane scroll as one column, so tall chrome can never\n * squeeze the content to nothing.\n */\n chromePlacement?: PaneChromePlacement;\n /**\n * The divider under the header and over the footer, where they meet the\n * scrolling content. Omitted defaults to `scroll` for a plain pane and\n * `always` for `appearance=\"sunken\"`. `scroll` shows the header's divider only\n * while the content is scrolled down, and the footer's only while more\n * content lies below — never when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane; unwired, neither shows. `always` shows both; `none` neither.\n * The line is drawn inside the chrome, so no state moves the content.\n */\n chromeDividers?: PaneChromeDividers;\n /**\n * `docked` (default) gives the header its own row above the scrolling\n * content. `overlay` lays the header over the content's top edge on the\n * translucent chrome material (`--kui-chrome-material`, opaque under\n * `prefers-reduced-transparency`, forced colors, or without\n * `backdrop-filter`), so content scrolls visibly beneath it. Once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane it measures the header and publishes its height as the\n * `--kui-scroll-clearance-block-start` context, which the content adds to\n * its block-start padding and `scroll-padding` without any\n * `scrollClearance` prop, so the first item, and anything focused or\n * scrolled into view, rests clear of the header. Until then, and with\n * `chromePlacement=\"auto\"`, the header stays docked. Keep overlay header\n * text in the normal text color: quiet text can fall below AA over the\n * content passing beneath it.\n */\n /**\n * What the header and footer do when the pane's container presents\n * compactly (default `fixed`); roomy containers ignore it. The container\n * interprets it, so set it on panes inside a `NavStack`, `TabNavigator`,\n * full-screen dialog, or `Workbench`.\n */\n compactChrome?: PaneCompactChromePolicy;\n /**\n * Which `overlay` compact chrome is showing. The app owns it and flips it\n * from a control the person can reach while the chrome is hidden.\n */\n compactChromeOpen?: { header?: boolean; footer?: boolean };\n headerPresentation?: PaneHeaderPresentation;\n /**\n * With `headerPresentation=\"clear\"`, `material` fades the chrome material\n * in behind the header once content scrolls beneath it (default `none`).\n */\n scrollEdge?: ScrollEdge;\n /**\n * The scroll distance, in CSS pixels, over which the scroll edge fades in\n * (default 60).\n */\n scrollEdgeDistance?: number;\n /** Paint the scrolling work surface with the shared lowered-surface color. */\n appearance?: PaneAppearance;\n /**\n * Paint the whole pane, header and footer included, in an app-chosen color\n * (`uiColor('surface-raised')`, `fillColor('#1f2a44')`, or `colorVar(…)`\n * from `@kerfjs/ui/css-values`). It replaces the appearance's fill: a sunken\n * pane drops its lowered color and grain. Omitted, the pane keeps its\n * default (transparent, or the sunken surface). Forced colors paint\n * `Canvas`. Keep text at AA over the color; a dark color needs a matching\n * tint or dark tones for its content.\n */\n background?: CssColor;\n /**\n * A scoped tint: `{ color, scheme }`, the app's color and the scheme it\n * belongs to. The pane paints the tinted surface (unless `background` is\n * set) and its whole subtree, chrome material and quiet fills included,\n * re-derives its surface and text tokens from the color with lightness\n * clamped to keep text at WCAG AA. Without relative color syntax, or under\n * `prefers-contrast: more`, the scope keeps the plain palette in the\n * declared scheme.\n */\n tint?: SurfaceTint;\n /**\n * Scope this surface and its subtree to the light or dark palette, whatever\n * the page's scheme (a light card on a dark page). A `tint` already sets\n * its scheme; pass `scheme` alone for the plain palette, or with a tint\n * only when they agree.\n */\n scheme?: SurfaceTintScheme;\n /**\n * Clear chrome that lies over the scrolling content's block-start and/or\n * block-end edge, such as a `DialogSurface` floating footer over a filling\n * Pane. The content scroller adds the inherited\n * `--kui-scroll-clearance-block-*` context that chrome publishes to its block\n * padding and `scroll-padding`, so content scrolls visibly beneath the chrome\n * while its first and last items (and anything focused or scrolled into\n * view) can still rest clear of it. Defaults to none.\n */\n scrollClearance?: ScrollClearance;\n /** Add 8px to every side of scrolling content (default: false). */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the Pane root. */\n tabIndex?: 0 | -1;\n /**\n * Names the Pane root as a CSS anchor (`anchor-name`): a dashed ident such\n * as `--app-main`. A surface that docks to a named anchor, such as a\n * `PopoverDialogSurface` with the same `anchorName`, then docks to this\n * pane, so the app names its main column without CSS. A Workbench work\n * area, panel, or NavStack view takes it through its `PaneConfig`.\n */\n anchorName?: AnchorName;\n /**\n * The scrolling content's CSS scroll anchoring (`overflow-anchor`). `auto`\n * (the default) keeps the browser's anchoring, which holds visible content\n * still when something above it grows or shrinks. `none` opts the pane\n * out: use it for a pane whose own edits insert or remove rows above the\n * reader, where Safari can apply a late anchoring jump on an unrelated\n * reflow, such as an inspector. A Workbench panel, work area, or NavStack\n * view takes it through its `PaneConfig`.\n */\n scrollAnchoring?: PaneScrollAnchoring;\n /** Keep the standard focus outline visible, such as for a drop target. */\n outlined?: boolean;\n /** Root semantics. Defaults to `div`. */\n element?: PaneElement;\n /** Scrolling content semantics. Defaults to `div`. */\n contentElement?: PaneContentElement;\n /** Independent logical-edge separator lines. Defaults to none. */\n separators?: readonly PaneSeparatorSide[];\n /**\n * Sides on which the pane may compensate for a device safe-area inset.\n * Defaults to every side: the pane pads its slots for each side that still\n * reaches an unsafe screen edge, as its surrounding layout reports, while its\n * background and separators paint through. List only the sides an app-owned\n * layout places at a screen edge, or pass `[]` to opt out.\n */\n safeAreaEdges?: readonly PaneSeparatorSide[];\n id?: string;\n /** Accessible name for a landmark root such as `aside` or `main`. */\n label?: string;\n /** Accessible name for a landmark scrolling slot such as `nav`. */\n contentLabel?: string;\n className?: string;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n /** Safe `data-*` metadata; Pane-owned structural attributes remain protected. */\n rootAttributes?: PaneRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A pane's configuration, apart from its content and root styling hooks: the props a\n * composite that renders a `Pane` for the app (a Workbench panel or work area,\n * or a CollapsiblePanel) forwards, so the app configures that pane instead of\n * styling it. An omitted or `undefined` field keeps the composite's default.\n */\nexport type PaneConfig = Pick<\n PaneProps,\n | 'contentElement'\n | 'contentLabel'\n | 'contentClassName'\n | 'separators'\n | 'safeAreaEdges'\n | 'chromeDividers'\n | 'compactChrome'\n | 'compactChromeOpen'\n | 'headerPresentation'\n | 'scrollEdge'\n | 'scrollEdgeDistance'\n | 'appearance'\n | 'background'\n | 'tint'\n | 'deepInset'\n | 'scrollClearance'\n | 'tabIndex'\n | 'outlined'\n | 'anchorName'\n | 'scrollAnchoring'\n>;\n\nfunction paneContent(\n element: PaneContentElement,\n children: KerfUiContent,\n className: string,\n label: string | undefined,\n) {\n const attributes = {\n class: `kui-pane__content kui-content ${className}`.trim(),\n 'aria-label': label,\n };\n if (element === 'main') return <main {...attributes}>{children}</main>;\n if (element === 'nav') return <nav {...attributes}>{children}</nav>;\n if (element === 'section')\n return <section {...attributes}>{children}</section>;\n return <div {...attributes}>{children}</div>;\n}\n\n/**\n * An unpadded application column with optional fixed header/footer slots and one\n * scrolling vertical content owner. Separator lines are independently opt-in on\n * each logical edge, so the same component works as a sidebar, main area,\n * inspector, or dialog column.\n */\nexport function Pane({\n header,\n children,\n footer,\n fill = false,\n chromePlacement = 'fixed',\n chromeDividers,\n compactChrome = {},\n compactChromeOpen = {},\n headerPresentation = 'docked',\n scrollEdge = 'none',\n scrollEdgeDistance,\n appearance = 'default',\n background,\n tint,\n scheme,\n deepInset = false,\n scrollClearance,\n tabIndex,\n anchorName,\n scrollAnchoring = 'auto',\n outlined = false,\n element = 'div',\n contentElement = 'div',\n separators = [],\n safeAreaEdges = allPaneSides,\n id,\n label,\n contentLabel,\n className = '',\n headerClassName = '',\n contentClassName = '',\n footerClassName = '',\n rootAttributes = {},\n slot,\n}: PaneProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n paneProtectedAttributes,\n );\n const content = paneContent(\n contentElement,\n children,\n contentClassName,\n contentLabel,\n );\n const resolvedChromeDividers =\n chromeDividers ?? (appearance === 'sunken' ? 'always' : 'scroll');\n if (appearance === 'sunken' && background === undefined)\n ensureSunkenTexture();\n const tinted = surfaceTintAttributes(tint, scheme);\n const clearHeader = headerPresentation === 'clear' && header !== undefined;\n const body = (\n <>\n {header === undefined ? null : (\n <header\n class={`kui-pane__header kui-pane__toolbar ${headerClassName}`.trim()}\n >\n {header}\n </header>\n )}\n {content}\n {footer === undefined ? null : (\n <footer class={`kui-pane__footer ${footerClassName}`.trim()}>\n {footer}\n </footer>\n )}\n </>\n );\n const attributes = {\n ...safeRootAttributes,\n class: `kui-pane ${tinted.className} ${className}`\n .replace(/\\s+/g, ' ')\n .trim(),\n id,\n 'data-component': 'pane',\n 'data-fill': fill ? 'true' : undefined,\n 'data-appearance': appearance === 'sunken' ? 'sunken' : undefined,\n 'data-background': background === undefined ? undefined : '',\n 'data-kui-tint': tinted['data-kui-tint'],\n 'data-kui-tint-accent': tinted['data-kui-tint-accent'],\n 'data-kui-scheme': tinted['data-kui-scheme'],\n style: joinStyles(\n background === undefined\n ? undefined\n : `--_kui-pane-background:${background}`,\n tinted.style,\n anchorName === undefined\n ? undefined\n : `anchor-name:${checkedAnchorName(anchorName, 'Pane anchorName')}`,\n ),\n 'data-deep-inset': deepInset ? 'true' : undefined,\n 'data-outlined': outlined ? 'true' : undefined,\n 'data-scroll-anchoring': scrollAnchoring === 'none' ? 'none' : undefined,\n 'data-scroll-clearance': scrollClearance,\n 'data-header-presentation':\n headerPresentation !== 'docked' && header !== undefined\n ? 'overlay'\n : undefined,\n 'data-header-material': clearHeader ? 'clear' : undefined,\n ...scrollEdgeAttributes(scrollEdge, scrollEdgeDistance, clearHeader),\n 'data-chrome-placement': chromePlacement === 'auto' ? 'auto' : undefined,\n 'data-compact-header':\n header !== undefined && compactChrome.header !== 'fixed'\n ? compactChrome.header\n : undefined,\n 'data-compact-footer':\n footer !== undefined && compactChrome.footer !== 'fixed'\n ? compactChrome.footer\n : undefined,\n 'data-compact-header-open':\n compactChrome.header === 'overlay' && compactChromeOpen.header\n ? ''\n : undefined,\n 'data-compact-footer-open':\n compactChrome.footer === 'overlay' && compactChromeOpen.footer\n ? ''\n : undefined,\n 'data-chrome-dividers':\n resolvedChromeDividers === 'always' || resolvedChromeDividers === 'none'\n ? resolvedChromeDividers\n : undefined,\n 'data-separator-block-start': String(separators.includes('block-start')),\n 'data-separator-block-end': String(separators.includes('block-end')),\n 'data-separator-inline-start': String(separators.includes('inline-start')),\n 'data-separator-inline-end': String(separators.includes('inline-end')),\n 'data-safe-area-block-start': String(safeAreaEdges.includes('block-start')),\n 'data-safe-area-block-end': String(safeAreaEdges.includes('block-end')),\n 'data-safe-area-inline-start': String(\n safeAreaEdges.includes('inline-start'),\n ),\n 'data-safe-area-inline-end': String(safeAreaEdges.includes('inline-end')),\n 'aria-label': label,\n tabindex: tabIndex,\n slot,\n };\n\n if (element === 'article') return <article {...attributes}>{body}</article>;\n if (element === 'aside') return <aside {...attributes}>{body}</aside>;\n if (element === 'main') return <main {...attributes}>{body}</main>;\n if (element === 'section') return <section {...attributes}>{body}</section>;\n return <div {...attributes}>{body}</div>;\n}\n\nexport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nexport type { ScrollEdge } from '../../../shared/layout/scroll-edge.js';\nexport type {\n SurfaceTint,\n SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n"]}
|
|
@@ -45,6 +45,11 @@ function ListHeader({
|
|
|
45
45
|
actionIcon,
|
|
46
46
|
actionDisabled = false,
|
|
47
47
|
disabledReason,
|
|
48
|
+
titleAction,
|
|
49
|
+
titleActionLabel,
|
|
50
|
+
titleActionDisabled = false,
|
|
51
|
+
titleDisabledReason,
|
|
52
|
+
titleTriggerAttributes = {},
|
|
48
53
|
expanded,
|
|
49
54
|
toggle = false,
|
|
50
55
|
overflowAction,
|
|
@@ -67,6 +72,13 @@ function ListHeader({
|
|
|
67
72
|
triggerAttributes,
|
|
68
73
|
PROTECTED_TRIGGER_DATA_ATTRIBUTES
|
|
69
74
|
),
|
|
75
|
+
...controls === void 0 || titleAction ? {} : { "aria-controls": controls }
|
|
76
|
+
};
|
|
77
|
+
const extensionTitleTriggerAttributes = {
|
|
78
|
+
...filterControlAttributes(
|
|
79
|
+
titleTriggerAttributes,
|
|
80
|
+
PROTECTED_TRIGGER_DATA_ATTRIBUTES
|
|
81
|
+
),
|
|
70
82
|
...controls === void 0 ? {} : { "aria-controls": controls }
|
|
71
83
|
};
|
|
72
84
|
const normalizedCount = typeof count === "number" && Number.isSafeInteger(count) && count >= 0 ? count : void 0;
|
|
@@ -82,6 +94,7 @@ function ListHeader({
|
|
|
82
94
|
renderedStatus && /* @__PURE__ */ jsx(Badge, { size: "compact", tone: badgeTone, children: placeholder ? /* @__PURE__ */ jsx(Skeleton, { width: em(1.75) }) : renderedStatus })
|
|
83
95
|
] });
|
|
84
96
|
const busy = placeholder ? "true" : void 0;
|
|
97
|
+
const Heading = `h${headingLevel}`;
|
|
85
98
|
if (toggle) {
|
|
86
99
|
return /* @__PURE__ */ jsxs(
|
|
87
100
|
"header",
|
|
@@ -166,7 +179,23 @@ function ListHeader({
|
|
|
166
179
|
"aria-busy": busy,
|
|
167
180
|
slot,
|
|
168
181
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ jsx("div", { class: "kui-list-header__title", children: titleAction ? /* @__PURE__ */ jsx(Heading, { class: "kui-list-header__heading", children: /* @__PURE__ */ jsxs(
|
|
183
|
+
"button",
|
|
184
|
+
{
|
|
185
|
+
...extensionTitleTriggerAttributes,
|
|
186
|
+
type: "button",
|
|
187
|
+
class: "kui-list-header__title-action",
|
|
188
|
+
"data-action": placeholder ? void 0 : titleAction,
|
|
189
|
+
"aria-label": titleActionLabel,
|
|
190
|
+
title: titleActionDisabled ? titleDisabledReason : void 0,
|
|
191
|
+
disabled: titleActionDisabled || placeholder || void 0,
|
|
192
|
+
"data-kui-disabled": titleActionDisabled ? "true" : void 0,
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
195
|
+
indicator
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
170
199
|
/* @__PURE__ */ jsx(
|
|
171
200
|
Text,
|
|
172
201
|
{
|
|
@@ -177,7 +206,7 @@ function ListHeader({
|
|
|
177
206
|
}
|
|
178
207
|
),
|
|
179
208
|
indicator
|
|
180
|
-
] }),
|
|
209
|
+
] }) }),
|
|
181
210
|
action && /* @__PURE__ */ jsx(
|
|
182
211
|
"button",
|
|
183
212
|
{
|
|
@@ -199,4 +228,4 @@ function ListHeader({
|
|
|
199
228
|
|
|
200
229
|
export { ListHeader };
|
|
201
230
|
|
|
202
|
-
//# sourceMappingURL=chunk-
|
|
231
|
+
//# sourceMappingURL=chunk-AUYGZ3UP.js.map
|