@kerfjs/ui 5.0.0-beta.7 → 5.0.0-beta.9
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 +20 -20
- package/ai/component-catalog.json +130 -83
- package/ai/public-api-signatures-v1.md +200 -29
- package/ai/skill.md +12 -12
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/browser/list-action-row.js +4 -0
- package/dist/browser/{menu-header.js → list-header.js} +2 -2
- package/dist/browser/{menu-item.js → list-item.js} +2 -2
- package/dist/catalog.d.ts +119 -0
- package/dist/catalog.js +128 -0
- package/dist/catalog.js.map +1 -0
- package/dist/{chunk-TZNCCM5H.js → chunk-2TS7ZSYX.js} +4 -4
- package/dist/chunk-2TS7ZSYX.js.map +1 -0
- package/dist/{chunk-PONXLV5U.js → chunk-37T3VNIZ.js} +1 -1
- package/dist/{chunk-PONXLV5U.js.map → chunk-37T3VNIZ.js.map} +1 -1
- package/dist/{chunk-3YD6ZNRA.js → chunk-7JB7VPRI.js} +8 -8
- package/dist/{chunk-3YD6ZNRA.js.map → chunk-7JB7VPRI.js.map} +1 -1
- package/dist/{chunk-N3SUXLLS.js → chunk-BLK3UEEI.js} +2 -2
- package/dist/{chunk-N3SUXLLS.js.map → chunk-BLK3UEEI.js.map} +1 -1
- package/dist/{chunk-YKUUZPED.js → chunk-L4OKFDJY.js} +7 -7
- package/dist/{chunk-YKUUZPED.js.map → chunk-L4OKFDJY.js.map} +1 -1
- package/dist/{chunk-KJYXOTG3.js → chunk-RUNWEPR4.js} +3 -3
- package/dist/chunk-RUNWEPR4.js.map +1 -0
- package/dist/{chunk-H6URQGJI.js → chunk-W5EQ3HYQ.js} +11 -11
- package/dist/{chunk-H6URQGJI.js.map → chunk-W5EQ3HYQ.js.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +11 -11
- package/dist/{menu-action-row.d.ts → list-action-row.d.ts} +7 -7
- package/dist/list-action-row.js +5 -0
- package/dist/list-action-row.js.map +1 -0
- package/dist/{menu-header.d.ts → list-header.d.ts} +9 -9
- package/dist/list-header.js +7 -0
- package/dist/list-header.js.map +1 -0
- package/dist/{menu-item.d.ts → list-item.d.ts} +5 -5
- package/dist/list-item.js +5 -0
- package/dist/list-item.js.map +1 -0
- package/dist/nav-stack.js +1 -1
- package/dist/panel-header.d.ts +9 -1
- package/dist/panel-header.js +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js +1 -1
- package/dist/split-view.js.map +1 -1
- package/dist/styles/catalog.css +482 -0
- package/dist/styles/list-action-row.css +160 -0
- package/dist/styles/{menu-header.css → list-header.css} +33 -33
- package/dist/styles/list-item.css +123 -0
- package/dist/styles/styles.css +4 -3
- package/dist/toolbar-text.d.ts +10 -2
- package/dist/toolbar-text.js +1 -1
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +26 -0
- package/dist/wire-catalog.js +50 -0
- package/dist/wire-catalog.js.map +1 -0
- package/docs/accessibility.md +15 -10
- package/docs/catalog.md +154 -0
- package/docs/component-contract.md +12 -12
- package/docs/component-selection.md +14 -13
- package/docs/design-philosophy.md +4 -4
- package/docs/layout.md +8 -8
- package/docs/recipes.md +17 -5
- package/docs/split-view.md +1 -1
- package/docs/ux-demo.md +5 -5
- package/llms.txt +12 -8
- package/package.json +25 -16
- package/ux-demo/recipes/app-shell.tsx +3 -3
- package/ux-demo/recipes/list-detail-dialog.tsx +45 -0
- package/ux-demo/recipes/loaders.ts +4 -2
- package/ux-demo/recipes/loading-inspector.tsx +79 -0
- package/ux-demo/recipes/navigation-sidebar.tsx +5 -5
- package/ux-demo/recipes/navigation-stack.tsx +4 -4
- package/ux-demo/recipes/recipes.css +13 -7
- package/dist/browser/menu-action-row.js +0 -4
- package/dist/chunk-KJYXOTG3.js.map +0 -1
- package/dist/chunk-TZNCCM5H.js.map +0 -1
- package/dist/menu-action-row.js +0 -5
- package/dist/menu-action-row.js.map +0 -1
- package/dist/menu-header.js +0 -7
- package/dist/menu-header.js.map +0 -1
- package/dist/menu-item.js +0 -5
- package/dist/menu-item.js.map +0 -1
- package/dist/styles/menu-action-row.css +0 -160
- package/dist/styles/menu-item.css +0 -123
- package/ux-demo/recipes/master-detail-dialog.tsx +0 -45
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { wireTokenSearchFields } from './chunk-2RJBFNB6.js';
|
|
2
|
+
export { ValueTable, ValueTableRow } from './chunk-37T3VNIZ.js';
|
|
2
3
|
export { wireResizableRegions } from './chunk-AQNKJRFH.js';
|
|
3
4
|
export { reorderTabs, wireTabBars } from './chunk-MQIZAD4A.js';
|
|
4
|
-
export { wireTokenSearchFields } from './chunk-2RJBFNB6.js';
|
|
5
5
|
export { StateBanner } from './chunk-I7INRJO4.js';
|
|
6
6
|
export { TabBar } from './chunk-MBR3TYNL.js';
|
|
7
7
|
export { TokenSearchField, placeTokenSearchCaret, readTokenSearchField } from './chunk-7LDCTU7D.js';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export { PanelHeader } from './chunk-TZNCCM5H.js';
|
|
11
|
-
export { Toolbar } from './chunk-DAFFDO33.js';
|
|
12
|
-
export { ToolbarControlGroup } from './chunk-MFKMHK5W.js';
|
|
13
|
-
export { ToolbarText } from './chunk-KJYXOTG3.js';
|
|
8
|
+
export { PanelHeader } from './chunk-2TS7ZSYX.js';
|
|
9
|
+
export { ToolbarText } from './chunk-RUNWEPR4.js';
|
|
14
10
|
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-M5JRI6MN.js';
|
|
15
11
|
export { SegmentedControl } from './chunk-YGN7OMLT.js';
|
|
16
|
-
export { Select } from './chunk-LC3YSAZC.js';
|
|
17
12
|
export { AppTab } from './chunk-2Z5TWHKQ.js';
|
|
18
|
-
export {
|
|
13
|
+
export { Select } from './chunk-LC3YSAZC.js';
|
|
14
|
+
export { ListItem } from './chunk-L4OKFDJY.js';
|
|
15
|
+
export { Toolbar } from './chunk-DAFFDO33.js';
|
|
16
|
+
export { ToolbarControlGroup } from './chunk-MFKMHK5W.js';
|
|
19
17
|
export { EmptyState } from './chunk-WVPYVDXY.js';
|
|
20
18
|
export { LoadingSpinner } from './chunk-55DATV3A.js';
|
|
19
|
+
export { ListActionRow } from './chunk-7JB7VPRI.js';
|
|
20
|
+
export { ListHeader } from './chunk-W5EQ3HYQ.js';
|
|
21
|
+
export { DisclosureArrow } from './chunk-56RJXPHG.js';
|
|
21
22
|
export { LucideIcon } from './chunk-W2FK7ZNY.js';
|
|
22
|
-
export { MenuActionRow } from './chunk-3YD6ZNRA.js';
|
|
23
23
|
|
|
24
24
|
export { Skeleton } from './chunk-B24C4A6T.js';
|
|
25
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type ListActionRowRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4
4
|
'data-component'?: never;
|
|
5
5
|
'data-action'?: never;
|
|
6
6
|
'data-item-id'?: never;
|
|
@@ -10,7 +10,7 @@ type MenuActionRowRootAttributes = Readonly<Record<`data-${string}`, string | un
|
|
|
10
10
|
'data-selected'?: never;
|
|
11
11
|
'data-pressed'?: never;
|
|
12
12
|
}>;
|
|
13
|
-
type
|
|
13
|
+
type ListActionRowTrailingAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
14
14
|
'data-component'?: never;
|
|
15
15
|
'data-action'?: never;
|
|
16
16
|
'data-item-id'?: never;
|
|
@@ -19,7 +19,7 @@ type MenuActionRowTrailingAttributes = Readonly<Record<`data-${string}`, string
|
|
|
19
19
|
'aria-controls'?: string;
|
|
20
20
|
'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true';
|
|
21
21
|
}>;
|
|
22
|
-
interface
|
|
22
|
+
interface ListActionRowProps {
|
|
23
23
|
/** Visible dormant content for the primary button. Must not contain interactive descendants. */
|
|
24
24
|
label: string | SafeHtml;
|
|
25
25
|
/** Decorative dormant content for the primary button. Must not contain interactive descendants. */
|
|
@@ -44,9 +44,9 @@ interface MenuActionRowProps {
|
|
|
44
44
|
trailingActionTitle?: string;
|
|
45
45
|
className?: string;
|
|
46
46
|
style?: string;
|
|
47
|
-
rootAttributes?:
|
|
48
|
-
trailingActionAttributes?:
|
|
47
|
+
rootAttributes?: ListActionRowRootAttributes;
|
|
48
|
+
trailingActionAttributes?: ListActionRowTrailingAttributes;
|
|
49
49
|
}
|
|
50
|
-
declare function
|
|
50
|
+
declare function ListActionRow({ label, icon, action, itemId, selected, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, trailingAction, trailingActionLabel, trailingActionIcon, trailingActionDisabled, trailingActionTitle, className, style, rootAttributes, trailingActionAttributes }: ListActionRowProps): SafeHtml;
|
|
51
51
|
|
|
52
|
-
export {
|
|
52
|
+
export { ListActionRow, type ListActionRowProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"list-action-row.js"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type ListHeaderRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4
4
|
'data-component'?: never;
|
|
5
5
|
'data-action'?: never;
|
|
6
6
|
'data-has-badge'?: never;
|
|
7
7
|
'data-has-count'?: never;
|
|
8
8
|
'data-toggle'?: never;
|
|
9
9
|
}>;
|
|
10
|
-
type
|
|
10
|
+
type ListHeaderTriggerAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
11
11
|
'data-action'?: never;
|
|
12
12
|
popoverTarget?: string;
|
|
13
13
|
popoverTargetAction?: 'toggle' | 'show' | 'hide';
|
|
14
14
|
'aria-controls'?: string;
|
|
15
15
|
'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true';
|
|
16
16
|
}>;
|
|
17
|
-
interface
|
|
17
|
+
interface ListHeaderBaseProps {
|
|
18
18
|
label: string;
|
|
19
19
|
action?: string;
|
|
20
20
|
actionLabel?: string;
|
|
@@ -25,10 +25,10 @@ interface MenuHeaderBaseProps {
|
|
|
25
25
|
toggle?: boolean;
|
|
26
26
|
/** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */
|
|
27
27
|
placeholder?: boolean;
|
|
28
|
-
rootAttributes?:
|
|
29
|
-
triggerAttributes?:
|
|
28
|
+
rootAttributes?: ListHeaderRootAttributes;
|
|
29
|
+
triggerAttributes?: ListHeaderTriggerAttributes;
|
|
30
30
|
}
|
|
31
|
-
type
|
|
31
|
+
type ListHeaderIndicatorProps = {
|
|
32
32
|
count: number;
|
|
33
33
|
countLabel: string;
|
|
34
34
|
badge?: never;
|
|
@@ -37,7 +37,7 @@ type MenuHeaderIndicatorProps = {
|
|
|
37
37
|
countLabel?: never;
|
|
38
38
|
badge?: SafeHtml;
|
|
39
39
|
};
|
|
40
|
-
type
|
|
41
|
-
declare function
|
|
40
|
+
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps;
|
|
41
|
+
declare function ListHeader({ label, count, countLabel, badge, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes }: ListHeaderProps): SafeHtml;
|
|
42
42
|
|
|
43
|
-
export {
|
|
43
|
+
export { ListHeader, type ListHeaderProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"list-header.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type ListItemRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4
4
|
'data-component'?: never;
|
|
5
5
|
'data-action'?: never;
|
|
6
6
|
'data-item-id'?: never;
|
|
@@ -8,7 +8,7 @@ type MenuItemRootAttributes = Readonly<Record<`data-${string}`, string | undefin
|
|
|
8
8
|
'data-multiline'?: never;
|
|
9
9
|
'data-state'?: never;
|
|
10
10
|
}>;
|
|
11
|
-
interface
|
|
11
|
+
interface ListItemProps {
|
|
12
12
|
label: string | SafeHtml;
|
|
13
13
|
icon?: SafeHtml;
|
|
14
14
|
trailing?: SafeHtml;
|
|
@@ -26,8 +26,8 @@ interface MenuItemProps {
|
|
|
26
26
|
tabIndex?: number;
|
|
27
27
|
/** Render the row as an unanimated loading skeleton, disabling its action. */
|
|
28
28
|
placeholder?: boolean;
|
|
29
|
-
rootAttributes?:
|
|
29
|
+
rootAttributes?: ListItemRootAttributes;
|
|
30
30
|
}
|
|
31
|
-
declare function
|
|
31
|
+
declare function ListItem({ label, icon, trailing, selected, action, itemId, className, style, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, rootAttributes }: ListItemProps): SafeHtml;
|
|
32
32
|
|
|
33
|
-
export {
|
|
33
|
+
export { ListItem, type ListItemProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"list-item.js"}
|
package/dist/nav-stack.js
CHANGED
package/dist/panel-header.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
|
+
import { HeadingLevel } from './toolbar-text.js';
|
|
2
3
|
|
|
3
4
|
interface PanelHeaderProps {
|
|
4
5
|
title: string;
|
|
@@ -8,6 +9,13 @@ interface PanelHeaderProps {
|
|
|
8
9
|
icon?: SafeHtml;
|
|
9
10
|
iconClassName?: string;
|
|
10
11
|
actions?: SafeHtml;
|
|
12
|
+
/**
|
|
13
|
+
* Expose the title as a heading landmark (`role="heading"` + `aria-level`). Set it
|
|
14
|
+
* for a PAGE or view heading so screen-reader heading navigation works and the view
|
|
15
|
+
* has a primary heading; omit it (the default) for a dialog title, which is instead
|
|
16
|
+
* referenced via `aria-labelledby={titleId}` and needs no heading landmark.
|
|
17
|
+
*/
|
|
18
|
+
headingLevel?: HeadingLevel;
|
|
11
19
|
/** Render the title and summary as unanimated loading skeletons, keeping the icon and actions. */
|
|
12
20
|
placeholder?: boolean;
|
|
13
21
|
}
|
|
@@ -23,6 +31,6 @@ interface PanelHeaderProps {
|
|
|
23
31
|
* is passed straight into the toolbar's trailing zone; the app supplies whatever
|
|
24
32
|
* trailing controls it needs (typically a `ToolbarControlGroup`).
|
|
25
33
|
*/
|
|
26
|
-
declare function PanelHeader({ title, titleId, summary, summaryId, icon, iconClassName, actions, placeholder }: PanelHeaderProps): SafeHtml;
|
|
34
|
+
declare function PanelHeader({ title, titleId, summary, summaryId, icon, iconClassName, actions, headingLevel, placeholder }: PanelHeaderProps): SafeHtml;
|
|
27
35
|
|
|
28
36
|
export { PanelHeader, type PanelHeaderProps };
|
package/dist/panel-header.js
CHANGED
package/dist/split-view.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ interface SplitViewProps {
|
|
|
31
31
|
className?: string;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* A list-detail
|
|
34
|
+
* A list-detail split. On roomy classes it shows both panes side
|
|
35
35
|
* by side with an optional resizable separator; on compact classes it collapses
|
|
36
36
|
* to a `NavStack` (list → detail). See `docs/23-app-layouts.md` §3.2. Compose the
|
|
37
37
|
* resizable wiring with `wireResizableRegions` and the compact back with
|
package/dist/split-view.js
CHANGED
package/dist/split-view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/split-view.tsx"],"names":[],"mappings":";;;;;;AA4CO,SAAS,UAAU,EAAE,EAAA,EAAI,OAAO,IAAA,EAAM,MAAA,EAAQ,UAAU,KAAA,EAAO,YAAA,GAAe,OAAO,SAAA,GAAY,EAAA,EAAI,cAAc,EAAA,EAAI,SAAA,GAAY,QAAQ,SAAA,EAAW,SAAA,GAAY,IAAG,EAAmB;AAC7L,EAAA,IAAI,OAAA,EAAS;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,EAAG,EAAA,EAAQ,gBAAA,EAAe,YAAA,EAAa,iBAAA,EAAgB,OAAA,EAAQ,cAAY,KAAA,EAC9H,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,oBACD,GAAA,CAAC,SAAI,KAAA,EAAM,iCAAA,EAAkC,qBAAiB,IAAA,EAAC,YAAA,EAAY,WAAA,IAAe,MAAA,EAAY,QAAA,EAAA,MAAA,EAAO;AAAA,GAAA,EAC/G,CAAA;AACF","file":"split-view.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { NavStack } from './nav-stack.js';\nimport { ResizableRegion } from './resizable-region.js';\n\nexport interface SplitViewResizable {\n size: number;\n min: number;\n max: number;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: SafeHtml;\n /** The detail (secondary) pane. */\n detail: SafeHtml;\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 /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n className?: string;\n}\n\n/**\n * A list-detail
|
|
1
|
+
{"version":3,"sources":["../src/split-view.tsx"],"names":[],"mappings":";;;;;;AA4CO,SAAS,UAAU,EAAE,EAAA,EAAI,OAAO,IAAA,EAAM,MAAA,EAAQ,UAAU,KAAA,EAAO,YAAA,GAAe,OAAO,SAAA,GAAY,EAAA,EAAI,cAAc,EAAA,EAAI,SAAA,GAAY,QAAQ,SAAA,EAAW,SAAA,GAAY,IAAG,EAAmB;AAC7L,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,MAAM,KA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,gBAAA,EAAe,YAAA,EAAa,iBAAA,EAAgB,OAAA,EAAQ,cAAY,KAAA,EAC9H,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,oBACD,GAAA,CAAC,SAAI,KAAA,EAAM,iCAAA,EAAkC,qBAAiB,IAAA,EAAC,YAAA,EAAY,WAAA,IAAe,MAAA,EAAY,QAAA,EAAA,MAAA,EAAO;AAAA,GAAA,EAC/G,CAAA;AACF","file":"split-view.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { NavStack } from './nav-stack.js';\nimport { ResizableRegion } from './resizable-region.js';\n\nexport interface SplitViewResizable {\n size: number;\n min: number;\n max: number;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: SafeHtml;\n /** The detail (secondary) pane. */\n detail: SafeHtml;\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 /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n className?: string;\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({ id, label, list, detail, compact = false, detailActive = false, listTitle = '', detailTitle = '', backLabel = 'Back', resizable, className = '' }: SplitViewProps) {\n if (compact) {\n const views = detailActive\n ? [{ key: 'list', title: listTitle, content: list }, { key: 'detail', title: detailTitle, content: detail }]\n : [{ key: 'list', title: listTitle, content: list }];\n return <div class={`kui-split-view kui-split-view--compact ${className}`.trim()} id={id} data-component=\"split-view\" data-split-mode=\"compact\">\n <NavStack id={`${id}-stack`} label={label} views={views} backLabel={backLabel} />\n </div>;\n }\n const listPane = resizable\n ? <ResizableRegion id={`${id}-list`} label={listTitle || 'List'} size={resizable.size} min={resizable.min} max={resizable.max}>\n <div class=\"kui-split-view__list kui-pane\" data-split-list>{list}</div>\n </ResizableRegion>\n : <div class=\"kui-split-view__list kui-pane\" data-split-list>{list}</div>;\n return <div class={`kui-split-view ${className}`.trim()} id={id} data-component=\"split-view\" data-split-mode=\"split\" aria-label={label}>\n {listPane}\n <div class=\"kui-split-view__detail kui-pane\" data-split-detail aria-label={detailTitle || undefined}>{detail}</div>\n </div>;\n}\n"]}
|