@kerfjs/ui 5.0.0-beta.110 → 5.0.0-beta.112
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 +3 -0
- package/ai/component-catalog.json +161 -8
- package/ai/component-composition.json +119 -2
- package/ai/components/README.md +2 -0
- package/ai/components/backdrop-image.md +1 -0
- package/ai/components/button.md +5 -2
- package/ai/components/content-item.md +1 -0
- package/ai/components/editor-frame.md +80 -0
- package/ai/components/summary-row.md +5 -2
- package/ai/components/surface-scaffold.md +3 -0
- package/ai/components/value-preview.md +75 -0
- package/ai/public-api-signatures-v1.md +207 -50
- package/ai/skill.md +17 -0
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/backdrop-image.d.ts +11 -0
- package/dist/backdrop-image.js +1 -1
- package/dist/browser/content-item.js +1 -0
- package/dist/browser/editor-frame.js +3 -0
- package/dist/browser/value-preview.js +3 -0
- package/dist/button.d.ts +4 -2
- package/dist/button.js +1 -1
- package/dist/catalog-resources.d.ts +2 -1
- package/dist/catalog.d.ts +2 -1
- package/dist/catalog.js +6 -4
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-JCCN3U6X.js → chunk-2J7XKAZX.js} +3 -2
- package/dist/chunk-2J7XKAZX.js.map +1 -0
- package/dist/chunk-3KFMLOTH.js +201 -0
- package/dist/chunk-3KFMLOTH.js.map +1 -0
- package/dist/{chunk-ATGAJVZ6.js → chunk-3OP66VXU.js} +64 -4
- package/dist/chunk-3OP66VXU.js.map +1 -0
- package/dist/{chunk-ZNROKDSZ.js → chunk-3V4OCDTL.js} +2 -8
- package/dist/chunk-3V4OCDTL.js.map +1 -0
- package/dist/{chunk-3GLYIIFR.js → chunk-3WWX2O4G.js} +3 -2
- package/dist/chunk-3WWX2O4G.js.map +1 -0
- package/dist/{chunk-SCDWURBO.js → chunk-5CLMV5YU.js} +21 -3
- package/dist/chunk-5CLMV5YU.js.map +1 -0
- package/dist/{chunk-P7EJ4CAD.js → chunk-ETFP7HAR.js} +2 -2
- package/dist/{chunk-P7EJ4CAD.js.map → chunk-ETFP7HAR.js.map} +1 -1
- package/dist/chunk-F653O57X.js +41 -0
- package/dist/chunk-F653O57X.js.map +1 -0
- package/dist/{chunk-SOFPUW3O.js → chunk-IIQ2XIMU.js} +4 -3
- package/dist/chunk-IIQ2XIMU.js.map +1 -0
- package/dist/chunk-IRC5N7FA.js +16 -0
- package/dist/chunk-IRC5N7FA.js.map +1 -0
- package/dist/{chunk-SQ5DH66U.js → chunk-ITENVZ6Q.js} +2 -15
- package/dist/chunk-ITENVZ6Q.js.map +1 -0
- package/dist/{chunk-4UB5Z3ZZ.js → chunk-K67XBCHG.js} +8 -4
- package/dist/chunk-K67XBCHG.js.map +1 -0
- package/dist/chunk-OK7FUK7U.js +9 -0
- package/dist/chunk-OK7FUK7U.js.map +1 -0
- package/dist/{chunk-WSEJ2FDE.js → chunk-OUCHU7JB.js} +2 -2
- package/dist/{chunk-WSEJ2FDE.js.map → chunk-OUCHU7JB.js.map} +1 -1
- package/dist/{chunk-KPINJHIC.js → chunk-PS24PVR6.js} +3 -1
- package/dist/chunk-PS24PVR6.js.map +1 -0
- package/dist/{chunk-6CDILXF4.js → chunk-S3DCRI2M.js} +31 -5
- package/dist/chunk-S3DCRI2M.js.map +1 -0
- package/dist/chunk-V6N3YLTM.js +56 -0
- package/dist/chunk-V6N3YLTM.js.map +1 -0
- package/dist/{chunk-HQZG3OFL.js → chunk-XRZSK2WC.js} +3 -2
- package/dist/chunk-XRZSK2WC.js.map +1 -0
- package/dist/{chunk-CPSGUGAY.js → chunk-YPAQFBMN.js} +4 -4
- package/dist/{chunk-CPSGUGAY.js.map → chunk-YPAQFBMN.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +1 -0
- package/dist/collapsible-panel.js +3 -2
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/content-item.d.ts +46 -2
- package/dist/content-item.js +4 -1
- package/dist/editor-frame.d.ts +41 -0
- package/dist/editor-frame.js +3 -0
- package/dist/editor-frame.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +27 -23
- package/dist/list-action-row.js +2 -1
- package/dist/list-detail-dialog.d.ts +2 -1
- package/dist/list-detail-dialog.js +5 -4
- package/dist/list-detail-dialog.js.map +1 -1
- package/dist/list-item.js +2 -1
- package/dist/{nav-stack-CU_0dKtI.d.ts → nav-stack-CrZF95VO.d.ts} +2 -1
- package/dist/nav-stack.d.ts +2 -1
- package/dist/nav-stack.js +2 -1
- package/dist/pane.d.ts +3 -23
- package/dist/pane.js +2 -1
- package/dist/split-view.d.ts +2 -1
- package/dist/split-view.js +2 -1
- package/dist/styles/backdrop-image.css +24 -1
- package/dist/styles/components/actions/popup-menu/popup-menu.css +1 -1
- package/dist/styles/components/collections/summary-row/summary-row.css +7 -3
- package/dist/styles/components/data-display/value-preview/value-preview.css +18 -0
- package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +24 -1
- package/dist/styles/components/surfaces/content-item/content-item.css +52 -0
- package/dist/styles/components/surfaces/editor-frame/editor-frame.css +121 -0
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +25 -1
- package/dist/styles/content-item.css +3 -168
- package/dist/styles/editor-frame.css +121 -0
- package/dist/styles/foundation.css +9 -4
- package/dist/styles/popup-menu.css +1 -1
- package/dist/styles/styles.css +2 -0
- package/dist/styles/summary-row.css +7 -3
- package/dist/styles/surface-scaffold.css +25 -1
- package/dist/styles/value-preview.css +18 -0
- package/dist/styles/webawesome.css +2 -2
- package/dist/summary-row.d.ts +20 -11
- package/dist/summary-row.js +2 -1
- package/dist/surface-scaffold-register.js +1 -1
- package/dist/surface-scaffold.d.ts +30 -2
- package/dist/surface-scaffold.js +2 -2
- package/dist/surface-tint-DQgYCaP9.d.ts +25 -0
- package/dist/tab-navigator.d.ts +2 -1
- package/dist/tab-navigator.js +2 -1
- package/dist/tab-navigator.js.map +1 -1
- package/dist/toolbar.d.ts +1 -0
- package/dist/value-preview.d.ts +21 -0
- package/dist/value-preview.js +3 -0
- package/dist/value-preview.js.map +1 -0
- package/dist/wire-catalog.d.ts +2 -1
- package/dist/wire-catalog.js +1 -1
- package/dist/wire-content-items.js +88 -0
- package/dist/wire-content-items.js.map +1 -1
- package/dist/workbench-dialog.d.ts +2 -1
- package/dist/workbench-dialog.js +4 -3
- package/dist/workbench-dialog.js.map +1 -1
- package/dist/workbench.d.ts +2 -1
- package/dist/workbench.js +2 -1
- package/docs/accessibility.md +6 -0
- package/docs/backdrop-image.md +4 -0
- package/docs/button.md +15 -0
- package/docs/component-contract.md +34 -4
- package/docs/component-selection.md +16 -1
- package/docs/design/templates/button/emphasis-dark.svg +1 -1
- package/docs/design/templates/button-dark.svg +1 -1
- package/docs/design/templates/checkbox/error-dark.svg +1 -1
- package/docs/design/templates/checkbox/states.svg +1 -1
- package/docs/design/templates/checkbox-dark.svg +1 -1
- package/docs/design/templates/checkbox-group/horizontal-dark.svg +1 -1
- package/docs/design/templates/checkbox-group/vertical.svg +1 -1
- package/docs/design/templates/checkbox-group-dark.svg +1 -1
- package/docs/design/templates/checkbox-group.svg +1 -1
- package/docs/design/templates/checkbox.svg +1 -1
- package/docs/design/templates/choice-chips/color-palette-dark.svg +1 -1
- package/docs/design/templates/choice-chips-dark.svg +1 -1
- package/docs/design/templates/color-field/error-dark.svg +1 -1
- package/docs/design/templates/color-field/hint.svg +1 -1
- package/docs/design/templates/color-field-dark.svg +1 -1
- package/docs/design/templates/color-field.svg +1 -1
- package/docs/design/templates/color-picker/gray.svg +1 -1
- package/docs/design/templates/color-picker/hsb.svg +1 -1
- package/docs/design/templates/color-picker/rgb.svg +1 -1
- package/docs/design/templates/color-picker.svg +1 -1
- package/docs/design/templates/color-swatches/palette-dark.svg +1 -1
- package/docs/design/templates/color-swatches-dark.svg +1 -1
- package/docs/design/templates/disclosure/embedded.svg +1 -1
- package/docs/design/templates/disclosure/framed-sunken.svg +1 -1
- package/docs/design/templates/disclosure/plain.svg +1 -1
- package/docs/design/templates/disclosure.svg +1 -1
- package/docs/design/templates/message-composer/chat.svg +1 -1
- package/docs/design/templates/message-composer.svg +1 -1
- package/docs/design/templates/progress-bar/determinate.svg +1 -1
- package/docs/design/templates/progress-bar/tones.svg +1 -1
- package/docs/design/templates/progress-bar.svg +1 -1
- package/docs/design/templates/radio-group/horizontal-dark.svg +1 -1
- package/docs/design/templates/radio-group/vertical.svg +1 -1
- package/docs/design/templates/radio-group-dark.svg +1 -1
- package/docs/design/templates/radio-group.svg +1 -1
- package/docs/design/templates/search-field/empty.svg +1 -1
- package/docs/design/templates/search-field/tokens.svg +1 -1
- package/docs/design/templates/search-field.svg +1 -1
- package/docs/design/templates/select/form.svg +1 -1
- package/docs/design/templates/select.svg +1 -1
- package/docs/design/templates/slider/compact.svg +1 -1
- package/docs/design/templates/slider/readout.svg +1 -1
- package/docs/design/templates/slider/ticks.svg +1 -1
- package/docs/design/templates/slider.svg +1 -1
- package/docs/design/templates/switch/states.svg +1 -1
- package/docs/design/templates/switch.svg +1 -1
- package/docs/design/templates/tag-field/error-dark.svg +1 -1
- package/docs/design/templates/tag-field/error.svg +1 -1
- package/docs/design/templates/tag-field/tags.svg +1 -1
- package/docs/design/templates/tag-field-dark.svg +1 -1
- package/docs/design/templates/tag-field.svg +1 -1
- package/docs/design/templates/text-field/error-dark.svg +1 -1
- package/docs/design/templates/text-field/labeled.svg +1 -1
- package/docs/design/templates/text-field/multiline.svg +1 -1
- package/docs/design/templates/text-field/search.svg +1 -1
- package/docs/design/templates/text-field-dark.svg +1 -1
- package/docs/design/templates/text-field.svg +1 -1
- package/docs/design/templates/toolbar-control-group/icon-tile-danger-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group-dark.svg +1 -1
- package/docs/design/templates.md +3 -1
- package/docs/editor-frame.md +47 -0
- package/docs/investigations/content-item-media-scroll-performance.md +26 -0
- package/docs/layout.md +34 -0
- package/docs/manual-test-plan.md +27 -1
- package/docs/recipes.md +9 -0
- package/docs/surface-scaffold.md +50 -1
- package/docs/value-preview.md +16 -0
- package/llms.txt +10 -1
- package/package.json +13 -1
- package/dist/chunk-3GLYIIFR.js.map +0 -1
- package/dist/chunk-4UB5Z3ZZ.js.map +0 -1
- package/dist/chunk-5USKCWGL.js +0 -113
- package/dist/chunk-5USKCWGL.js.map +0 -1
- package/dist/chunk-6CDILXF4.js.map +0 -1
- package/dist/chunk-ATGAJVZ6.js.map +0 -1
- package/dist/chunk-HQZG3OFL.js.map +0 -1
- package/dist/chunk-JCCN3U6X.js.map +0 -1
- package/dist/chunk-KPINJHIC.js.map +0 -1
- package/dist/chunk-SCDWURBO.js.map +0 -1
- package/dist/chunk-SOFPUW3O.js.map +0 -1
- package/dist/chunk-SQ5DH66U.js.map +0 -1
- package/dist/chunk-ZNROKDSZ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/split-view/split-view.tsx"],"names":[],"mappings":";;;;;AAkFA,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,W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C,KAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAM,+BAAA;AAAA,UACN,iBAAA,EAAe,IAAA;AAAA,UACf,gBAAA,EAAe,MAAA;AAAA,UAEd,QAAA,EAAA;AAAA;AAAA;AACH;AAAA,GACF,mBAEA,GAAA;AAAA,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,MACC,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-P7EJ4CAD.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.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}\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}: 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 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 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":";;;;;AAkFA,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;AA6CO,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,EACd,SAAA,GAAY,MAAA;AAAA,EACZ,eAAe,EAAC;AAAA,EAChB,SAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAAmB;AACjB,EAAA,IAAI,cAAc,MAAA,IAAa,SAAA;AAC7B,IAAA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AAA,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-ETFP7HAR.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.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}\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}: 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 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 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"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx } from 'kerfjs/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/components/data-display/value-preview/value-preview.tsx
|
|
4
|
+
var unsafeStyleValue = /[;{}<>"'\\]|\p{Cc}/u;
|
|
5
|
+
function styleValue(value, prop) {
|
|
6
|
+
const trimmed = value.trim();
|
|
7
|
+
if (!trimmed || unsafeStyleValue.test(trimmed))
|
|
8
|
+
throw new TypeError(`ValuePreview ${prop} requires one CSS length.`);
|
|
9
|
+
return trimmed;
|
|
10
|
+
}
|
|
11
|
+
function ValuePreview({
|
|
12
|
+
label,
|
|
13
|
+
value,
|
|
14
|
+
minHeight,
|
|
15
|
+
maxHeight,
|
|
16
|
+
id,
|
|
17
|
+
className = "",
|
|
18
|
+
slot
|
|
19
|
+
}) {
|
|
20
|
+
const bounds = [
|
|
21
|
+
minHeight === void 0 ? "" : `--_kui-value-preview-min-height:${styleValue(minHeight, "minHeight")}`,
|
|
22
|
+
maxHeight === void 0 ? "" : `--_kui-value-preview-max-height:${styleValue(maxHeight, "maxHeight")}`
|
|
23
|
+
].filter(Boolean).join(";");
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"output",
|
|
26
|
+
{
|
|
27
|
+
class: `kui-value-preview ${className}`.trim(),
|
|
28
|
+
"data-component": "value-preview",
|
|
29
|
+
"aria-label": label,
|
|
30
|
+
tabindex: 0,
|
|
31
|
+
id,
|
|
32
|
+
style: bounds || void 0,
|
|
33
|
+
slot,
|
|
34
|
+
children: value
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { ValuePreview };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=chunk-F653O57X.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/value-preview/value-preview.tsx"],"names":[],"mappings":";;;AAEA,IAAM,gBAAA,GAAmB,qBAAA;AAEzB,SAAS,UAAA,CAAW,OAAkB,IAAA,EAAsB;AAC1D,EAAA,MAAM,OAAA,GAAU,MAAM,IAAA,EAAK;AAC3B,EAAA,IAAI,CAAC,OAAA,IAAW,gBAAA,CAAiB,IAAA,CAAK,OAAO,CAAA;AAC3C,IAAA,MAAM,IAAI,SAAA,CAAU,CAAA,aAAA,EAAgB,IAAI,CAAA,yBAAA,CAA2B,CAAA;AACrE,EAAA,OAAO,OAAA;AACT;AAkBO,SAAS,YAAA,CAAa;AAAA,EAC3B,KAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,EAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAAsB;AACpB,EAAA,MAAM,MAAA,GAAS;AAAA,IACb,cAAc,MAAA,GACV,EAAA,GACA,mCAAmC,UAAA,CAAW,SAAA,EAAW,WAAW,CAAC,CAAA,CAAA;AAAA,IACzE,cAAc,MAAA,GACV,EAAA,GACA,mCAAmC,UAAA,CAAW,SAAA,EAAW,WAAW,CAAC,CAAA;AAAA,GAC3E,CACG,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AACX,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,kBAAA,EAAqB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC7C,gBAAA,EAAe,eAAA;AAAA,MACf,YAAA,EAAY,KAAA;AAAA,MACZ,QAAA,EAAU,CAAA;AAAA,MACV,EAAA;AAAA,MACA,OAAO,MAAA,IAAU,MAAA;AAAA,MACjB,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-F653O57X.js","sourcesContent":["import type { CssLength } from '../../../shared/styles/css-values.js';\n\nconst unsafeStyleValue = /[;{}<>\"'\\\\]|\\p{Cc}/u;\n\nfunction styleValue(value: CssLength, prop: string): string {\n const trimmed = value.trim();\n if (!trimmed || unsafeStyleValue.test(trimmed))\n throw new TypeError(`ValuePreview ${prop} requires one CSS length.`);\n return trimmed;\n}\n\nexport interface ValuePreviewProps {\n /** Accessible name for the keyboard-scrollable value. */\n label: string;\n /** Literal plain-text value, including newlines and long unbroken text. */\n value: string;\n /** Minimum height; defaults to 48px. */\n minHeight?: CssLength;\n /** Maximum height before the value scrolls; defaults to 96px. */\n maxHeight?: CssLength;\n id?: string;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** Read-only, bounded multiline text for a containing surface such as SunkenPanel. */\nexport function ValuePreview({\n label,\n value,\n minHeight,\n maxHeight,\n id,\n className = '',\n slot,\n}: ValuePreviewProps) {\n const bounds = [\n minHeight === undefined\n ? ''\n : `--_kui-value-preview-min-height:${styleValue(minHeight, 'minHeight')}`,\n maxHeight === undefined\n ? ''\n : `--_kui-value-preview-max-height:${styleValue(maxHeight, 'maxHeight')}`,\n ]\n .filter(Boolean)\n .join(';');\n return (\n <output\n class={`kui-value-preview ${className}`.trim()}\n data-component=\"value-preview\"\n aria-label={label}\n tabindex={0}\n id={id}\n style={bounds || undefined}\n slot={slot}\n >\n {value}\n </output>\n );\n}\n"]}
|
|
@@ -2,9 +2,10 @@ import { ToolbarText } from './chunk-EKHDLBRP.js';
|
|
|
2
2
|
import { paneConfigProps } from './chunk-CTQUDCY5.js';
|
|
3
3
|
import { ToolbarControlGroup } from './chunk-5J6Z4BWY.js';
|
|
4
4
|
import { Toolbar } from './chunk-ZN7KUMPY.js';
|
|
5
|
-
import { Pane } from './chunk-
|
|
6
|
-
import {
|
|
5
|
+
import { Pane } from './chunk-XRZSK2WC.js';
|
|
6
|
+
import { scrollEdgeAttributes } from './chunk-IRC5N7FA.js';
|
|
7
7
|
import { List } from './chunk-NB6POCFH.js';
|
|
8
|
+
import { surfaceTintAttributes, joinStyles } from './chunk-ITENVZ6Q.js';
|
|
8
9
|
import { LucideIcon } from './chunk-HJXVVFBT.js';
|
|
9
10
|
import { ChevronLeft } from 'lucide';
|
|
10
11
|
import { jsx, jsxs, Fragment } from 'kerfjs/jsx-runtime';
|
|
@@ -193,4 +194,4 @@ function NavStack({
|
|
|
193
194
|
|
|
194
195
|
export { NavStack };
|
|
195
196
|
|
|
196
|
-
//# sourceMappingURL=chunk-
|
|
197
|
+
//# sourceMappingURL=chunk-IIQ2XIMU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/navigation/nav-stack/nav-stack.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAuMA,IAAM,uBAAA,GAA0B;AAAA,EAC9B,aAAA;AAAA,EACA,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YACd,SAAS,MAAA,CAAO,OAAA;AAAA,YAChB,cAAc,MAAA,CAAO,YAAA;AAAA,YACrB,aAAa,MAAA,CAAO,WAAA;AAAA,YACpB,YAAY,MAAA,CAAO,UAAA;AAAA,YACnB,cAAc,MAAA,CAAO,YAAA;AAAA,YACrB,aAAA,EACE,OAAO,aAAA,IAAiB,8BAAA;AAAA,YAE1B,SAAS,MAAA,CAAO,OAAA;AAAA,YAChB,QAAQ,MAAA,CAAO,MAAA;AAAA,YACf,UAAU,MAAA,CAAO;AAAA;AAAA,SACnB,EACF;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-IIQ2XIMU.js","sourcesContent":["import { ChevronLeft } from 'lucide';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n type ScrollEdge,\n scrollEdgeAttributes,\n} from '../../../shared/layout/scroll-edge.js';\nimport type { NavPane } from '../../../shared/panels/nav-pane.js';\nimport type { PanelBottomToolbar } from '../../../shared/panels/panel-toolbar.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport {\n joinStyles,\n type SurfaceTint,\n surfaceTintAttributes,\n} from '../../../shared/styles/surface-tint.js';\nimport { Toolbar, type ToolbarConfig } from '../../actions/toolbar/toolbar.js';\nimport { ToolbarControlGroup } from '../../actions/toolbar-control-group/toolbar-control-group.js';\nimport {\n type HeadingLevel,\n ToolbarText,\n type ToolbarTextSize,\n} from '../../actions/toolbar-text/toolbar-text.js';\nimport { List, type ListConfig } from '../../collections/list/list.js';\nimport { paneConfigProps } from '../../layout/pane/internal/pane-config-props.js';\nimport { Pane } from '../../layout/pane/pane.js';\nimport { LucideIcon } from '../../media/lucide-icon/lucide-icon.js';\n\n/**\n * One entry in a {@link NavStack}. The app owns the stack as an array (usually a\n * signal); `NavStack` renders it and `wireNavStack` animates the transitions.\n */\nexport interface NavStackView extends NavPane<\n NavStackViewToolbar,\n PanelBottomToolbar\n> {\n /** Stable identity for keyed reconcile and transition direction. */\n key: string;\n}\n\n/** Per-view top toolbar. The stack supplies its back control before `leading`. */\nexport interface NavStackViewToolbar extends NavStackToolbarConfig {\n title?: string;\n leading?: KerfUiContent;\n center?: KerfUiContent;\n trailing?: KerfUiContent;\n}\n\n/** A view's structured bottom toolbar; it cross-fades on navigation. */\nexport type NavStackViewBottomToolbar = PanelBottomToolbar;\n\n/**\n * The top toolbar's configuration. Its `ToolbarConfig` forwards to the real\n * `Toolbar` the stack renders; by default that toolbar draws no divider and\n * claims the top and side safe-area edges the stack still touches.\n */\nexport interface NavStackToolbarConfig extends ToolbarConfig {\n /** Accessible name of the top toolbar (default: none). */\n label?: string;\n /**\n * Size of the view title's `ToolbarText`. Default `xlarge` at the root,\n * where the title is the page heading, and `large` once a back control\n * shares the bar.\n */\n titleSize?: ToolbarTextSize;\n /** Expose the view title as a heading at this level (default: a plain span). */\n headingLevel?: HeadingLevel;\n}\n\n/**\n * How a {@link NavStack}'s top chrome relates to the active view: `docked`\n * above it, or `overlay` laid over its top edge on the translucent chrome\n * material, so the view's 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 NavStackChromePresentation = 'docked' | 'overlay' | 'clear';\n\n/**\n * How a {@link NavStack}'s bottom toolbar relates to the active view:\n * `docked` below it, or `overlay` laid over its bottom edge on the\n * translucent chrome material, so the view's content scrolls visibly beneath\n * 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\n * it, until the view scrolls to its end.\n */\nexport type NavStackBottomToolbarPresentation = 'docked' | 'overlay' | 'clear';\n\nexport interface NavStackProps {\n id: string;\n /** Accessible name for the stack region. */\n label: string;\n /** The stack, root first; the last entry is the active top view. */\n views: NavStackView[];\n /** Accessible label for the icon-only back control (default \"Back\"). */\n backLabel?: string;\n /** The back control's icon (default a chevron-left `LucideIcon`). */\n backIcon?: KerfUiContent;\n /**\n * Visible text beside the back icon, such as the previous view's title\n * (default: icon only). When set, the text names the control and\n * `backLabel` is not used.\n */\n backText?: string;\n /** The top toolbar's configuration, forwarded to its `Toolbar`. */\n toolbarConfig?: NavStackToolbarConfig;\n /** Persistent last group in every view's top toolbar, supplied by a hosting panel. */\n panelToggle?: KerfUiContent;\n /** Hide the top toolbar entirely (rare — a fully custom-chrome view). */\n hideToolbar?: boolean;\n /** Optional persistent bottom toolbar used when the active view does not provide one. */\n bottomToolbar?: NavStackViewBottomToolbar;\n /**\n * Stack chrome separator. `auto` (default) draws both available edges\n * against a sunken active Pane and otherwise follows `chromeDividers`;\n * `hidden` suppresses the stack-owned edges.\n */\n separator?: 'auto' | 'hidden';\n /**\n * The line under the top chrome and over the bottom toolbar, where they\n * meet the active view. `scroll` (default) shows the chrome's line only\n * while the view's content is scrolled beneath it, and the bottom\n * toolbar's only while more content lies below — never when the content\n * fits — once `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is\n * wired above the stack; unwired, neither shows. `always` shows both\n * without the wiring; `none` neither, even when wired. The line is drawn\n * inside the chrome, so no state moves the chrome or the content. A\n * A sunken active Pane still draws the separator unless\n * `separator=\"hidden\"`. A `toolbarConfig.dividerSides` edge is the Toolbar's\n * own and is unaffected.\n */\n chromeDividers?: 'scroll' | 'always' | 'none';\n /**\n * `docked` (default) gives the top chrome its own band above the active\n * view. `overlay` lays the chrome over the view's top edge on the\n * translucent chrome material (`--kui-chrome-material`, opaque under\n * `prefers-reduced-transparency`, `prefers-contrast: more`, forced colors,\n * or without `backdrop-filter`), so content scrolls visibly beneath it, as\n * an iOS navigation bar does. `wireNavStack` measures the live chrome and\n * hands its height (top safe area included) to the viewport as the\n * block-start `--kui-edge-inset-*` context, so every view clears it with no\n * prop: a plain view, a sole `Pane`'s content (or header), and a nested\n * layout all pad and `scroll-padding` by it, so the first item, and anything\n * focused or scrolled into view, rests clear of the bar. Until then, and\n * with `hideToolbar`, the chrome stays docked. An untoned `ToolbarText` in\n * the chrome lifts its title and description to AA over the content passing\n * beneath it; keep any other quiet copy in the view. With `clear`, the\n * stack's own back control sits in a glass control group\n * (`material=\"glass\"`), so it stays legible over imagery.\n */\n chromePresentation?: NavStackChromePresentation;\n /**\n * `docked` (default) gives the bottom toolbar its own band below the\n * active view. `overlay` lays it over the view's bottom edge on the\n * translucent chrome material (opaque under the same preferences as\n * `chromePresentation`), so content scrolls visibly beneath it, as under\n * an iOS toolbar. `wireNavStack` measures the live bottom toolbar (never a\n * cross-fading copy) and hands its height (bottom safe area included) to\n * the viewport as the block-end `--kui-edge-inset-*` context, so a plain\n * view, a sole `Pane`'s content (or footer), and a nested layout rest their\n * last item, and anything focused or scrolled into view, clear of it. Until\n * then, and while no bottom toolbar is shown, it stays docked. Independent\n * of `chromePresentation`, which governs only the top chrome. An untoned\n * `ToolbarText` in the toolbar lifts to AA over the content beneath it.\n */\n bottomToolbarPresentation?: NavStackBottomToolbarPresentation;\n /**\n * For `clear` chrome or bottom toolbar, `material` fades the chrome\n * material in while the active view's content lies beneath it (default\n * `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 /**\n * Paint the stack, its docked chrome and bottom toolbar, and every view in\n * an app-chosen color (a `@kerfjs/ui/css-values` color builder) instead of\n * the surface. Overlay chrome keeps the chrome material; one view's own\n * color goes in its `pane: { background }`. Forced colors paint `Canvas`.\n */\n background?: CssColor;\n /**\n * A scoped tint (`{ color, scheme }`) for the stack, its chrome, bottom toolbar, and views: its surfaces and every\n * descendant re-derive their surface and text tokens from the app's color\n * in the declared scheme, with lightness clamped to keep text at WCAG AA.\n */\n tint?: SurfaceTint;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nconst DEFAULT_SAFE_AREA_EDGES = [\n 'block-start',\n 'inline-start',\n 'inline-end',\n] as const;\n\nconst DEFAULT_BOTTOM_SAFE_AREA_EDGES = [\n 'block-end',\n 'inline-start',\n 'inline-end',\n] as const;\n\nfunction chromeList(content: KerfUiContent, config?: ListConfig) {\n return (\n <List\n dividerSides={config?.dividerSides}\n gap={config?.gap}\n hAlign={config?.hAlign}\n vAlign={config?.vAlign}\n textInsets={config?.textInsets}\n controlInsets={config?.controlInsets}\n >\n {content}\n </List>\n );\n}\n\n/**\n * A navigation stack (iOS-style push/pop). Renders every entry stacked, the last\n * one active; `@kerfjs/ui/wire-nav-stack`'s `wireNavStack` slides the content and\n * cross-fades the chrome across a change. Its top chrome is a real `Toolbar`: the\n * back control and title lead, the active view's `toolbar` fills the zones,\n * and `toolbarConfig` supplies defaults. A single-pane\n * layout is a `NavStack` with one entry. See `docs/23-app-layouts.md` §3.1.\n */\nexport function NavStack({\n id,\n label,\n views,\n backLabel = 'Back',\n backIcon,\n backText,\n toolbarConfig = {},\n panelToggle,\n hideToolbar = false,\n bottomToolbar,\n separator = 'auto',\n chromeDividers = 'scroll',\n chromePresentation = 'docked',\n bottomToolbarPresentation = 'docked',\n scrollEdge = 'none',\n scrollEdgeDistance,\n background,\n tint,\n className = '',\n slot,\n}: NavStackProps) {\n const tinted = surfaceTintAttributes(tint);\n const topIndex = views.length - 1;\n const top = views[topIndex];\n const topToolbar = top?.toolbar;\n const bottom = top?.bottomToolbar ?? bottomToolbar;\n const canPop = views.length > 1;\n const topDensity = topToolbar?.density ?? toolbarConfig.density;\n // With a back control, the title centers on the bar (iOS-style) unless the\n // view owns the center zone; at the root it leads and fills, left-aligned.\n const centerTitle = canPop && topToolbar?.center === undefined;\n const title = (\n <ToolbarText\n text={topToolbar?.title ?? ''}\n size={\n topToolbar?.titleSize ??\n toolbarConfig.titleSize ??\n (canPop ? 'large' : 'xlarge')\n }\n headingLevel={topToolbar?.headingLevel ?? toolbarConfig.headingLevel}\n fill={!centerTitle}\n />\n );\n return (\n <section\n class={`kui-nav-stack ${tinted.className} ${className}`\n .replace(/\\s+/g, ' ')\n .trim()}\n id={id}\n data-component=\"nav-stack\"\n data-nav-stack-id={id}\n data-depth={String(views.length)}\n data-separator={separator}\n data-chrome-dividers={\n chromeDividers === 'always' || chromeDividers === 'none'\n ? chromeDividers\n : undefined\n }\n data-chrome-presentation={\n chromePresentation !== 'docked' && !hideToolbar ? 'overlay' : undefined\n }\n data-chrome-material={\n chromePresentation === 'clear' && !hideToolbar ? 'clear' : undefined\n }\n data-bottom-toolbar-presentation={\n bottomToolbarPresentation !== 'docked' ? 'overlay' : undefined\n }\n data-bottom-toolbar-material={\n bottomToolbarPresentation === 'clear' ? 'clear' : undefined\n }\n {...scrollEdgeAttributes(\n scrollEdge,\n scrollEdgeDistance,\n (chromePresentation === 'clear' && !hideToolbar) ||\n bottomToolbarPresentation === 'clear',\n )}\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 style={joinStyles(\n background === undefined\n ? undefined\n : `--_kui-nav-stack-background:${background}`,\n tinted.style,\n )}\n aria-label={label}\n slot={slot}\n >\n {!hideToolbar && (\n <div class=\"kui-nav-stack__chrome\" data-nav-stack-chrome>\n <Toolbar\n label={topToolbar?.label ?? toolbarConfig.label}\n density={topDensity}\n dividerSides={\n topToolbar?.dividerSides ?? toolbarConfig.dividerSides\n }\n centerAlign={\n centerTitle\n ? 'balanced'\n : (topToolbar?.centerAlign ?? toolbarConfig.centerAlign)\n }\n responsive={topToolbar?.responsive ?? toolbarConfig.responsive}\n responsiveAt={\n topToolbar?.responsiveAt ?? toolbarConfig.responsiveAt\n }\n safeAreaEdges={\n topToolbar?.safeAreaEdges ??\n toolbarConfig.safeAreaEdges ??\n DEFAULT_SAFE_AREA_EDGES\n }\n leading={\n <>\n {canPop && (\n <ToolbarControlGroup\n content={backText ? 'mixed' : 'icon'}\n size={topDensity === 'compact' ? 'compact' : 'default'}\n material={\n chromePresentation === 'clear' ? 'glass' : undefined\n }\n single\n >\n <button\n type=\"button\"\n class=\"kui-nav-stack__back\"\n data-nav-back\n aria-label={backText ? undefined : backLabel}\n >\n {backIcon ?? (\n <LucideIcon\n icon={ChevronLeft}\n name=\"chevron-left\"\n className=\"kui-nav-stack__back-icon\"\n />\n )}\n {backText ? <span>{backText}</span> : null}\n </button>\n </ToolbarControlGroup>\n )}\n {topToolbar?.leading}\n {centerTitle ? null : title}\n </>\n }\n center={centerTitle ? title : topToolbar?.center}\n trailing={\n <>\n {topToolbar?.trailing}\n {panelToggle}\n </>\n }\n />\n </div>\n )}\n <div class=\"kui-nav-stack__viewport\" data-nav-stack-viewport>\n {views.map((view, index) => (\n <article\n class=\"kui-nav-stack__view\"\n data-key={view.key}\n data-nav-key={view.key}\n data-nav-active={String(index === topIndex)}\n aria-hidden={String(index !== topIndex)}\n >\n {view.pane ||\n view.header !== undefined ||\n view.footer !== undefined ? (\n <Pane\n {...paneConfigProps(view.pane)}\n header={\n view.header === undefined ? undefined : (\n <div data-nav-stack-header>\n {chromeList(view.header, view.headerList)}\n </div>\n )\n }\n footer={\n view.footer === undefined ? undefined : (\n <div data-nav-stack-footer>\n {chromeList(view.footer, view.footerList)}\n </div>\n )\n }\n >\n {view.content}\n </Pane>\n ) : (\n view.content\n )}\n </article>\n ))}\n </div>\n {bottom && (\n <footer class=\"kui-nav-stack__bottom\" data-nav-stack-bottom>\n <Toolbar\n position=\"footer\"\n label={bottom.label}\n density={bottom.density}\n dividerSides={bottom.dividerSides}\n centerAlign={bottom.centerAlign}\n responsive={bottom.responsive}\n responsiveAt={bottom.responsiveAt}\n safeAreaEdges={\n bottom.safeAreaEdges ?? DEFAULT_BOTTOM_SAFE_AREA_EDGES\n }\n leading={bottom.leading}\n center={bottom.center}\n trailing={bottom.trailing}\n />\n </footer>\n )}\n </section>\n );\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/shared/layout/scroll-edge.ts
|
|
2
|
+
function scrollEdgeAttributes(edge, distance, enabled) {
|
|
3
|
+
if (!enabled || edge === "none")
|
|
4
|
+
return {
|
|
5
|
+
"data-scroll-edge": void 0,
|
|
6
|
+
"data-scroll-edge-distance": void 0
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
"data-scroll-edge": edge,
|
|
10
|
+
"data-scroll-edge-distance": distance === void 0 || !(distance > 0) ? void 0 : String(distance)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { scrollEdgeAttributes };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=chunk-IRC5N7FA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/layout/scroll-edge.ts"],"names":[],"mappings":";AAaO,SAAS,oBAAA,CACd,IAAA,EACA,QAAA,EACA,OAAA,EAIA;AACA,EAAA,IAAI,CAAC,WAAW,IAAA,KAAS,MAAA;AACvB,IAAA,OAAO;AAAA,MACL,kBAAA,EAAoB,MAAA;AAAA,MACpB,2BAAA,EAA6B;AAAA,KAC/B;AACF,EAAA,OAAO;AAAA,IACL,kBAAA,EAAoB,IAAA;AAAA,IACpB,2BAAA,EACE,aAAa,MAAA,IAAa,EAAE,WAAW,CAAA,CAAA,GAAK,MAAA,GAAY,OAAO,QAAQ;AAAA,GAC3E;AACF","file":"chunk-IRC5N7FA.js","sourcesContent":["/**\n * What clear (fully transparent) chrome fades in as content scrolls beneath\n * it: `none` stays clear; `material` fades in the translucent chrome\n * material; `surface` fades in the opaque surface. The fade tracks the scroll\n * over `scrollEdgeDistance` (opacity only), from the scroll state\n * `wireScrollDividers` reports; unwired, the chrome stays clear.\n */\nexport type ScrollEdge = 'none' | 'material' | 'surface';\n\n/** The default scroll distance, in CSS pixels, a scroll edge fades in over. */\nexport const DEFAULT_SCROLL_EDGE_DISTANCE = 60;\n\n/** The root attributes a component with a scroll edge renders. */\nexport function scrollEdgeAttributes(\n edge: ScrollEdge,\n distance: number | undefined,\n enabled: boolean,\n): {\n 'data-scroll-edge': 'material' | 'surface' | undefined;\n 'data-scroll-edge-distance': string | undefined;\n} {\n if (!enabled || edge === 'none')\n return {\n 'data-scroll-edge': undefined,\n 'data-scroll-edge-distance': undefined,\n };\n return {\n 'data-scroll-edge': edge,\n 'data-scroll-edge-distance':\n distance === undefined || !(distance > 0) ? undefined : String(distance),\n };\n}\n"]}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
// src/shared/layout/scroll-edge.ts
|
|
2
|
-
function scrollEdgeAttributes(edge, distance, enabled) {
|
|
3
|
-
if (!enabled || edge === "none")
|
|
4
|
-
return {
|
|
5
|
-
"data-scroll-edge": void 0,
|
|
6
|
-
"data-scroll-edge-distance": void 0
|
|
7
|
-
};
|
|
8
|
-
return {
|
|
9
|
-
"data-scroll-edge": edge,
|
|
10
|
-
"data-scroll-edge-distance": distance === void 0 || !(distance > 0) ? void 0 : String(distance)
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
1
|
// src/shared/styles/surface-tint.ts
|
|
15
2
|
function surfaceTintAttributes(tint) {
|
|
16
3
|
if (tint === void 0)
|
|
@@ -32,6 +19,6 @@ function joinStyles(...declarations) {
|
|
|
32
19
|
return present.length === 0 ? void 0 : present.join(";");
|
|
33
20
|
}
|
|
34
21
|
|
|
35
|
-
export { joinStyles,
|
|
22
|
+
export { joinStyles, surfaceTintAttributes };
|
|
36
23
|
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-ITENVZ6Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/styles/surface-tint.ts"],"names":[],"mappings":";AA0BO,SAAS,sBAAsB,IAAA,EAOpC;AACA,EAAA,IAAI,IAAA,KAAS,MAAA;AACX,IAAA,OAAO;AAAA,MACL,eAAA,EAAiB,MAAA;AAAA,MACjB,sBAAA,EAAwB,MAAA;AAAA,MACxB,SAAA,EAAW,EAAA;AAAA,MACX,KAAA,EAAO;AAAA,KACT;AACF,EAAA,OAAO;AAAA,IACL,iBAAiB,IAAA,CAAK,MAAA;AAAA,IACtB,sBAAA,EAAwB,IAAA,CAAK,MAAA,KAAW,MAAA,GAAY,MAAA,GAAY,EAAA;AAAA,IAChE,SAAA,EAAW,CAAA,GAAA,EAAM,IAAA,CAAK,MAAM,CAAA,CAAA;AAAA,IAC5B,KAAA,EACE,IAAA,CAAK,MAAA,KAAW,MAAA,GACZ,CAAA,kBAAA,EAAqB,IAAA,CAAK,KAAK,CAAA,CAAA,GAC/B,CAAA,kBAAA,EAAqB,IAAA,CAAK,KAAK,CAAA,oBAAA,EAAuB,KAAK,MAAM,CAAA;AAAA,GACzE;AACF;AAGO,SAAS,cACX,YAAA,EACiB;AACpB,EAAA,MAAM,UAAU,YAAA,CAAa,MAAA,CAAO,CAAC,KAAA,KAAU,UAAU,MAAS,CAAA;AAClE,EAAA,OAAO,QAAQ,MAAA,KAAW,CAAA,GAAI,MAAA,GAAY,OAAA,CAAQ,KAAK,GAAG,CAAA;AAC5D","file":"chunk-ITENVZ6Q.js","sourcesContent":["import type { CssColor } from './css-values.js';\n\n/** The color scheme an app declares for a {@link SurfaceTint}'s color. */\nexport type SurfaceTintScheme = 'light' | 'dark';\n\n/**\n * A scoped tint for a layout surface: the app's color (usually sampled from\n * artwork it already knows) and the scheme that color belongs to. Kerf does no\n * color detection; `scheme` says whether the color reads as a light or a dark\n * surface. Inside the scope the surface, raised surface, text, quiet text, and\n * everything built on them (quiet fills, separators' backdrop, the chrome\n * material) re-derive from the color, with lightness clamped so text keeps\n * WCAG AA over any color.\n */\nexport interface SurfaceTint {\n color: CssColor;\n scheme: SurfaceTintScheme;\n /**\n * An optional accent (usually the artwork's most vivid color). The scope's\n * brand ramp re-derives from it: loud fills and their text, brand text and\n * links, text on brand fills, and the focus ring, each clamped to keep AA.\n */\n accent?: CssColor;\n}\n\n/** The root attributes a tinted surface renders. */\nexport function surfaceTintAttributes(tint: SurfaceTint | undefined): {\n 'data-kui-tint': SurfaceTintScheme | undefined;\n 'data-kui-tint-accent': '' | undefined;\n /** The Web Awesome scheme class, so its theme re-derives in the scope. */\n className: string;\n /** The inline declaration carrying the color, or `undefined`. */\n style: string | undefined;\n} {\n if (tint === undefined)\n return {\n 'data-kui-tint': undefined,\n 'data-kui-tint-accent': undefined,\n className: '',\n style: undefined,\n };\n return {\n 'data-kui-tint': tint.scheme,\n 'data-kui-tint-accent': tint.accent === undefined ? undefined : '',\n className: `wa-${tint.scheme}`,\n style:\n tint.accent === undefined\n ? `--_kui-tint-color:${tint.color}`\n : `--_kui-tint-color:${tint.color};--_kui-tint-accent:${tint.accent}`,\n };\n}\n\n/** Join inline declarations, omitting absent ones. */\nexport function joinStyles(\n ...declarations: (string | undefined)[]\n): string | undefined {\n const present = declarations.filter((value) => value !== undefined);\n return present.length === 0 ? undefined : present.join(';');\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { nativeDraggable } from './chunk-OK7FUK7U.js';
|
|
1
2
|
import { filterDataAttributes } from './chunk-KH4KEMSP.js';
|
|
2
3
|
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
3
4
|
|
|
@@ -21,6 +22,8 @@ function SummaryRow({
|
|
|
21
22
|
dimmed = false,
|
|
22
23
|
listEdge,
|
|
23
24
|
deferRendering = false,
|
|
25
|
+
semanticRole = "option",
|
|
26
|
+
draggable,
|
|
24
27
|
ariaLabel,
|
|
25
28
|
id,
|
|
26
29
|
className = "",
|
|
@@ -41,9 +44,10 @@ function SummaryRow({
|
|
|
41
44
|
"data-selected": selected ? "true" : void 0,
|
|
42
45
|
"data-dimmed": dimmed ? "true" : void 0,
|
|
43
46
|
"data-defer": deferRendering ? "true" : void 0,
|
|
44
|
-
role:
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
+
role: semanticRole,
|
|
48
|
+
draggable: nativeDraggable(draggable, false),
|
|
49
|
+
tabindex: semanticRole === "option" ? "0" : void 0,
|
|
50
|
+
"aria-selected": semanticRole === "option" ? selected ? "true" : "false" : void 0,
|
|
47
51
|
"aria-label": ariaLabel,
|
|
48
52
|
style: titleLines === void 0 ? void 0 : `--_kui-summary-row-title-lines:${titleLines}`,
|
|
49
53
|
children: [
|
|
@@ -65,4 +69,4 @@ function SummaryRow({
|
|
|
65
69
|
|
|
66
70
|
export { SummaryRow };
|
|
67
71
|
|
|
68
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-K67XBCHG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/collections/summary-row/summary-row.tsx"],"names":[],"mappings":";;;;AAYA,IAAM,mBAAA,uBAA0B,GAAA,CAAI;AAAA,EAClC,gBAAA;AAAA,EACA,mBAAA;AAAA,EACA,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,CAAC,CAAA;AAiEM,SAAS,UAAA,CAAW;AAAA,EACzB,KAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA,GAAe,KAAA;AAAA,EACf,UAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA,GAAW,KAAA;AAAA,EACX,MAAA,GAAS,KAAA;AAAA,EACT,QAAA;AAAA,EACA,cAAA,GAAiB,KAAA;AAAA,EACjB,YAAA,GAAe,QAAA;AAAA,EACf,SAAA;AAAA,EACA,SAAA;AAAA,EACA,EAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,iBAAiB;AACnB,CAAA,EAAoB;AAClB,EAAA,IACE,eAAe,MAAA,KACd,CAAC,OAAO,SAAA,CAAU,UAAU,KAAK,UAAA,GAAa,CAAA,CAAA;AAE/C,IAAA,MAAM,IAAI,WAAW,kDAAkD,CAAA;AACzE,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,mBAAmB,CAAA;AAAA,MAC5D,EAAA;A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,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,6BAA6B,QAAA,EAAA,YAAA,EAAa,CAAA;AAAA,cAEvD;AAAA,aAAA,EACH,CAAA;AAAA,YACC,QAAA,oBAAY,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,6BAA6B,QAAA,EAAA,QAAA,EAAS;AAAA,WAAA,EAChE;AAAA,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ","file":"chunk-K67XBCHG.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { nativeDraggable } from '../../../shared/dom/draggable.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { SemanticTone } from '../../../shared/styles/semantic-tone.js';\n\n/** `row` for a list section; `card` for a board column. */\nexport type SummaryRowPresentation = 'row' | 'card';\n/** A row's place in a rounded list section, so its corners match. */\nexport type SummaryRowListEdge = 'start' | 'end' | 'only';\n\nconst summaryRowProtected = new Set([\n 'data-component',\n 'data-presentation',\n 'data-list-edge',\n 'data-rail',\n 'data-selected',\n 'data-dimmed',\n]);\n\ntype SummaryRowRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-presentation'?: never;\n 'data-list-edge'?: never;\n 'data-rail'?: never;\n 'data-selected'?: never;\n 'data-dimmed'?: never;\n }\n>;\n\ninterface SummaryRowBaseProps {\n /** The identity line: an identifier, inline status glyphs, and the title. */\n title: KerfUiContent;\n /** Optional leading glyph, such as a category icon. */\n leading?: SafeHtml;\n /** Quiet text at the end of the title line, such as a relative time. */\n trailingMeta?: string | SafeHtml;\n /** A wrapping line of badges, chips, and quiet text below the title. */\n metadata?: KerfUiContent;\n /** `row` (default) or `card`. */\n presentation?: SummaryRowPresentation;\n /** Title lines before clipping; default 2 for a row and 4 for a card. */\n titleLines?: number;\n /** A leading state rail in a semantic tone (Up Next, blocked, …). */\n rail?: SemanticTone;\n /** Selected visual state; also exposed as `aria-selected` for an option. */\n selected?: boolean;\n /** Dim a finished or cut item; hover and selection restore it. */\n dimmed?: boolean;\n /** Round the corners that meet a rounded list section's edge. */\n listEdge?: SummaryRowListEdge;\n /** Skip rendering while off screen in long lists (`content-visibility`). */\n deferRendering?: boolean;\n id?: string;\n className?: string;\n /** Safe `data-*` identity (an item id or delegated action) on the root. */\n rootAttributes?: SummaryRowRootAttributes;\n}\n\nexport type SummaryRowProps = SummaryRowBaseProps &\n (\n | {\n /** Selectable option, the default; place it in a labeled listbox. */\n semanticRole?: 'option';\n /** Native HTML drag source on this option root, in row or card form. */\n draggable?: boolean;\n /** Accessible name when the visible content is not a good one. */\n ariaLabel?: string;\n }\n | {\n /** Static labeled group; nested actions own focus and activation. */\n semanticRole: 'group';\n draggable?: never;\n ariaLabel: string;\n }\n );\n\n/**\n * A list row or board card with a clamped identity line, metadata, and state\n * rail. The default is a focusable `role=\"option\"` for a labeled listbox;\n * `semanticRole=\"group\"` gives a static labeled row for nested actions.\n */\nexport function SummaryRow({\n title,\n leading,\n trailingMeta,\n metadata,\n presentation = 'row',\n titleLines,\n rail,\n selected = false,\n dimmed = false,\n listEdge,\n deferRendering = false,\n semanticRole = 'option',\n draggable,\n ariaLabel,\n id,\n className = '',\n rootAttributes = {},\n}: SummaryRowProps) {\n if (\n titleLines !== undefined &&\n (!Number.isInteger(titleLines) || titleLines < 1)\n )\n throw new RangeError('SummaryRow titleLines must be a positive integer');\n return (\n <div\n {...filterDataAttributes(rootAttributes, summaryRowProtected)}\n id={id}\n class={`kui-summary-row ${className}`.trim()}\n data-component=\"summary-row\"\n data-presentation={presentation}\n data-list-edge={listEdge}\n data-rail={rail}\n data-selected={selected ? 'true' : undefined}\n data-dimmed={dimmed ? 'true' : undefined}\n data-defer={deferRendering ? 'true' : undefined}\n role={semanticRole}\n draggable={nativeDraggable(draggable, false)}\n tabindex={semanticRole === 'option' ? '0' : undefined}\n aria-selected={\n semanticRole === 'option' ? (selected ? 'true' : 'false') : undefined\n }\n aria-label={ariaLabel}\n style={\n titleLines === undefined\n ? undefined\n : `--_kui-summary-row-title-lines:${titleLines}`\n }\n >\n {rail && <span class=\"kui-summary-row__rail\" aria-hidden=\"true\" />}\n <div class=\"kui-summary-row__body\">\n {leading && <span class=\"kui-summary-row__leading\">{leading}</span>}\n <div class=\"kui-summary-row__content\">\n <div class=\"kui-summary-row__title\">\n {trailingMeta !== undefined && (\n <span class=\"kui-summary-row__trailing\">{trailingMeta}</span>\n )}\n {title}\n </div>\n {metadata && <div class=\"kui-summary-row__metadata\">{metadata}</div>}\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/shared/dom/draggable.ts
|
|
2
|
+
function nativeDraggable(draggable, placeholder) {
|
|
3
|
+
if (draggable === void 0) return void 0;
|
|
4
|
+
return draggable && !placeholder ? "true" : "false";
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { nativeDraggable };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=chunk-OK7FUK7U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/dom/draggable.ts"],"names":[],"mappings":";AAIO,SAAS,eAAA,CACd,WACA,WAAA,EAC8B;AAC9B,EAAA,IAAI,SAAA,KAAc,QAAW,OAAO,MAAA;AACpC,EAAA,OAAO,SAAA,IAAa,CAAC,WAAA,GAAc,MAAA,GAAS,OAAA;AAC9C","file":"chunk-OK7FUK7U.js","sourcesContent":["/**\n * The native `draggable` attribute value for a component root: omitted unless\n * the author set it, and never `\"true\"` on an inert loading placeholder.\n */\nexport function nativeDraggable(\n draggable: boolean | undefined,\n placeholder: boolean,\n): 'true' | 'false' | undefined {\n if (draggable === undefined) return undefined;\n return draggable && !placeholder ? 'true' : 'false';\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { paneConfigProps } from './chunk-CTQUDCY5.js';
|
|
2
2
|
import { ToolbarControlGroup, isRelocatableGroup } from './chunk-5J6Z4BWY.js';
|
|
3
3
|
import { Toolbar } from './chunk-ZN7KUMPY.js';
|
|
4
|
-
import { Pane } from './chunk-
|
|
4
|
+
import { Pane } from './chunk-XRZSK2WC.js';
|
|
5
5
|
import { List } from './chunk-NB6POCFH.js';
|
|
6
6
|
import { LucideIcon } from './chunk-HJXVVFBT.js';
|
|
7
7
|
import { PanelLeftOpen, PanelLeftClose, PanelRightOpen, PanelRightClose, PanelBottomOpen, PanelBottomClose } from 'lucide';
|
|
@@ -159,4 +159,4 @@ function relocatedPanelGroups(toolbar, side, collapsed, attributes, size = "defa
|
|
|
159
159
|
|
|
160
160
|
export { collapsiblePanelToggleIcon, composedPanelBody, groupSizeFor, panelToggleGroup, relocatedPanelGroups };
|
|
161
161
|
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-OUCHU7JB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/panels/panel-toolbar.tsx"],"names":[],"mappings":";;;;;;;;;AAsCO,SAAS,0BAAA,CACd,MACA,SAAA,EACkE;AAClE,EAAA,IAAI,IAAA,KAAS,MAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,aAAA,EAAe,IAAA,EAAM,iBAAA,EAAkB,GAC/C,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB;AACvD,EAAA,IAAI,IAAA,KAAS,OAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB,GACjD,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB;AACzD,EAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB,GACnD,EAAE,IAAA,EAAM,gBAAA,EAAkB,IAAA,EAAM,oBAAA,EAAqB;AAC3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GAAG,gBAAgB,IAAI,CAAA;AAAA,MAEvB,QAAA,EAAA;AAAA,QAAA,YAAA,GAAe,WAAA,GAAc,IAAA;AAAA,QAC7B,OAAA;AAAA,QACA,eAAe,WAAA,GAAc;AAAA;AAAA;AAAA,GAChC;AAEJ;AAMO,SAAS,qBACd,OAAA,EACA,IAAA,EACA,SAAA,EACA,UAAA,EACA,OAAgC,SAAA,EACf;AACjB,EAAA,IAAI,CAAC,SAAA,IAAa,CAAC,OAAA,SAAgB,EAAC;AACpC,EAAA,MAAM,SAA0B,EAAC;AACjC,EAAA,MAAM,OAAA,GAAU,CAAC,OAAA,KAAiC;AAChD,IAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,OAAO,CAAA,EAAG;AAC1B,MAAA,KAAA,MAAW,IAAA,IAAQ,OAAA,EAAS,OAAA,CAAQ,IAAI,CAAA;AAAA,IAC1C,CAAA,MAAA,IAAW,kBAAA,CAAmB,OAAO,CAAA,EAAG;AACtC,MAAA,MAAA,CAAO,KAAK,OAAO,CAAA;AAAA,IACrB;AAAA,EACF,CAAA;AACA,EAAA,OAAA,CAAQ,QAAQ,OAAO,CAAA;AACvB,EAAA,OAAA,CAAQ,QAAQ,MAAM,CAAA;AACtB,EAAA,OAAA,CAAQ,QAAQ,QAAQ,CAAA;AACxB,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH,OAAA,CAAQ,SACJ,gBAAA,CAAiB,IAAA,EAAM,QAAQ,MAAA,EAAQ,IAAA,EAAM,UAAA,EAAY,IAAI,CAAA,GAC7D;AAAA,GACN,CAAE,OAAO,CAAC,KAAA,KAAU,UAAU,MAAA,IAAa,KAAA,KAAU,IAAA,IAAQ,KAAA,KAAU,KAAK,CAAA;AAC9E","file":"chunk-WSEJ2FDE.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport {\n PanelBottomClose,\n PanelBottomOpen,\n PanelLeftClose,\n PanelLeftOpen,\n PanelRightClose,\n PanelRightOpen,\n} from 'lucide';\n\nimport {\n Toolbar,\n type ToolbarConfig,\n} from '../../components/actions/toolbar/toolbar.js';\nimport {\n ToolbarControlGroup,\n type ToolbarControlGroupSize,\n} from '../../components/actions/toolbar-control-group/toolbar-control-group.js';\nimport {\n List,\n type ListConfig,\n} from '../../components/collections/list/list.js';\nimport { paneConfigProps } from '../../components/layout/pane/internal/pane-config-props.js';\nimport { Pane, type PaneConfig } from '../../components/layout/pane/pane.js';\nimport { LucideIcon } from '../../components/media/lucide-icon/lucide-icon.js';\nimport type { KerfUiContent } from '../content/semantic-content.js';\nimport { isRelocatableGroup } from './panel-toolbar-group.js';\n\n/** Which edge a collapsible panel docks to. */\nexport type PanelSide = 'left' | 'right' | 'bottom';\n\n/**\n * The standard collapse/expand icon for a panel `side` and `collapsed` state,\n * so every app's sidebars and drawers use one recognizable convention:\n * `PanelLeft*` for a left rail, `PanelRight*` for a right rail, `PanelBottom*`\n * for a bottom drawer — the `Close` glyph while open, the `Open` glyph while\n * collapsed. Exposed so an app can render its own toggle affordance.\n */\nexport function collapsiblePanelToggleIcon(\n side: PanelSide,\n collapsed: boolean,\n): { icon: Parameters<typeof LucideIcon>[0]['icon']; name: string } {\n if (side === 'left')\n return collapsed\n ? { icon: PanelLeftOpen, name: 'panel-left-open' }\n : { icon: PanelLeftClose, name: 'panel-left-close' };\n if (side === 'right')\n return collapsed\n ? { icon: PanelRightOpen, name: 'panel-right-open' }\n : { icon: PanelRightClose, name: 'panel-right-close' };\n return collapsed\n ? { icon: PanelBottomOpen, name: 'panel-bottom-open' }\n : { icon: PanelBottomClose, name: 'panel-bottom-close' };\n}\n\n/**\n * The standard collapse toggle a panel toolbar renders. The app handles the\n * button's `data-action` and flips its own `collapsed` flag.\n */\nexport interface PanelToggle {\n /** The `data-action` the toggle button carries. */\n action: string;\n /**\n * The panel's short title-style name (\"Navigator\", \"Build Output\"). It is\n * the toggle group's accessible name and completes the default \"Show …\" /\n * \"Hide …\" label (\"Show Navigator\"), so it follows the title-style rule in\n * `docs/writing.md`; it is never recapitalized.\n */\n name: string;\n /** Accessible label while the panel is collapsed. Defaults to `Show {name}`. */\n showLabel?: string;\n /** Accessible label while the panel is open. Defaults to `Hide {name}`. */\n hideLabel?: string;\n}\n\n/**\n * A collapsible panel's top toolbar, composed so its groups follow the\n * panel's open state.\n *\n * - `title` precedes the `leading` zone. Groups may appear in any of the\n * `leading`, `center`, and `trailing` zones while the panel is open.\n * - Groups marked `relocateOnCollapse` move to the work area's toolbar while\n * the panel is collapsed, preserving their order across the three zones.\n * - `toggle` is always the last group: in the panel's toolbar while it is\n * open, and right after the relocated groups in the work area's toolbar\n * while it is collapsed.\n *\n * Relocated content renders in both places while the panel is collapsed (the\n * panel's copy is inert), so give it no `id`s. Pass groups directly or in\n * arrays so their render-time annotation remains available to the panel.\n *\n * The toolbar's configuration (`dividerSides`, `centerAlign`, `responsive`,\n * `responsiveAt`, `safeAreaEdges`) forwards to its `Toolbar`. It draws no\n * divider of its own: the panel's `Pane` draws the line under it while the\n * content is scrolled (its `chromeDividers`, wired by `wireScrollDividers`).\n */\nexport interface PanelToolbar extends ToolbarConfig {\n /** Accessible name of the panel's toolbar. */\n label: string;\n title?: KerfUiContent;\n leading?: KerfUiContent;\n center?: KerfUiContent;\n trailing?: KerfUiContent;\n toggle?: PanelToggle;\n}\n\n/** A panel's fixed bottom toolbar, below its optional footer content. */\nexport interface PanelBottomToolbar extends ToolbarConfig {\n label: string;\n leading?: KerfUiContent;\n center?: KerfUiContent;\n trailing?: KerfUiContent;\n}\n\n/** Whether panel chrome stays fixed, scrolls, or follows Pane's auto rule. */\nexport type PanelChromePlacement = 'fixed' | 'scroll' | 'auto';\n\nfunction panelChromeList(content: KerfUiContent, config?: ListConfig) {\n return (\n <List\n dividerSides={config?.dividerSides}\n gap={config?.gap}\n hAlign={config?.hAlign}\n vAlign={config?.vAlign}\n textInsets={config?.textInsets}\n controlInsets={config?.controlInsets}\n >\n {content}\n </List>\n );\n}\n\n/** Owner-specific attributes a toggle button carries (its wiring hooks). */\nexport type PanelToggleAttributes = Readonly<Record<string, string>>;\n\n/** The group size that fits a toolbar of this density. */\nexport function groupSizeFor(\n density: ToolbarConfig['density'],\n): ToolbarControlGroupSize {\n return density === 'compact' ? 'compact' : 'default';\n}\n\n/** The standard toggle, alone in a borderless group. */\nexport function panelToggleGroup(\n side: PanelSide,\n toggle: PanelToggle,\n collapsed: boolean,\n attributes: PanelToggleAttributes,\n size: ToolbarControlGroupSize = 'default',\n): SafeHtml {\n const glyph = collapsiblePanelToggleIcon(side, collapsed);\n return (\n <ToolbarControlGroup\n label={toggle.name}\n appearance=\"borderless\"\n size={size}\n single\n >\n <button\n type=\"button\"\n {...attributes}\n data-action={toggle.action}\n aria-expanded={String(!collapsed)}\n aria-label={\n collapsed\n ? (toggle.showLabel ?? `Show ${toggle.name}`)\n : (toggle.hideLabel ?? `Hide ${toggle.name}`)\n }\n >\n <LucideIcon icon={glyph.icon} name={glyph.name} />\n </button>\n </ToolbarControlGroup>\n );\n}\n\n/**\n * The panel's own toolbar: content keeps its chosen zones and the toggle trails.\n */\nexport function composedPanelToolbar(\n toolbar: PanelToolbar,\n side: PanelSide,\n collapsed: boolean,\n attributes: PanelToggleAttributes,\n): SafeHtml {\n return (\n <Toolbar\n label={toolbar.label}\n density={toolbar.density}\n dividerSides={toolbar.dividerSides}\n centerAlign={toolbar.centerAlign}\n responsive={toolbar.responsive}\n responsiveAt={toolbar.responsiveAt}\n safeAreaEdges={toolbar.safeAreaEdges}\n center={toolbar.center}\n leading={\n <>\n {toolbar.title}\n {toolbar.leading}\n </>\n }\n trailing={\n <>\n {toolbar.trailing}\n {toolbar.toggle\n ? panelToggleGroup(\n side,\n toolbar.toggle,\n collapsed,\n attributes,\n groupSizeFor(toolbar.density),\n )\n : null}\n </>\n }\n />\n );\n}\n\n/**\n * A toolbar panel's body: its content in a `Pane` under its composed toolbar,\n * with its optional `footer` below. The panel's `pane` configuration forwards\n * to that `Pane`; an omitted or `undefined` field keeps the `Pane` default.\n */\nexport function composedPanelBody({\n toolbar,\n side,\n collapsed,\n attributes,\n pane,\n header,\n headerList,\n headerPlacement = 'fixed',\n footer,\n footerList,\n bottomToolbar,\n footerPlacement = 'fixed',\n content,\n}: {\n toolbar: PanelToolbar;\n side: PanelSide;\n collapsed: boolean;\n attributes: PanelToggleAttributes;\n pane: PaneConfig | undefined;\n header?: KerfUiContent;\n headerList?: ListConfig;\n headerPlacement?: PanelChromePlacement;\n footer?: KerfUiContent;\n footerList?: ListConfig;\n bottomToolbar?: PanelBottomToolbar;\n footerPlacement?: PanelChromePlacement;\n content: KerfUiContent;\n}): SafeHtml {\n const panelHeader = (\n <>\n {composedPanelToolbar(toolbar, side, collapsed, attributes)}\n {header ? panelChromeList(header, headerList) : null}\n </>\n );\n const panelFooter =\n footer || bottomToolbar ? (\n <>\n {footer ? panelChromeList(footer, footerList) : null}\n {bottomToolbar ? (\n <Toolbar\n position=\"footer\"\n label={bottomToolbar.label}\n density={bottomToolbar.density}\n dividerSides={bottomToolbar.dividerSides}\n centerAlign={bottomToolbar.centerAlign}\n responsive={bottomToolbar.responsive}\n responsiveAt={bottomToolbar.responsiveAt}\n safeAreaEdges={bottomToolbar.safeAreaEdges}\n leading={bottomToolbar.leading}\n center={bottomToolbar.center}\n trailing={bottomToolbar.trailing}\n />\n ) : null}\n </>\n ) : undefined;\n const scrollHeader = headerPlacement === 'scroll';\n const scrollFooter = footerPlacement === 'scroll';\n return (\n <Pane\n header={scrollHeader ? undefined : panelHeader}\n footer={scrollFooter ? undefined : panelFooter}\n chromePlacement={\n headerPlacement === 'auto' || footerPlacement === 'auto'\n ? 'auto'\n : 'fixed'\n }\n {...paneConfigProps(pane)}\n >\n {scrollHeader ? panelHeader : null}\n {content}\n {scrollFooter ? panelFooter : null}\n </Pane>\n );\n}\n\n/**\n * The groups a collapsed panel hands to the work area, in zone order, then its\n * toggle. Empty while the panel is open or has no toolbar.\n */\nexport function relocatedPanelGroups(\n toolbar: PanelToolbar | undefined,\n side: PanelSide,\n collapsed: boolean,\n attributes: PanelToggleAttributes,\n size: ToolbarControlGroupSize = 'default',\n): KerfUiContent[] {\n if (!collapsed || !toolbar) return [];\n const groups: KerfUiContent[] = [];\n const collect = (content: KerfUiContent): void => {\n if (Array.isArray(content)) {\n for (const item of content) collect(item);\n } else if (isRelocatableGroup(content)) {\n groups.push(content);\n }\n };\n collect(toolbar.leading);\n collect(toolbar.center);\n collect(toolbar.trailing);\n return [\n ...groups,\n toolbar.toggle\n ? panelToggleGroup(side, toolbar.toggle, true, attributes, size)\n : null,\n ].filter((group) => group !== undefined && group !== null && group !== false);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/shared/panels/panel-toolbar.tsx"],"names":[],"mappings":";;;;;;;;;AAsCO,SAAS,0BAAA,CACd,MACA,SAAA,EACkE;AAClE,EAAA,IAAI,IAAA,KAAS,MAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,aAAA,EAAe,IAAA,EAAM,iBAAA,EAAkB,GAC/C,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB;AACvD,EAAA,IAAI,IAAA,KAAS,OAAA;AACX,IAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,kBAAA,EAAmB,GACjD,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB;AACzD,EAAA,OAAO,SAAA,GACH,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,mBAAA,EAAoB,GACnD,EAAE,IAAA,EAAM,gBAAA,EAAkB,IAAA,EAAM,oBAAA,EAAqB;AAC3D;AAgEA,SAAS,eAAA,CAAgB,SAAwB,MAAA,EAAqB;AACpE,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,cAAc,MAAA,EAAQ,YAAA;AAAA,MACtB,KAAK,MAAA,EAAQ,GAAA;AAAA,MACb,QAAQ,MAAA,EAA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AA,EACA,SAAA,EACA,UAAA,EACA,OAAgC,SAAA,EACf;AACjB,EAAA,IAAI,CAAC,SAAA,IAAa,CAAC,OAAA,SAAgB,EAAC;AACpC,EAAA,MAAM,SAA0B,EAAC;AACjC,EAAA,MAAM,OAAA,GAAU,CAAC,OAAA,KAAiC;AAChD,IAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,OAAO,CAAA,EAAG;AAC1B,MAAA,KAAA,MAAW,IAAA,IAAQ,OAAA,EAAS,OAAA,CAAQ,IAAI,CAAA;AAAA,IAC1C,CAAA,MAAA,IAAW,kBAAA,CAAmB,OAAO,CAAA,EAAG;AACtC,MAAA,MAAA,CAAO,KAAK,OAAO,CAAA;AAAA,IACrB;AAAA,EACF,CAAA;AACA,EAAA,OAAA,CAAQ,QAAQ,OAAO,CAAA;AACvB,EAAA,OAAA,CAAQ,QAAQ,MAAM,CAAA;AACtB,EAAA,OAAA,CAAQ,QAAQ,QAAQ,CAAA;AACxB,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH,OAAA,CAAQ,SACJ,gBAAA,CAAiB,IAAA,EAAM,QAAQ,MAAA,EAAQ,IAAA,EAAM,UAAA,EAAY,IAAI,CAAA,GAC7D;AAAA,GACN,CAAE,OAAO,CAAC,KAAA,KAAU,UAAU,MAAA,IAAa,KAAA,KAAU,IAAA,IAAQ,KAAA,KAAU,KAAK,CAAA;AAC9E","file":"chunk-OUCHU7JB.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport {\n PanelBottomClose,\n PanelBottomOpen,\n PanelLeftClose,\n PanelLeftOpen,\n PanelRightClose,\n PanelRightOpen,\n} from 'lucide';\n\nimport {\n Toolbar,\n type ToolbarConfig,\n} from '../../components/actions/toolbar/toolbar.js';\nimport {\n ToolbarControlGroup,\n type ToolbarControlGroupSize,\n} from '../../components/actions/toolbar-control-group/toolbar-control-group.js';\nimport {\n List,\n type ListConfig,\n} from '../../components/collections/list/list.js';\nimport { paneConfigProps } from '../../components/layout/pane/internal/pane-config-props.js';\nimport { Pane, type PaneConfig } from '../../components/layout/pane/pane.js';\nimport { LucideIcon } from '../../components/media/lucide-icon/lucide-icon.js';\nimport type { KerfUiContent } from '../content/semantic-content.js';\nimport { isRelocatableGroup } from './panel-toolbar-group.js';\n\n/** Which edge a collapsible panel docks to. */\nexport type PanelSide = 'left' | 'right' | 'bottom';\n\n/**\n * The standard collapse/expand icon for a panel `side` and `collapsed` state,\n * so every app's sidebars and drawers use one recognizable convention:\n * `PanelLeft*` for a left rail, `PanelRight*` for a right rail, `PanelBottom*`\n * for a bottom drawer — the `Close` glyph while open, the `Open` glyph while\n * collapsed. Exposed so an app can render its own toggle affordance.\n */\nexport function collapsiblePanelToggleIcon(\n side: PanelSide,\n collapsed: boolean,\n): { icon: Parameters<typeof LucideIcon>[0]['icon']; name: string } {\n if (side === 'left')\n return collapsed\n ? { icon: PanelLeftOpen, name: 'panel-left-open' }\n : { icon: PanelLeftClose, name: 'panel-left-close' };\n if (side === 'right')\n return collapsed\n ? { icon: PanelRightOpen, name: 'panel-right-open' }\n : { icon: PanelRightClose, name: 'panel-right-close' };\n return collapsed\n ? { icon: PanelBottomOpen, name: 'panel-bottom-open' }\n : { icon: PanelBottomClose, name: 'panel-bottom-close' };\n}\n\n/**\n * The standard collapse toggle a panel toolbar renders. The app handles the\n * button's `data-action` and flips its own `collapsed` flag.\n */\nexport interface PanelToggle {\n /** The `data-action` the toggle button carries. */\n action: string;\n /**\n * The panel's short title-style name (\"Navigator\", \"Build Output\"). It is\n * the toggle group's accessible name and completes the default \"Show …\" /\n * \"Hide …\" label (\"Show Navigator\"), so it follows the title-style rule in\n * `docs/writing.md`; it is never recapitalized.\n */\n name: string;\n /** Accessible label while the panel is collapsed. Defaults to `Show {name}`. */\n showLabel?: string;\n /** Accessible label while the panel is open. Defaults to `Hide {name}`. */\n hideLabel?: string;\n}\n\n/**\n * A collapsible panel's top toolbar, composed so its groups follow the\n * panel's open state.\n *\n * - `title` precedes the `leading` zone. Groups may appear in any of the\n * `leading`, `center`, and `trailing` zones while the panel is open.\n * - Groups marked `relocateOnCollapse` move to the work area's toolbar while\n * the panel is collapsed, preserving their order across the three zones.\n * - `toggle` is always the last group: in the panel's toolbar while it is\n * open, and right after the relocated groups in the work area's toolbar\n * while it is collapsed.\n *\n * Relocated content renders in both places while the panel is collapsed (the\n * panel's copy is inert), so give it no `id`s. Pass groups directly or in\n * arrays so their render-time annotation remains available to the panel.\n *\n * The toolbar's configuration (`dividerSides`, `centerAlign`, `responsive`,\n * `responsiveAt`, `safeAreaEdges`) forwards to its `Toolbar`. It draws no\n * divider of its own: the panel's `Pane` draws the line under it while the\n * content is scrolled (its `chromeDividers`, wired by `wireScrollDividers`).\n */\nexport interface PanelToolbar extends ToolbarConfig {\n /** Accessible name of the panel's toolbar. */\n label: string;\n title?: KerfUiContent;\n leading?: KerfUiContent;\n center?: KerfUiContent;\n trailing?: KerfUiContent;\n toggle?: PanelToggle;\n}\n\n/** A panel's fixed bottom toolbar, below its optional footer content. */\nexport interface PanelBottomToolbar extends ToolbarConfig {\n label: string;\n leading?: KerfUiContent;\n center?: KerfUiContent;\n trailing?: KerfUiContent;\n}\n\n/** Whether panel chrome stays fixed, scrolls, or follows Pane's auto rule. */\nexport type PanelChromePlacement = 'fixed' | 'scroll' | 'auto';\n\nfunction panelChromeList(content: KerfUiContent, config?: ListConfig) {\n return (\n <List\n dividerSides={config?.dividerSides}\n gap={config?.gap}\n hAlign={config?.hAlign}\n vAlign={config?.vAlign}\n textInsets={config?.textInsets}\n controlInsets={config?.controlInsets}\n >\n {content}\n </List>\n );\n}\n\n/** Owner-specific attributes a toggle button carries (its wiring hooks). */\nexport type PanelToggleAttributes = Readonly<Record<string, string>>;\n\n/** The group size that fits a toolbar of this density. */\nexport function groupSizeFor(\n density: ToolbarConfig['density'],\n): ToolbarControlGroupSize {\n return density === 'compact' ? 'compact' : 'default';\n}\n\n/** The standard toggle, alone in a borderless group. */\nexport function panelToggleGroup(\n side: PanelSide,\n toggle: PanelToggle,\n collapsed: boolean,\n attributes: PanelToggleAttributes,\n size: ToolbarControlGroupSize = 'default',\n): SafeHtml {\n const glyph = collapsiblePanelToggleIcon(side, collapsed);\n return (\n <ToolbarControlGroup\n label={toggle.name}\n appearance=\"borderless\"\n size={size}\n single\n >\n <button\n type=\"button\"\n {...attributes}\n data-action={toggle.action}\n aria-expanded={String(!collapsed)}\n aria-label={\n collapsed\n ? (toggle.showLabel ?? `Show ${toggle.name}`)\n : (toggle.hideLabel ?? `Hide ${toggle.name}`)\n }\n >\n <LucideIcon icon={glyph.icon} name={glyph.name} />\n </button>\n </ToolbarControlGroup>\n );\n}\n\n/**\n * The panel's own toolbar: content keeps its chosen zones and the toggle trails.\n */\nexport function composedPanelToolbar(\n toolbar: PanelToolbar,\n side: PanelSide,\n collapsed: boolean,\n attributes: PanelToggleAttributes,\n): SafeHtml {\n return (\n <Toolbar\n label={toolbar.label}\n density={toolbar.density}\n dividerSides={toolbar.dividerSides}\n centerAlign={toolbar.centerAlign}\n responsive={toolbar.responsive}\n responsiveAt={toolbar.responsiveAt}\n safeAreaEdges={toolbar.safeAreaEdges}\n center={toolbar.center}\n leading={\n <>\n {toolbar.title}\n {toolbar.leading}\n </>\n }\n trailing={\n <>\n {toolbar.trailing}\n {toolbar.toggle\n ? panelToggleGroup(\n side,\n toolbar.toggle,\n collapsed,\n attributes,\n groupSizeFor(toolbar.density),\n )\n : null}\n </>\n }\n />\n );\n}\n\n/**\n * A toolbar panel's body: its content in a `Pane` under its composed toolbar,\n * with its optional `footer` below. The panel's `pane` configuration forwards\n * to that `Pane`; an omitted or `undefined` field keeps the `Pane` default.\n */\nexport function composedPanelBody({\n toolbar,\n side,\n collapsed,\n attributes,\n pane,\n header,\n headerList,\n headerPlacement = 'fixed',\n footer,\n footerList,\n bottomToolbar,\n footerPlacement = 'fixed',\n content,\n}: {\n toolbar: PanelToolbar;\n side: PanelSide;\n collapsed: boolean;\n attributes: PanelToggleAttributes;\n pane: PaneConfig | undefined;\n header?: KerfUiContent;\n headerList?: ListConfig;\n headerPlacement?: PanelChromePlacement;\n footer?: KerfUiContent;\n footerList?: ListConfig;\n bottomToolbar?: PanelBottomToolbar;\n footerPlacement?: PanelChromePlacement;\n content: KerfUiContent;\n}): SafeHtml {\n const panelHeader = (\n <>\n {composedPanelToolbar(toolbar, side, collapsed, attributes)}\n {header ? panelChromeList(header, headerList) : null}\n </>\n );\n const panelFooter =\n footer || bottomToolbar ? (\n <>\n {footer ? panelChromeList(footer, footerList) : null}\n {bottomToolbar ? (\n <Toolbar\n position=\"footer\"\n label={bottomToolbar.label}\n density={bottomToolbar.density}\n dividerSides={bottomToolbar.dividerSides}\n centerAlign={bottomToolbar.centerAlign}\n responsive={bottomToolbar.responsive}\n responsiveAt={bottomToolbar.responsiveAt}\n safeAreaEdges={bottomToolbar.safeAreaEdges}\n leading={bottomToolbar.leading}\n center={bottomToolbar.center}\n trailing={bottomToolbar.trailing}\n />\n ) : null}\n </>\n ) : undefined;\n const scrollHeader = headerPlacement === 'scroll';\n const scrollFooter = footerPlacement === 'scroll';\n return (\n <Pane\n header={scrollHeader ? undefined : panelHeader}\n footer={scrollFooter ? undefined : panelFooter}\n chromePlacement={\n headerPlacement === 'auto' || footerPlacement === 'auto'\n ? 'auto'\n : 'fixed'\n }\n {...paneConfigProps(pane)}\n >\n {scrollHeader ? panelHeader : null}\n {content}\n {scrollFooter ? panelFooter : null}\n </Pane>\n );\n}\n\n/**\n * The groups a collapsed panel hands to the work area, in zone order, then its\n * toggle. Empty while the panel is open or has no toolbar.\n */\nexport function relocatedPanelGroups(\n toolbar: PanelToolbar | undefined,\n side: PanelSide,\n collapsed: boolean,\n attributes: PanelToggleAttributes,\n size: ToolbarControlGroupSize = 'default',\n): KerfUiContent[] {\n if (!collapsed || !toolbar) return [];\n const groups: KerfUiContent[] = [];\n const collect = (content: KerfUiContent): void => {\n if (Array.isArray(content)) {\n for (const item of content) collect(item);\n } else if (isRelocatableGroup(content)) {\n groups.push(content);\n }\n };\n collect(toolbar.leading);\n collect(toolbar.center);\n collect(toolbar.trailing);\n return [\n ...groups,\n toolbar.toggle\n ? panelToggleGroup(side, toolbar.toggle, true, attributes, size)\n : null,\n ].filter((group) => group !== undefined && group !== null && group !== false);\n}\n"]}
|
|
@@ -23,6 +23,7 @@ function Button({
|
|
|
23
23
|
shape = "rounded",
|
|
24
24
|
fill = false,
|
|
25
25
|
pressed,
|
|
26
|
+
currentStep = false,
|
|
26
27
|
icon,
|
|
27
28
|
loading = false,
|
|
28
29
|
disabled = false,
|
|
@@ -61,6 +62,7 @@ function Button({
|
|
|
61
62
|
"aria-label": ariaLabel && badge !== void 0 && badgeLabel ? `${ariaLabel}, ${badgeLabel}` : ariaLabel,
|
|
62
63
|
title,
|
|
63
64
|
"aria-busy": loading ? "true" : void 0,
|
|
65
|
+
"aria-current": currentStep ? "step" : void 0,
|
|
64
66
|
slot
|
|
65
67
|
};
|
|
66
68
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -119,4 +121,4 @@ function Button({
|
|
|
119
121
|
|
|
120
122
|
export { Button };
|
|
121
123
|
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
124
|
+
//# sourceMappingURL=chunk-PS24PVR6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/actions/button/button.tsx"],"names":[],"mappings":";;;;;AAsBA,IAAM,gBAAA,uBAAuB,GAAA,CAAI;AAAA,EAC/B,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,WAAA;AAAA,EACA,eAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA,gBAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAAC,CAAA;AAiHM,SAAS,MAAA,CAAO;AAAA,EACrB,QAAA;AAAA,EACA,IAAA,GAAO,SAAA;AAAA,EACP,QAAA,GAAW,SAAA;AAAA,EACX,IAAA,GAAO,SAAA;AAAA,E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,kBAAA,GAAA,CAAC,cAAA,EAAA,EAAe,CAAA,EAClB,CAAA,GACE;AAAA,GAAA,EACN,CAAA;AAGF,EAAA,IAAI,SAAS,MAAA,EAAW;AACtB,IAAA,IAAI,OAAA,KAAY,MAAA;AACd,MAAA,MAAM,IAAI,UAAU,6CAA6C,CAAA;AACnE,IAAA,uBACE,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACE,GAAG,MAAA;AAAA,QACJ,IAAA,EAAM,WAAW,MAAA,GAAY,IAAA;AAAA,QAC7B,MAAA,EAAQ,WAAW,MAAA,GAAY,MAAA;AAAA,QAC/B,IAAA,EAAM,WAAW,MAAA,GAAS,MAAA;AAAA,QAC1B,eAAA,EAAe,WAAW,MAAA,GAAS,MAAA;AAAA,QAElC,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACA,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACE,GAAG,MAAA;AAAA,MACJ,IAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,QAAA;AAAA,MACA,cAAA,EAAc,OAAA,KAAY,MAAA,GAAY,MAAA,GAAY,OAAO,OAAO,CAAA;AAAA,MAE/D,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-PS24PVR6.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport { Badge, type BadgeTone } from '../../feedback/badge/badge.js';\nimport { LoadingSpinner } from '../../feedback/loading-spinner/loading-spinner.js';\n\n/** The color family: `neutral` (default), `brand` for the main action, `success` for a positive one, `danger` for a destructive one. */\nexport type ButtonTone = 'neutral' | 'brand' | 'success' | 'danger';\n\n/**\n * How loudly it asks: `primary` (default) fills the button, `secondary`\n * outlines it, and `plain` shows only its text until hovered.\n */\nexport type ButtonEmphasis = 'primary' | 'secondary' | 'plain';\n\n/** `default` is the 44px control height; `compact` is 33px with smaller text. */\nexport type ButtonSize = 'default' | 'compact';\n\n/** Corner shape: the shared `rounded` control radius (default) or a full `pill`. */\nexport type ButtonShape = 'rounded' | 'pill';\n/** What a form button does: `button` (default), `submit`, or `reset`. */\nexport type ButtonType = 'button' | 'submit' | 'reset';\n\nconst BUTTON_PROTECTED = new Set([\n 'data-component',\n 'data-action',\n 'data-tone',\n 'data-emphasis',\n 'data-size',\n 'data-loading',\n 'data-icon-only',\n 'data-shape',\n 'data-fill',\n 'data-focus-ring-inset',\n]);\n\n/** Application `data-*` metadata; the Button's own markers stay protected. */\nexport type ButtonRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined>\n>;\n\n/** A Button's visible label: text or rendered content, never empty. */\nexport type ButtonLabel =\n string | Exclude<KerfUiContent, null | undefined | boolean>;\n\n/**\n * A labeled button (its label names it; `ariaLabel` only when the label is\n * not enough), or an icon-only square named by `ariaLabel`.\n */\nexport type ButtonContent =\n | {\n /** The label. */\n children: ButtonLabel;\n /** A leading icon, such as a `LucideIcon`; it is decorative. */\n icon?: KerfUiContent;\n ariaLabel?: string;\n }\n | {\n children?: undefined;\n /** The icon of an icon-only square button. */\n icon: KerfUiContent;\n /** The accessible name an icon-only button needs. */\n ariaLabel: string;\n };\n\nexport type ButtonProps = ButtonContent & ButtonOptions;\n\nexport interface ButtonOptions {\n tone?: ButtonTone;\n emphasis?: ButtonEmphasis;\n size?: ButtonSize;\n /** Corner shape (default `rounded`). */\n shape?: ButtonShape;\n /**\n * Span the full width of the parent instead of sizing to the label, as on\n * `SplitButton`. The label stays centered and ellipsizes when it no longer\n * fits.\n */\n fill?: boolean;\n /**\n * Make it a toggle: `aria-pressed` reports the state, and a pressed look is\n * drawn on top of the tone and emphasis. The application owns the state and\n * flips it in its `action` handler. A link (`href`) cannot be a toggle.\n */\n pressed?: boolean;\n /** Mark the current step in a sequence with `aria-current=\"step\"`. */\n currentStep?: boolean;\n /**\n * Busy: a spinner replaces the label (which still names it) and the button\n * reports `aria-busy`. Presses still reach it; the application decides\n * what a press does while it is busy.\n */\n loading?: boolean;\n disabled?: boolean;\n /** A form button's behavior (default `button`, which never submits). */\n type?: ButtonType;\n name?: string;\n value?: string;\n /** The id of the form it belongs to, when it sits outside that form. */\n form?: string;\n /** Render a link with button styling instead of a `<button>`. */\n href?: string;\n /** Where a link opens. */\n target?: '_self' | '_blank' | '_parent' | '_top';\n /** Delegated `data-action` the application handles. */\n action?: string;\n /**\n * Keep the button's focus ring inside its box when an ancestor clips\n * overflow. The inset ring is two-tone, a surface-colored line inside the\n * ring color, so it stays visible on a loud fill of the ring's own hue.\n */\n focusRingInset?: boolean;\n /**\n * A count, short text, or `true` for a text-free dot over the button's\n * top-trailing corner, such as how many items a filter hides. It stays out\n * of the accessible name unless `badgeLabel` names it.\n */\n badge?: number | string | true;\n /** Words for the badge (\"3 hidden\"), added to the button's name. */\n badgeLabel?: string;\n /** The badge's tone (default `danger`). */\n badgeTone?: BadgeTone;\n /**\n * Native hover text that says more than the name, such as \"More Actions\n * for report.pdf\". An icon-only Button already gets a help tag with its\n * `ariaLabel` (with `@kerfjs/ui/help-tags-register`); a `title` replaces\n * that tag.\n */\n title?: string;\n id?: string;\n className?: string;\n /** Safe `data-*` metadata (a `data-key`, `data-dialog-close`). */\n rootAttributes?: ButtonRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A standalone action button: a native `<button>` (or a link with `href`)\n * in one of four tones and three emphases, at the 44px control height or\n * compact, with a label or as an icon-only square, rounded or pill-shaped,\n * sized to its label or filling its parent's width, and optionally a\n * `pressed` toggle or `currentStep` marker. Inside a\n * `ToolbarControlGroup`, use a plain `<button>`, which the group styles; use\n * Button for a dialog footer, a form, or a standalone action beside other\n * content.\n */\nexport function Button({\n children,\n tone = 'neutral',\n emphasis = 'primary',\n size = 'default',\n shape = 'rounded',\n fill = false,\n pressed,\n currentStep = false,\n icon,\n loading = false,\n disabled = false,\n type = 'button',\n name,\n value,\n form,\n href,\n target,\n action,\n focusRingInset = false,\n badge,\n badgeLabel,\n badgeTone = 'danger',\n ariaLabel,\n title,\n id,\n className = '',\n rootAttributes = {},\n slot,\n}: ButtonProps) {\n const shared = {\n ...filterDataAttributes(rootAttributes, BUTTON_PROTECTED),\n id,\n class: `kui-button ${className}`.trim(),\n 'data-component': 'button',\n 'data-tone': tone,\n 'data-emphasis': emphasis,\n 'data-size': size,\n 'data-loading': loading ? '' : undefined,\n 'data-icon-only': children === undefined ? '' : undefined,\n 'data-shape': shape === 'pill' ? 'pill' : undefined,\n 'data-fill': fill ? 'true' : undefined,\n 'data-focus-ring-inset': focusRingInset ? 'true' : undefined,\n 'data-action': action,\n 'aria-label':\n ariaLabel && badge !== undefined && badgeLabel\n ? `${ariaLabel}, ${badgeLabel}`\n : ariaLabel,\n title,\n 'aria-busy': loading ? 'true' : undefined,\n 'aria-current': currentStep ? 'step' : undefined,\n slot,\n };\n const content = (\n <>\n {icon === undefined ? null : (\n <span class=\"kui-button__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {children === undefined ? null : (\n <span class=\"kui-button__label\">{children}</span>\n )}\n {badge === undefined || badge === '' ? null : badge === true ? (\n <Badge\n tone={badgeTone}\n size=\"dot\"\n placement=\"corner\"\n {...(ariaLabel || !badgeLabel\n ? { ariaHidden: true as const }\n : { label: badgeLabel })}\n />\n ) : (\n <Badge\n tone={badgeTone}\n appearance=\"solid\"\n size=\"compact\"\n placement=\"corner\"\n {...(ariaLabel || !badgeLabel\n ? { ariaHidden: true as const }\n : { label: badgeLabel })}\n >\n {String(badge)}\n </Badge>\n )}\n {loading ? (\n <span class=\"kui-button__spinner\" aria-hidden=\"true\">\n <LoadingSpinner />\n </span>\n ) : null}\n </>\n );\n // A disabled link has no destination and is announced as disabled.\n if (href !== undefined) {\n if (pressed !== undefined)\n throw new TypeError('A link Button cannot be a toggle (pressed).');\n return (\n <a\n {...shared}\n href={disabled ? undefined : href}\n target={disabled ? undefined : target}\n role={disabled ? 'link' : undefined}\n aria-disabled={disabled ? 'true' : undefined}\n >\n {content}\n </a>\n );\n }\n return (\n <button\n {...shared}\n type={type}\n name={name}\n value={value}\n form={form}\n disabled={disabled}\n aria-pressed={pressed === undefined ? undefined : String(pressed)}\n >\n {content}\n </button>\n );\n}\n"]}
|
|
@@ -20,7 +20,11 @@ var DIALOG_SURFACE_PROTECTED = /* @__PURE__ */ new Set([
|
|
|
20
20
|
"data-resizable",
|
|
21
21
|
"data-enter-motion",
|
|
22
22
|
"data-exit-motion",
|
|
23
|
-
"data-light-dismiss"
|
|
23
|
+
"data-light-dismiss",
|
|
24
|
+
"data-stack-open",
|
|
25
|
+
"data-stack-active",
|
|
26
|
+
"data-stack-position",
|
|
27
|
+
"data-stack-count"
|
|
24
28
|
]);
|
|
25
29
|
function DialogSurface({
|
|
26
30
|
id,
|
|
@@ -34,7 +38,9 @@ function DialogSurface({
|
|
|
34
38
|
withoutHeader = false,
|
|
35
39
|
lightDismiss = false,
|
|
36
40
|
closeLabel = "Close",
|
|
41
|
+
closeEmphasis = "normal",
|
|
37
42
|
children,
|
|
43
|
+
stack,
|
|
38
44
|
size = "medium",
|
|
39
45
|
presentation = "modal",
|
|
40
46
|
preferredWidth,
|
|
@@ -55,13 +61,18 @@ function DialogSurface({
|
|
|
55
61
|
className = "",
|
|
56
62
|
slot
|
|
57
63
|
}) {
|
|
64
|
+
if (stack && (!Number.isInteger(stack.position) || !Number.isInteger(stack.count) || stack.count < 1 || stack.position < 1 || stack.position > stack.count || stack.active && !stack.open))
|
|
65
|
+
throw new RangeError(
|
|
66
|
+
"DialogSurface stack needs a valid frontmost active layer"
|
|
67
|
+
);
|
|
58
68
|
const style = [
|
|
59
69
|
preferredWidth === void 0 ? "" : `--_kui-dialog-surface-preferred-width:${preferredWidth}`,
|
|
60
70
|
viewportGutter === void 0 ? "" : `--_kui-dialog-surface-gutter:${viewportGutter}`,
|
|
61
71
|
maxHeight === void 0 || maxHeight === "viewport" ? "" : `--_kui-dialog-surface-max-height:${maxHeight}`,
|
|
62
72
|
height === void 0 || height === "viewport" ? "" : `--_kui-dialog-surface-height:${height}`,
|
|
63
73
|
footerOffset === void 0 ? "" : `--_kui-dialog-surface-footer-offset:${footerOffset}`,
|
|
64
|
-
minHeight === void 0 ? "" : `--_kui-dialog-surface-min-height:${minHeight}
|
|
74
|
+
minHeight === void 0 ? "" : `--_kui-dialog-surface-min-height:${minHeight}`,
|
|
75
|
+
stack?.offset === void 0 ? "" : `--_kui-dialog-surface-stack-offset:${stack.offset}`
|
|
65
76
|
].filter(Boolean).join(";");
|
|
66
77
|
return /* @__PURE__ */ jsxs(
|
|
67
78
|
"dialog",
|
|
@@ -73,15 +84,22 @@ function DialogSurface({
|
|
|
73
84
|
"aria-label": label,
|
|
74
85
|
"aria-labelledby": labelledBy,
|
|
75
86
|
"aria-describedby": describedBy,
|
|
87
|
+
"aria-modal": stack ? stack.open && stack.active ? "true" : "false" : void 0,
|
|
88
|
+
"aria-hidden": stack ? stack.open && stack.active ? "false" : "true" : void 0,
|
|
89
|
+
inert: stack && (!stack.open || !stack.active) ? true : void 0,
|
|
76
90
|
tabindex: -1,
|
|
77
91
|
"data-light-dismiss": lightDismiss ? "" : void 0,
|
|
78
92
|
"data-component": "dialog-surface",
|
|
93
|
+
"data-stack-open": stack ? String(stack.open) : void 0,
|
|
94
|
+
"data-stack-active": stack ? String(stack.active) : void 0,
|
|
95
|
+
"data-stack-position": stack?.position,
|
|
96
|
+
"data-stack-count": stack?.count,
|
|
79
97
|
"data-size": size,
|
|
80
98
|
"data-presentation": presentation,
|
|
81
99
|
"data-preferred-width": preferredWidth === void 0 ? void 0 : "",
|
|
82
100
|
"data-body-inset": bodyInset,
|
|
83
101
|
"data-footer-inset": footerInset,
|
|
84
|
-
"data-viewport-gutter": viewportGutter === void 0 ? void 0 : "",
|
|
102
|
+
"data-viewport-gutter": viewportGutter === void 0 && !stack ? void 0 : "",
|
|
85
103
|
"data-max-height": maxHeight === void 0 ? void 0 : "",
|
|
86
104
|
"data-height": height === void 0 ? void 0 : "",
|
|
87
105
|
"data-body-layout": bodyLayout === "flow" ? void 0 : bodyLayout,
|
|
@@ -104,8 +122,16 @@ function DialogSurface({
|
|
|
104
122
|
type: "button",
|
|
105
123
|
class: "kui-dialog-surface__close",
|
|
106
124
|
"aria-label": closeLabel,
|
|
125
|
+
"data-emphasis": closeEmphasis === "quiet" ? "quiet" : void 0,
|
|
107
126
|
"data-dialog-close": "",
|
|
108
|
-
children: /* @__PURE__ */ jsx(
|
|
127
|
+
children: /* @__PURE__ */ jsx(
|
|
128
|
+
LucideIcon,
|
|
129
|
+
{
|
|
130
|
+
icon: X,
|
|
131
|
+
name: "x",
|
|
132
|
+
size: closeEmphasis === "quiet" ? "m" : "l"
|
|
133
|
+
}
|
|
134
|
+
)
|
|
109
135
|
}
|
|
110
136
|
)
|
|
111
137
|
] })
|
|
@@ -201,4 +227,4 @@ function PopupSurface({
|
|
|
201
227
|
|
|
202
228
|
export { DialogSurface, PopoverDialogSurface, PopupSurface };
|
|
203
229
|
|
|
204
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-S3DCRI2M.js.map
|