@kerfjs/ui 5.0.0-beta.110 → 5.0.0-beta.111
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 +1 -0
- package/ai/component-catalog.json +9 -2
- package/ai/component-composition.json +8 -1
- package/ai/components/button.md +5 -2
- package/ai/components/surface-scaffold.md +3 -0
- package/ai/public-api-signatures-v1.md +86 -39
- package/ai/skill.md +4 -0
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/backdrop-image.d.ts +8 -0
- package/dist/backdrop-image.js +1 -1
- package/dist/browser/content-item.js +1 -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 +2 -1
- package/dist/catalog.js.map +1 -1
- 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-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-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-SCDWURBO.js → chunk-SOBRGH7T.js} +18 -3
- package/dist/chunk-SOBRGH7T.js.map +1 -0
- package/dist/{chunk-6CDILXF4.js → chunk-VGECEXM6.js} +11 -2
- package/dist/chunk-VGECEXM6.js.map +1 -0
- package/dist/chunk-WD6KABEU.js +200 -0
- package/dist/chunk-WD6KABEU.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 +44 -2
- package/dist/content-item.js +4 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -5
- package/dist/list-detail-dialog.d.ts +2 -1
- package/dist/list-detail-dialog.js +4 -3
- package/dist/list-detail-dialog.js.map +1 -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 +18 -1
- package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +18 -1
- package/dist/styles/components/surfaces/content-item/content-item.css +52 -0
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +9 -1
- package/dist/styles/content-item.css +3 -168
- package/dist/styles/foundation.css +4 -4
- package/dist/styles/surface-scaffold.css +9 -1
- package/dist/styles/webawesome.css +2 -2
- package/dist/surface-scaffold.d.ts +6 -2
- package/dist/surface-scaffold.js +1 -1
- 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/wire-catalog.d.ts +2 -1
- package/dist/wire-content-items.js +62 -0
- package/dist/wire-content-items.js.map +1 -1
- package/dist/workbench-dialog.d.ts +2 -1
- package/dist/workbench-dialog.js +3 -2
- 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 +7 -0
- package/docs/component-selection.md +1 -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/layout.md +25 -0
- package/docs/manual-test-plan.md +27 -1
- package/docs/recipes.md +9 -0
- package/docs/surface-scaffold.md +4 -1
- package/llms.txt +3 -0
- package/package.json +1 -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-HQZG3OFL.js.map +0 -1
- package/dist/chunk-KPINJHIC.js.map +0 -1
- package/dist/chun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W,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,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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,EACP,KAAA,GAAQ,SAAA;AAAA,EACR,IAAA,GAAO,KAAA;AAAA,EACP,OAAA;AAAA,EACA,WAAA,GAAc,KAAA;AAAA,EACd,IAAA;AAAA,EACA,OAAA,GAAU,KAAA;AAAA,EACV,QAAA,GAAW,KAAA;AAAA,EACX,IAAA,GAAO,QAAA;AAAA,EACP,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA,GAAiB,KAAA;AAAA,EACjB,KAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA,GAAY,QAAA;AAAA,EACZ,SAAA;AAAA,EACA,KAAA;AAAA,EACA,EAAA;AAAA,EACA,SAAA,GAAY,EAAA;AA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,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"]}
|
|
@@ -9,7 +9,9 @@ var backdropImageProtected = /* @__PURE__ */ new Set([
|
|
|
9
9
|
"data-scrim",
|
|
10
10
|
"data-fade",
|
|
11
11
|
"data-repeat",
|
|
12
|
-
"data-under-chrome"
|
|
12
|
+
"data-under-chrome",
|
|
13
|
+
"data-aspect-ratio",
|
|
14
|
+
"data-inline-bleed"
|
|
13
15
|
]);
|
|
14
16
|
var SUBTLE_PARALLAX = 0.35;
|
|
15
17
|
function parallaxFactor(parallax) {
|
|
@@ -47,6 +49,9 @@ function BackdropImage(props) {
|
|
|
47
49
|
alt,
|
|
48
50
|
position = "center",
|
|
49
51
|
height,
|
|
52
|
+
aspectRatio,
|
|
53
|
+
loading,
|
|
54
|
+
bleedInline = true,
|
|
50
55
|
parallax = "none",
|
|
51
56
|
blur,
|
|
52
57
|
fadeTo,
|
|
@@ -60,10 +65,17 @@ function BackdropImage(props) {
|
|
|
60
65
|
slot
|
|
61
66
|
} = props;
|
|
62
67
|
const factor = parallaxFactor(parallax);
|
|
68
|
+
if (aspectRatio !== void 0 && (!Number.isFinite(aspectRatio) || aspectRatio <= 0))
|
|
69
|
+
throw new RangeError("BackdropImage aspectRatio must be positive.");
|
|
70
|
+
if (aspectRatio !== void 0 && height !== void 0)
|
|
71
|
+
throw new TypeError(
|
|
72
|
+
"BackdropImage height and aspectRatio cannot be combined."
|
|
73
|
+
);
|
|
63
74
|
const dim = blurDim(blur?.dim);
|
|
64
75
|
const blurRadius = blur === void 0 ? void 0 : blur.radius ?? (blur.blurredSrc === void 0 ? remify(24) : void 0);
|
|
65
76
|
const style = [
|
|
66
77
|
height === void 0 ? "" : `--_kui-backdrop-image-height:${styleValue(height, "height")}`,
|
|
78
|
+
aspectRatio === void 0 ? "" : `--_kui-backdrop-image-ratio:${String(aspectRatio)}`,
|
|
67
79
|
fadeTo === void 0 ? "" : `--_kui-backdrop-image-fade-to:${styleValue(fadeTo, "fadeTo")}`,
|
|
68
80
|
factor === 0 ? "" : `--_kui-backdrop-image-parallax:${String(factor)}`,
|
|
69
81
|
position === "center" ? "" : `--_kui-backdrop-image-position:${position}`,
|
|
@@ -80,7 +92,8 @@ function BackdropImage(props) {
|
|
|
80
92
|
sizes: source === src ? props.sizes : void 0,
|
|
81
93
|
alt: copy ? "" : alt,
|
|
82
94
|
"aria-hidden": copy ? "true" : void 0,
|
|
83
|
-
decoding: "async"
|
|
95
|
+
decoding: "async",
|
|
96
|
+
loading
|
|
84
97
|
}
|
|
85
98
|
) : /* @__PURE__ */ jsx(
|
|
86
99
|
"div",
|
|
@@ -107,6 +120,8 @@ function BackdropImage(props) {
|
|
|
107
120
|
"data-scrim": scrim === "none" ? void 0 : scrim,
|
|
108
121
|
"data-repeat": props.repeat,
|
|
109
122
|
"data-under-chrome": underChrome ? "true" : void 0,
|
|
123
|
+
"data-aspect-ratio": aspectRatio === void 0 ? void 0 : "true",
|
|
124
|
+
"data-inline-bleed": bleedInline ? void 0 : "false",
|
|
110
125
|
style: style || void 0,
|
|
111
126
|
slot,
|
|
112
127
|
children: [
|
|
@@ -133,4 +148,4 @@ function BackdropImage(props) {
|
|
|
133
148
|
|
|
134
149
|
export { BackdropImage };
|
|
135
150
|
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-SOBRGH7T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/surfaces/backdrop-image/backdrop-image.tsx"],"names":["className"],"mappings":";;;;AAiEA,IAAM,sBAAA,uBAA6B,GAAA,CAAI;AAAA,EACrC,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,mBAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAAC,CAAA;AA4FD,IAAM,eAAA,GAAkB,IAAA;AAExB,SAAS,eAAe,QAAA,EAAyC;AAC/D,EAAA,IAAI,QAAA,KAAa,QAAQ,OAAO,CAAA;AAChC,EAAA,IAAI,QAAA,KAAa,UAAU,OAAO,eAAA;AAClC,EAAA,IAAI,CAAC,MAAA,CAAO,QAAA,CAAS,QAAQ,CAAA,IAAK,QAAA,GAAW,KAAK,QAAA,GAAW,CAAA;AAC3D,IAAA,MAAM,IAAI,UAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,OAAO,QAAA;AACT;AAEA,SAAS,QAAQ,GAAA,EAAiC;AAChD,EAAA,IAAI,GAA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AA,gBACE,6BAAA;AAAA,gBACA,KAAK,UAAA,IAAc,GAAA;AAAA,gBACnB;AAAA;AACF,aAAA,EACN,CAAA;AAAA,YACC,QAAQ,CAAA,GAAI,IAAA,mBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,OAAM,yBAAA,EAA0B,CAAA;AAAA,YACxD,UAAU,MAAA,GAAS,IAAA,mBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,OAAM,2BAAA,EAA4B;AAAA,WAAA,EACpE,CAAA;AAAA,UACC,6BACC,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,6BAAA,EAA+B,mBAAQ,CAAA,GAChD;AAAA,SAAA,EACN,CAAA;AAAA,QACC,8BACC,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,6BAAA,EAA+B,UAAS,CAAA,GACjD;AAAA;AAAA;AAAA,GACN;AAEJ","file":"chunk-SOBRGH7T.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n filterRootAttributes,\n type StructuralRootAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport {\n type CssColor,\n type CssLength,\n remify,\n} from '../../../shared/styles/css-values.js';\n\n/** How a single image fills the backdrop (`object-fit`). */\nexport type BackdropImageFit = 'cover' | 'contain' | 'fill';\n\n/** Which part of the image stays in view when it is cropped. */\nexport type BackdropImagePosition =\n | 'center'\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top left'\n | 'top right'\n | 'bottom left'\n | 'bottom right';\n\n/** Tile the image as a background instead of fitting one copy. */\nexport type BackdropImageRepeat = 'repeat' | 'repeat-x' | 'repeat-y';\n\n/**\n * How far the image lags the scroll: `none` scrolls with the content,\n * `subtle` lags by 35%, and a number from 0 to 1 is the lag factor (0.5\n * moves the image at half the scroll speed).\n */\nexport type BackdropImageParallax = 'none' | 'subtle' | number;\n\n/**\n * A dimming layer under `overlay` content: `bottom` darkens toward the\n * block end where a title sits, `full` dims the whole image evenly.\n */\nexport type BackdropImageScrim = 'none' | 'bottom' | 'full';\n\n/**\n * A scroll-linked progressive blur: a statically blurred copy of the image\n * fades in as the image block scrolls away. Only the copy's opacity (and the\n * optional dim layer's) animates; the blur itself is set once.\n */\nexport interface BackdropImageBlur {\n /**\n * CSS blur radius applied once to the copy. Default 24px; with\n * `blurredSrc` the default is no filter, since that asset is already soft.\n */\n radius?: CssLength;\n /**\n * An app-supplied pre-blurred or low-resolution copy of the image, used\n * instead of filtering `src`.\n */\n blurredSrc?: string;\n /**\n * Peak opacity, from 0 to 1, of a black dim layer that ramps in with the\n * blur. Default 0 (no dim layer).\n */\n dim?: number;\n}\n\nconst backdropImageProtected = new Set([\n 'data-component',\n 'data-blur',\n 'data-parallax',\n 'data-scrim',\n 'data-fade',\n 'data-repeat',\n 'data-under-chrome',\n 'data-aspect-ratio',\n 'data-inline-bleed',\n]);\n\ntype BackdropImageRootAttributes = StructuralRootAttributes &\n Readonly<{\n 'data-component'?: never;\n 'data-blur'?: never;\n 'data-parallax'?: never;\n 'data-scrim'?: never;\n 'data-fade'?: never;\n 'data-repeat'?: never;\n 'data-under-chrome'?: never;\n 'data-aspect-ratio'?: never;\n 'data-inline-bleed'?: never;\n }>;\n\ninterface BackdropImageCommonProps {\n /** Image URL. */\n src: string;\n /**\n * Accessible description of the image. Pass `''` for a decorative image\n * that only sets a mood; assistive technology then skips it.\n */\n alt: string;\n /** Which part of a cropped image stays in view. Default `center`. */\n position?: BackdropImagePosition;\n /** Height of the image block. Default 320px (`remify(320)`). */\n height?: CssLength;\n /** Reserve image height from its width, useful for an inline card. Cannot be combined with `height`. */\n aspectRatio?: number;\n /** Native image loading behavior. Omit for the browser default. */\n loading?: 'eager' | 'lazy';\n /** Bleed to a Pane's inline content edges. Set false when embedded in a card. Defaults to true. */\n bleedInline?: boolean;\n /** How far the image lags the scroll. Default `none`. */\n parallax?: BackdropImageParallax;\n /**\n * The color the image fades into at its block end. It also paints the\n * whole surface, so `children` below the image sit on the same color and\n * the page reads as one surface. Omit for a hard edge with no surface.\n */\n fadeTo?: CssColor;\n /**\n * Blur the image progressively as it scrolls away, by cross-fading a\n * statically blurred copy. Static (unblurred) wherever parallax is.\n */\n blur?: BackdropImageBlur;\n /**\n * Run the image up beneath the scroller's block-start inset: an overlay or\n * clear Pane header, NavStack chrome handed to a view's Pane, and the top\n * safe area, the way a media page's artwork fills the screen behind\n * transparent chrome. The visible image keeps `height` below that inset,\n * and `overlay` content stays clear of the chrome. Place the image first in\n * the Pane's content; it reads the Pane's\n * `--kui-pane-content-inset-block-start`. Default `false`.\n */\n underChrome?: boolean;\n /** Dim the image under `overlay` content. Default `none`. */\n scrim?: BackdropImageScrim;\n /** Content laid over the image's block end, such as a title and actions. */\n overlay?: KerfUiContent;\n /** Content that continues below the image on the `fadeTo` surface. */\n children?: KerfUiContent;\n id?: string;\n className?: string;\n /** Safe `data-*`, `aria-*`, and structural `role` metadata on the root. */\n rootAttributes?: BackdropImageRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** One fitted image, with optional responsive candidates. */\nexport interface BackdropImageSingleProps extends BackdropImageCommonProps {\n repeat?: undefined;\n /** Responsive image candidates (`srcset`). */\n srcset?: string;\n /** Rendered-size hints for `srcset` (`sizes`). */\n sizes?: string;\n /** How the image fills the block. Default `cover`. */\n fit?: BackdropImageFit;\n}\n\n/** A tiled background image at its natural size. */\nexport interface BackdropImageTiledProps extends BackdropImageCommonProps {\n repeat: BackdropImageRepeat;\n srcset?: never;\n sizes?: never;\n fit?: never;\n}\n\nexport type BackdropImageProps =\n BackdropImageSingleProps | BackdropImageTiledProps;\n\nconst SUBTLE_PARALLAX = 0.35;\n\nfunction parallaxFactor(parallax: BackdropImageParallax): number {\n if (parallax === 'none') return 0;\n if (parallax === 'subtle') return SUBTLE_PARALLAX;\n if (!Number.isFinite(parallax) || parallax < 0 || parallax > 1)\n throw new RangeError(\n 'BackdropImage parallax must be none, subtle, or a number from 0 to 1.',\n );\n return parallax;\n}\n\nfunction blurDim(dim: number | undefined): number {\n if (dim === undefined) return 0;\n if (!Number.isFinite(dim) || dim < 0 || dim > 1)\n throw new RangeError('BackdropImage blur.dim must be from 0 to 1.');\n return dim;\n}\n\nconst unsafeStyleValue = /[;{}<>\"'\\\\]|\\p{Cc}/u;\n\nfunction styleValue(value: string, prop: string): string {\n const trimmed = value.trim();\n if (!trimmed || unsafeStyleValue.test(trimmed))\n throw new TypeError(`BackdropImage ${prop} requires one CSS value.`);\n return trimmed;\n}\n\n/** A CSS `url(\"…\")` for the tiled form; quotes and backslashes are escaped. */\nfunction cssUrl(src: string): string {\n if (/\\p{Cc}/u.test(src))\n throw new TypeError(\n 'BackdropImage src must not contain control characters.',\n );\n return `url(\"${src.replace(/[\"\\\\]/g, (char) => `\\\\${char}`)}\")`;\n}\n\n/**\n * An image backdrop at the top of a scrolling Pane or NavStack view: the\n * image can lag the scroll (parallax on a scroll-driven, compositor-only\n * transform), fade through a mask into `fadeTo`, and that color keeps\n * painting under `children` so the page reads as one surface. Kerf owns the\n * static fallbacks: no parallax without scroll-driven animation support,\n * under reduced motion, under `data-kui-effects=\"static\"`, or on a\n * slow-update display, and a hard edge onto solid `fadeTo` under reduced\n * transparency.\n */\nexport function BackdropImage(props: BackdropImageProps) {\n const {\n src,\n alt,\n position = 'center',\n height,\n aspectRatio,\n loading,\n bleedInline = true,\n parallax = 'none',\n blur,\n fadeTo,\n scrim = 'none',\n underChrome = false,\n overlay,\n children,\n id,\n className = '',\n rootAttributes = {},\n slot,\n } = props;\n const factor = parallaxFactor(parallax);\n if (\n aspectRatio !== undefined &&\n (!Number.isFinite(aspectRatio) || aspectRatio <= 0)\n )\n throw new RangeError('BackdropImage aspectRatio must be positive.');\n if (aspectRatio !== undefined && height !== undefined)\n throw new TypeError(\n 'BackdropImage height and aspectRatio cannot be combined.',\n );\n const dim = blurDim(blur?.dim);\n const blurRadius =\n blur === undefined\n ? undefined\n : (blur.radius ??\n (blur.blurredSrc === undefined ? remify(24) : undefined));\n const style = [\n height === undefined\n ? ''\n : `--_kui-backdrop-image-height:${styleValue(height, 'height')}`,\n aspectRatio === undefined\n ? ''\n : `--_kui-backdrop-image-ratio:${String(aspectRatio)}`,\n fadeTo === undefined\n ? ''\n : `--_kui-backdrop-image-fade-to:${styleValue(fadeTo, 'fadeTo')}`,\n factor === 0 ? '' : `--_kui-backdrop-image-parallax:${String(factor)}`,\n position === 'center' ? '' : `--_kui-backdrop-image-position:${position}`,\n props.fit === undefined || props.fit === 'cover'\n ? ''\n : `--_kui-backdrop-image-fit:${props.fit}`,\n blurRadius === undefined\n ? ''\n : `--_kui-backdrop-image-blur:${styleValue(blurRadius, 'blur.radius')}`,\n dim === 0 ? '' : `--_kui-backdrop-image-dim:${String(dim)}`,\n ]\n .filter(Boolean)\n .join(';');\n const image = (className: string, source: string, copy: boolean) =>\n props.repeat === undefined ? (\n <img\n class={className}\n src={source}\n srcSet={source === src ? props.srcset : undefined}\n sizes={source === src ? props.sizes : undefined}\n alt={copy ? '' : alt}\n aria-hidden={copy ? 'true' : undefined}\n decoding=\"async\"\n loading={loading}\n />\n ) : (\n <div\n class={className}\n role={!copy && alt ? 'img' : undefined}\n aria-label={!copy && alt ? alt : undefined}\n aria-hidden={copy ? 'true' : undefined}\n style={`background-image:${cssUrl(source)};background-repeat:${props.repeat}`}\n />\n );\n const hasOverlay =\n overlay !== undefined && overlay !== null && overlay !== false;\n const hasChildren =\n children !== undefined && children !== null && children !== false;\n return (\n <div\n {...filterRootAttributes(rootAttributes, backdropImageProtected)}\n id={id}\n class={`kui-backdrop-image ${className}`.trim()}\n data-component=\"backdrop-image\"\n data-parallax={factor === 0 ? 'none' : 'scroll'}\n data-blur={\n blur === undefined\n ? undefined\n : blurRadius === undefined\n ? 'asset'\n : 'filter'\n }\n data-fade={fadeTo === undefined ? undefined : 'true'}\n data-scrim={scrim === 'none' ? undefined : scrim}\n data-repeat={props.repeat}\n data-under-chrome={underChrome ? 'true' : undefined}\n data-aspect-ratio={aspectRatio === undefined ? undefined : 'true'}\n data-inline-bleed={bleedInline ? undefined : 'false'}\n style={style || undefined}\n slot={slot}\n >\n <div class=\"kui-backdrop-image__hero\">\n <div class=\"kui-backdrop-image__backdrop\">\n <div class=\"kui-backdrop-image__layers\">\n {image('kui-backdrop-image__media', src, false)}\n {blur === undefined\n ? null\n : image(\n 'kui-backdrop-image__blurred',\n blur.blurredSrc ?? src,\n true,\n )}\n </div>\n {dim === 0 ? null : <div class=\"kui-backdrop-image__dim\" />}\n {scrim === 'none' ? null : <div class=\"kui-backdrop-image__scrim\" />}\n </div>\n {hasOverlay ? (\n <div class=\"kui-backdrop-image__overlay\">{overlay}</div>\n ) : null}\n </div>\n {hasChildren ? (\n <div class=\"kui-backdrop-image__content\">{children}</div>\n ) : null}\n </div>\n );\n}\n"]}
|
|
@@ -34,6 +34,7 @@ function DialogSurface({
|
|
|
34
34
|
withoutHeader = false,
|
|
35
35
|
lightDismiss = false,
|
|
36
36
|
closeLabel = "Close",
|
|
37
|
+
closeEmphasis = "normal",
|
|
37
38
|
children,
|
|
38
39
|
size = "medium",
|
|
39
40
|
presentation = "modal",
|
|
@@ -104,8 +105,16 @@ function DialogSurface({
|
|
|
104
105
|
type: "button",
|
|
105
106
|
class: "kui-dialog-surface__close",
|
|
106
107
|
"aria-label": closeLabel,
|
|
108
|
+
"data-emphasis": closeEmphasis === "quiet" ? "quiet" : void 0,
|
|
107
109
|
"data-dialog-close": "",
|
|
108
|
-
children: /* @__PURE__ */ jsx(
|
|
110
|
+
children: /* @__PURE__ */ jsx(
|
|
111
|
+
LucideIcon,
|
|
112
|
+
{
|
|
113
|
+
icon: X,
|
|
114
|
+
name: "x",
|
|
115
|
+
size: closeEmphasis === "quiet" ? "m" : "l"
|
|
116
|
+
}
|
|
117
|
+
)
|
|
109
118
|
}
|
|
110
119
|
)
|
|
111
120
|
] })
|
|
@@ -201,4 +210,4 @@ function PopupSurface({
|
|
|
201
210
|
|
|
202
211
|
export { DialogSurface, PopoverDialogSurface, PopupSurface };
|
|
203
212
|
|
|
204
|
-
//# sourceMappingURL=chunk-
|
|
213
|
+
//# sourceMappingURL=chunk-VGECEXM6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/surfaces/surface-scaffold/surface-scaffold.tsx"],"names":[],"mappings":";;;;;AAkEA,IAAM,wBAAA,uBAA+B,GAAA,CAAI;AAAA,EACvC,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,mBAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0BAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,mBAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF,CAAC,CAAA;AAiJM,SAAS,aAAA,CAAc;AAAA,EAC5B,EAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA,GAAQ,KAAA;AAAA,EACR,OAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAA,GAAgB,KAAA;AAAA,EAChB,YAAA,GAAe,KAAA;AAAA,EACf,UAAA,GAAa,OAAA;AAAA,EACb,aAAA,GAAgB,QAAA;AAAA,EAChB,QAAA;AAAA,EACA,IAAA,GAAO,QAAA;AAAA,EACP,YAAA,GAAe,OAAA;AAAA,EACf,cAAA;AAAA,EACA,SAAA,GAAY,SAAA;AAAA,EACZ,WAAA,GAAc,aAAA;AAAA,EACd,cAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA,GAAY,KAAA;AAAA,EACZ,WAAA,GAAc,OAAA;AAAA,EACd,UAAA,GAAa,OAAA;AAAA,EACb,UAAA,GAAa,MAAA;AAAA,EACb,kBAAA,GAAqB,QAAA;AAAA,E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,EAAa,MAAA,KAAW,MAAA,GAAY,MAAA,GAAY,EAAA;AAAA,MAChD,iBAAA,EAAiB,SAAA,KAAc,MAAA,GAAY,MAAA,GAAY,EAAA;AAAA,MACvD,kBAAA,EAAkB,UAAA,KAAe,MAAA,GAAS,MAAA,GAAY,UAAA;AAAA,MACtD,OAAA,EAAS,YAAA,KAAiB,SAAA,GAAY,MAAA,GAAS,MAAA;AAAA,MAC/C,IAAA,EAAK,QAAA;AAAA,MACL,YAAA,EAAY,KAAA;AAAA,MACZ,iBAAA,EAAiB,UAAA;AAAA,MACjB,kBAAA,EAAkB,WAAA;AAAA,MAClB,OAAO,KAAA,IAAS,MAAA;AAAA,MAChB,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;AAaO,SAAS,YAAA,CAAa;AAAA,EAC3B,QAAA;AAAA,EACA,KAAA,GAAQ,UAAA;AAAA,EACR,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAAsB;AACpB,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;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,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"chunk-VGECEXM6.js","sourcesContent":["import { X } from 'lucide';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { CssLength } from '../../../shared/styles/css-values.js';\nimport { LucideIcon } from '../../media/lucide-icon/lucide-icon.js';\n\nexport {\n closeDialog,\n type DialogCloseSource,\n type DialogRequestCloseDetail,\n openDialog,\n} from './internal/dialog-surface-controller.js';\n\nexport type DialogSurfaceSize = 'small' | 'medium' | 'large';\n/**\n * How the dialog is presented: `modal` (default) centered on the screen,\n * `side-sheet` against the inline end, `fullscreen`, or `bottom-sheet`\n * attached to the bottom edge (square bottom corners, safe-area and\n * virtual-keyboard clearance, optionally user-resizable).\n */\nexport type DialogSurfacePresentation =\n 'modal' | 'side-sheet' | 'fullscreen' | 'bottom-sheet';\n/**\n * How a bottom sheet appears or leaves: `slide` (default) moves the panel in\n * from, or out to, the bottom edge; `standard` keeps the dialog's\n * scale-and-fade. Both honor `prefers-reduced-motion`.\n */\nexport type DialogSurfaceSheetMotion = 'slide' | 'standard';\nexport type SurfaceInset = 'none' | 'compact' | 'comfortable';\nexport type DialogSurfaceMaxHeight = CssLength | 'viewport';\n/** A definite modal height: a length or the full viewport, minus both gutters. */\nexport type DialogSurfaceHeight = CssLength | 'viewport';\n/**\n * How the dialog body lays out its children: `flow` (default) scrolls ordinary\n * content in the body; `fill` gives one child the body's whole height and\n * lets it own scrolling (a SplitView, a Pane, an editor); `fill-last` stacks\n * the leading children at their natural height and gives the last child the\n * remaining height to own its scrolling (a heading and notices above a\n * scrolling transcript).\n */\nexport type DialogSurfaceBodyLayout = 'flow' | 'fill' | 'fill-last';\n/**\n * Where the dialog footer sits: `docked` (default) below the body, or\n * `floating` over the body's block end, inset from the panel's inline and\n * block-end edges on a transparent background (a chat composer).\n */\nexport type DialogSurfaceFooterPresentation = 'docked' | 'floating';\n/**\n * Where the dialog header sits: `docked` (default) above the body, or\n * `floating` over the body's block-start edge on the translucent chrome\n * material, so content scrolls visibly beneath the title bar.\n */\nexport type DialogSurfaceHeaderPresentation = 'docked' | 'floating';\n\n/** The built-in close control's visual weight; `normal` keeps the default. */\nexport type DialogSurfaceCloseEmphasis = 'normal' | 'quiet';\n\n/**\n * Application `data-*` identity on the DialogSurface root, such as\n * `data-key`; the surface's own configuration attributes stay protected.\n */\nexport type DialogSurfaceRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined>\n>;\n\nconst DIALOG_SURFACE_PROTECTED = new Set([\n 'data-component',\n 'data-size',\n 'data-presentation',\n 'data-preferred-width',\n 'data-body-inset',\n 'data-footer-inset',\n 'data-viewport-gutter',\n 'data-max-height',\n 'data-height',\n 'data-body-layout',\n 'data-footer-presentation',\n 'data-header-presentation',\n 'data-min-height',\n 'data-resizable',\n 'data-enter-motion',\n 'data-exit-motion',\n 'data-light-dismiss',\n]);\n\n/**\n * The dialog's accessible name: its `label` text (also the default title), or\n * the id of an element that names it, such as a `heading` ToolbarText.\n */\nexport type DialogSurfaceName =\n { label: string; labelledBy?: never } | { label?: never; labelledBy: string };\n\nexport type DialogSurfaceProps = DialogSurfaceName & DialogSurfaceOptions;\n\nexport interface DialogSurfaceOptions {\n /** The dialog's id, for `openDialog(document.getElementById(id))`. */\n id?: string;\n /**\n * Id of the element whose text is the dialog's accessible description,\n * such as the `heading` ToolbarText's `descriptionId` or app-owned summary\n * copy in the body; rendered as `aria-describedby` on the `<dialog>`.\n */\n describedBy?: string;\n /**\n * An alert dialog: a confirmation that interrupts the person to report\n * something urgent or ask before a destructive action (\"Delete this\n * topic?\"). Renders `role=\"alertdialog\"` on the `<dialog>`; set\n * `describedBy` to the element holding the message, and leave\n * `lightDismiss` off so the person answers it.\n */\n alert?: boolean;\n /** The body content. */\n children: KerfUiContent;\n /**\n * Header title content in place of the `label` text, such as an xl\n * `ToolbarText` with a description. The dialog keeps its `label` (or\n * `labelledBy`) name.\n */\n heading?: KerfUiContent;\n /** Controls before the close button in the header. */\n headerActions?: KerfUiContent;\n /** The footer, below the body (or floating over it); usually its buttons. */\n footer?: KerfUiContent;\n /**\n * Render no header: no title and no close button. The content then owns its\n * heading and a way to close (an element with `data-dialog-close`).\n */\n withoutHeader?: boolean;\n /** Close on a press on the backdrop; otherwise the panel pulses. */\n lightDismiss?: boolean;\n /** The close button's accessible name (default `Close`). */\n closeLabel?: string;\n /** Soften the built-in close control without changing its 40px target. */\n closeEmphasis?: DialogSurfaceCloseEmphasis;\n size?: DialogSurfaceSize;\n presentation?: DialogSurfacePresentation;\n /** Modal preferred width. Takes precedence over size, within the viewport cap. */\n preferredWidth?: CssLength;\n bodyInset?: SurfaceInset;\n footerInset?: SurfaceInset;\n /** Modal edge clearance. Omit to retain Web Awesome's default viewport cap. */\n viewportGutter?: CssLength;\n /**\n * Modal height cap, bounded by the dynamic viewport minus both gutters. On a\n * bottom sheet, the cap (and the resize ceiling), bounded by the dynamic\n * viewport minus the top safe area and one gutter.\n */\n maxHeight?: DialogSurfaceMaxHeight;\n /**\n * Modal definite height, bounded the same way, so a filling child has a\n * height to fill. Takes precedence over `maxHeight`. On a bottom sheet, the\n * height it opens at (the visible height above the safe area or keyboard).\n */\n height?: DialogSurfaceHeight;\n /**\n * A resizable bottom sheet's resize floor (default 160px), the visible\n * height above the safe area or keyboard.\n */\n minHeight?: CssLength;\n /**\n * Let the person resize a bottom sheet by its top grabber (drag, or the\n * arrow, Page Up/Down, Home and End keys) between `minHeight` and the\n * sheet's cap. Needs the `/register` entry; each opening starts at `height`\n * (or the content height). Ignored by other presentations.\n */\n resizable?: boolean;\n /** How a bottom sheet appears (default `slide` up from the bottom edge). */\n enterMotion?: DialogSurfaceSheetMotion;\n /** How a bottom sheet is dismissed (default `slide` down off the bottom edge). */\n exitMotion?: DialogSurfaceSheetMotion;\n /**\n * Body layout (default `flow`); `fill` lets one child own the body and\n * `fill-last` stacks fixed rows above one filling last child.\n */\n bodyLayout?: DialogSurfaceBodyLayout;\n /**\n * Header placement (default `docked`); `floating` lays the dialog's header\n * (its title and close control) over the body's block-start edge on the\n * translucent chrome material (`--kui-chrome-material-raised`, opaque under\n * `prefers-reduced-transparency`, increased contrast, forced colors, or\n * without `backdrop-filter`). The `/register` entry measures the header;\n * the body reserves that height before its own inset, so its first content\n * rests below the title bar. A `fill`/`fill-last` child that is the body's\n * only child and opts into block-start `scrollClearance` (a `List` or\n * `Pane`) takes the clearance inside its own scroll area instead, published\n * as `--kui-scroll-clearance-block-start`, so its content scrolls visibly\n * beneath the header. Unmeasured (without the register), the header stays\n * docked. Keep header text in the normal text color: quiet text can fall\n * below AA over the content passing beneath it.\n */\n headerPresentation?: DialogSurfaceHeaderPresentation;\n /**\n * Footer placement (default `docked`); `floating` lays the footer over the\n * body's block end. The body reserves the footer's measured height so its\n * last content is never hidden beneath it. A `fill`/`fill-last` child that\n * opts into block-end `scrollClearance` (a `List` or `Pane`) takes that\n * clearance inside its own scroll area instead, published as\n * `--kui-scroll-clearance-block-end`, so its content scrolls visibly beneath\n * the transparent footer.\n */\n footerPresentation?: DialogSurfaceFooterPresentation;\n /**\n * A floating footer's clearance from the panel's inline and block-end edges\n * (default the 16px container inset). Choose a phone value such as\n * `remify(8)` from `deviceClass()`; the scaffold adds no breakpoint.\n */\n footerOffset?: CssLength;\n /**\n * Safe `data-*` identity on the root. Give sibling dialogs distinct\n * `data-key`s so a re-render morphs each surface into itself instead of\n * reusing one dialog's element for another (structurally identical roots\n * are otherwise matched by position).\n */\n rootAttributes?: DialogSurfaceRootAttributes;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A modal dialog: a native `<dialog>` with Kerf's header, body, and footer\n * chrome, sized and presented by its props. Render it closed, then open it\n * with `openDialog()` and close it with `closeDialog()`, the close button, an\n * element with `data-dialog-close`, Escape, or (with `lightDismiss`) a press\n * on the backdrop. Import `@kerfjs/ui/surface-scaffold/register` for the\n * floating header and footer measurement, the bottom sheet's keyboard\n * clearance and grabber, and re-render resilience while open.\n */\nexport function DialogSurface({\n id,\n label,\n labelledBy,\n describedBy,\n alert = false,\n heading,\n headerActions,\n footer,\n withoutHeader = false,\n lightDismiss = false,\n closeLabel = 'Close',\n closeEmphasis = 'normal',\n children,\n size = 'medium',\n presentation = 'modal',\n preferredWidth,\n bodyInset = 'compact',\n footerInset = 'comfortable',\n viewportGutter,\n maxHeight,\n height,\n minHeight,\n resizable = false,\n enterMotion = 'slide',\n exitMotion = 'slide',\n bodyLayout = 'flow',\n headerPresentation = 'docked',\n footerPresentation = 'docked',\n footerOffset,\n rootAttributes = {},\n className = '',\n slot,\n}: DialogSurfaceProps) {\n const style = [\n preferredWidth === undefined\n ? ''\n : `--_kui-dialog-surface-preferred-width:${preferredWidth}`,\n viewportGutter === undefined\n ? ''\n : `--_kui-dialog-surface-gutter:${viewportGutter}`,\n maxHeight === undefined || maxHeight === 'viewport'\n ? ''\n : `--_kui-dialog-surface-max-height:${maxHeight}`,\n height === undefined || height === 'viewport'\n ? ''\n : `--_kui-dialog-surface-height:${height}`,\n footerOffset === undefined\n ? ''\n : `--_kui-dialog-surface-footer-offset:${footerOffset}`,\n minHeight === undefined\n ? ''\n : `--_kui-dialog-surface-min-height:${minHeight}`,\n ]\n .filter(Boolean)\n .join(';');\n return (\n <dialog\n {...filterDataAttributes(rootAttributes, DIALOG_SURFACE_PROTECTED)}\n id={id}\n class={`kui-dialog-surface ${className}`.trim()}\n role={alert ? 'alertdialog' : undefined}\n aria-label={label}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n tabindex={-1}\n data-light-dismiss={lightDismiss ? '' : undefined}\n data-component=\"dialog-surface\"\n data-size={size}\n data-presentation={presentation}\n data-preferred-width={preferredWidth === undefined ? undefined : ''}\n data-body-inset={bodyInset}\n data-footer-inset={footerInset}\n data-viewport-gutter={viewportGutter === undefined ? undefined : ''}\n data-max-height={maxHeight === undefined ? undefined : ''}\n data-height={height === undefined ? undefined : ''}\n data-body-layout={bodyLayout === 'flow' ? undefined : bodyLayout}\n data-header-presentation={\n headerPresentation === 'floating' ? 'floating' : undefined\n }\n data-footer-presentation={\n footerPresentation === 'floating' ? 'floating' : undefined\n }\n data-min-height={minHeight === undefined ? undefined : ''}\n data-resizable={resizable ? '' : undefined}\n data-enter-motion={enterMotion === 'slide' ? undefined : enterMotion}\n data-exit-motion={exitMotion === 'slide' ? undefined : exitMotion}\n style={style || undefined}\n slot={slot}\n >\n {withoutHeader ? null : (\n <header class=\"kui-dialog-surface__header\">\n {heading === undefined ? (\n <h2 class=\"kui-dialog-surface__title\">{label}</h2>\n ) : (\n <div class=\"kui-dialog-surface__title\">{heading}</div>\n )}\n <div class=\"kui-dialog-surface__header-actions\">\n {headerActions}\n <button\n type=\"button\"\n class=\"kui-dialog-surface__close\"\n aria-label={closeLabel}\n data-emphasis={closeEmphasis === 'quiet' ? 'quiet' : undefined}\n data-dialog-close=\"\"\n >\n <LucideIcon\n icon={X}\n name=\"x\"\n size={closeEmphasis === 'quiet' ? 'm' : 'l'}\n />\n </button>\n </div>\n </header>\n )}\n {presentation === 'bottom-sheet' && resizable ? (\n <div\n class=\"kui-dialog-surface__sheet-handle\"\n role=\"separator\"\n aria-orientation=\"horizontal\"\n aria-label=\"Resize sheet\"\n tabindex={0}\n />\n ) : null}\n <div class=\"kui-dialog-surface__body\">{children}</div>\n {footer === undefined ? null : (\n <footer class=\"kui-dialog-surface__footer\">{footer}</footer>\n )}\n {/* Where kerfjs/overlay hosts a popover or tooltip opened inside the\n modal dialog, so it stays interactive above the inert page. */}\n <div data-kerf-overlay-host data-morph-skip style=\"display:contents\" />\n </dialog>\n );\n}\n\n/** Where a PopoverDialogSurface appears: the top layer, or in flow. */\nexport type PopoverDialogSurfacePresentation = 'overlay' | 'embedded';\n\n/** Application `data-*` metadata on the surface root. */\nexport type PopoverDialogSurfaceDataAttributes = Readonly<\n Record<`data-${string}`, string>\n>;\n\ntype PopoverDialogSurfaceName =\n { label: string; labelledBy?: never } | { label?: never; labelledBy: string };\n\nexport type PopoverDialogSurfaceProps = PopoverDialogSurfaceName & {\n /** The root id: what an opening control's `popovertarget` names. */\n id?: string;\n /**\n * Id of the element whose text is the dialog's accessible description,\n * such as a title `ToolbarText`'s `descriptionId`; rendered as\n * `aria-describedby` on the `role=\"dialog\"` root.\n */\n describedBy?: string;\n children: KerfUiContent;\n /**\n * `overlay` (default) is a native `popover=\"auto\"` in the top layer:\n * non-modal, light dismiss (Escape or a press outside), nothing inert.\n * `embedded` renders the same surface in flow for a catalog or inline use.\n */\n presentation?: PopoverDialogSurfacePresentation;\n /** Preferred width preset: 400px, 560px (default), or 800px. */\n size?: DialogSurfaceSize;\n /** Preferred width; takes precedence over `size`, within the viewport cap. */\n preferredWidth?: CssLength;\n /** Definite height, bounded by the dynamic viewport minus both gutters. */\n height?: DialogSurfaceHeight;\n /** Height cap, bounded the same way, for a surface that sizes to content. */\n maxHeight?: DialogSurfaceMaxHeight;\n /** Edge clearance on each side of the viewport (default 16px). */\n viewportGutter?: CssLength;\n /**\n * Body layout (default `flow`); `fill` lets one child own the surface and\n * `fill-last` stacks fixed rows above one filling last child.\n */\n bodyLayout?: DialogSurfaceBodyLayout;\n rootAttributes?: PopoverDialogSurfaceDataAttributes;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n};\n\nconst POPOVER_DIALOG_PROTECTED = new Set([\n 'data-component',\n 'data-presentation',\n 'data-size',\n 'data-height',\n 'data-max-height',\n 'data-body-layout',\n]);\n\n/**\n * A non-modal dialog surface on the native Popover API: Kerf's dialog chrome,\n * viewport-bounded size, and single-child fill without application CSS.\n * Open it with a `popovertarget` control or `showPopover()`; it light\n * dismisses and leaves the page interactive. Use `DialogSurface` when the\n * task must block the page.\n */\nexport function PopoverDialogSurface({\n id,\n children,\n label,\n labelledBy,\n describedBy,\n presentation = 'overlay',\n size = 'medium',\n preferredWidth,\n height,\n maxHeight,\n viewportGutter,\n bodyLayout = 'flow',\n rootAttributes = {},\n className = '',\n slot,\n}: PopoverDialogSurfaceProps) {\n const style = [\n preferredWidth === undefined\n ? ''\n : `--_kui-popover-dialog-surface-preferred-width:${preferredWidth}`,\n viewportGutter === undefined\n ? ''\n : `--_kui-popover-dialog-surface-gutter:${viewportGutter}`,\n height === undefined || height === 'viewport'\n ? ''\n : `--_kui-popover-dialog-surface-height:${height}`,\n maxHeight === undefined || maxHeight === 'viewport'\n ? ''\n : `--_kui-popover-dialog-surface-max-height:${maxHeight}`,\n ]\n .filter(Boolean)\n .join(';');\n return (\n <section\n {...filterDataAttributes(rootAttributes, POPOVER_DIALOG_PROTECTED)}\n id={id}\n class={`kui-popover-dialog-surface ${className}`.trim()}\n data-component=\"popover-dialog-surface\"\n data-presentation={presentation}\n data-size={size}\n data-height={height === undefined ? undefined : ''}\n data-max-height={maxHeight === undefined ? undefined : ''}\n data-body-layout={bodyLayout === 'flow' ? undefined : bodyLayout}\n popover={presentation === 'overlay' ? 'auto' : undefined}\n role=\"dialog\"\n aria-label={label}\n aria-labelledby={labelledBy}\n aria-describedby={describedBy}\n style={style || undefined}\n slot={slot}\n >\n {children}\n </section>\n );\n}\n\nexport type PopupSurfaceInset = 'standard' | 'compact' | 'list-zero';\n\nexport interface PopupSurfaceProps {\n children: KerfUiContent;\n inset?: PopupSurfaceInset;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/** Configure recurring Web Awesome dropdown-menu geometry without consumer ::part() CSS. */\nexport function PopupSurface({\n children,\n inset = 'standard',\n className = '',\n slot,\n}: PopupSurfaceProps) {\n return (\n <span\n class={`kui-popup-surface ${className}`.trim()}\n data-component=\"popup-surface\"\n data-inset={inset}\n slot={slot}\n >\n {children}\n </span>\n );\n}\n"]}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { BackdropImage } from './chunk-SOBRGH7T.js';
|
|
2
|
+
import { surfaceTintAttributes } from './chunk-ITENVZ6Q.js';
|
|
3
|
+
import { filterDataAttributes } from './chunk-KH4KEMSP.js';
|
|
4
|
+
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function mediaParallax(value) {
|
|
7
|
+
if (value === "none") return 0;
|
|
8
|
+
if (value === "subtle") return 0.35;
|
|
9
|
+
if (!Number.isFinite(value) || value < 0 || value > 1)
|
|
10
|
+
throw new RangeError("ContentItem media.parallax must be from 0 to 1.");
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
var mediaPositions = /* @__PURE__ */ new Set([
|
|
14
|
+
"center",
|
|
15
|
+
"top",
|
|
16
|
+
"bottom",
|
|
17
|
+
"left",
|
|
18
|
+
"right",
|
|
19
|
+
"top left",
|
|
20
|
+
"top right",
|
|
21
|
+
"bottom left",
|
|
22
|
+
"bottom right"
|
|
23
|
+
]);
|
|
24
|
+
function roleForSelectionMode(mode) {
|
|
25
|
+
switch (mode) {
|
|
26
|
+
case "single":
|
|
27
|
+
return "option";
|
|
28
|
+
case "multiple":
|
|
29
|
+
return "row";
|
|
30
|
+
case "none":
|
|
31
|
+
case "toggle":
|
|
32
|
+
return "button";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
var contentItemProtectedAttributes = /* @__PURE__ */ new Set([
|
|
36
|
+
"data-component",
|
|
37
|
+
"data-appearance",
|
|
38
|
+
"data-outlined",
|
|
39
|
+
"data-bubble",
|
|
40
|
+
"data-grid-row",
|
|
41
|
+
"data-media-state",
|
|
42
|
+
"data-media-edge",
|
|
43
|
+
"data-media-fade",
|
|
44
|
+
"data-kui-tint",
|
|
45
|
+
"data-kui-tint-accent"
|
|
46
|
+
]);
|
|
47
|
+
var interactiveProtectedAttributes = /* @__PURE__ */ new Set([
|
|
48
|
+
"data-component",
|
|
49
|
+
"data-appearance",
|
|
50
|
+
"data-outlined",
|
|
51
|
+
"data-bubble",
|
|
52
|
+
"data-grid-row",
|
|
53
|
+
"data-media-state",
|
|
54
|
+
"data-media-edge",
|
|
55
|
+
"data-media-fade",
|
|
56
|
+
"data-kui-tint",
|
|
57
|
+
"data-kui-tint-accent",
|
|
58
|
+
"data-action",
|
|
59
|
+
"data-item-id",
|
|
60
|
+
"data-interactive",
|
|
61
|
+
"data-selected",
|
|
62
|
+
"data-disabled",
|
|
63
|
+
"data-selection-mode",
|
|
64
|
+
"data-kui-pressed"
|
|
65
|
+
]);
|
|
66
|
+
function ContentItem({
|
|
67
|
+
appearance = "transparent",
|
|
68
|
+
media,
|
|
69
|
+
tint,
|
|
70
|
+
children,
|
|
71
|
+
frame = "none",
|
|
72
|
+
flush = false,
|
|
73
|
+
shape = "rounded",
|
|
74
|
+
bubble,
|
|
75
|
+
title,
|
|
76
|
+
ariaLabel,
|
|
77
|
+
focusTarget = false,
|
|
78
|
+
outlined = false,
|
|
79
|
+
tabIndex,
|
|
80
|
+
gridRow = false,
|
|
81
|
+
interactive = false,
|
|
82
|
+
action,
|
|
83
|
+
itemId,
|
|
84
|
+
selectionMode = "none",
|
|
85
|
+
selected = false,
|
|
86
|
+
disabled = false,
|
|
87
|
+
className = "",
|
|
88
|
+
rootAttributes = {},
|
|
89
|
+
slot
|
|
90
|
+
}) {
|
|
91
|
+
const safeRootAttributes = filterDataAttributes(
|
|
92
|
+
rootAttributes,
|
|
93
|
+
interactive ? interactiveProtectedAttributes : contentItemProtectedAttributes
|
|
94
|
+
);
|
|
95
|
+
if (interactive && !action) {
|
|
96
|
+
throw new Error("Interactive ContentItem requires an action");
|
|
97
|
+
}
|
|
98
|
+
if (interactive && selected && selectionMode === "none") {
|
|
99
|
+
throw new Error("Selected ContentItem requires a selectionMode");
|
|
100
|
+
}
|
|
101
|
+
if (media?.aspectRatio !== void 0 && (!Number.isFinite(media.aspectRatio) || media.aspectRatio <= 0))
|
|
102
|
+
throw new RangeError("ContentItem media.aspectRatio must be positive.");
|
|
103
|
+
if (media?.position !== void 0 && !mediaPositions.has(media.position))
|
|
104
|
+
throw new TypeError(
|
|
105
|
+
"ContentItem media.position must be a supported position."
|
|
106
|
+
);
|
|
107
|
+
if (media?.blur !== void 0 && media.blurredSrc !== void 0)
|
|
108
|
+
throw new TypeError(
|
|
109
|
+
"ContentItem media.blur and blurredSrc cannot be combined."
|
|
110
|
+
);
|
|
111
|
+
if (media) mediaParallax(media.parallax ?? "subtle");
|
|
112
|
+
const tinted = surfaceTintAttributes(media ? tint : void 0);
|
|
113
|
+
const fadeStyle = media?.fadeTo === void 0 ? void 0 : `--_kui-content-item-media-fade-to:${media.fadeTo}`;
|
|
114
|
+
const cls = [
|
|
115
|
+
"kui-content-item",
|
|
116
|
+
shape === "pill" ? "kui-content-item--pill" : "",
|
|
117
|
+
frame === "framed" ? "kui-content-item--framed" : "",
|
|
118
|
+
flush ? "kui-content-item--flush" : "",
|
|
119
|
+
tinted.className,
|
|
120
|
+
className
|
|
121
|
+
].filter(Boolean).join(" ");
|
|
122
|
+
const interactiveAttributes = interactive ? {
|
|
123
|
+
"data-interactive": "true",
|
|
124
|
+
"data-action": disabled ? void 0 : action,
|
|
125
|
+
"data-item-id": itemId,
|
|
126
|
+
"data-selection-mode": selectionMode,
|
|
127
|
+
"data-selected": selectionMode === "none" ? void 0 : String(selected),
|
|
128
|
+
"data-disabled": disabled ? "true" : void 0
|
|
129
|
+
} : {};
|
|
130
|
+
let role = ariaLabel ? "region" : void 0;
|
|
131
|
+
if (interactive) role = roleForSelectionMode(selectionMode);
|
|
132
|
+
else if (gridRow) role = "row";
|
|
133
|
+
return /* @__PURE__ */ jsxs(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
...safeRootAttributes,
|
|
137
|
+
...interactiveAttributes,
|
|
138
|
+
class: cls,
|
|
139
|
+
style: [tinted.style, fadeStyle].filter(Boolean).join(";") || void 0,
|
|
140
|
+
title,
|
|
141
|
+
"data-component": "content-item",
|
|
142
|
+
"data-appearance": appearance,
|
|
143
|
+
"data-outlined": outlined ? "true" : void 0,
|
|
144
|
+
"data-bubble": bubble,
|
|
145
|
+
"data-grid-row": !interactive && gridRow ? "true" : void 0,
|
|
146
|
+
"data-media-state": media ? "pending" : void 0,
|
|
147
|
+
"data-media-edge": media?.edgeToEdge ? "true" : void 0,
|
|
148
|
+
"data-media-fade": media?.fadeTo === void 0 ? void 0 : "true",
|
|
149
|
+
"data-kui-tint": tinted["data-kui-tint"],
|
|
150
|
+
"data-kui-tint-accent": tinted["data-kui-tint-accent"],
|
|
151
|
+
role,
|
|
152
|
+
"aria-label": ariaLabel,
|
|
153
|
+
"aria-selected": interactive && (selectionMode === "single" || selectionMode === "multiple") ? String(selected) : void 0,
|
|
154
|
+
"aria-pressed": interactive && selectionMode === "toggle" ? String(selected) : void 0,
|
|
155
|
+
"aria-disabled": interactive && disabled ? "true" : void 0,
|
|
156
|
+
tabindex: interactive ? disabled ? "-1" : "0" : tabIndex ?? (focusTarget ? "-1" : void 0),
|
|
157
|
+
slot,
|
|
158
|
+
children: [
|
|
159
|
+
media ? /* @__PURE__ */ jsx(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
class: "kui-content-item__media",
|
|
163
|
+
"data-tint-scheme": tinted["data-kui-tint"],
|
|
164
|
+
"data-tint-accent": tinted["data-kui-tint-accent"],
|
|
165
|
+
children: /* @__PURE__ */ jsx(
|
|
166
|
+
BackdropImage,
|
|
167
|
+
{
|
|
168
|
+
src: media.src,
|
|
169
|
+
srcset: media.srcset,
|
|
170
|
+
sizes: media.sizes,
|
|
171
|
+
alt: media.alt,
|
|
172
|
+
aspectRatio: media.aspectRatio ?? 16 / 9,
|
|
173
|
+
position: media.position,
|
|
174
|
+
parallax: media.parallax ?? "subtle",
|
|
175
|
+
blur: media.blur ?? (media.blurredSrc ? { blurredSrc: media.blurredSrc } : void 0),
|
|
176
|
+
fadeTo: media.fadeTo,
|
|
177
|
+
overlay: media.overlay,
|
|
178
|
+
scrim: media.scrim,
|
|
179
|
+
loading: "lazy",
|
|
180
|
+
bleedInline: false
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
) : null,
|
|
185
|
+
media ? /* @__PURE__ */ jsx(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
class: "kui-content-item__body",
|
|
189
|
+
role: interactive && selectionMode === "multiple" || !interactive && gridRow ? "gridcell" : void 0,
|
|
190
|
+
children
|
|
191
|
+
}
|
|
192
|
+
) : interactive && selectionMode === "multiple" || !interactive && gridRow ? /* @__PURE__ */ jsx("div", { role: "gridcell", children }) : children
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { ContentItem };
|
|
199
|
+
|
|
200
|
+
//# sourceMappingURL=chunk-WD6KABEU.js.map
|
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L;AAAA;AAAA,SACH,GACG,WAAA,IAAe,aAAA,KAAkB,UAAA,IACnC,CAAC,WAAA,IAAe,OAAA,mBACjB,GAAA,CAAC,KAAA,EAAA,EAAI,IAAA,EAAK,UAAA,EAAY,QAAA,EAAS,CAAA,GAE/B;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-WD6KABEU.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport type { SemanticTone } from '../../../shared/styles/semantic-tone.js';\nimport {\n type SurfaceTint,\n surfaceTintAttributes,\n} from '../../../shared/styles/surface-tint.js';\nimport {\n BackdropImage,\n type BackdropImageBlur,\n type BackdropImageParallax,\n type BackdropImagePosition,\n type BackdropImageScrim,\n} from '../backdrop-image/backdrop-image.js';\n\nexport type { SemanticTone } from '../../../shared/styles/semantic-tone.js';\n\n/**\n * Base surface treatment, semantic status colors, or `brand-loud`: the solid\n * brand fill with its on-loud foreground (a transcript's own messages).\n */\nexport type ContentItemAppearance =\n 'transparent' | 'surface' | 'brand-loud' | SemanticTone;\n\n/**\n * A chat-bubble layout for transcripts: the item fits its content up to 80%\n * of the row and sits at the `start` (other participants) or `end` (the\n * person's own messages) of the line.\n */\nexport type ContentItemBubble = 'start' | 'end';\n\n/** Whether the item's always-reserved 1px border is transparent or visible. */\nexport type ContentItemFrame = 'none' | 'framed';\n\n/** Corner shape: the 12px rounded rectangle or the 22px pill. */\nexport type ContentItemShape = 'rounded' | 'pill';\n/** `single` uses an option; `multiple` uses a grid row; `toggle` uses a pressed button. */\nexport type ContentItemSelectionMode =\n 'none' | 'single' | 'multiple' | 'toggle';\n\n/** One card-owned lead image in the containing feed's shared scrollport. */\nexport interface ContentItemMedia {\n src: string;\n alt: string;\n srcset?: string;\n sizes?: string;\n /** Width divided by height; reserves the image block before it loads. Default 16/9. */\n aspectRatio?: number;\n position?: BackdropImagePosition;\n /** Default subtle (35% lag); set none for a static lead image. */\n parallax?: BackdropImageParallax;\n /** App-supplied soft copy; its opacity changes, never its blur filter. */\n blurredSrc?: string;\n /** Shared BackdropImage blur behavior; use instead of `blurredSrc`. */\n blur?: BackdropImageBlur;\n /** Color the image dissolves into and the card body continues on. */\n fadeTo?: CssColor;\n /** Content layered over the image, including native controls. */\n overlay?: KerfUiContent;\n /** Dim the image behind overlay content. */\n scrim?: BackdropImageScrim;\n /** Extend the image to the card's top, left, and right inner edges. */\n edgeToEdge?: boolean;\n}\n\nfunction mediaParallax(value: BackdropImageParallax): number {\n if (value === 'none') return 0;\n if (value === 'subtle') return 0.35;\n if (!Number.isFinite(value) || value < 0 || value > 1)\n throw new RangeError('ContentItem media.parallax must be from 0 to 1.');\n return value;\n}\n\nconst mediaPositions = new Set<BackdropImagePosition>([\n 'center',\n 'top',\n 'bottom',\n 'left',\n 'right',\n 'top left',\n 'top right',\n 'bottom left',\n 'bottom right',\n]);\n\nfunction roleForSelectionMode(\n mode: ContentItemSelectionMode,\n): 'option' | 'row' | 'button' {\n switch (mode) {\n case 'single':\n return 'option';\n case 'multiple':\n return 'row';\n case 'none':\n case 'toggle':\n return 'button';\n }\n}\n\nconst contentItemProtectedAttributes = new Set([\n 'data-component',\n 'data-appearance',\n 'data-outlined',\n 'data-bubble',\n 'data-grid-row',\n 'data-media-state',\n 'data-media-edge',\n 'data-media-fade',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n]);\nconst interactiveProtectedAttributes = new Set([\n 'data-component',\n 'data-appearance',\n 'data-outlined',\n 'data-bubble',\n 'data-grid-row',\n 'data-media-state',\n 'data-media-edge',\n 'data-media-fade',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n 'data-action',\n 'data-item-id',\n 'data-interactive',\n 'data-selected',\n 'data-disabled',\n 'data-selection-mode',\n 'data-kui-pressed',\n]);\n\ntype ContentItemRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-appearance'?: never;\n 'data-outlined'?: never;\n 'data-bubble'?: never;\n 'data-grid-row'?: never;\n 'data-media-state'?: never;\n 'data-media-edge'?: never;\n 'data-media-fade'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n }\n>;\n\ntype ContentItemInteractiveRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-appearance'?: never;\n 'data-outlined'?: never;\n 'data-bubble'?: never;\n 'data-grid-row'?: never;\n 'data-media-state'?: never;\n 'data-media-edge'?: never;\n 'data-media-fade'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n 'data-action'?: never;\n 'data-item-id'?: never;\n 'data-interactive'?: never;\n 'data-selected'?: never;\n 'data-disabled'?: never;\n 'data-selection-mode'?: never;\n 'data-kui-pressed'?: never;\n }\n>;\n\ninterface ContentItemBaseProps {\n /**\n * Coordinated background, border, and foreground colors. `transparent`\n * preserves the surrounding surface; `surface` paints the base surface;\n * semantic values match StateBanner. Defaults to `transparent`.\n */\n appearance?: ContentItemAppearance;\n /** Reserved lead image with a per-image scroll timeline. Wire the containing root with `wireContentItems`. */\n media?: ContentItemMedia;\n /** App-sampled image color, scoped to this card once its image loads. */\n tint?: SurfaceTint;\n /** Item content; a plain string is allowed for bare copy. */\n children?: KerfUiContent | string;\n /**\n * `framed` paints the standard neutral border in the 1px the item always\n * reserves, so framing never changes geometry. Frame only an item that\n * marks a real distinction. Defaults to `none` (transparent border).\n */\n frame?: ContentItemFrame;\n /** Remove block padding and block borders while retaining inline geometry. */\n flush?: boolean;\n /** Corner shape. Defaults to `rounded`. */\n shape?: ContentItemShape;\n /**\n * Lay the item out as a chat bubble: content width up to 80% of the row,\n * at the `start` or `end` of the line. Pair `end` with `brand-loud` for the\n * person's own messages. Omit for an ordinary full-width item.\n */\n bubble?: ContentItemBubble;\n /** Native hover tooltip. */\n title?: string;\n /**\n * Names the item as a distinct region (`role=\"region\"`). Omit it for an\n * ordinary item, which stays a non-landmark grouping.\n */\n ariaLabel?: string;\n /**\n * Makes the item a programmatic focus target (`tabindex=\"-1\"`, never a tab\n * stop), for example the preferred initial focus of a NavStack view when\n * combined with `data-nav-focus` in `rootAttributes`.\n */\n focusTarget?: boolean;\n /** Keep the standard focus outline visible, such as for a drop target. */\n outlined?: boolean;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nexport type ContentItemProps = ContentItemBaseProps &\n (\n | {\n interactive?: false;\n action?: never;\n itemId?: never;\n selectionMode?: never;\n selected?: never;\n disabled?: never;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus. */\n tabIndex?: 0 | -1;\n /**\n * A non-selectable row of a multi-select `List` or `Grid`: renders\n * `role=\"row\"` around a `gridcell`, with no `aria-selected` and no\n * Tab stop of its own, for content between selectable rows (an\n * activity group, a \"messages skipped\" divider). Its controls stay\n * reachable by Tab; arrow keys skip it.\n */\n gridRow?: boolean;\n /** Existing static `data-*` metadata remains available. */\n rootAttributes?: ContentItemRootAttributes;\n }\n | {\n /** Enable a keyboard reachable card; wire `wireContentItems` once on its containing root. */\n interactive: true;\n /** Delegated action dispatched by pointer, Enter, or Space. */\n action: string;\n itemId?: string;\n selectionMode?: ContentItemSelectionMode;\n selected?: boolean;\n disabled?: boolean;\n tabIndex?: never;\n /** An interactive item is already a row in a multi-select grid. */\n gridRow?: never;\n /** Safe app metadata; interaction attributes are component-owned. */\n rootAttributes?: ContentItemInteractiveRootAttributes;\n }\n );\n\n/**\n * One self-contained `.kui-content` child: an 8px inline margin, a real 1px\n * border (transparent unless `framed`), 8px padding, and a rounded or pill\n * radius. It owns that whole geometry, so wrappers must not add more.\n */\nexport function ContentItem({\n appearance = 'transparent',\n media,\n tint,\n children,\n frame = 'none',\n flush = false,\n shape = 'rounded',\n bubble,\n title,\n ariaLabel,\n focusTarget = false,\n outlined = false,\n tabIndex,\n gridRow = false,\n interactive = false,\n action,\n itemId,\n selectionMode = 'none',\n selected = false,\n disabled = false,\n className = '',\n rootAttributes = {},\n slot,\n}: ContentItemProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n interactive\n ? interactiveProtectedAttributes\n : contentItemProtectedAttributes,\n );\n if (interactive && !action) {\n throw new Error('Interactive ContentItem requires an action');\n }\n if (interactive && selected && selectionMode === 'none') {\n throw new Error('Selected ContentItem requires a selectionMode');\n }\n if (\n media?.aspectRatio !== undefined &&\n (!Number.isFinite(media.aspectRatio) || media.aspectRatio <= 0)\n )\n throw new RangeError('ContentItem media.aspectRatio must be positive.');\n if (media?.position !== undefined && !mediaPositions.has(media.position))\n throw new TypeError(\n 'ContentItem media.position must be a supported position.',\n );\n if (media?.blur !== undefined && media.blurredSrc !== undefined)\n throw new TypeError(\n 'ContentItem media.blur and blurredSrc cannot be combined.',\n );\n if (media) mediaParallax(media.parallax ?? 'subtle');\n const tinted = surfaceTintAttributes(media ? tint : undefined);\n const fadeStyle =\n media?.fadeTo === undefined\n ? undefined\n : `--_kui-content-item-media-fade-to:${media.fadeTo}`;\n const cls = [\n 'kui-content-item',\n shape === 'pill' ? 'kui-content-item--pill' : '',\n frame === 'framed' ? 'kui-content-item--framed' : '',\n flush ? 'kui-content-item--flush' : '',\n tinted.className,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n const interactiveAttributes = interactive\n ? {\n 'data-interactive': 'true',\n 'data-action': disabled ? undefined : action,\n 'data-item-id': itemId,\n 'data-selection-mode': selectionMode,\n 'data-selected':\n selectionMode === 'none' ? undefined : String(selected),\n 'data-disabled': disabled ? 'true' : undefined,\n }\n : {};\n let role: 'option' | 'row' | 'button' | 'region' | undefined = ariaLabel\n ? 'region'\n : undefined;\n if (interactive) role = roleForSelectionMode(selectionMode);\n else if (gridRow) role = 'row';\n return (\n <div\n {...safeRootAttributes}\n {...interactiveAttributes}\n class={cls}\n style={[tinted.style, fadeStyle].filter(Boolean).join(';') || undefined}\n title={title}\n data-component=\"content-item\"\n data-appearance={appearance}\n data-outlined={outlined ? 'true' : undefined}\n data-bubble={bubble}\n data-grid-row={!interactive && gridRow ? 'true' : undefined}\n data-media-state={media ? 'pending' : undefined}\n data-media-edge={media?.edgeToEdge ? 'true' : undefined}\n data-media-fade={media?.fadeTo === undefined ? undefined : 'true'}\n data-kui-tint={tinted['data-kui-tint']}\n data-kui-tint-accent={tinted['data-kui-tint-accent']}\n role={role}\n aria-label={ariaLabel}\n aria-selected={\n interactive &&\n (selectionMode === 'single' || selectionMode === 'multiple')\n ? String(selected)\n : undefined\n }\n aria-pressed={\n interactive && selectionMode === 'toggle' ? String(selected) : undefined\n }\n aria-disabled={interactive && disabled ? 'true' : undefined}\n tabindex={\n interactive\n ? disabled\n ? '-1'\n : '0'\n : (tabIndex ?? (focusTarget ? '-1' : undefined))\n }\n slot={slot}\n >\n {media ? (\n <div\n class=\"kui-content-item__media\"\n data-tint-scheme={tinted['data-kui-tint']}\n data-tint-accent={tinted['data-kui-tint-accent']}\n >\n <BackdropImage\n src={media.src}\n srcset={media.srcset}\n sizes={media.sizes}\n alt={media.alt}\n aspectRatio={media.aspectRatio ?? 16 / 9}\n position={media.position}\n parallax={media.parallax ?? 'subtle'}\n blur={\n media.blur ??\n (media.blurredSrc ? { blurredSrc: media.blurredSrc } : undefined)\n }\n fadeTo={media.fadeTo}\n overlay={media.overlay}\n scrim={media.scrim}\n loading=\"lazy\"\n bleedInline={false}\n />\n </div>\n ) : null}\n {media ? (\n <div\n class=\"kui-content-item__body\"\n role={\n (interactive && selectionMode === 'multiple') ||\n (!interactive && gridRow)\n ? 'gridcell'\n : undefined\n }\n >\n {children}\n </div>\n ) : (interactive && selectionMode === 'multiple') ||\n (!interactive && gridRow) ? (\n <div role=\"gridcell\">{children}</div>\n ) : (\n children\n )}\n </div>\n );\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { scrollEdgeAttributes } from './chunk-IRC5N7FA.js';
|
|
2
2
|
import { ensureSunkenTexture } from './chunk-IKS72C6P.js';
|
|
3
|
+
import { surfaceTintAttributes, joinStyles } from './chunk-ITENVZ6Q.js';
|
|
3
4
|
import { filterDataAttributes } from './chunk-KH4KEMSP.js';
|
|
4
5
|
import { jsx, jsxs, Fragment } from 'kerfjs/jsx-runtime';
|
|
5
6
|
|
|
@@ -155,4 +156,4 @@ function Pane({
|
|
|
155
156
|
|
|
156
157
|
export { Pane };
|
|
157
158
|
|
|
158
|
-
//# sourceMappingURL=chunk-
|
|
159
|
+
//# sourceMappingURL=chunk-XRZSK2WC.js.map
|