@kerfjs/ui 4.4.1 → 5.0.0-beta.3
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 +231 -5
- package/ai/component-catalog.json +4467 -0
- package/ai/component-catalog.schema.json +79 -0
- package/ai/public-api-signatures-v1.md +619 -0
- package/ai/skill.md +64 -11
- package/ai/webawesome-jsx-signatures-v1.md +106 -0
- package/dist/app-tab.d.ts +12 -2
- package/dist/app-tab.js +2 -1
- package/dist/browser/app-tab.js +2 -2
- package/dist/browser/dialog-header.js +4 -2
- package/dist/browser/disclosure-arrow.js +4 -0
- package/dist/browser/empty-state.js +3 -3
- package/dist/browser/loading-spinner.js +2 -2
- package/dist/browser/lucide-icon.js +2 -2
- package/dist/browser/menu-action-row.js +3 -0
- package/dist/browser/menu-header.js +4 -2
- package/dist/browser/menu-item.js +2 -2
- package/dist/browser/page-header.js +2 -2
- package/dist/browser/resizable-region.js +2 -2
- package/dist/browser/segmented-control.js +2 -2
- package/dist/browser/select.js +3 -3
- package/dist/browser/state-banner.js +2 -2
- package/dist/browser/tab-bar.js +2 -2
- package/dist/browser/token-search-field.js +4 -0
- package/dist/browser/toolbar-control-group.js +2 -2
- package/dist/browser/toolbar-text.js +2 -2
- package/dist/browser/toolbar.js +2 -2
- package/dist/browser/value-table.js +2 -2
- package/dist/chunk-56RJXPHG.js +43 -0
- package/dist/chunk-56RJXPHG.js.map +1 -0
- package/dist/chunk-7BR3DO2A.js +31 -0
- package/dist/chunk-7BR3DO2A.js.map +1 -0
- package/dist/chunk-7LDCTU7D.js +134 -0
- package/dist/chunk-7LDCTU7D.js.map +1 -0
- package/dist/{chunk-4HHCYSGT.js → chunk-AQNKJRFH.js} +2 -2
- package/dist/{chunk-4HHCYSGT.js.map → chunk-AQNKJRFH.js.map} +1 -1
- package/dist/{chunk-NHXX4JI5.js → chunk-CTQKI2XL.js} +3 -3
- package/dist/chunk-CTQKI2XL.js.map +1 -0
- package/dist/chunk-EGHL5S4P.js +33 -0
- package/dist/chunk-EGHL5S4P.js.map +1 -0
- package/dist/chunk-H5AGGVU5.js +75 -0
- package/dist/chunk-H5AGGVU5.js.map +1 -0
- package/dist/chunk-K3G72I6D.js +24 -0
- package/dist/chunk-K3G72I6D.js.map +1 -0
- package/dist/{chunk-3O7ZEUW2.js → chunk-M5JRI6MN.js} +3 -3
- package/dist/chunk-M5JRI6MN.js.map +1 -0
- package/dist/chunk-NPPD2A6O.js +40 -0
- package/dist/chunk-NPPD2A6O.js.map +1 -0
- package/dist/chunk-R6JHHBKQ.js +19 -0
- package/dist/chunk-R6JHHBKQ.js.map +1 -0
- package/dist/chunk-S3TPM2LP.js +23 -0
- package/dist/chunk-S3TPM2LP.js.map +1 -0
- package/dist/{chunk-T5XNMVOI.js → chunk-XZXRLY5Q.js} +14 -5
- package/dist/chunk-XZXRLY5Q.js.map +1 -0
- package/dist/dialog-header.d.ts +3 -2
- package/dist/dialog-header.js +3 -1
- package/dist/disclosure-arrow.d.ts +14 -0
- package/dist/disclosure-arrow.js +4 -0
- package/dist/disclosure-arrow.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +16 -11
- package/dist/menu-action-row.d.ts +50 -0
- package/dist/menu-action-row.js +4 -0
- package/dist/menu-action-row.js.map +1 -0
- package/dist/menu-header.d.ts +28 -2
- package/dist/menu-header.js +4 -1
- package/dist/menu-item.d.ts +10 -1
- package/dist/menu-item.js +2 -1
- package/dist/resizable-region.d.ts +3 -1
- package/dist/resizable-region.js +1 -1
- package/dist/select.js +1 -1
- package/dist/styles/app-tab.css +152 -0
- package/dist/styles/dialog-header.css +87 -0
- package/dist/styles/disclosure-arrow.css +23 -0
- package/dist/styles/empty-state.css +47 -0
- package/dist/styles/foundation.css +326 -0
- package/dist/styles/layout.css +73 -0
- package/dist/styles/loading-spinner.css +21 -0
- package/dist/styles/lucide-icon.css +6 -0
- package/dist/styles/menu-action-row.css +154 -0
- package/dist/styles/menu-header.css +143 -0
- package/dist/styles/menu-item.css +118 -0
- package/dist/styles/page-header.css +26 -0
- package/dist/styles/resizable-region.css +111 -0
- package/{src → dist/styles}/segmented-control.css +62 -31
- package/dist/styles/select.css +96 -0
- package/dist/styles/state-banner.css +173 -0
- package/dist/styles/styles.css +22 -0
- package/dist/styles/tab-bar.css +45 -0
- package/dist/styles/token-search-field.css +281 -0
- package/dist/styles/toolbar-control-group.css +161 -0
- package/dist/styles/toolbar-text.css +29 -0
- package/dist/styles/toolbar.css +52 -0
- package/dist/styles/value-table.css +75 -0
- package/{src → dist/styles}/webawesome.css +119 -29
- package/dist/token-search-field.d.ts +43 -0
- package/dist/token-search-field.js +4 -0
- package/dist/token-search-field.js.map +1 -0
- package/dist/value-table.d.ts +10 -2
- package/dist/value-table.js +1 -1
- package/dist/webawesome.d.ts +100 -0
- package/dist/webawesome.js +3 -0
- package/dist/webawesome.js.map +1 -0
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-token-search-fields.d.ts +11 -0
- package/dist/wire-token-search-fields.js +5 -0
- package/dist/wire-token-search-fields.js.map +1 -0
- package/docs/accessibility.md +60 -3
- package/docs/component-contract.md +128 -3
- package/docs/component-selection.md +133 -0
- package/docs/design-philosophy.md +38 -0
- package/docs/examples/command-palette-adapter.tsx +70 -0
- package/docs/layout.md +95 -0
- package/docs/recipes.md +116 -0
- package/docs/ux-demo.md +17 -5
- package/docs/webawesome-theme.md +15 -0
- package/llms.txt +25 -2
- package/package.json +70 -27
- package/ux-demo/recipes/app-shell.tsx +32 -0
- package/ux-demo/recipes/compact-toolbar.tsx +43 -0
- package/ux-demo/recipes/composer-form.tsx +62 -0
- package/ux-demo/recipes/list-workspace-states.tsx +26 -0
- package/ux-demo/recipes/loaders.ts +27 -0
- package/ux-demo/recipes/master-detail-dialog.tsx +45 -0
- package/ux-demo/recipes/mount-recipe.ts +38 -0
- package/ux-demo/recipes/navigation-sidebar.tsx +26 -0
- package/ux-demo/recipes/recipes.css +328 -0
- package/ux-demo/recipes/types.ts +11 -0
- package/ux-demo/recipes/workspace-header.tsx +12 -0
- package/dist/chunk-3O7ZEUW2.js.map +0 -1
- package/dist/chunk-723YNJBH.js +0 -17
- package/dist/chunk-723YNJBH.js.map +0 -1
- package/dist/chunk-NHXX4JI5.js.map +0 -1
- package/dist/chunk-OPCJRCYO.js +0 -19
- package/dist/chunk-OPCJRCYO.js.map +0 -1
- package/dist/chunk-T5XNMVOI.js.map +0 -1
- package/dist/chunk-VKH2JLDZ.js +0 -10
- package/dist/chunk-VKH2JLDZ.js.map +0 -1
- package/dist/chunk-WY4CAEPG.js +0 -14
- package/dist/chunk-WY4CAEPG.js.map +0 -1
- package/src/app-tab.css +0 -20
- package/src/dialog-header.css +0 -9
- package/src/empty-state.css +0 -6
- package/src/foundation.css +0 -106
- package/src/loading-spinner.css +0 -4
- package/src/lucide-icon.css +0 -1
- package/src/menu-header.css +0 -13
- package/src/menu-item.css +0 -12
- package/src/page-header.css +0 -3
- package/src/resizable-region.css +0 -19
- package/src/select.css +0 -18
- package/src/state-banner.css +0 -31
- package/src/styles.css +0 -18
- package/src/tab-bar.css +0 -4
- package/src/toolbar-control-group.css +0 -25
- package/src/toolbar-text.css +0 -4
- package/src/toolbar.css +0 -9
- package/src/value-table.css +0 -5
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '@kerfjs/ui/layout.css';
|
|
2
|
+
import './recipes.css';
|
|
3
|
+
|
|
4
|
+
import { EmptyState } from '@kerfjs/ui/empty-state';
|
|
5
|
+
import { LoadingSpinner } from '@kerfjs/ui/loading-spinner';
|
|
6
|
+
import { PageHeader } from '@kerfjs/ui/page-header';
|
|
7
|
+
import { StateBanner } from '@kerfjs/ui/state-banner';
|
|
8
|
+
import { signal } from 'kerfjs';
|
|
9
|
+
|
|
10
|
+
import type { RecipeFactory } from './types.js';
|
|
11
|
+
|
|
12
|
+
type ListState = 'loading' | 'empty' | 'populated' | 'stale' | 'error';
|
|
13
|
+
const items = ['Audit keyboard focus order', 'Verify 200% zoom layout', 'Publish package migration notes'];
|
|
14
|
+
|
|
15
|
+
export const createRecipe: RecipeFactory = (announce) => {
|
|
16
|
+
const state = signal<ListState>('loading');
|
|
17
|
+
const populated = () => <ul class="recipe-list__items" aria-label="Release tasks">{items.map((item, index) => <li><strong>{item}</strong><span class="kui-recipe__muted">{index === 0 ? 'In review · Mara' : index === 1 ? 'Ready · Sam' : 'Draft · Inez'}</span></li>)}</ul>;
|
|
18
|
+
const renderBody = () => {
|
|
19
|
+
if (state.value === 'loading') return <EmptyState title="Loading release tasks" detail="The current workspace will appear when data is ready." busy action={<button class="kui-recipe__button" type="button" data-action="recipe-action" data-recipe-command="load">Complete load</button>} />;
|
|
20
|
+
if (state.value === 'empty') return <EmptyState title="No release tasks" detail="Create the first task for this milestone." action={<button class="kui-recipe__button" data-primary="true" type="button" data-action="recipe-action" data-recipe-command="create">Create task</button>} />;
|
|
21
|
+
if (state.value === 'error') return <StateBanner title="Release tasks could not be refreshed" detail="Existing filters are preserved. Try again when the connection recovers." tone="danger" urgency="alert" action={<button class="kui-recipe__button" type="button" data-action="recipe-action" data-recipe-command="retry">Retry</button>} />;
|
|
22
|
+
return <>{state.value === 'stale' && <StateBanner title="Showing saved results" detail="Refreshing in the background." tone="warning" action={<span class="kui-inline-metadata"><LoadingSpinner label="Refreshing release tasks" /><button class="kui-recipe__button" type="button" data-action="recipe-action" data-recipe-command="finish">Finish refresh</button></span>} />}{populated()}</>;
|
|
23
|
+
};
|
|
24
|
+
const render = () => <section class="kui-recipe recipe-list kui-recipe__surface kui-pane" data-recipe="recipe-list-workspace-states" data-list-state={state.value}><PageHeader title="Release tasks" action={<div class="kui-control-cluster"><button class="kui-recipe__button" type="button" data-action="recipe-action" data-recipe-command="empty">Clear</button><button class="kui-recipe__button" type="button" data-action="recipe-action" data-recipe-command="fail">Simulate failure</button><button class="kui-recipe__button" data-primary="true" type="button" data-action="recipe-action" data-recipe-command="refresh">Refresh</button></div>} /><div class="recipe-list__body kui-pane__content kui-content">{renderBody()}<p class="kui-recipe__ownership kui-content-item">The recipe owns feedback placement and stable content. The app owns fetching, cache age, retry policy, and domain rows.</p></div></section>;
|
|
25
|
+
return { render, action(command) { const next: Record<string, ListState> = { load: 'populated', empty: 'empty', create: 'populated', fail: 'error', retry: 'populated', refresh: 'stale', finish: 'populated' }; if (command in next) state.value = next[command]!; announce(`List state: ${state.value}`); } };
|
|
26
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RecipeFactory } from './types.js';
|
|
2
|
+
|
|
3
|
+
export const recipeIds = [
|
|
4
|
+
'recipe-app-shell',
|
|
5
|
+
'recipe-navigation-sidebar',
|
|
6
|
+
'recipe-workspace-header',
|
|
7
|
+
'recipe-master-detail-dialog',
|
|
8
|
+
'recipe-composer-form',
|
|
9
|
+
'recipe-list-workspace-states',
|
|
10
|
+
'recipe-compact-toolbar',
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
export type RecipeId = typeof recipeIds[number];
|
|
14
|
+
|
|
15
|
+
export const recipeLoaders: Record<RecipeId, () => Promise<{ createRecipe: RecipeFactory }>> = {
|
|
16
|
+
'recipe-app-shell': () => import('./app-shell.js'),
|
|
17
|
+
'recipe-navigation-sidebar': () => import('./navigation-sidebar.js'),
|
|
18
|
+
'recipe-workspace-header': () => import('./workspace-header.js'),
|
|
19
|
+
'recipe-master-detail-dialog': () => import('./master-detail-dialog.js'),
|
|
20
|
+
'recipe-composer-form': () => import('./composer-form.js'),
|
|
21
|
+
'recipe-list-workspace-states': () => import('./list-workspace-states.js'),
|
|
22
|
+
'recipe-compact-toolbar': () => import('./compact-toolbar.js'),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function isRecipeId(value: string): value is RecipeId {
|
|
26
|
+
return (recipeIds as readonly string[]).includes(value);
|
|
27
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import '@kerfjs/ui/layout.css';
|
|
2
|
+
import '@kerfjs/ui/webawesome.css';
|
|
3
|
+
import '@awesome.me/webawesome/dist/components/button/button.js';
|
|
4
|
+
import '@awesome.me/webawesome/dist/components/dialog/dialog.js';
|
|
5
|
+
import './recipes.css';
|
|
6
|
+
|
|
7
|
+
import { DialogHeader } from '@kerfjs/ui/dialog-header';
|
|
8
|
+
import { LucideIcon } from '@kerfjs/ui/lucide-icon';
|
|
9
|
+
import { MenuHeader } from '@kerfjs/ui/menu-header';
|
|
10
|
+
import { MenuItem } from '@kerfjs/ui/menu-item';
|
|
11
|
+
import { ValueTable, ValueTableRow } from '@kerfjs/ui/value-table';
|
|
12
|
+
import { signal } from 'kerfjs';
|
|
13
|
+
import { FileText } from 'lucide';
|
|
14
|
+
|
|
15
|
+
import type { RecipeFactory } from './types.js';
|
|
16
|
+
|
|
17
|
+
const records = {
|
|
18
|
+
alpha: { name: 'Northstar migration', owner: 'Mara Chen', state: 'In review', updated: 'Today, 09:42' },
|
|
19
|
+
beta: { name: 'Tablet navigation', owner: 'Sam Rivera', state: 'Ready', updated: 'Yesterday, 16:20' },
|
|
20
|
+
gamma: { name: 'Contrast audit', owner: 'Inez Okafor', state: 'Blocked', updated: 'Monday, 11:05' },
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
interface RecipeDialogElement extends HTMLElement {
|
|
24
|
+
open: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const createRecipe: RecipeFactory = (announce) => {
|
|
28
|
+
const selected = signal<keyof typeof records>('alpha');
|
|
29
|
+
const open = { value: false };
|
|
30
|
+
const render = () => <section class="kui-recipe kui-content" data-recipe="recipe-master-detail-dialog"><button class="kui-recipe__button kui-content-item" data-primary="true" type="button" data-action="recipe-action" data-recipe-command="open">Open project details</button><p class="kui-recipe__ownership kui-content-item">Web Awesome owns modal focus and dismissal. The recipe owns header/body/master-detail anatomy; the app owns open state, selection, and policy.</p><wa-dialog class="recipe-dialog" label="Project details" without-header open={open.value}><div class="recipe-dialog__pane kui-pane"><DialogHeader title="Project details" titleId="recipe-dialog-title" summary="Compare delivery state without leaving the workspace." summaryId="recipe-dialog-summary" icon={<LucideIcon icon={FileText} name="file-text" />} actions={<wa-button appearance="plain" data-action="recipe-action" data-recipe-command="close">Close</wa-button>} actionsLabel="Project detail actions" /><div class="recipe-master-detail kui-pane__content"><nav class="recipe-master-detail__master kui-pane" aria-label="Projects"><MenuHeader label="Recent projects" /><div class="kui-pane__content kui-content"><section>{Object.entries(records).map(([id, record]) => <MenuItem action="recipe-action" itemId={id} label={record.name} selected={selected.value === id} multiline />)}</section></div></nav><section class="recipe-master-detail__detail kui-content" aria-live="polite"><h3 class="kui-recipe__pane-title kui-content-item">{records[selected.value].name}</h3><ValueTable label="Project details"><ValueTableRow label="Owner" value={records[selected.value].owner} /><ValueTableRow label="Status" value={records[selected.value].state} /><ValueTableRow label="Updated" value={records[selected.value].updated} /></ValueTable><div class="kui-control-cluster kui-content-item"><wa-button appearance="outlined" data-action="recipe-action" data-recipe-command="archive">Archive</wa-button><wa-button variant="brand" appearance="accent" data-action="recipe-action" data-recipe-command="open-record">Open project</wa-button></div></section></div></div></wa-dialog></section>;
|
|
31
|
+
return {
|
|
32
|
+
render,
|
|
33
|
+
action(command, element) {
|
|
34
|
+
const id = element.dataset.itemId;
|
|
35
|
+
if (id && id in records) { selected.value = id as keyof typeof records; announce(`Selected ${records[selected.value].name}`); return; }
|
|
36
|
+
const dialog = element.closest('[data-recipe]')?.querySelector<RecipeDialogElement>('wa-dialog');
|
|
37
|
+
if (command === 'open' && dialog) { element.focus(); open.value = true; dialog.open = true; return; }
|
|
38
|
+
if (command === 'close' && dialog) { dialog.open = false; return; }
|
|
39
|
+
announce(`${command} requested`);
|
|
40
|
+
},
|
|
41
|
+
afterHide() {
|
|
42
|
+
open.value = false;
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { wireResizableRegions } from '@kerfjs/ui/wire-resizable-regions';
|
|
2
|
+
import { delegate, mount } from 'kerfjs';
|
|
3
|
+
import { delegateActions } from 'kerfjs/actions';
|
|
4
|
+
|
|
5
|
+
import type { RecipeController } from './types.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Copyable application boundary for a recipe. The caller owns one stable root
|
|
9
|
+
* and retains the returned disposer for that root's lifetime.
|
|
10
|
+
*/
|
|
11
|
+
export function mountRecipe(root: HTMLElement, controller: RecipeController): () => void {
|
|
12
|
+
const stopMount = mount(root, controller.render);
|
|
13
|
+
const stopActions = delegateActions(root, 'click', {
|
|
14
|
+
'recipe-action': (_event, element) => {
|
|
15
|
+
const target = element as HTMLElement;
|
|
16
|
+
controller.action(target.dataset.recipeCommand ?? '', target);
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const dispatchChange = (_event: Event, element: Element) => controller.change?.(element as HTMLElement);
|
|
20
|
+
const stopChanges = delegate(root, 'change', 'wa-select, wa-input, wa-textarea', dispatchChange);
|
|
21
|
+
const stopInputs = delegate(root, 'input', 'wa-input, wa-textarea', dispatchChange);
|
|
22
|
+
const stopDialogs = delegate(root, 'wa-after-hide', 'wa-dialog', (_event, element) => controller.afterHide?.(element as HTMLElement));
|
|
23
|
+
const stopResize = wireResizableRegions(root, {
|
|
24
|
+
onCommit: ({ id, size }) => controller.resize?.(id, size),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
let disposed = false;
|
|
28
|
+
return () => {
|
|
29
|
+
if (disposed) return;
|
|
30
|
+
disposed = true;
|
|
31
|
+
stopResize();
|
|
32
|
+
stopDialogs();
|
|
33
|
+
stopInputs();
|
|
34
|
+
stopChanges();
|
|
35
|
+
stopActions();
|
|
36
|
+
stopMount();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '@kerfjs/ui/layout.css';
|
|
2
|
+
import './recipes.css';
|
|
3
|
+
|
|
4
|
+
import { LucideIcon } from '@kerfjs/ui/lucide-icon';
|
|
5
|
+
import { MenuHeader } from '@kerfjs/ui/menu-header';
|
|
6
|
+
import { MenuItem } from '@kerfjs/ui/menu-item';
|
|
7
|
+
import { Toolbar } from '@kerfjs/ui/toolbar';
|
|
8
|
+
import { ToolbarControlGroup } from '@kerfjs/ui/toolbar-control-group';
|
|
9
|
+
import { signal } from 'kerfjs';
|
|
10
|
+
import { Folder, Inbox, Plus, Settings, Users } from 'lucide';
|
|
11
|
+
|
|
12
|
+
import type { RecipeFactory } from './types.js';
|
|
13
|
+
|
|
14
|
+
export const createRecipe: RecipeFactory = (announce) => {
|
|
15
|
+
const selected = signal('inbox');
|
|
16
|
+
const expanded = signal(true);
|
|
17
|
+
const render = () => <aside class="kui-recipe recipe-sidebar kui-recipe__surface kui-pane" data-recipe="recipe-navigation-sidebar">
|
|
18
|
+
<div class="recipe-sidebar__body kui-pane__content kui-content">
|
|
19
|
+
<section><MenuHeader label="Workspace" count={3} countLabel="3 workspaces" action="recipe-action" actionLabel="Add workspace item" actionIcon={<LucideIcon icon={Plus} name="plus" />} /><MenuItem action="recipe-action" itemId="inbox" label="Inbox" icon={<LucideIcon icon={Inbox} name="inbox" />} trailing={<span>12</span>} selected={selected.value === 'inbox'} /><MenuItem action="recipe-action" itemId="shared" label="Shared with me" icon={<LucideIcon icon={Users} name="users" />} selected={selected.value === 'shared'} /><MenuItem action="recipe-action" itemId="drafts" label="Drafts without an icon" selected={selected.value === 'drafts'} /></section>
|
|
20
|
+
<section><MenuHeader label="Projects" toggle action="recipe-action" expanded={expanded.value} />{expanded.value && <><MenuItem action="recipe-action" itemId="design" label="Design system rollout across desktop and tablet" icon={<LucideIcon icon={Folder} name="folder" />} selected={selected.value === 'design'} multiline /><MenuItem action="recipe-action" itemId="archive" label="Archived" disabled title="Available to administrators" /><div class="kui-content-item"><strong>Quarterly goal</strong><p class="kui-recipe__muted">Ship accessible navigation patterns to every workspace.</p></div></>}</section>
|
|
21
|
+
<p class="kui-recipe__ownership kui-content-item">The recipe owns pane, content-item, and toolbar geometry. The app owns routes, permissions, labels, and disclosure state.</p>
|
|
22
|
+
</div>
|
|
23
|
+
<footer class="recipe-sidebar__footer kui-pane__footer"><Toolbar label="Sidebar actions" divider={false} leading={<ToolbarControlGroup appearance="borderless" single><button type="button" aria-label="Add project" data-action="recipe-action" data-recipe-command="add"><LucideIcon icon={Plus} name="plus" /></button></ToolbarControlGroup>} trailing={<ToolbarControlGroup appearance="borderless" single><button type="button" aria-label="Workspace settings" data-action="recipe-action" data-recipe-command="settings"><LucideIcon icon={Settings} name="settings" /></button></ToolbarControlGroup>} /></footer>
|
|
24
|
+
</aside>;
|
|
25
|
+
return { render, action(command, element) { if (element.matches('.kui-menu-header__toggle')) { expanded.value = !expanded.value; announce(expanded.value ? 'Projects expanded' : 'Projects collapsed'); return; } const id = element.dataset.itemId; if (id) selected.value = id; announce(id ? `Selected ${id}` : `${command} requested`); } };
|
|
26
|
+
};
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
.kui-recipe {
|
|
2
|
+
width: 100%;
|
|
3
|
+
min-width: 0;
|
|
4
|
+
color: var(--kui-color-text);
|
|
5
|
+
container-type: inline-size;
|
|
6
|
+
}
|
|
7
|
+
.kui-recipe button {
|
|
8
|
+
font: inherit;
|
|
9
|
+
}
|
|
10
|
+
.kui-recipe__button {
|
|
11
|
+
min-height: 2rem;
|
|
12
|
+
padding: var(--kui-space-xs) var(--kui-space-s);
|
|
13
|
+
border: 1px solid var(--kui-color-border);
|
|
14
|
+
border-radius: var(--kui-radius-m);
|
|
15
|
+
color: var(--kui-color-text);
|
|
16
|
+
background: var(--kui-color-surface);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
.kui-recipe__button[data-primary="true"] {
|
|
20
|
+
color: var(--kui-color-brand-on-normal);
|
|
21
|
+
border-color: var(--kui-color-brand-border-normal);
|
|
22
|
+
background: var(--kui-color-brand-fill-normal);
|
|
23
|
+
}
|
|
24
|
+
.kui-recipe__button:focus-visible {
|
|
25
|
+
outline: var(--kui-focus-ring);
|
|
26
|
+
outline-offset: 2px;
|
|
27
|
+
}
|
|
28
|
+
.kui-recipe__surface {
|
|
29
|
+
min-width: 0;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
border: 1px solid var(--kui-color-border);
|
|
32
|
+
border-radius: var(--kui-radius-l);
|
|
33
|
+
background: var(--kui-color-surface);
|
|
34
|
+
box-shadow: var(--kui-shadow-s);
|
|
35
|
+
}
|
|
36
|
+
.kui-recipe__pane-title {
|
|
37
|
+
margin: 0;
|
|
38
|
+
font-size: var(--kui-font-s);
|
|
39
|
+
}
|
|
40
|
+
.kui-recipe__muted {
|
|
41
|
+
color: var(--kui-color-text-quiet);
|
|
42
|
+
font-size: var(--kui-font-s);
|
|
43
|
+
}
|
|
44
|
+
.kui-recipe__ownership {
|
|
45
|
+
margin: 0;
|
|
46
|
+
color: var(--kui-color-text-quiet);
|
|
47
|
+
font-size: var(--kui-font-xs);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.recipe-shell {
|
|
51
|
+
display: grid;
|
|
52
|
+
height: min(37rem, 70vh);
|
|
53
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
54
|
+
}
|
|
55
|
+
.recipe-shell__body {
|
|
56
|
+
display: flex;
|
|
57
|
+
min-width: 0;
|
|
58
|
+
min-height: 0;
|
|
59
|
+
}
|
|
60
|
+
.recipe-shell__toolbar-actions {
|
|
61
|
+
display: flex;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
.recipe-shell__responsive-controls {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
.recipe-shell__nav,
|
|
69
|
+
.recipe-shell__inspector {
|
|
70
|
+
min-height: 0;
|
|
71
|
+
background: var(--kui-color-surface);
|
|
72
|
+
}
|
|
73
|
+
.recipe-shell__nav-list,
|
|
74
|
+
.recipe-shell__inspector-body,
|
|
75
|
+
.recipe-shell__main-body {
|
|
76
|
+
min-height: 0;
|
|
77
|
+
}
|
|
78
|
+
.recipe-shell__main {
|
|
79
|
+
display: grid;
|
|
80
|
+
min-width: 16rem;
|
|
81
|
+
min-height: 0;
|
|
82
|
+
flex: 1;
|
|
83
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
84
|
+
background: var(--kui-color-surface-lowered);
|
|
85
|
+
}
|
|
86
|
+
.recipe-shell__cards {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
89
|
+
gap: var(--kui-layout-content-gap);
|
|
90
|
+
}
|
|
91
|
+
.recipe-shell__card {
|
|
92
|
+
--kui-content-item-border: var(--kui-color-border-quiet);
|
|
93
|
+
--kui-content-item-background: var(--kui-color-surface);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.recipe-sidebar {
|
|
97
|
+
display: grid;
|
|
98
|
+
width: min(22rem, 100%);
|
|
99
|
+
min-height: 32rem;
|
|
100
|
+
margin-inline: auto;
|
|
101
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
102
|
+
}
|
|
103
|
+
.recipe-sidebar__body {
|
|
104
|
+
min-height: 0;
|
|
105
|
+
}
|
|
106
|
+
.recipe-sidebar__footer {
|
|
107
|
+
border-block-start: 1px solid var(--kui-color-border);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.recipe-header {
|
|
111
|
+
min-height: 20rem;
|
|
112
|
+
}
|
|
113
|
+
.recipe-header__context {
|
|
114
|
+
margin: 0;
|
|
115
|
+
}
|
|
116
|
+
.recipe-header .kui-page-header__action {
|
|
117
|
+
max-width: 100%;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.recipe-master-detail {
|
|
121
|
+
display: grid;
|
|
122
|
+
width: min(58rem, 100%);
|
|
123
|
+
min-height: 25rem;
|
|
124
|
+
grid-template-columns: minmax(13rem, 0.8fr) minmax(18rem, 1.4fr);
|
|
125
|
+
}
|
|
126
|
+
.recipe-master-detail__master {
|
|
127
|
+
border-inline-end: 1px solid var(--kui-color-border);
|
|
128
|
+
}
|
|
129
|
+
.recipe-master-detail__detail {
|
|
130
|
+
min-width: 0;
|
|
131
|
+
padding-block: var(--kui-layout-item-gap);
|
|
132
|
+
}
|
|
133
|
+
.recipe-dialog {
|
|
134
|
+
--spacing: 0;
|
|
135
|
+
--width: min(62rem, calc(100vw - 2rem));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.recipe-form {
|
|
139
|
+
width: min(38rem, 100%);
|
|
140
|
+
margin-inline: auto;
|
|
141
|
+
padding-block: var(--kui-layout-item-gap);
|
|
142
|
+
}
|
|
143
|
+
.recipe-form__section {
|
|
144
|
+
--kui-content-item-border: transparent;
|
|
145
|
+
--kui-content-item-background: transparent;
|
|
146
|
+
display: grid;
|
|
147
|
+
gap: var(--kui-layout-item-gap);
|
|
148
|
+
}
|
|
149
|
+
.recipe-form__introduction > :where(h2, p) {
|
|
150
|
+
margin: 0;
|
|
151
|
+
}
|
|
152
|
+
.recipe-form__fields {
|
|
153
|
+
align-content: start;
|
|
154
|
+
}
|
|
155
|
+
.recipe-form__footer {
|
|
156
|
+
align-content: start;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.recipe-list {
|
|
160
|
+
display: grid;
|
|
161
|
+
min-height: 27rem;
|
|
162
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
163
|
+
}
|
|
164
|
+
.recipe-list__body {
|
|
165
|
+
min-height: 0;
|
|
166
|
+
}
|
|
167
|
+
.recipe-list__items {
|
|
168
|
+
display: grid;
|
|
169
|
+
margin: 0 var(--kui-layout-inline-margin);
|
|
170
|
+
padding: var(--kui-layout-item-padding);
|
|
171
|
+
border: var(--kui-layout-item-border-width) solid
|
|
172
|
+
var(--kui-color-border-quiet);
|
|
173
|
+
border-radius: var(--kui-layout-rounded-radius);
|
|
174
|
+
background: var(--kui-color-surface);
|
|
175
|
+
list-style: none;
|
|
176
|
+
}
|
|
177
|
+
.recipe-list__items li {
|
|
178
|
+
display: grid;
|
|
179
|
+
padding: var(--kui-layout-item-padding);
|
|
180
|
+
border-block-end: 1px solid var(--kui-color-border-quiet);
|
|
181
|
+
gap: var(--kui-layout-metadata-gap);
|
|
182
|
+
}
|
|
183
|
+
.recipe-list__items li:last-child {
|
|
184
|
+
border-block-end: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.recipe-compact-toolbar {
|
|
188
|
+
display: flex;
|
|
189
|
+
flex-direction: column;
|
|
190
|
+
gap: var(--kui-layout-content-gap);
|
|
191
|
+
}
|
|
192
|
+
.recipe-compact-toolbar__guide {
|
|
193
|
+
display: grid;
|
|
194
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
195
|
+
gap: var(--kui-layout-control-gap);
|
|
196
|
+
}
|
|
197
|
+
.recipe-compact-toolbar__guide > div {
|
|
198
|
+
padding: var(--kui-layout-item-padding);
|
|
199
|
+
border: var(--kui-layout-item-border-width) solid
|
|
200
|
+
var(--kui-color-border-quiet);
|
|
201
|
+
border-radius: var(--kui-layout-rounded-radius);
|
|
202
|
+
}
|
|
203
|
+
.recipe-compact-toolbar__guide strong,
|
|
204
|
+
.recipe-compact-toolbar__guide span {
|
|
205
|
+
display: block;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@container (max-width: 44rem) {
|
|
209
|
+
.recipe-shell__inspector-region {
|
|
210
|
+
display: none;
|
|
211
|
+
}
|
|
212
|
+
.recipe-shell__responsive-controls {
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
}
|
|
215
|
+
.recipe-shell[data-responsive-pane="inspector"] .recipe-shell__nav-region,
|
|
216
|
+
.recipe-shell[data-responsive-pane="inspector"] .recipe-shell__main {
|
|
217
|
+
display: none;
|
|
218
|
+
}
|
|
219
|
+
.recipe-shell[data-responsive-pane="inspector"]
|
|
220
|
+
.recipe-shell__inspector-region {
|
|
221
|
+
display: flex;
|
|
222
|
+
min-width: 0;
|
|
223
|
+
flex: 1;
|
|
224
|
+
}
|
|
225
|
+
.recipe-shell[data-responsive-pane="inspector"]
|
|
226
|
+
.recipe-shell__inspector-region
|
|
227
|
+
.kui-resizable-region {
|
|
228
|
+
width: 100%;
|
|
229
|
+
flex: 1;
|
|
230
|
+
}
|
|
231
|
+
.recipe-shell[data-responsive-pane="inspector"]
|
|
232
|
+
.recipe-shell__inspector-region
|
|
233
|
+
.kui-resizable-region__handle {
|
|
234
|
+
display: none;
|
|
235
|
+
}
|
|
236
|
+
.recipe-shell__responsive-controls [data-recipe-command="show-navigation"] {
|
|
237
|
+
display: none;
|
|
238
|
+
}
|
|
239
|
+
.recipe-shell__cards,
|
|
240
|
+
.recipe-compact-toolbar__guide {
|
|
241
|
+
grid-template-columns: 1fr 1fr;
|
|
242
|
+
}
|
|
243
|
+
.recipe-master-detail {
|
|
244
|
+
grid-template-columns: 1fr;
|
|
245
|
+
}
|
|
246
|
+
.recipe-master-detail__master {
|
|
247
|
+
border-inline-end: 0;
|
|
248
|
+
border-block-end: 1px solid var(--kui-color-border);
|
|
249
|
+
}
|
|
250
|
+
.recipe-compact-toolbar .kui-toolbar {
|
|
251
|
+
height: auto;
|
|
252
|
+
grid-template-columns: minmax(0, 1fr);
|
|
253
|
+
grid-template-areas: "leading" "center" "trailing";
|
|
254
|
+
row-gap: var(--kui-toolbar-gap);
|
|
255
|
+
}
|
|
256
|
+
.recipe-compact-toolbar .kui-toolbar__leading {
|
|
257
|
+
grid-area: leading;
|
|
258
|
+
padding-inline-end: 0;
|
|
259
|
+
}
|
|
260
|
+
.recipe-compact-toolbar .kui-toolbar__center {
|
|
261
|
+
grid-area: center;
|
|
262
|
+
}
|
|
263
|
+
.recipe-compact-toolbar .kui-toolbar__trailing {
|
|
264
|
+
grid-area: trailing;
|
|
265
|
+
justify-content: flex-start;
|
|
266
|
+
}
|
|
267
|
+
.recipe-compact-toolbar .kui-toolbar__trailing > .kui-control-cluster {
|
|
268
|
+
width: 100%;
|
|
269
|
+
}
|
|
270
|
+
.recipe-compact-toolbar .kui-toolbar__trailing wa-select {
|
|
271
|
+
min-width: min(12rem, 100%);
|
|
272
|
+
flex: 1 1 12rem;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@container (max-width: 28rem) {
|
|
277
|
+
.recipe-shell__nav-region {
|
|
278
|
+
display: none;
|
|
279
|
+
}
|
|
280
|
+
.recipe-shell[data-responsive-pane="navigation"] .recipe-shell__main,
|
|
281
|
+
.recipe-shell[data-responsive-pane="navigation"]
|
|
282
|
+
.recipe-shell__inspector-region {
|
|
283
|
+
display: none;
|
|
284
|
+
}
|
|
285
|
+
.recipe-shell[data-responsive-pane="navigation"] .recipe-shell__nav-region {
|
|
286
|
+
display: flex;
|
|
287
|
+
min-width: 0;
|
|
288
|
+
flex: 1;
|
|
289
|
+
}
|
|
290
|
+
.recipe-shell[data-responsive-pane="navigation"]
|
|
291
|
+
.recipe-shell__nav-region
|
|
292
|
+
.kui-resizable-region {
|
|
293
|
+
width: 100%;
|
|
294
|
+
flex: 1;
|
|
295
|
+
}
|
|
296
|
+
.recipe-shell[data-responsive-pane="navigation"]
|
|
297
|
+
.recipe-shell__nav-region
|
|
298
|
+
.kui-resizable-region__handle {
|
|
299
|
+
display: none;
|
|
300
|
+
}
|
|
301
|
+
.recipe-shell__responsive-controls [data-recipe-command="show-navigation"] {
|
|
302
|
+
display: grid;
|
|
303
|
+
}
|
|
304
|
+
.recipe-shell__cards,
|
|
305
|
+
.recipe-compact-toolbar__guide {
|
|
306
|
+
grid-template-columns: 1fr;
|
|
307
|
+
}
|
|
308
|
+
.recipe-header .kui-page-header {
|
|
309
|
+
align-items: flex-start;
|
|
310
|
+
flex-direction: column;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@media (forced-colors: active) {
|
|
315
|
+
.recipe-form__section {
|
|
316
|
+
border-color: Canvas;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@media (prefers-reduced-motion: reduce) {
|
|
321
|
+
.kui-recipe *,
|
|
322
|
+
.kui-recipe *::before,
|
|
323
|
+
.kui-recipe *::after {
|
|
324
|
+
scroll-behavior: auto !important;
|
|
325
|
+
animation-duration: 1ms !important;
|
|
326
|
+
transition-duration: 1ms !important;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SafeHtml } from 'kerfjs';
|
|
2
|
+
|
|
3
|
+
export interface RecipeController {
|
|
4
|
+
render(): SafeHtml;
|
|
5
|
+
action(command: string, element: HTMLElement): void;
|
|
6
|
+
change?(element: HTMLElement): void;
|
|
7
|
+
afterHide?(element: HTMLElement): void;
|
|
8
|
+
resize?(id: string, size: number): void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type RecipeFactory = (announce: (message: string) => void) => RecipeController;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@kerfjs/ui/layout.css';
|
|
2
|
+
import './recipes.css';
|
|
3
|
+
|
|
4
|
+
import { PageHeader } from '@kerfjs/ui/page-header';
|
|
5
|
+
import { StateBanner } from '@kerfjs/ui/state-banner';
|
|
6
|
+
|
|
7
|
+
import type { RecipeFactory } from './types.js';
|
|
8
|
+
|
|
9
|
+
export const createRecipe: RecipeFactory = (announce) => ({
|
|
10
|
+
render: () => <section class="kui-recipe recipe-header kui-recipe__surface kui-content" data-recipe="recipe-workspace-header"><p class="recipe-header__context kui-inline-metadata kui-content-item"><span>Northstar workspace</span><span>·</span><span>Product planning</span></p><PageHeader title="Accessibility readiness and responsive navigation rollout" action={<div class="kui-control-cluster"><button class="kui-recipe__button" type="button" data-action="recipe-action" data-recipe-command="share">Share</button><button class="kui-recipe__button" type="button" data-action="recipe-action" data-recipe-command="more">More actions</button><button class="kui-recipe__button" data-primary="true" type="button" data-action="recipe-action" data-recipe-command="publish">Publish update</button></div>} /><StateBanner title="Ready for review" detail="All required checks passed 18 minutes ago." tone="success" /><p class="kui-recipe__ownership kui-content-item">The recipe owns page hierarchy and action relocation. The app owns authorization, command behavior, breadcrumbs, and product copy.</p></section>,
|
|
11
|
+
action(command) { announce(`${command} requested`); },
|
|
12
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resizable-region.tsx"],"names":[],"mappings":";;;AAkBO,IAAM,eAAA,GAAkB,CAAC,IAAA,EAAc,GAAA,EAAa,QAAgB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,GAAA,EAAK,IAAA,CAAK,KAAA,CAAM,IAAI,CAAC,CAAC;AACjH,IAAM,uBAAA,GAA0B,CAAC,SAAA,EAAmB,KAAA,EAAe,SAA8B,SAAA,GAAY,KAAA,IAAS,IAAA,KAAS,OAAA,GAAU,EAAA,GAAK,CAAA;AAErJ,SAAS,UAAA,CAAW,EAAE,IAAA,EAAK,EAAkC;AAC3D,EAAA,2BAAQ,KAAA,EAAA,EAAI,aAAA,EAAY,MAAA,EAAO,OAAA,EAAQ,aAAY,IAAA,EAAK,MAAA,EAAO,MAAA,EAAO,cAAA,EAAe,gBAAa,GAAA,EAAI,gBAAA,EAAe,OAAA,EAClH,QAAA,EAAA,IAAA,KAAS,+BACN,IAAA,CAAA,QAAA,EAAA,EAAE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,GAAE,SAAA,EAAU,CAAA;AAAA,oBAAO,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,UAAA,EAAW;AAAA,GAAA,EAAO,oBACrD,IAAA,CAAA,QAAA,EAAA,EAAE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,GAAE,SAAA,EAAU,CAAA;AAAA,oBAAO,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,UAAA,EAAW;AAAA,GAAA,EAAO,CAAA,EAC3D,CAAA;AACF;AAEO,SAAS,gBAAgB,EAAE,EAAA,EAAI,KAAA,EAAO,IAAA,EAAM,KAAK,GAAA,EAAK,IAAA,GAAO,YAAA,EAAc,IAAA,GAAO,OAAO,SAAA,GAAY,KAAA,EAAO,aAAA,GAAgB,KAAA,EAAO,UAAS,EAAyB;AAC1K,EAAA,MAAM,YAAA,GAAe,eAAA,CAAgB,IAAA,EAAM,GAAA,EAAK,GAAG,CAAA;AACnD,EAAA,MAAM,QAAA,GAAW,YAAY,CAAA,GAAI,YAAA;AACjC,EAAA,MAAM,WAAA,GAAc,IAAA,KAAS,YAAA,GAAe,UAAA,GAAa,YAAA;AACzD,EAAA,uBAAO,IAAA,CAAC,SAAA,EAAA,EAAQ,KAAA,EAAM,sBAAA,EAAuB,gBAAA,EAAe,kBAAA,EAAmB,gBAAA,EAAgB,EAAA,EAAI,WAAA,EAAW,IAAA,EAAM,WAAA,EAAW,IAAA,EAAM,gBAAA,EAAgB,MAAA,CAAO,SAAS,CAAA,EAAG,oBAAA,EAAoB,MAAA,CAAO,aAAa,CAAA,EAAG,KAAA,EAAO,CAAA,4BAAA,EAA+B,QAAQ,CAAA,wCAAA,EAA2C,YAAY,CAAA,EAAA,CAAA,EAAM,YAAA,EAAY,KAAA,EACxU,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,+BAAA,EAAiC,QAAA,EAAS,CAAA;AAAA,oBACrD,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,8BAAA,EAA+B,IAAA,EAAK,WAAA,EAAY,QAAA,EAAS,GAAA,EAAI,YAAA,EAAY,CAAA,OAAA,EAAU,KAAK,CAAA,CAAA,EAAI,kBAAA,EAAkB,WAAA,EAAa,eAAA,EAAe,SAAA,GAAY,CAAA,GAAI,GAAA,EAAK,eAAA,EAAe,GAAA,EAAK,eAAA,EAAe,QAAA,EAAU,wBAAA,EAAsB,IAAA,EAAC,gBAAA,EAAgB,EAAA,EAC5P,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,MAAY,CAAA,EAC1B;AAAA,GAAA,EACF,CAAA;AACF","file":"chunk-3O7ZEUW2.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport type ResizableRegionAxis = 'horizontal' | 'vertical';\nexport type ResizableRegionEdge = 'start' | 'end';\n\nexport interface ResizableRegionProps {\n id: string;\n label: string;\n size: number;\n min: number;\n max: number;\n axis?: ResizableRegionAxis;\n edge?: ResizableRegionEdge;\n collapsed?: boolean;\n transitioning?: boolean;\n children: SafeHtml | SafeHtml[];\n}\n\nexport const clampRegionSize = (size: number, min: number, max: number) => Math.min(max, Math.max(min, Math.round(size)));\nexport const resizeRegionFromPointer = (startSize: number, delta: number, edge: ResizableRegionEdge) => startSize + delta * (edge === 'start' ? -1 : 1);\n\nfunction ResizeGrip({ axis }: { axis: ResizableRegionAxis }) {\n return <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\">\n {axis === 'horizontal'\n ? <><path d=\"M9 6v12\"></path><path d=\"M15 6v12\"></path></>\n : <><path d=\"M6 9h12\"></path><path d=\"M6 15h12\"></path></>}\n </svg>;\n}\n\nexport function ResizableRegion({ id, label, size, min, max, axis = 'horizontal', edge = 'end', collapsed = false, transitioning = false, children }: ResizableRegionProps) {\n const expandedSize = clampRegionSize(size, min, max);\n const resolved = collapsed ? 0 : expandedSize;\n const orientation = axis === 'horizontal' ? 'vertical' : 'horizontal';\n return <section class=\"kui-resizable-region\" data-component=\"resizable-region\" data-region-id={id} data-axis={axis} data-edge={edge} data-collapsed={String(collapsed)} data-transitioning={String(transitioning)} style={`--kui-resizable-region-size:${resolved}px;--kui-resizable-region-expanded-size:${expandedSize}px`} aria-label={label}>\n <div class=\"kui-resizable-region__content\">{children}</div>\n <div class=\"kui-resizable-region__handle\" role=\"separator\" tabindex=\"0\" aria-label={`Resize ${label}`} aria-orientation={orientation} aria-valuemin={collapsed ? 0 : min} aria-valuemax={max} aria-valuenow={resolved} data-kui-resize-handle data-region-id={id}>\n <ResizeGrip axis={axis} />\n </div>\n </section>;\n}\n"]}
|
package/dist/chunk-723YNJBH.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
// src/dialog-header.tsx
|
|
4
|
-
function DialogHeader({ title, titleId, summary, summaryId, icon, iconClassName = "", actions }) {
|
|
5
|
-
return /* @__PURE__ */ jsxs("header", { class: "kui-dialog-header", "data-component": "dialog-header", "data-has-icon": String(Boolean(icon)), children: [
|
|
6
|
-
icon && /* @__PURE__ */ jsx("span", { class: `kui-dialog-header__icon ${iconClassName}`.trim(), children: icon }),
|
|
7
|
-
/* @__PURE__ */ jsxs("div", { class: "kui-dialog-header__copy", children: [
|
|
8
|
-
/* @__PURE__ */ jsx("h2", { id: titleId, children: title }),
|
|
9
|
-
/* @__PURE__ */ jsx("p", { id: summaryId, children: summary })
|
|
10
|
-
] }),
|
|
11
|
-
actions && /* @__PURE__ */ jsx("div", { class: "kui-dialog-header__actions", children: actions })
|
|
12
|
-
] });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { DialogHeader };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=chunk-723YNJBH.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dialog-header.tsx"],"names":[],"mappings":";;;AAYO,SAAS,YAAA,CAAa,EAAE,KAAA,EAAO,OAAA,EAAS,OAAA,EAAS,WAAW,IAAA,EAAM,aAAA,GAAgB,EAAA,EAAI,OAAA,EAAQ,EAAsB;AACzH,EAAA,uBAAO,IAAA,CAAC,QAAA,EAAA,EAAO,KAAA,EAAM,mBAAA,EAAoB,gBAAA,EAAe,eAAA,EAAgB,eAAA,EAAe,MAAA,CAAO,OAAA,CAAQ,IAAI,CAAC,CAAA,EACxG,QAAA,EAAA;AAAA,IAAA,IAAA,oBAAQ,GAAA,CAAC,UAAK,KAAA,EAAO,CAAA,wBAAA,EAA2B,aAAa,CAAA,CAAA,CAAG,IAAA,IAAS,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,oBAC/E,IAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,yBAAA,EAA0B,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,IAAA,EAAA,EAAG,EAAA,EAAI,OAAA,EAAU,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,sBAAK,GAAA,CAAC,GAAA,EAAA,EAAE,EAAA,EAAI,SAAA,EAAY,QAAA,EAAA,OAAA,EAAQ;AAAA,KAAA,EAAI,CAAA;AAAA,IAChG,OAAA,oBAAW,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,8BAA8B,QAAA,EAAA,OAAA,EAAQ;AAAA,GAAA,EAC/D,CAAA;AACF","file":"chunk-723YNJBH.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport interface DialogHeaderProps {\n title: string;\n titleId: string;\n summary: string;\n summaryId?: string;\n icon?: SafeHtml;\n iconClassName?: string;\n actions?: SafeHtml;\n}\n\nexport function DialogHeader({ title, titleId, summary, summaryId, icon, iconClassName = '', actions }: DialogHeaderProps) {\n return <header class=\"kui-dialog-header\" data-component=\"dialog-header\" data-has-icon={String(Boolean(icon))}>\n {icon && <span class={`kui-dialog-header__icon ${iconClassName}`.trim()}>{icon}</span>}\n <div class=\"kui-dialog-header__copy\"><h2 id={titleId}>{title}</h2><p id={summaryId}>{summary}</p></div>\n {actions && <div class=\"kui-dialog-header__actions\">{actions}</div>}\n </header>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/select.tsx"],"names":[],"mappings":";;;AA2BO,SAAS,MAAA,CAA6B,EAAE,IAAA,EAAM,KAAA,EAAO,OAAO,SAAA,EAAW,OAAA,EAAS,SAAA,GAAY,EAAA,EAAI,aAAa,QAAA,GAAW,KAAA,EAAO,OAAA,GAAU,KAAA,EAAO,gBAAe,EAAuB;AAC3L,EAAA,MAAM,WAAW,OAAA,CAAQ,IAAA,CAAK,CAAC,MAAA,KAAW,MAAA,CAAO,UAAU,KAAK,CAAA;AAChE,EAAA,MAAM,OAAO,CAAC,MAAA,EAA6B,eAAe,KAAA,qBAAU,GAAA,CAAC,UAAK,IAAA,EAAK,OAAA,EAAQ,OAAO,CAAA,gBAAA,EAAmB,YAAA,GAAe,gCAAgC,EAAE,CAAA,CAAA,EAAI,OAAO,MAAA,CAAO,KAAA,GAAQ,SAAS,MAAA,CAAO,KAAK,CAAA,CAAA,GAAK,MAAA,EAAY,iBAAO,IAAA,mBAAO,GAAA,CAAC,cAAW,IAAA,EAAM,MAAA,CAAO,MAAM,IAAA,EAAM,MAAA,CAAO,YAAY,MAAA,CAAO,KAAA,CAAM,aAAY,CAAE,UAAA,CAAW,KAAK,GAAG,CAAA,EAAG,IAAK,IAAA,EAAK,CAAA;AACnW,EAAA,MAAM,MAAA,GAAS,CAAC,MAAA,qBAAgC,IAAA,CAAA,QAAA,EAAA,EAAG,QAAA,EAAA;AAAA,IAAA,MAAA,CAAO,eAAA,wBAAoB,YAAA,EAAA,EAAW,CAAA;AAAA,oBAAc,IAAA,CAAC,WAAA,EAAA,EAAU,KAAA,EAAO,MAAA,CAAO,KAAA,EAAQ,QAAA,EAAA;AAAA,MAAA,MAAA,CAAO,IAAA,GAAO,IAAA,CAAK,MAAM,CAAA,GAAI,IAAA;AAAA,MAAM,MAAA,CAAO;AAAA,KAAA,EAAM;AAAA,GAAA,EAAY,CAAA;AACpM,EAAA,MAAM,SAAS,CAAC,GAAG,IAAI,GAAA,CAAI,OAAA,CAAQ,IAAI,CAAC,MAAA,KAAW,OAAO,KAAK,CAAA,CAAE,OAAO,CAAC,KAAA,KAA2B,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAA;AACpH,EAAA,MAAM,YAAY,OAAA,CAAQ,MAAA,CAAO,CAAC,MAAA,KAAW,CAAC,OAAO,KAAK,CAAA;AAC1D,EAAA,uBAAO,IAAA,CAAC,WAAA,EAAA,EAAU,KAAA,EAAO,CAAA,UAAA,EAAa,cAAA,GAAiB,iCAAiC,EAAE,CAAA,EAAG,OAAA,GAAU,uBAAA,GAA0B,EAAE,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK,EAAG,gBAAA,EAAe,QAAA,EAAS,IAAA,EAAY,OAAc,YAAA,EAAY,SAAA,EAAW,KAAA,EAAc,WAAA,EAA0B,QAAA,EACzQ,QAAA,EAAA;AAAA,IAAA,QAAA,KAAa,iCAAiB,GAAA,CAAC,MAAA,EAAA,EAAK,IAAA,EAAK,OAAA,EAAQ,OAAM,6BAAA,EAA+B,QAAA,EAAA,cAAA,CAAe,QAAQ,CAAA,EAAE,IAAU,QAAA,CAAS,IAAA,GAAO,IAAA,CAAK,QAAA,EAAU,IAAI,CAAA,GAAI,IAAA,CAAA;AAAA,IAChK,SAAA,CAAU,IAAI,MAAM,CAAA;AAAA,IACpB,MAAA,CAAO,IAAI,CAAC,KAAA,EAAO,0BAAU,IAAA,CAAC,KAAA,EAAA,EAAI,OAAO,CAAA,iBAAA,EAAoB,KAAA,GAAQ,KAAK,SAAA,CAAU,MAAA,GAAS,IAAI,+BAAA,GAAkC,EAAE,IAAI,IAAA,EAAK,OAAA,EAAQ,cAAY,KAAA,EAAO,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,yBAAA,EAA2B,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MAAQ,OAAA,CAAQ,OAAO,CAAC,MAAA,KAAW,OAAO,KAAA,KAAU,KAAK,CAAA,CAAE,GAAA,CAAI,MAAM;AAAA,KAAA,EAAE,CAAM;AAAA,GAAA,EACtS,CAAA;AACF","file":"chunk-NHXX4JI5.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport { LucideIcon, type LucideNode } from './lucide-icon.js';\n\nexport interface SelectChoice<Value extends string = string> {\n value: Value;\n label: string;\n icon?: LucideNode;\n iconName?: string;\n color?: string;\n group?: string;\n separatorBefore?: boolean;\n}\n\nexport interface SelectProps<Value extends string = string> {\n name: string;\n value: Value;\n label?: string;\n ariaLabel?: string;\n choices: readonly SelectChoice<Value>[];\n className?: string;\n placeholder?: string;\n disabled?: boolean;\n fitMenu?: boolean;\n renderSelected?: (choice: SelectChoice<Value>) => SafeHtml;\n}\n\nexport function Select<Value extends string>({ name, value, label, ariaLabel, choices, className = '', placeholder, disabled = false, fitMenu = false, renderSelected }: SelectProps<Value>) {\n const selected = choices.find((choice) => choice.value === value);\n const icon = (choice: SelectChoice<Value>, selectedIcon = false) => <span slot=\"start\" class={`kui-select__icon${selectedIcon ? ' kui-select__icon--selected' : ''}`} style={choice.color ? `color:${choice.color}` : undefined}>{choice.icon ? <LucideIcon icon={choice.icon} name={choice.iconName ?? choice.label.toLowerCase().replaceAll(' ', '-')} /> : null}</span>;\n const option = (choice: SelectChoice<Value>) => <>{choice.separatorBefore && <wa-divider></wa-divider>}<wa-option value={choice.value}>{choice.icon ? icon(choice) : null}{choice.label}</wa-option></>;\n const groups = [...new Set(choices.map((choice) => choice.group).filter((group): group is string => Boolean(group)))];\n const ungrouped = choices.filter((choice) => !choice.group);\n return <wa-select class={`kui-select${renderSelected ? ' kui-select--custom-selected' : ''}${fitMenu ? ' kui-select--fit-menu' : ''} ${className}`.trim()} data-component=\"select\" name={name} label={label} aria-label={ariaLabel} value={value} placeholder={placeholder} disabled={disabled}>\n {selected && (renderSelected ? <span slot=\"start\" class=\"kui-select__custom-selected\">{renderSelected(selected)}</span> : selected.icon ? icon(selected, true) : null)}\n {ungrouped.map(option)}\n {groups.map((group, index) => <div class={`kui-select__group${index > 0 || ungrouped.length > 0 ? ' kui-select__group--separated' : ''}`} role=\"group\" aria-label={group}><span class=\"kui-select__group-title\">{group}</span>{choices.filter((choice) => choice.group === group).map(option)}</div>)}\n </wa-select>;\n}\n"]}
|
package/dist/chunk-OPCJRCYO.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
// src/menu-header.tsx
|
|
4
|
-
function MenuHeader({ label, action, actionLabel, actionIcon, actionDisabled = false, disabledReason, expanded, toggle = false }) {
|
|
5
|
-
if (toggle) {
|
|
6
|
-
return /* @__PURE__ */ jsxs("button", { type: "button", class: "kui-menu-header kui-menu-header--toggle", "data-component": "menu-header", "data-action": action, "aria-expanded": String(Boolean(expanded)), children: [
|
|
7
|
-
/* @__PURE__ */ jsx("span", { children: label }),
|
|
8
|
-
actionIcon
|
|
9
|
-
] });
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */ jsxs("header", { class: "kui-menu-header", "data-component": "menu-header", children: [
|
|
12
|
-
/* @__PURE__ */ jsx("h2", { children: label }),
|
|
13
|
-
action && /* @__PURE__ */ jsx("button", { type: "button", "data-action": action, "aria-label": actionLabel, title: actionDisabled ? disabledReason : actionLabel, disabled: actionDisabled || void 0, children: actionIcon })
|
|
14
|
-
] });
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { MenuHeader };
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=chunk-OPCJRCYO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/menu-header.tsx"],"names":[],"mappings":";;;AAaO,SAAS,UAAA,CAAW,EAAE,KAAA,EAAO,MAAA,EAAQ,WAAA,EAAa,UAAA,EAAY,cAAA,GAAiB,KAAA,EAAO,cAAA,EAAgB,QAAA,EAAU,MAAA,GAAS,KAAA,EAAM,EAAoB;AACxJ,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,uBAAO,IAAA,CAAC,QAAA,EAAA,EAAO,IAAA,EAAK,QAAA,EAAS,OAAM,yCAAA,EAA0C,gBAAA,EAAe,aAAA,EAAc,aAAA,EAAa,QAAQ,eAAA,EAAe,MAAA,CAAO,OAAA,CAAQ,QAAQ,CAAC,CAAA,EAAG,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,UAAM,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MAAQ;AAAA,KAAA,EAAW,CAAA;AAAA,EAC3M;AACA,EAAA,uBAAO,IAAA,CAAC,QAAA,EAAA,EAAO,KAAA,EAAM,iBAAA,EAAkB,kBAAe,aAAA,EAAc,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAI,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,IAAM,0BAAU,GAAA,CAAC,QAAA,EAAA,EAAO,IAAA,EAAK,QAAA,EAAS,eAAa,MAAA,EAAQ,YAAA,EAAY,WAAA,EAAa,KAAA,EAAO,iBAAiB,cAAA,GAAiB,WAAA,EAAa,QAAA,EAAU,cAAA,IAAkB,QAAY,QAAA,EAAA,UAAA,EAAW;AAAA,GAAA,EAAU,CAAA;AACxR","file":"chunk-OPCJRCYO.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport interface MenuHeaderProps {\n label: string;\n action?: string;\n actionLabel?: string;\n actionIcon?: SafeHtml;\n actionDisabled?: boolean;\n disabledReason?: string;\n expanded?: boolean;\n toggle?: boolean;\n}\n\nexport function MenuHeader({ label, action, actionLabel, actionIcon, actionDisabled = false, disabledReason, expanded, toggle = false }: MenuHeaderProps) {\n if (toggle) {\n return <button type=\"button\" class=\"kui-menu-header kui-menu-header--toggle\" data-component=\"menu-header\" data-action={action} aria-expanded={String(Boolean(expanded))}><span>{label}</span>{actionIcon}</button>;\n }\n return <header class=\"kui-menu-header\" data-component=\"menu-header\"><h2>{label}</h2>{action && <button type=\"button\" data-action={action} aria-label={actionLabel} title={actionDisabled ? disabledReason : actionLabel} disabled={actionDisabled || undefined}>{actionIcon}</button>}</header>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/app-tab.tsx"],"names":[],"mappings":";;;AAgBA,SAAS,SAAA,GAAY;AACnB,EAAA,uBAAO,IAAA,CAAC,KAAA,EAAA,EAAI,aAAA,EAAY,MAAA,EAAO,OAAA,EAAQ,WAAA,EAAY,IAAA,EAAK,MAAA,EAAO,MAAA,EAAO,cAAA,EAAe,cAAA,EAAa,MAAA,EAAO,kBAAe,OAAA,EAAQ,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,GAAE,YAAA,EAAa,CAAA;AAAA,oBAAO,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,YAAA,EAAa;AAAA,GAAA,EAAO,CAAA;AAC1L;AAEO,SAAS,MAAA,CAAO,EAAE,EAAA,EAAI,IAAA,EAAM,WAAW,KAAA,EAAO,QAAA,GAAW,MAAM,SAAA,GAAY,KAAA,EAAO,SAAS,QAAA,EAAU,YAAA,GAAe,cAAc,WAAA,GAAc,WAAA,EAAa,YAAY,EAAA,EAAI,cAAA,GAAiB,EAAC,EAAE,EAAgB;AACtN,EAAA,MAAM,YAAA,GAAe,CAAC,QAAA,GAAW,kBAAA,GAAqB,EAAA,EAAI,SAAA,GAAY,0CAAA,GAA6C,EAAE,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AAC/I,EAAA,uBAAO,IAAA,CAAC,SAAI,KAAA,EAAO,CAAA,YAAA,EAAe,SAAS,CAAA,CAAA,CAAG,IAAA,IAAS,GAAG,cAAA,EAAgB,kBAAe,SAAA,EAAU,aAAA,EAAa,IAAI,eAAA,EAAe,MAAA,CAAO,QAAQ,CAAA,EAAG,SAAA,EAAW,SAAA,GAAY,MAAA,GAAS,OAAA,EAClL,QAAA,EAAA;AAAA,IAAA,QAAA,oBAAY,GAAA,CAAC,YAAO,IAAA,EAAK,QAAA,EAAS,UAAS,IAAA,EAAK,KAAA,EAAM,oBAAA,EAAqB,aAAA,EAAa,WAAA,EAAa,aAAA,EAAa,IAAI,YAAA,EAAY,CAAA,MAAA,EAAS,IAAI,CAAA,CAAA,EAAI,KAAA,EAAO,SAAS,IAAI,CAAA,CAAA,EAAI,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA,EAAE,CAAA;AAAA,oBACzL,IAAA,CAAC,YAAO,IAAA,EAAK,QAAA,EAAS,OAAM,qBAAA,EAAsB,IAAA,EAAK,KAAA,EAAM,eAAA,EAAe,MAAA,CAAO,QAAQ,GAAG,mBAAA,EAAmB,YAAA,IAAgB,QAAW,aAAA,EAAa,YAAA,EAAc,eAAa,EAAA,EAAI,QAAA,EAAU,QAAA,GAAW,GAAA,GAAM,IAAA,EAChN,QAAA,EAAA;AAAA,MAAA,OAAA;AAAA,sBAAQ,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,mBAAA,EAAqB,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,MAAQ,YAAY,QAAA,mBAAW,GAAA,CAAC,UAAK,KAAA,EAAM,uBAAA,EAAyB,oBAAS,CAAA,GAAU;AAAA,KAAA,EACxI;AAAA,GAAA,EACF,CAAA;AACF","file":"chunk-T5XNMVOI.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport interface AppTabProps {\n id: string;\n name: string;\n selected?: boolean;\n closable?: boolean;\n draggable?: boolean;\n leading?: SafeHtml;\n trailing?: SafeHtml;\n selectAction?: string;\n closeAction?: string;\n className?: string;\n rootAttributes?: Readonly<Record<`data-${string}`, string>>;\n}\n\nfunction CloseIcon() {\n return <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.25\" stroke-linecap=\"round\"><path d=\"m7 7 10 10\"></path><path d=\"M17 7 7 17\"></path></svg>;\n}\n\nexport function AppTab({ id, name, selected = false, closable = true, draggable = false, leading, trailing, selectAction = 'select-tab', closeAction = 'close-tab', className = '', rootAttributes = {} }: AppTabProps) {\n const keyshortcuts = [closable ? 'Delete Backspace' : '', draggable ? 'Alt+Shift+ArrowLeft Alt+Shift+ArrowRight' : ''].filter(Boolean).join(' ');\n return <div class={`kui-app-tab ${className}`.trim()} {...rootAttributes} data-component=\"app-tab\" data-tab-id={id} data-selected={String(selected)} draggable={draggable ? 'true' : 'false'}>\n {closable && <button type=\"button\" tabindex=\"-1\" class=\"kui-app-tab__close\" data-action={closeAction} data-tab-id={id} aria-label={`Close ${name}`} title={`Close ${name}`}><CloseIcon /></button>}\n <button type=\"button\" class=\"kui-app-tab__select\" role=\"tab\" aria-selected={String(selected)} aria-keyshortcuts={keyshortcuts || undefined} data-action={selectAction} data-tab-id={id} tabindex={selected ? '0' : '-1'}>\n {leading}<span class=\"kui-app-tab__name\">{name}</span>{closable || trailing ? <span class=\"kui-app-tab__trailing\">{trailing}</span> : undefined}\n </button>\n </div>;\n}\n"]}
|
package/dist/chunk-VKH2JLDZ.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
// src/value-table.tsx
|
|
4
|
-
function ValueTable({ label, className = "", children }) {
|
|
5
|
-
return /* @__PURE__ */ jsx("dl", { class: `kui-value-table ${className}`.trim(), "data-component": "value-table", "aria-label": label, children });
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export { ValueTable };
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=chunk-VKH2JLDZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/value-table.tsx"],"names":[],"mappings":";;;AAQO,SAAS,WAAW,EAAE,KAAA,EAAO,SAAA,GAAY,EAAA,EAAI,UAAS,EAAoB;AAC/E,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAG,KAAA,EAAO,CAAA,gBAAA,EAAmB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK,EAAG,gBAAA,EAAe,aAAA,EAAc,YAAA,EAAY,KAAA,EAAQ,QAAA,EAAS,CAAA;AACrH","file":"chunk-VKH2JLDZ.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nexport interface ValueTableProps {\n label: string;\n className?: string;\n children: SafeHtml | SafeHtml[];\n}\n\nexport function ValueTable({ label, className = '', children }: ValueTableProps) {\n return <dl class={`kui-value-table ${className}`.trim()} data-component=\"value-table\" aria-label={label}>{children}</dl>;\n}\n"]}
|
package/dist/chunk-WY4CAEPG.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
// src/menu-item.tsx
|
|
4
|
-
function MenuItem({ label, icon, trailing, selected = false, action, itemId, className = "", style, pressed, accessibleLabel, title, multiline = false, state, disabled = false, tabIndex }) {
|
|
5
|
-
return /* @__PURE__ */ jsxs("button", { type: "button", class: `kui-menu-item ${className}`.trim(), style, title, disabled, tabindex: tabIndex, "data-component": "menu-item", "data-action": action, "data-item-id": itemId, "data-multiline": multiline ? "true" : void 0, "data-state": state, "aria-label": accessibleLabel, "aria-current": selected ? "page" : void 0, "aria-pressed": pressed === void 0 ? void 0 : String(pressed), children: [
|
|
6
|
-
icon && /* @__PURE__ */ jsx("span", { class: "kui-menu-item__icon", children: icon }),
|
|
7
|
-
/* @__PURE__ */ jsx("span", { class: "kui-menu-item__label", children: label }),
|
|
8
|
-
trailing && /* @__PURE__ */ jsx("span", { class: "kui-menu-item__trailing", children: trailing })
|
|
9
|
-
] });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { MenuItem };
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=chunk-WY4CAEPG.js.map
|