@wow-two-beta/fe 0.0.44 → 0.0.45
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/dist/presentation/display/dataTable/DataTable.vue.js.map +1 -1
- package/dist/presentation/layout/appFrame/AppFrame.vue.d.ts +38 -2
- package/dist/presentation/layout/appFrame/AppFrame.vue.js +57 -19
- package/dist/presentation/layout/appFrame/AppFrame.vue.js.map +1 -1
- package/dist/presentation/layout/appShell/AppShell.vue.d.ts +3 -0
- package/dist/presentation/layout/appShell/AppShell.vue.js +3 -2
- package/dist/presentation/layout/appShell/AppShell.vue.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.vue.js","sources":["../../../../src/presentation/display/dataTable/DataTable.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { SelectionKey, SelectionMode } from '../../../foundation/selection';\nimport type { Breakpoint } from '../../layout/appShell/AppShell.vue';\nimport type { TableDensity, TablePhoneLayout } from '../table';\n\n/** Defines the sort order of a DataTable column. */\nexport const SortDirection = {\n /** Refers to ascending order. */\n Asc: 'asc',\n /** Refers to descending order. */\n Desc: 'desc',\n} as const;\n\nexport type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];\n\n/** Defines the horizontal text alignment of a DataTable column. */\nexport const DataTableColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type DataTableColumnAlign = (typeof DataTableColumnAlign)[keyof typeof DataTableColumnAlign];\n\nexport interface DataTableSort {\n readonly columnKey: string;\n readonly direction: SortDirection;\n}\n\nexport interface DataTableColumn<T> {\n readonly key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n readonly header: string | number;\n readonly accessor?: (row: T) => unknown;\n /**\n * The per-cell renderer — this column's rich override. Returns text, a number, a VNode (`h(Badge, …)`) or an\n * array of VNodes; any other value renders as its display string. The `cell` scoped slot overrides every\n * column at once.\n */\n readonly cell?: (row: T, index: number) => unknown;\n readonly isSortable?: boolean;\n /** Custom row comparison; takes precedence over accessor-based sorting. */\n readonly compare?: (left: T, right: T) => number;\n readonly align?: DataTableColumnAlign;\n readonly width?: string;\n /** The skeleton bar's width in this column, any CSS length; defaults to a varied share of the cell. */\n readonly skeletonWidth?: string;\n}\n\nexport interface DataTableProps<T> {\n readonly columns: ReadonlyArray<DataTableColumn<T>>;\n readonly data: ReadonlyArray<T>;\n readonly rowKey?: (row: T, index: number) => string | number;\n /**\n * Fires with the clicked row and its index.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * seeds `isHoverable` and the `cursor-pointer` class, and Vue strips declared\n * emit listeners out of `useAttrs()`.\n */\n readonly onRowClick?: (row: T, index: number) => void;\n readonly sortBy?: DataTableSort | null;\n readonly defaultSortBy?: DataTableSort | null;\n readonly isStriped?: boolean;\n readonly isHoverable?: boolean;\n readonly density?: TableDensity;\n readonly isBare?: boolean;\n /** The empty-state text. Default `No results.`; override richly via the `emptyContent` slot. */\n readonly emptyContent?: string | number;\n\n /** How many rows the reader may select. Default `none`; `single` and `multiple` add a checkbox column. */\n readonly selectionMode?: SelectionMode;\n\n /** The selected row keys, controlled. The `v-model:selection` binding target. */\n readonly selection?: ReadonlyArray<SelectionKey>;\n\n /** The initially selected row keys when uncontrolled. Default none. */\n readonly defaultSelection?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can be selected, given its data index. Default every row. */\n readonly isRowSelectable?: (row: T, index: number) => boolean;\n\n /** The expanded row keys, controlled. The `v-model:expanded` binding target. */\n readonly expanded?: ReadonlyArray<SelectionKey>;\n\n /** The initially expanded row keys when uncontrolled. Default none. */\n readonly defaultExpanded?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can expand when the `expanded` slot is set, given its data index. Default every row. */\n readonly isRowExpandable?: (row: T, index: number) => boolean;\n\n /** Whether the header row stays pinned while the body scrolls inside `containerClassName`'s height. */\n readonly hasStickyHeader?: boolean;\n\n /** Whether data is loading — marks the table busy and draws skeleton rows while it is empty. */\n readonly isLoading?: boolean;\n\n /** The skeleton rows drawn while an empty table loads or its `DataRegion` first-loads. Default 5. */\n readonly skeletonRows?: number;\n\n /** @deprecated Use `skeletonRows`; this alias is removed next release. */\n readonly loadingRowCount?: number;\n\n /** Classes for the scroll container — a height such as `max-h-96` lets a sticky header pin. */\n readonly containerClassName?: string;\n\n /**\n * The layout below `stackBreakpoint`. Default `stack`: one card per row, each value beside its column's `header`,\n * with the sort and select-all controls in a bar above. `scroll` keeps the table and scrolls it sideways.\n */\n readonly phoneLayout?: TablePhoneLayout;\n\n /** Rows stack into cards below this breakpoint. Default `md`. */\n readonly stackBreakpoint?: Breakpoint;\n}\n\n/** @internal A row-control cell when stacked: inline at the head of its card, with no label. */\nconst StackedControlClass = 'w-10 table-stacked:inline-flex table-stacked:w-auto';\n\n/** @internal The skeleton rows drawn while an empty table loads, when `skeletonRows` is not set. */\nconst DefaultSkeletonRows = 5;\n\n/** @internal Bar widths a loading cell cycles through, so placeholder rows read as varied text, not a grid of bars. */\nconst SkeletonLineWidths = ['min(75%, 12rem)', 'min(50%, 8rem)', 'min(83%, 14rem)', 'min(66%, 10rem)'] as const;\n\n/** @internal Whether two key lists hold the same members. */\nfunction sameKeys(a: ReadonlyArray<SelectionKey>, b: ReadonlyArray<SelectionKey>): boolean {\n if (a.length !== b.length) return false;\n const lookup = new Set(b);\n return a.every((key) => lookup.has(key));\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed, isVNode, toDisplayString, type FunctionalComponent, type VNodeChild } from 'vue';\nimport { useLocale } from '../../../foundation/i18n';\nimport { ArrowDown, ArrowUp, ArrowUpDown, ChevronRight } from 'lucide-vue-next';\nimport { useId } from '../../../foundation/identifiers';\nimport {\n compareValues,\n createSelection,\n deselect,\n extendSelection,\n isNullish,\n isSelected,\n select,\n selectionStatus,\n toggle,\n toggleAll,\n SelectionMode as SelectionModeToken,\n SelectionStatus,\n type SelectionState,\n} from '../../../foundation/selection';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport CheckboxInput from '../../forms/checkboxInput/CheckboxInput.vue';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { SkeletonStateLine } from '../../feedback/skeletonState/SkeletonStateLine';\nimport { skeletonBoxClass } from '../../feedback/skeletonState/SkeletonState.variants';\nimport { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '../table';\n\n/**\n * Renders a sortable table from a `columns` descriptor, wrapping the `Table` primitives, with optional row\n * selection, expandable detail rows, a pinned header and a loading state.\n *\n * `class` and `aria-label` reach the inner `<table>` by fallthrough, which is why this component keeps `inheritAttrs`\n * on.\n */\ndefineOptions({ name: 'DataTable' });\n\nconst props = withDefaults(defineProps<DataTableProps<T>>(), {\n rowKey: undefined,\n onRowClick: undefined,\n sortBy: undefined,\n defaultSortBy: undefined,\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and\n // each one keeps deferring to `Table`'s own default.\n isStriped: undefined,\n isHoverable: undefined,\n density: undefined,\n isBare: undefined,\n selectionMode: SelectionModeToken.None,\n selection: undefined,\n defaultSelection: undefined,\n isRowSelectable: undefined,\n expanded: undefined,\n defaultExpanded: undefined,\n isRowExpandable: undefined,\n hasStickyHeader: false,\n isLoading: false,\n skeletonRows: undefined,\n loadingRowCount: undefined,\n containerClassName: undefined,\n phoneLayout: undefined,\n stackBreakpoint: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader clicks a sortable header, with the next sort or `null` once cleared. */\n 'update:sortBy': [sort: DataTableSort | null];\n\n /** Fires when the reader selects or deselects rows, with every selected row key. */\n 'update:selection': [keys: SelectionKey[]];\n\n /** Fires when the reader expands or collapses a row, with every expanded row key. */\n 'update:expanded': [keys: SelectionKey[]];\n}>();\n\nconst slots = defineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataTableColumn<T> }): unknown;\n /** Overrides a body cell. Falls back to the column's `cell`, then its `accessor`. */\n cell(props: { row: T; column: DataTableColumn<T>; index: number }): unknown;\n /** Overrides the empty-state content. Falls back to the `emptyContent` prop. */\n emptyContent(): unknown;\n /** The detail row under an expanded row; its presence adds the expand toggle column. */\n expanded?(props: { row: T; index: number }): unknown;\n /** Replaces the skeleton rows drawn while an empty table loads. */\n loading?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst tableId = useId();\n\nconst emptyText = computed(() => props.emptyContent ?? locale.t('DataTable.emptyContent', undefined, 'No results.'));\n\nconst { value: sort, setValue: setSort } = useControlled<DataTableSort | null>({\n controlled: () => props.sortBy,\n default: props.defaultSortBy ?? null,\n onChange: (next) => emit('update:sortBy', next),\n});\n\nconst { value: selectedKeys, setValue: setSelectedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.selection,\n default: props.defaultSelection ?? [],\n onChange: (next) => emit('update:selection', [...next]),\n});\n\nconst { value: expandedKeys, setValue: setExpandedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.expanded,\n default: props.defaultExpanded ?? [],\n onChange: (next) => emit('update:expanded', [...next]),\n});\n\n/** @internal The fixed end of a shift-click range — interaction state, never part of the model. */\nlet selectionAnchor: SelectionKey | null = null;\n\n/** @internal Whether the pointer press that toggles a row checkbox held Shift. */\nlet isRangeGesture = false;\n\n/** React seeded `isHoverable` from `!!onRowClick`; kept as an explicit fallback. */\nconst resolvedHoverable = computed(() => props.isHoverable ?? props.onRowClick != null);\n\nconst hasSelection = computed(() => props.selectionMode !== SelectionModeToken.None);\nconst hasExpansion = computed(() => slots.expanded !== undefined);\n\n/** Every body column, including the selection and expansion control columns. */\nconst columnCount = computed(() => props.columns.length + (hasSelection.value ? 1 : 0) + (hasExpansion.value ? 1 : 0));\n\nconst selectedLookup = computed(() => new Set(selectedKeys.value));\nconst expandedLookup = computed(() => new Set(expandedKeys.value));\n\n/** The rows with their stable keys, which come from the data order so sorting never changes them. */\nconst keyedRows = computed(() =>\n props.data.map((row, dataIndex) => ({\n row,\n dataIndex,\n key: props.rowKey ? props.rowKey(row, dataIndex) : dataIndex,\n })),\n);\n\nconst sortedRows = computed(() => {\n const active = sort.value;\n if (!active) return keyedRows.value;\n const column = props.columns.find((entry) => entry.key === active.columnKey);\n const accessor = column?.accessor;\n if (!accessor && !column?.compare) return keyedRows.value;\n return keyedRows.value\n .map((entry) => ({ entry, value: column?.compare ? undefined : accessor?.(entry.row) }))\n .sort((a, b) => {\n if (column?.compare) {\n const result = column.compare(a.entry.row, b.entry.row);\n return active.direction === SortDirection.Asc ? result : -result;\n }\n /* The shared foundation ordering: absent values land last in both directions, outside the flip. */\n const isLeftAbsent = isNullish(a.value);\n const isRightAbsent = isNullish(b.value);\n if (isLeftAbsent || isRightAbsent) return isLeftAbsent === isRightAbsent ? 0 : isLeftAbsent ? 1 : -1;\n const result = compareValues(a.value, b.value, { locale: locale.locale.value });\n return active.direction === SortDirection.Asc ? result : -result;\n })\n .map(({ entry }) => entry);\n});\n\nconst rows = computed(() =>\n sortedRows.value.map(({ row, key, dataIndex }, index) => {\n const isRowSelected = selectedLookup.value.has(key);\n return {\n key,\n row,\n index,\n isSelected: isRowSelected,\n isSelectable: hasSelection.value && (props.isRowSelectable?.(row, dataIndex) ?? true),\n isExpandable: hasExpansion.value && (props.isRowExpandable?.(row, dataIndex) ?? true),\n isExpanded: expandedLookup.value.has(key),\n detailId: `${tableId}-detail-${dataIndex}`,\n /* `onClick` only exists when a handler was supplied — React's `onClick={onRowClick ? … : undefined}`. */\n attrs: {\n ...(hasSelection.value\n ? { 'aria-selected': isRowSelected, 'data-selected': isRowSelected ? '' : undefined }\n : {}),\n ...(props.onRowClick\n ? {\n tabindex: 0,\n onClick: (event: MouseEvent): void => {\n if (event.defaultPrevented || (event.target as Element | null)?.closest('[data-row-control]')) return;\n props.onRowClick?.(row, index);\n },\n onKeydown: (event: KeyboardEvent): void => {\n if (\n event.target !== event.currentTarget ||\n event.defaultPrevented ||\n !['Enter', ' '].includes(event.key)\n )\n return;\n event.preventDefault();\n props.onRowClick?.(row, index);\n },\n }\n : {}),\n },\n class: cn(\n props.onRowClick &&\n 'cursor-pointer focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-2',\n isRowSelected && 'bg-primary-soft/40 hover:bg-primary-soft/60',\n ),\n };\n }),\n);\n\n/** The keys of every selectable row, in display order — the scope of select-all and shift ranges. */\nconst selectableKeys = computed(() => rows.value.filter((entry) => entry.isSelectable).map((entry) => entry.key));\n\n/** The header checkbox's tri-state over the selectable rows. */\nconst headerStatus = computed(() =>\n selectionStatus(createSelection(SelectionModeToken.Multiple, selectedKeys.value), selectableKeys.value),\n);\n\nconst skeletonRowKeys = computed(() => {\n const count = Math.round(props.skeletonRows ?? props.loadingRowCount ?? DefaultSkeletonRows);\n return Array.from({ length: Math.max(1, count || DefaultSkeletonRows) }, (_, index) => index);\n});\n\n/* A `DataRegion` first load draws placeholder rows whatever the data holds; on its own the table draws them while an\n empty table loads. */\nconst regionSkeleton = useSkeletonState();\nconst isShowingSkeleton = computed(\n () => regionSkeleton.isSkeleton.value || (props.isLoading && rows.value.length === 0),\n);\n\nfunction cycleSort(columnKey: string): void {\n const active = sort.value;\n if (!active || active.columnKey !== columnKey) {\n setSort({ columnKey, direction: SortDirection.Asc });\n } else if (active.direction === SortDirection.Asc) {\n setSort({ columnKey, direction: SortDirection.Desc });\n } else {\n setSort(null);\n }\n}\n\nfunction alignClass(align: DataTableColumn<T>['align']): string {\n if (align === DataTableColumnAlign.Right) return 'text-right';\n if (align === DataTableColumnAlign.Center) return 'text-center';\n return 'text-left';\n}\n\n/** A loading cell's bar width: the column's own, else a varied share of the cell. The cell's alignment places it. */\nfunction skeletonLineWidth(column: DataTableColumn<T>, row: number, position: number): string {\n return column.skeletonWidth ?? SkeletonLineWidths[(row + position) % SkeletonLineWidths.length]!;\n}\n\n/** The expand control's own box, drawn as its placeholder. */\nconst skeletonControlClass = computed(() =>\n cn('inline-flex size-6 rounded-sm align-middle', skeletonBoxClass(regionSkeleton.animation.value)),\n);\n\nconst headerCells = computed(() =>\n props.columns.map((column) => {\n const active = sort.value;\n const isSorted = active?.columnKey === column.key;\n return {\n key: column.key,\n column,\n isSorted,\n isAscending: isSorted && active?.direction === SortDirection.Asc,\n ariaSort: isSorted\n ? active?.direction === SortDirection.Asc\n ? 'ascending'\n : 'descending'\n : column.isSortable\n ? 'none'\n : undefined,\n style: column.width ? { width: column.width } : undefined,\n class: alignClass(column.align),\n };\n }),\n);\n\n/** The column's own renderer, then its accessor — the fallback under the `cell` slot. */\nfunction renderCell(column: DataTableColumn<T>, row: T, index: number): unknown {\n if (column.cell) return column.cell(row, index);\n if (column.accessor) return column.accessor(row);\n return null;\n}\n\n/*\n * Renders a cell value: VNodes (and arrays of them) mount as markup, everything else as its display string.\n * Interpolating a VNode instead would JSON-stringify it — which throws on the VNode's circular component link.\n */\nconst CellContent: FunctionalComponent<{ value: unknown }> = ({ value }): VNodeChild => {\n if (isVNode(value)) return value;\n if (Array.isArray(value) && value.length > 0 && value.every((item) => isVNode(item))) return value as VNodeChild;\n return toDisplayString(value);\n};\nCellContent.props = ['value'];\n\n/** The current selection as a model state, carrying the range anchor. */\nfunction selectionState(): SelectionState<SelectionKey> {\n return createSelection(props.selectionMode, selectedKeys.value, selectionAnchor);\n}\n\n/** Requests the next selection, keeping its anchor and emitting only a real change. */\nfunction commitSelection(next: SelectionState<SelectionKey>): void {\n selectionAnchor = next.anchor;\n const keys = [...next.keys];\n if (!sameKeys(keys, selectedKeys.value)) setSelectedKeys(keys);\n}\n\n/** Records whether the press about to toggle a row checkbox held Shift. */\nfunction rememberGesture(event: MouseEvent): void {\n isRangeGesture = event.shiftKey;\n}\n\n/** Toggles one row — a Shift press in multiple mode selects the range from the anchor. */\nfunction toggleRow(key: SelectionKey): void {\n const state = selectionState();\n const isRange = isRangeGesture && props.selectionMode === SelectionModeToken.Multiple;\n isRangeGesture = false;\n if (isRange) commitSelection(extendSelection(state, key, selectableKeys.value));\n else if (props.selectionMode === SelectionModeToken.Single)\n commitSelection(isSelected(state, key) ? deselect(state, key) : select(state, key));\n else commitSelection(toggle(state, key));\n}\n\n/** Selects every selectable row, or clears them when all are selected. */\nfunction toggleAllRows(): void {\n commitSelection(toggleAll(selectionState(), selectableKeys.value));\n}\n\n/** Expands a collapsed row or collapses an expanded one. */\nfunction toggleExpanded(key: SelectionKey): void {\n const next = new Set(expandedKeys.value);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n setExpandedKeys([...next]);\n}\n\n/** The expand chevron's classes — it points down once its row is expanded, and mirrors right to left. */\nfunction expandIconClass(isExpanded: boolean): string {\n return cn('size-4 transition-transform rtl:-scale-x-100', isExpanded && 'rotate-90 rtl:scale-x-100');\n}\n\nconst SortButtonClass =\n 'inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\nconst ExpandButtonClass =\n 'inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<template>\n <Table\n :is-striped=\"isStriped\"\n :is-hoverable=\"resolvedHoverable\"\n :density=\"density\"\n :is-bare=\"isBare\"\n :container-class-name=\"containerClassName\"\n :has-sticky-header=\"hasStickyHeader\"\n :phone-layout=\"phoneLayout\"\n :stack-breakpoint=\"stackBreakpoint\"\n :aria-busy=\"isLoading || isShowingSkeleton || undefined\"\n >\n <!-- The heading stays as it is through a first load; only the body draws placeholder rows. -->\n <TableHead>\n <TableRow>\n <TableHeaderCell v-if=\"hasExpansion\" class=\"w-10\">\n <span class=\"sr-only\">{{ locale.t('DataTable.expandColumn', undefined, 'Details') }}</span>\n </TableHeaderCell>\n <TableHeaderCell v-if=\"hasSelection\" class=\"w-10\" data-row-control>\n <CheckboxInput\n v-if=\"selectionMode === SelectionModeToken.Multiple\"\n size=\"sm\"\n :model-value=\"headerStatus === SelectionStatus.All\"\n :is-indeterminate=\"headerStatus === SelectionStatus.Some\"\n :is-disabled=\"selectableKeys.length === 0\"\n :is-skeleton=\"false\"\n :aria-label=\"locale.t('DataTable.selectAll', undefined, 'Select all rows')\"\n @update:model-value=\"toggleAllRows\"\n />\n <span v-else class=\"sr-only\">{{ locale.t('DataTable.selectColumn', undefined, 'Select') }}</span>\n </TableHeaderCell>\n <TableHeaderCell\n v-for=\"cell in headerCells\"\n :key=\"cell.key\"\n :aria-sort=\"cell.ariaSort\"\n :style=\"cell.style\"\n :class=\"cell.class\"\n >\n <button v-if=\"cell.column.isSortable\" type=\"button\" :class=\"SortButtonClass\" @click=\"cycleSort(cell.key)\">\n <span>\n <slot name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </span>\n <ArrowUp v-if=\"cell.isSorted && cell.isAscending\" class=\"h-3.5 w-3.5\" />\n <ArrowDown v-else-if=\"cell.isSorted\" class=\"h-3.5 w-3.5\" />\n <ArrowUpDown v-else class=\"h-3.5 w-3.5 opacity-50\" />\n </button>\n <slot v-else name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <template v-if=\"isShowingSkeleton\">\n <slot name=\"loading\">\n <TableRow v-for=\"index in skeletonRowKeys\" :key=\"`skeleton-${index}`\" data-skeleton-row>\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <span aria-hidden=\"true\" :class=\"skeletonControlClass\" />\n </TableCell>\n <TableCell v-if=\"hasSelection\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <CheckboxInput size=\"sm\" is-skeleton />\n </TableCell>\n <TableCell\n v-for=\"(column, position) in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <SkeletonStateLine is-skeleton :width=\"skeletonLineWidth(column, index, position)\" />\n </TableCell>\n </TableRow>\n </slot>\n </template>\n <template v-else-if=\"rows.length === 0\">\n <TableRow>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"py-8 text-center text-muted-foreground\">\n <slot name=\"emptyContent\">{{ emptyText }}</slot>\n </TableCell>\n </TableRow>\n </template>\n <template v-else>\n <template v-for=\"row in rows\" :key=\"row.key\">\n <TableRow v-bind=\"row.attrs\" :class=\"row.class\">\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <button\n v-if=\"row.isExpandable\"\n type=\"button\"\n :class=\"ExpandButtonClass\"\n :aria-expanded=\"row.isExpanded\"\n :aria-controls=\"row.isExpanded ? row.detailId : undefined\"\n :aria-label=\"\n row.isExpanded\n ? locale.t('DataTable.collapseRow', undefined, 'Hide details')\n : locale.t('DataTable.expandRow', undefined, 'Show details')\n \"\n @click=\"toggleExpanded(row.key)\"\n >\n <ChevronRight :class=\"expandIconClass(row.isExpanded)\" />\n </button>\n </TableCell>\n <TableCell\n v-if=\"hasSelection\"\n :class=\"StackedControlClass\"\n label=\"\"\n data-row-control\n @click.capture=\"rememberGesture\"\n >\n <CheckboxInput\n size=\"sm\"\n :model-value=\"row.isSelected\"\n :is-disabled=\"!row.isSelectable\"\n :aria-label=\"locale.t('DataTable.selectRow', undefined, 'Select row')\"\n @update:model-value=\"toggleRow(row.key)\"\n />\n </TableCell>\n <TableCell\n v-for=\"column in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <slot name=\"cell\" :row=\"row.row\" :column=\"column\" :index=\"row.index\"\n ><CellContent :value=\"renderCell(column, row.row, row.index)\"\n /></slot>\n </TableCell>\n </TableRow>\n <TableRow v-if=\"row.isExpandable && row.isExpanded\" :id=\"row.detailId\" data-detail-row>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"bg-muted/30\">\n <slot name=\"expanded\" :row=\"row.row\" :index=\"row.index\" />\n </TableCell>\n </TableRow>\n </template>\n </template>\n </TableBody>\n </Table>\n</template>\n"],"names":["_useSlots","SelectionModeToken","result","_createBlock","_unref","Table","_createVNode","TableHead","TableRow","TableHeaderCell","_createElementVNode","_toDisplayString","CheckboxInput","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeStyle","_normalizeClass","_renderSlot","TableBody","TableCell","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,KAAK;AAAA;AAAA,EAEL,MAAM;AACR;AAKO,MAAM,uBAAuB;AAAA;AAAA,EAElC,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,OAAO;AACT;AAqGA,MAAM,sBAAsB;AAG5B,MAAM,sBAAsB;AAG5B,MAAM,qBAAqB,CAAC,mBAAmB,kBAAkB,mBAAmB,iBAAiB;AAGrG,SAAS,SAAS,GAAgC,GAAyC;AACzF,MAAI,EAAE,WAAW,EAAE,OAAQ,QAAO;AAClC,QAAM,SAAS,IAAI,IAAI,CAAC;AACxB,SAAO,EAAE,MAAM,CAAC,QAAQ,OAAO,IAAI,GAAG,CAAC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,UAAM,QAAQ;AA2Bd,UAAM,OAAO;AAWb,UAAM,QAAQA,SAAA;AAad,UAAM,SAAS,UAAA;AACf,UAAM,UAAU,MAAA;AAEhB,UAAM,YAAY,SAAS,MAAM,MAAM,gBAAgB,OAAO,EAAE,0BAA0B,QAAW,aAAa,CAAC;AAEnH,UAAM,EAAE,OAAO,MAAM,UAAU,QAAA,IAAY,cAAoC;AAAA,MAC7E,YAAY,MAAM,MAAM;AAAA,MACxB,SAAS,MAAM,iBAAiB;AAAA,MAChC,UAAU,CAAC,SAAS,KAAK,iBAAiB,IAAI;AAAA,IAAA,CAC/C;AAED,UAAM,EAAE,OAAO,cAAc,UAAU,gBAAA,IAAoB,cAA2C;AAAA,MACpG,YAAY,M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AAO;AAAA,0BACZ,OAAO,OAAO,OAAO,MAAM;AAAA,0BAC3B,OAAKH,eAAE,WAAW,OAAO,KAAK,CAAA;AAAA,wBAAA;2CAE/B,MAES;AAAA,4BAFTC,WAES,KAAA,QAAA,QAAA;AAAA,8BAFU,KAAK,IAAI;AAAA,8BAAM;AAAA,8BAAiB,OAAO,IAAI;AAAA,4BAAA,GAA9D,MAES;AAAA,8BADNb,YACD,aAAA;AAAA,gCADe,OAAO,WAAW,QAAQ,IAAI,KAAK,IAAI,KAAK;AAAA,8BAAA;;;;;;;;;kBAIjD,IAAI,gBAAgB,IAAI,2BAAxCH,YAIWC,MAAAI,WAAA,GAAA;AAAA;oBAJ0C,IAAI,IAAI;AAAA,oBAAU,mBAAA;AAAA,kBAAA;qCACrE,MAEY;AAAA,sBAFZF,YAEYF,MAAAiB,WAAA,GAAA;AAAA,wBAFA,SAAS,YAAA;AAAA,wBAAa,OAAM;AAAA,wBAAG,OAAM;AAAA,sBAAA;yCAC/C,MAA0D;AAAA,0BAA1DF,WAA0D,KAAA,QAAA,YAAA;AAAA,4BAAnC,KAAK,IAAI;AAAA,4BAAM,OAAO,IAAI;AAAA,0BAAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"DataTable.vue.js","sources":["../../../../src/presentation/display/dataTable/DataTable.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { SelectionKey, SelectionMode } from '../../../foundation/selection';\nimport type { Breakpoint } from '../../layout/appShell/AppShell.vue';\nimport type { TableDensity, TablePhoneLayout } from '../table';\n\n/** Defines the sort order of a DataTable column. */\nexport const SortDirection = {\n /** Refers to ascending order. */\n Asc: 'asc',\n /** Refers to descending order. */\n Desc: 'desc',\n} as const;\n\nexport type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];\n\n/** Defines the horizontal text alignment of a DataTable column. */\nexport const DataTableColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type DataTableColumnAlign = (typeof DataTableColumnAlign)[keyof typeof DataTableColumnAlign];\n\nexport interface DataTableSort {\n readonly columnKey: string;\n readonly direction: SortDirection;\n}\n\nexport interface DataTableColumn<T> {\n readonly key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n readonly header: string | number;\n readonly accessor?: (row: T) => unknown;\n /**\n * The per-cell renderer — this column's rich override. Returns text, a number, a VNode (`h(Badge, …)`) or an\n * array of VNodes; any other value renders as its display string. The `cell` scoped slot overrides every\n * column at once.\n */\n readonly cell?: (row: T, index: number) => unknown;\n readonly isSortable?: boolean;\n /** Custom row comparison; takes precedence over accessor-based sorting. */\n readonly compare?: (left: T, right: T) => number;\n readonly align?: DataTableColumnAlign;\n readonly width?: string;\n /** The skeleton bar's width in this column, any CSS length; defaults to a varied share of the cell. */\n readonly skeletonWidth?: string;\n}\n\nexport interface DataTableProps<T> {\n readonly columns: ReadonlyArray<DataTableColumn<T>>;\n readonly data: ReadonlyArray<T>;\n readonly rowKey?: (row: T, index: number) => string | number;\n /**\n * Fires with the clicked row and its index.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * seeds `isHoverable` and the `cursor-pointer` class, and Vue strips declared\n * emit listeners out of `useAttrs()`.\n */\n readonly onRowClick?: (row: T, index: number) => void;\n readonly sortBy?: DataTableSort | null;\n readonly defaultSortBy?: DataTableSort | null;\n readonly isStriped?: boolean;\n readonly isHoverable?: boolean;\n readonly density?: TableDensity;\n readonly isBare?: boolean;\n /** The empty-state text. Default `No results.`; override richly via the `emptyContent` slot. */\n readonly emptyContent?: string | number;\n\n /** How many rows the reader may select. Default `none`; `single` and `multiple` add a checkbox column. */\n readonly selectionMode?: SelectionMode;\n\n /** The selected row keys, controlled. The `v-model:selection` binding target. */\n readonly selection?: ReadonlyArray<SelectionKey>;\n\n /** The initially selected row keys when uncontrolled. Default none. */\n readonly defaultSelection?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can be selected, given its data index. Default every row. */\n readonly isRowSelectable?: (row: T, index: number) => boolean;\n\n /** The expanded row keys, controlled. The `v-model:expanded` binding target. */\n readonly expanded?: ReadonlyArray<SelectionKey>;\n\n /** The initially expanded row keys when uncontrolled. Default none. */\n readonly defaultExpanded?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can expand when the `expanded` slot is set, given its data index. Default every row. */\n readonly isRowExpandable?: (row: T, index: number) => boolean;\n\n /** Whether the header row stays pinned while the body scrolls inside `containerClassName`'s height. */\n readonly hasStickyHeader?: boolean;\n\n /** Whether data is loading — marks the table busy and draws skeleton rows while it is empty. */\n readonly isLoading?: boolean;\n\n /** The skeleton rows drawn while an empty table loads or its `DataRegion` first-loads. Default 5. */\n readonly skeletonRows?: number;\n\n /** @deprecated Use `skeletonRows`; this alias is removed next release. */\n readonly loadingRowCount?: number;\n\n /** Classes for the scroll container — a height such as `max-h-96` lets a sticky header pin. */\n readonly containerClassName?: string;\n\n /**\n * The layout below `stackBreakpoint`. Default `stack`: one card per row, each value beside its column's `header`,\n * with the sort and select-all controls in a bar above. `scroll` keeps the table and scrolls it sideways.\n */\n readonly phoneLayout?: TablePhoneLayout;\n\n /** Rows stack into cards below this breakpoint. Default `md`. */\n readonly stackBreakpoint?: Breakpoint;\n}\n\n/** @internal A row-control cell when stacked: inline at the head of its card, with no label. */\nconst StackedControlClass = 'w-10 table-stacked:inline-flex table-stacked:w-auto';\n\n/** @internal The skeleton rows drawn while an empty table loads, when `skeletonRows` is not set. */\nconst DefaultSkeletonRows = 5;\n\n/** @internal Bar widths a loading cell cycles through, so placeholder rows read as varied text, not a grid of bars. */\nconst SkeletonLineWidths = ['min(75%, 12rem)', 'min(50%, 8rem)', 'min(83%, 14rem)', 'min(66%, 10rem)'] as const;\n\n/** @internal Whether two key lists hold the same members. */\nfunction sameKeys(a: ReadonlyArray<SelectionKey>, b: ReadonlyArray<SelectionKey>): boolean {\n if (a.length !== b.length) return false;\n const lookup = new Set(b);\n return a.every((key) => lookup.has(key));\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed, isVNode, toDisplayString, type FunctionalComponent, type VNodeChild } from 'vue';\nimport { useLocale } from '../../../foundation/i18n';\nimport { ArrowDown, ArrowUp, ArrowUpDown, ChevronRight } from 'lucide-vue-next';\nimport { useId } from '../../../foundation/identifiers';\nimport {\n compareValues,\n createSelection,\n deselect,\n extendSelection,\n isNullish,\n isSelected,\n select,\n selectionStatus,\n toggle,\n toggleAll,\n SelectionMode as SelectionModeToken,\n SelectionStatus,\n type SelectionState,\n} from '../../../foundation/selection';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport CheckboxInput from '../../forms/checkboxInput/CheckboxInput.vue';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { SkeletonStateLine } from '../../feedback/skeletonState/SkeletonStateLine';\nimport { skeletonBoxClass } from '../../feedback/skeletonState/SkeletonState.variants';\nimport { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '../table';\n\n/**\n * Renders a sortable table from a `columns` descriptor, wrapping the `Table` primitives, with optional row\n * selection, expandable detail rows, a pinned header and a loading state.\n *\n * `class` and `aria-label` reach the inner `<table>` by fallthrough, which is why this component keeps `inheritAttrs`\n * on.\n */\ndefineOptions({ name: 'DataTable' });\n\nconst props = withDefaults(defineProps<DataTableProps<T>>(), {\n rowKey: undefined,\n onRowClick: undefined,\n sortBy: undefined,\n defaultSortBy: undefined,\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and\n // each one keeps deferring to `Table`'s own default.\n isStriped: undefined,\n isHoverable: undefined,\n density: undefined,\n isBare: undefined,\n selectionMode: SelectionModeToken.None,\n selection: undefined,\n defaultSelection: undefined,\n isRowSelectable: undefined,\n expanded: undefined,\n defaultExpanded: undefined,\n isRowExpandable: undefined,\n hasStickyHeader: false,\n isLoading: false,\n skeletonRows: undefined,\n loadingRowCount: undefined,\n containerClassName: undefined,\n phoneLayout: undefined,\n stackBreakpoint: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader clicks a sortable header, with the next sort or `null` once cleared. */\n 'update:sortBy': [sort: DataTableSort | null];\n\n /** Fires when the reader selects or deselects rows, with every selected row key. */\n 'update:selection': [keys: SelectionKey[]];\n\n /** Fires when the reader expands or collapses a row, with every expanded row key. */\n 'update:expanded': [keys: SelectionKey[]];\n}>();\n\nconst slots = defineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataTableColumn<T> }): unknown;\n /** Overrides a body cell. Falls back to the column's `cell`, then its `accessor`. */\n cell(props: { row: T; column: DataTableColumn<T>; index: number }): unknown;\n /** Overrides the empty-state content. Falls back to the `emptyContent` prop. */\n emptyContent(): unknown;\n /** The detail row under an expanded row; its presence adds the expand toggle column. */\n expanded?(props: { row: T; index: number }): unknown;\n /** Replaces the skeleton rows drawn while an empty table loads. */\n loading?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst tableId = useId();\n\nconst emptyText = computed(() => props.emptyContent ?? locale.t('DataTable.emptyContent', undefined, 'No results.'));\n\nconst { value: sort, setValue: setSort } = useControlled<DataTableSort | null>({\n controlled: () => props.sortBy,\n default: props.defaultSortBy ?? null,\n onChange: (next) => emit('update:sortBy', next),\n});\n\nconst { value: selectedKeys, setValue: setSelectedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.selection,\n default: props.defaultSelection ?? [],\n onChange: (next) => emit('update:selection', [...next]),\n});\n\nconst { value: expandedKeys, setValue: setExpandedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.expanded,\n default: props.defaultExpanded ?? [],\n onChange: (next) => emit('update:expanded', [...next]),\n});\n\n/** @internal The fixed end of a shift-click range — interaction state, never part of the model. */\nlet selectionAnchor: SelectionKey | null = null;\n\n/** @internal Whether the pointer press that toggles a row checkbox held Shift. */\nlet isRangeGesture = false;\n\n/** React seeded `isHoverable` from `!!onRowClick`; kept as an explicit fallback. */\nconst resolvedHoverable = computed(() => props.isHoverable ?? props.onRowClick != null);\n\nconst hasSelection = computed(() => props.selectionMode !== SelectionModeToken.None);\nconst hasExpansion = computed(() => slots.expanded !== undefined);\n\n/** Every body column, including the selection and expansion control columns. */\nconst columnCount = computed(() => props.columns.length + (hasSelection.value ? 1 : 0) + (hasExpansion.value ? 1 : 0));\n\nconst selectedLookup = computed(() => new Set(selectedKeys.value));\nconst expandedLookup = computed(() => new Set(expandedKeys.value));\n\n/** The rows with their stable keys, which come from the data order so sorting never changes them. */\nconst keyedRows = computed(() =>\n props.data.map((row, dataIndex) => ({\n row,\n dataIndex,\n key: props.rowKey ? props.rowKey(row, dataIndex) : dataIndex,\n })),\n);\n\nconst sortedRows = computed(() => {\n const active = sort.value;\n if (!active) return keyedRows.value;\n const column = props.columns.find((entry) => entry.key === active.columnKey);\n const accessor = column?.accessor;\n if (!accessor && !column?.compare) return keyedRows.value;\n return keyedRows.value\n .map((entry) => ({ entry, value: column?.compare ? undefined : accessor?.(entry.row) }))\n .sort((a, b) => {\n if (column?.compare) {\n const result = column.compare(a.entry.row, b.entry.row);\n return active.direction === SortDirection.Asc ? result : -result;\n }\n /* The shared foundation ordering: absent values land last in both directions, outside the flip. */\n const isLeftAbsent = isNullish(a.value);\n const isRightAbsent = isNullish(b.value);\n if (isLeftAbsent || isRightAbsent) return isLeftAbsent === isRightAbsent ? 0 : isLeftAbsent ? 1 : -1;\n const result = compareValues(a.value, b.value, { locale: locale.locale.value });\n return active.direction === SortDirection.Asc ? result : -result;\n })\n .map(({ entry }) => entry);\n});\n\nconst rows = computed(() =>\n sortedRows.value.map(({ row, key, dataIndex }, index) => {\n const isRowSelected = selectedLookup.value.has(key);\n return {\n key,\n row,\n index,\n isSelected: isRowSelected,\n isSelectable: hasSelection.value && (props.isRowSelectable?.(row, dataIndex) ?? true),\n isExpandable: hasExpansion.value && (props.isRowExpandable?.(row, dataIndex) ?? true),\n isExpanded: expandedLookup.value.has(key),\n detailId: `${tableId}-detail-${dataIndex}`,\n /* `onClick` only exists when a handler was supplied — React's `onClick={onRowClick ? … : undefined}`. */\n attrs: {\n ...(hasSelection.value\n ? { 'aria-selected': isRowSelected, 'data-selected': isRowSelected ? '' : undefined }\n : {}),\n ...(props.onRowClick\n ? {\n tabindex: 0,\n onClick: (event: MouseEvent): void => {\n if (event.defaultPrevented || (event.target as Element | null)?.closest('[data-row-control]')) return;\n props.onRowClick?.(row, index);\n },\n onKeydown: (event: KeyboardEvent): void => {\n if (\n event.target !== event.currentTarget ||\n event.defaultPrevented ||\n !['Enter', ' '].includes(event.key)\n )\n return;\n event.preventDefault();\n props.onRowClick?.(row, index);\n },\n }\n : {}),\n },\n class: cn(\n props.onRowClick &&\n 'cursor-pointer focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-2',\n isRowSelected && 'bg-primary-soft/40 hover:bg-primary-soft/60',\n ),\n };\n }),\n);\n\n/** The keys of every selectable row, in display order — the scope of select-all and shift ranges. */\nconst selectableKeys = computed(() => rows.value.filter((entry) => entry.isSelectable).map((entry) => entry.key));\n\n/** The header checkbox's tri-state over the selectable rows. */\nconst headerStatus = computed(() =>\n selectionStatus(createSelection(SelectionModeToken.Multiple, selectedKeys.value), selectableKeys.value),\n);\n\nconst skeletonRowKeys = computed(() => {\n const count = Math.round(props.skeletonRows ?? props.loadingRowCount ?? DefaultSkeletonRows);\n return Array.from({ length: Math.max(1, count || DefaultSkeletonRows) }, (_, index) => index);\n});\n\n/* A `DataRegion` first load draws placeholder rows whatever the data holds; on its own the table draws them while an\n empty table loads. */\nconst regionSkeleton = useSkeletonState();\nconst isShowingSkeleton = computed(\n () => regionSkeleton.isSkeleton.value || (props.isLoading && rows.value.length === 0),\n);\n\nfunction cycleSort(columnKey: string): void {\n const active = sort.value;\n if (!active || active.columnKey !== columnKey) {\n setSort({ columnKey, direction: SortDirection.Asc });\n } else if (active.direction === SortDirection.Asc) {\n setSort({ columnKey, direction: SortDirection.Desc });\n } else {\n setSort(null);\n }\n}\n\nfunction alignClass(align: DataTableColumn<T>['align']): string {\n if (align === DataTableColumnAlign.Right) return 'text-right';\n if (align === DataTableColumnAlign.Center) return 'text-center';\n return 'text-left';\n}\n\n/** A loading cell's bar width: the column's own, else a varied share of the cell. The cell's alignment places it. */\nfunction skeletonLineWidth(column: DataTableColumn<T>, row: number, position: number): string {\n return column.skeletonWidth ?? SkeletonLineWidths[(row + position) % SkeletonLineWidths.length]!;\n}\n\n/** The expand control's own box, drawn as its placeholder. */\nconst skeletonControlClass = computed(() =>\n cn('inline-flex size-6 rounded-sm align-middle', skeletonBoxClass(regionSkeleton.animation.value)),\n);\n\nconst headerCells = computed(() =>\n props.columns.map((column) => {\n const active = sort.value;\n const isSorted = active?.columnKey === column.key;\n return {\n key: column.key,\n column,\n isSorted,\n isAscending: isSorted && active?.direction === SortDirection.Asc,\n ariaSort: isSorted\n ? active?.direction === SortDirection.Asc\n ? 'ascending'\n : 'descending'\n : column.isSortable\n ? 'none'\n : undefined,\n style: column.width ? { width: column.width } : undefined,\n class: alignClass(column.align),\n };\n }),\n);\n\n/** The column's own renderer, then its accessor — the fallback under the `cell` slot. */\nfunction renderCell(column: DataTableColumn<T>, row: T, index: number): unknown {\n if (column.cell) return column.cell(row, index);\n if (column.accessor) return column.accessor(row);\n return null;\n}\n\n/*\n * Renders a cell value: VNodes (and arrays of them) mount as markup, everything else as its display string.\n * Interpolating a VNode instead would JSON-stringify it — which throws on the VNode's circular component link.\n */\nconst CellContent: FunctionalComponent<{ value: unknown }> = ({ value }): VNodeChild => {\n if (isVNode(value)) return value;\n if (Array.isArray(value) && value.length > 0 && value.every((item) => isVNode(item))) return value as VNodeChild;\n return toDisplayString(value);\n};\nCellContent.props = ['value'];\n\n/** The current selection as a model state, carrying the range anchor. */\nfunction selectionState(): SelectionState<SelectionKey> {\n return createSelection(props.selectionMode, selectedKeys.value, selectionAnchor);\n}\n\n/** Requests the next selection, keeping its anchor and emitting only a real change. */\nfunction commitSelection(next: SelectionState<SelectionKey>): void {\n selectionAnchor = next.anchor;\n const keys = [...next.keys];\n if (!sameKeys(keys, selectedKeys.value)) setSelectedKeys(keys);\n}\n\n/** Records whether the press about to toggle a row checkbox held Shift. */\nfunction rememberGesture(event: MouseEvent): void {\n isRangeGesture = event.shiftKey;\n}\n\n/** Toggles one row — a Shift press in multiple mode selects the range from the anchor. */\nfunction toggleRow(key: SelectionKey): void {\n const state = selectionState();\n const isRange = isRangeGesture && props.selectionMode === SelectionModeToken.Multiple;\n isRangeGesture = false;\n if (isRange) commitSelection(extendSelection(state, key, selectableKeys.value));\n else if (props.selectionMode === SelectionModeToken.Single)\n commitSelection(isSelected(state, key) ? deselect(state, key) : select(state, key));\n else commitSelection(toggle(state, key));\n}\n\n/** Selects every selectable row, or clears them when all are selected. */\nfunction toggleAllRows(): void {\n commitSelection(toggleAll(selectionState(), selectableKeys.value));\n}\n\n/** Expands a collapsed row or collapses an expanded one. */\nfunction toggleExpanded(key: SelectionKey): void {\n const next = new Set(expandedKeys.value);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n setExpandedKeys([...next]);\n}\n\n/** The expand chevron's classes — it points down once its row is expanded, and mirrors right to left. */\nfunction expandIconClass(isExpanded: boolean): string {\n return cn('size-4 transition-transform rtl:-scale-x-100', isExpanded && 'rotate-90 rtl:scale-x-100');\n}\n\nconst SortButtonClass =\n 'inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\nconst ExpandButtonClass =\n 'inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<template>\n <Table\n :is-striped=\"isStriped\"\n :is-hoverable=\"resolvedHoverable\"\n :density=\"density\"\n :is-bare=\"isBare\"\n :container-class-name=\"containerClassName\"\n :has-sticky-header=\"hasStickyHeader\"\n :phone-layout=\"phoneLayout\"\n :stack-breakpoint=\"stackBreakpoint\"\n :aria-busy=\"isLoading || isShowingSkeleton || undefined\"\n >\n <!-- The heading stays as it is through a first load; only the body draws placeholder rows. -->\n <TableHead>\n <TableRow>\n <TableHeaderCell v-if=\"hasExpansion\" class=\"w-10\">\n <span class=\"sr-only\">{{ locale.t('DataTable.expandColumn', undefined, 'Details') }}</span>\n </TableHeaderCell>\n <TableHeaderCell v-if=\"hasSelection\" class=\"w-10\" data-row-control>\n <CheckboxInput\n v-if=\"selectionMode === SelectionModeToken.Multiple\"\n size=\"sm\"\n :model-value=\"headerStatus === SelectionStatus.All\"\n :is-indeterminate=\"headerStatus === SelectionStatus.Some\"\n :is-disabled=\"selectableKeys.length === 0\"\n :is-skeleton=\"false\"\n :aria-label=\"locale.t('DataTable.selectAll', undefined, 'Select all rows')\"\n @update:model-value=\"toggleAllRows\"\n />\n <span v-else class=\"sr-only\">{{ locale.t('DataTable.selectColumn', undefined, 'Select') }}</span>\n </TableHeaderCell>\n <TableHeaderCell\n v-for=\"cell in headerCells\"\n :key=\"cell.key\"\n :aria-sort=\"cell.ariaSort\"\n :style=\"cell.style\"\n :class=\"cell.class\"\n >\n <button v-if=\"cell.column.isSortable\" type=\"button\" :class=\"SortButtonClass\" @click=\"cycleSort(cell.key)\">\n <span>\n <slot name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </span>\n <ArrowUp v-if=\"cell.isSorted && cell.isAscending\" class=\"h-3.5 w-3.5\" />\n <ArrowDown v-else-if=\"cell.isSorted\" class=\"h-3.5 w-3.5\" />\n <ArrowUpDown v-else class=\"h-3.5 w-3.5 opacity-50\" />\n </button>\n <slot v-else name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <template v-if=\"isShowingSkeleton\">\n <slot name=\"loading\">\n <TableRow v-for=\"index in skeletonRowKeys\" :key=\"`skeleton-${index}`\" data-skeleton-row>\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <span aria-hidden=\"true\" :class=\"skeletonControlClass\" />\n </TableCell>\n <TableCell v-if=\"hasSelection\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <CheckboxInput size=\"sm\" is-skeleton />\n </TableCell>\n <TableCell\n v-for=\"(column, position) in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <SkeletonStateLine is-skeleton :width=\"skeletonLineWidth(column, index, position)\" />\n </TableCell>\n </TableRow>\n </slot>\n </template>\n <template v-else-if=\"rows.length === 0\">\n <TableRow>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"py-8 text-center text-muted-foreground\">\n <slot name=\"emptyContent\">{{ emptyText }}</slot>\n </TableCell>\n </TableRow>\n </template>\n <template v-else>\n <template v-for=\"row in rows\" :key=\"row.key\">\n <TableRow v-bind=\"row.attrs\" :class=\"row.class\">\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <button\n v-if=\"row.isExpandable\"\n type=\"button\"\n :class=\"ExpandButtonClass\"\n :aria-expanded=\"row.isExpanded\"\n :aria-controls=\"row.isExpanded ? row.detailId : undefined\"\n :aria-label=\"\n row.isExpanded\n ? locale.t('DataTable.collapseRow', undefined, 'Hide details')\n : locale.t('DataTable.expandRow', undefined, 'Show details')\n \"\n @click=\"toggleExpanded(row.key)\"\n >\n <ChevronRight :class=\"expandIconClass(row.isExpanded)\" />\n </button>\n </TableCell>\n <TableCell\n v-if=\"hasSelection\"\n :class=\"StackedControlClass\"\n label=\"\"\n data-row-control\n @click.capture=\"rememberGesture\"\n >\n <CheckboxInput\n size=\"sm\"\n :model-value=\"row.isSelected\"\n :is-disabled=\"!row.isSelectable\"\n :aria-label=\"locale.t('DataTable.selectRow', undefined, 'Select row')\"\n @update:model-value=\"toggleRow(row.key)\"\n />\n </TableCell>\n <TableCell\n v-for=\"column in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <slot name=\"cell\" :row=\"row.row\" :column=\"column\" :index=\"row.index\"\n ><CellContent :value=\"renderCell(column, row.row, row.index)\"\n /></slot>\n </TableCell>\n </TableRow>\n <TableRow v-if=\"row.isExpandable && row.isExpanded\" :id=\"row.detailId\" data-detail-row>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"bg-muted/30\">\n <slot name=\"expanded\" :row=\"row.row\" :index=\"row.index\" />\n </TableCell>\n </TableRow>\n </template>\n </template>\n </TableBody>\n </Table>\n</template>\n"],"names":["_useSlots","SelectionModeToken","result","_createBlock","_unref","Table","_createVNode","TableHead","TableRow","TableHeaderCell","_createElementVNode","_toDisplayString","CheckboxInput","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeStyle","_normalizeClass","_renderSlot","TableBody","TableCell","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,KAAK;AAAA;AAAA,EAEL,MAAM;AACR;AAKO,MAAM,uBAAuB;AAAA;AAAA,EAElC,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,OAAO;AACT;AAqGA,MAAM,sBAAsB;AAG5B,MAAM,sBAAsB;AAG5B,MAAM,qBAAqB,CAAC,mBAAmB,kBAAkB,mBAAmB,iBAAiB;AAGrG,SAAS,SAAS,GAAgC,GAAyC;AACzF,MAAI,EAAE,WAAW,EAAE,OAAQ,QAAO;AAClC,QAAM,SAAS,IAAI,IAAI,CAAC;AACxB,SAAO,EAAE,MAAM,CAAC,QAAQ,OAAO,IAAI,GAAG,CAAC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,UAAM,QAAQ;AA2Bd,UAAM,OAAO;AAWb,UAAM,QAAQA,SAAA;AAad,UAAM,SAAS,UAAA;AACf,UAAM,UAAU,MAAA;AAEhB,UAAM,YAAY,SAAS,MAAM,MAA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
1
|
import { AccountMenuProps } from '../../nav/accountMenu/AccountMenu.vue';
|
|
2
2
|
import { AppSwitcherItem, AppSwitcherMenuProps } from '../../nav/appSwitcherMenu/AppSwitcherMenu.vue';
|
|
3
|
+
import { HTMLAttributes } from 'vue';
|
|
4
|
+
import { SizeValue } from '../../../foundation/styles';
|
|
3
5
|
import { BreadcrumbItem } from '../../nav/breadcrumb/Breadcrumb.vue';
|
|
6
|
+
import { ContainerLayoutSize } from '../containerLayout/ContainerLayout.variants';
|
|
4
7
|
/** Defines how wide an `AppFrame` lets its page run. */
|
|
5
8
|
export declare const AppFrameContentWidth: {
|
|
6
9
|
/** Refers to the shared page column: the frame's gutter, capped at `--frame-content-max` and centred. */
|
|
@@ -38,7 +41,9 @@ export interface AppFrameProps {
|
|
|
38
41
|
*/
|
|
39
42
|
readonly onReload?: () => unknown;
|
|
40
43
|
/** The trail to the current place, the last item the place itself. Empty or omitted, the bar shows none. */
|
|
41
|
-
readonly crumbs?: ReadonlyArray<BreadcrumbItem>;
|
|
44
|
+
readonly crumbs?: ReadonlyArray<BreadcrumbItem | string>;
|
|
45
|
+
/** The trail landmark's accessible name. Default `"Breadcrumb"`, localized. */
|
|
46
|
+
readonly trailLabel?: string;
|
|
42
47
|
/**
|
|
43
48
|
* Opens a trail link through the app's router: a plain left click on a link whose `href` starts with `/` calls
|
|
44
49
|
* this instead of loading the page. Modified clicks keep the browser's behaviour.
|
|
@@ -78,6 +83,19 @@ export interface AppFrameProps {
|
|
|
78
83
|
readonly isCollapsedByDefault?: boolean;
|
|
79
84
|
/** How wide the page runs. Default `default`. */
|
|
80
85
|
readonly contentWidth?: AppFrameContentWidth;
|
|
86
|
+
/**
|
|
87
|
+
* The cap on the page column under `contentWidth="default"`: a `ContainerLayoutSize` step or any CSS length
|
|
88
|
+
* (number = px). Default `--frame-content-max`, 1536px — the width every app shares unless its pages need another.
|
|
89
|
+
*/
|
|
90
|
+
readonly contentMaxWidth?: ContainerLayoutSize | SizeValue;
|
|
91
|
+
/** Extra classes on the bar. */
|
|
92
|
+
readonly barClass?: HTMLAttributes['class'];
|
|
93
|
+
/** Extra classes on the sidebar. */
|
|
94
|
+
readonly sidebarClass?: HTMLAttributes['class'];
|
|
95
|
+
/** Extra classes on the scrolling main region. */
|
|
96
|
+
readonly mainClass?: HTMLAttributes['class'];
|
|
97
|
+
/** Extra classes on the page column; unused under `contentWidth="full"`, which renders none. */
|
|
98
|
+
readonly contentClass?: HTMLAttributes['class'];
|
|
81
99
|
/** The chrome's surface. Default `glass`. */
|
|
82
100
|
readonly variant?: AppFrameVariant;
|
|
83
101
|
/** The toggle's name while the desktop sidebar is open. Default `"Collapse sidebar"`, localized. */
|
|
@@ -88,6 +106,12 @@ export interface AppFrameProps {
|
|
|
88
106
|
readonly openNavigationLabel?: string;
|
|
89
107
|
/** The navigation drawer's accessible title. Default `"Navigation"`, localized. */
|
|
90
108
|
readonly navigationLabel?: string;
|
|
109
|
+
/** The version badge's tooltip; `{version}` is the shown version. Default `"Version {version}"`, localized. */
|
|
110
|
+
readonly versionLabel?: string;
|
|
111
|
+
/** The stale version badge's name; `{version}` is the loaded release, `{running}` the served one. Localized. */
|
|
112
|
+
readonly versionUpdateLabel?: string;
|
|
113
|
+
/** The skip link's text. Default `"Skip to content"`, localized. */
|
|
114
|
+
readonly skipToContentLabel?: string;
|
|
91
115
|
}
|
|
92
116
|
/** What the `brand` slot receives. */
|
|
93
117
|
export interface AppFrameBrandSlotProps {
|
|
@@ -108,6 +132,7 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<AppFramePr
|
|
|
108
132
|
isCollapsed: import('vue').Ref<boolean, boolean>;
|
|
109
133
|
toggleSidebar: () => void;
|
|
110
134
|
closeNavigation: () => void;
|
|
135
|
+
scrollToTop: () => void;
|
|
111
136
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
112
137
|
collapse: (isCollapsed: boolean) => any;
|
|
113
138
|
"update:locale": (locale: string) => any;
|
|
@@ -122,11 +147,15 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<AppFramePr
|
|
|
122
147
|
readonly variant: AppFrameVariant;
|
|
123
148
|
readonly version: string;
|
|
124
149
|
readonly locale: string;
|
|
150
|
+
readonly skipToContentLabel: string;
|
|
151
|
+
readonly barClass: string | false | Record<string, any> | import('vue').ClassValue[] | null;
|
|
125
152
|
readonly organization: string;
|
|
126
153
|
readonly runningVersion: string | null;
|
|
127
154
|
readonly onReload: () => unknown;
|
|
155
|
+
readonly contentClass: string | false | Record<string, any> | import('vue').ClassValue[] | null;
|
|
128
156
|
readonly apps: ReadonlyArray<AppSwitcherItem>;
|
|
129
|
-
readonly crumbs: ReadonlyArray<BreadcrumbItem>;
|
|
157
|
+
readonly crumbs: ReadonlyArray<BreadcrumbItem | string>;
|
|
158
|
+
readonly trailLabel: string;
|
|
130
159
|
readonly onNavigate: (href: string, event: MouseEvent) => unknown;
|
|
131
160
|
readonly currentApp: string;
|
|
132
161
|
readonly appLabel: string;
|
|
@@ -138,6 +167,11 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<AppFramePr
|
|
|
138
167
|
readonly collapseStorageKey: string;
|
|
139
168
|
readonly isCollapsedByDefault: boolean;
|
|
140
169
|
readonly contentWidth: AppFrameContentWidth;
|
|
170
|
+
readonly contentMaxWidth: ContainerLayoutSize | SizeValue;
|
|
171
|
+
readonly sidebarClass: string | false | Record<string, any> | import('vue').ClassValue[] | null;
|
|
172
|
+
readonly mainClass: string | false | Record<string, any> | import('vue').ClassValue[] | null;
|
|
173
|
+
readonly versionLabel: string;
|
|
174
|
+
readonly versionUpdateLabel: string;
|
|
141
175
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
142
176
|
/** The page. */
|
|
143
177
|
default?(): unknown;
|
|
@@ -145,6 +179,8 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<AppFramePr
|
|
|
145
179
|
brand?(props: AppFrameBrandSlotProps): unknown;
|
|
146
180
|
/** The sidebar's navigation — a `SidebarMenu` bound to `isRail`. Omitted, the frame has no sidebar. */
|
|
147
181
|
nav?(props: AppFrameNavSlotProps): unknown;
|
|
182
|
+
/** What stands at the sidebar's foot, under a hairline — a home link, a help link. */
|
|
183
|
+
'nav-footer'?(props: Pick<AppFrameNavSlotProps, "isRail">): unknown;
|
|
148
184
|
/** Controls between the toggle and the trail. */
|
|
149
185
|
'bar-start'?(): unknown;
|
|
150
186
|
/** Replaces the trail — a portal target, or a trail that carries a page's actions. */
|
|
@@ -64,6 +64,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
64
|
runningVersion: { default: void 0 },
|
|
65
65
|
onReload: { type: Function, default: void 0 },
|
|
66
66
|
crumbs: { default: () => [] },
|
|
67
|
+
trailLabel: { default: void 0 },
|
|
67
68
|
onNavigate: { type: Function, default: void 0 },
|
|
68
69
|
apps: { default: void 0 },
|
|
69
70
|
currentApp: { default: void 0 },
|
|
@@ -78,11 +79,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
79
|
collapseStorageKey: { default: DefaultCollapseStorageKey },
|
|
79
80
|
isCollapsedByDefault: { type: Boolean, default: false },
|
|
80
81
|
contentWidth: { default: AppFrameContentWidth.Default },
|
|
82
|
+
contentMaxWidth: { default: void 0 },
|
|
83
|
+
barClass: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
84
|
+
sidebarClass: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
85
|
+
mainClass: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
86
|
+
contentClass: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
81
87
|
variant: { default: AppFrameVariant.Glass },
|
|
82
88
|
collapseLabel: {},
|
|
83
89
|
expandLabel: {},
|
|
84
90
|
openNavigationLabel: {},
|
|
85
|
-
navigationLabel: {}
|
|
91
|
+
navigationLabel: {},
|
|
92
|
+
versionLabel: { default: void 0 },
|
|
93
|
+
versionUpdateLabel: { default: void 0 },
|
|
94
|
+
skipToContentLabel: { default: void 0 }
|
|
86
95
|
},
|
|
87
96
|
emits: ["update:accountOpen", "update:locale", "update:organization", "collapse"],
|
|
88
97
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -180,7 +189,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
180
189
|
});
|
|
181
190
|
const el = computed(() => shell.value?.el ?? null);
|
|
182
191
|
const mainEl = computed(() => main.value?.el ?? null);
|
|
183
|
-
|
|
192
|
+
function scrollToTop() {
|
|
193
|
+
mainEl.value?.scrollTo?.({ top: 0 });
|
|
194
|
+
}
|
|
195
|
+
const trail = computed(
|
|
196
|
+
() => props.crumbs.map((crumb) => typeof crumb === "string" ? { label: crumb } : crumb)
|
|
197
|
+
);
|
|
198
|
+
const trailAttrs = computed(() => props.trailLabel === void 0 ? {} : { "aria-label": props.trailLabel });
|
|
199
|
+
__expose({ el, mainEl, isRail, isCollapsed, toggleSidebar, closeNavigation, scrollToTop });
|
|
184
200
|
return (_ctx, _cache) => {
|
|
185
201
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
186
202
|
createVNode(_sfc_main$1, mergeProps({
|
|
@@ -194,13 +210,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
194
210
|
"sidebar-width": sidebarWidth.value,
|
|
195
211
|
navigation: navigation.value,
|
|
196
212
|
"sidebar-open": unref(isPhone) && isDrawerOpen.value,
|
|
213
|
+
"skip-to-content-label": unref(props).skipToContentLabel,
|
|
197
214
|
"onUpdate:sidebarOpen": setDrawerOpen
|
|
198
215
|
}), {
|
|
199
216
|
default: withCtx(() => [
|
|
200
217
|
createVNode(_sfc_main$2, {
|
|
201
218
|
height: "md",
|
|
202
219
|
variant: unref(props).variant,
|
|
203
|
-
class: normalizeClass(headerClasses),
|
|
220
|
+
class: normalizeClass([headerClasses, unref(props).barClass]),
|
|
204
221
|
"data-app-frame-bar": ""
|
|
205
222
|
}, {
|
|
206
223
|
default: withCtx(() => [
|
|
@@ -231,8 +248,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
231
248
|
key: 2,
|
|
232
249
|
version: unref(props).version,
|
|
233
250
|
"running-version": unref(props).runningVersion,
|
|
251
|
+
label: unref(props).versionLabel,
|
|
252
|
+
"update-label": unref(props).versionUpdateLabel,
|
|
234
253
|
onReload: reload
|
|
235
|
-
}, null, 8, ["version", "running-version"])) : createCommentVNode("", true)
|
|
254
|
+
}, null, 8, ["version", "running-version", "label", "update-label"])) : createCommentVNode("", true)
|
|
236
255
|
], 6)) : createCommentVNode("", true),
|
|
237
256
|
createElementVNode("div", _hoisted_2, [
|
|
238
257
|
!hasSidebar.value || unref(isPhone) ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
@@ -256,8 +275,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
256
275
|
key: 2,
|
|
257
276
|
version: unref(props).version,
|
|
258
277
|
"running-version": unref(props).runningVersion,
|
|
278
|
+
label: unref(props).versionLabel,
|
|
279
|
+
"update-label": unref(props).versionUpdateLabel,
|
|
259
280
|
onReload: reload
|
|
260
|
-
}, null, 8, ["version", "running-version"])) : createCommentVNode("", true)
|
|
281
|
+
}, null, 8, ["version", "running-version", "label", "update-label"])) : createCommentVNode("", true)
|
|
261
282
|
])) : createCommentVNode("", true),
|
|
262
283
|
hasToggle.value ? (openBlock(), createBlock(_sfc_main$5, {
|
|
263
284
|
key: 1,
|
|
@@ -282,13 +303,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
282
303
|
}, 8, ["aria-label", "aria-expanded", "title"])) : createCommentVNode("", true),
|
|
283
304
|
renderSlot(_ctx.$slots, "bar-start"),
|
|
284
305
|
renderSlot(_ctx.$slots, "trail", {}, () => [
|
|
285
|
-
|
|
306
|
+
trail.value.length > 0 ? (openBlock(), createBlock(_sfc_main$7, mergeProps({
|
|
286
307
|
key: 0,
|
|
287
|
-
items:
|
|
288
|
-
"is-single-line": ""
|
|
308
|
+
items: trail.value,
|
|
309
|
+
"is-single-line": ""
|
|
310
|
+
}, trailAttrs.value, {
|
|
289
311
|
class: "flex-1",
|
|
290
312
|
onClick: onTrailClick
|
|
291
|
-
}, null,
|
|
313
|
+
}), null, 16, ["items"])) : (openBlock(), createElementBlock("span", _hoisted_4))
|
|
292
314
|
]),
|
|
293
315
|
renderSlot(_ctx.$slots, "bar-end"),
|
|
294
316
|
renderSlot(_ctx.$slots, "account", {}, () => [
|
|
@@ -314,11 +336,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
314
336
|
])
|
|
315
337
|
]),
|
|
316
338
|
_: 3
|
|
317
|
-
}, 8, ["variant"]),
|
|
339
|
+
}, 8, ["variant", "class"]),
|
|
318
340
|
hasSidebar.value ? (openBlock(), createBlock(_sfc_main$9, {
|
|
319
341
|
key: 0,
|
|
320
342
|
variant: unref(props).variant,
|
|
321
|
-
class: normalizeClass([edgeClass.value, "print:hidden"])
|
|
343
|
+
class: normalizeClass([edgeClass.value, "print:hidden", unref(props).sidebarClass])
|
|
322
344
|
}, {
|
|
323
345
|
default: withCtx(() => [
|
|
324
346
|
createElementVNode("div", {
|
|
@@ -329,40 +351,48 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
329
351
|
isRail: isRail.value,
|
|
330
352
|
close: closeNavigation
|
|
331
353
|
})
|
|
332
|
-
])
|
|
354
|
+
]),
|
|
355
|
+
slots["nav-footer"] ? (openBlock(), createElementBlock("div", {
|
|
356
|
+
key: 0,
|
|
357
|
+
class: normalizeClass(["mt-2 shrink-0 border-t pt-2", edgeClass.value]),
|
|
358
|
+
"data-app-frame-nav-footer": "",
|
|
359
|
+
onClick: onNavClick
|
|
360
|
+
}, [
|
|
361
|
+
renderSlot(_ctx.$slots, "nav-footer", { isRail: isRail.value })
|
|
362
|
+
], 2)) : createCommentVNode("", true)
|
|
333
363
|
]),
|
|
334
364
|
_: 3
|
|
335
365
|
}, 8, ["variant", "class"])) : createCommentVNode("", true),
|
|
336
366
|
createVNode(_sfc_main$a, {
|
|
337
367
|
ref_key: "main",
|
|
338
368
|
ref: main,
|
|
339
|
-
class: "min-w-0 print:block print:overflow-visible"
|
|
369
|
+
class: normalizeClass(["min-w-0 print:block print:overflow-visible", unref(props).mainClass])
|
|
340
370
|
}, {
|
|
341
371
|
default: withCtx(() => [
|
|
342
372
|
unref(props).contentWidth === "default" ? (openBlock(), createBlock(_sfc_main$b, {
|
|
343
373
|
key: 0,
|
|
344
374
|
gutter: "lg",
|
|
345
|
-
"max-width": "var(--frame-content-max)",
|
|
346
|
-
class: "lg:px-6 xl:px-8 print:p-0 print:*:max-w-none"
|
|
375
|
+
"max-width": unref(props).contentMaxWidth ?? "var(--frame-content-max)",
|
|
376
|
+
class: normalizeClass(["lg:px-6 xl:px-8 print:p-0 print:*:max-w-none", unref(props).contentClass])
|
|
347
377
|
}, {
|
|
348
378
|
default: withCtx(() => [
|
|
349
379
|
renderSlot(_ctx.$slots, "notice"),
|
|
350
380
|
renderSlot(_ctx.$slots, "default")
|
|
351
381
|
]),
|
|
352
382
|
_: 3
|
|
353
|
-
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
383
|
+
}, 8, ["max-width", "class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
354
384
|
renderSlot(_ctx.$slots, "notice"),
|
|
355
385
|
renderSlot(_ctx.$slots, "default")
|
|
356
386
|
], 64))
|
|
357
387
|
]),
|
|
358
388
|
_: 3
|
|
359
|
-
},
|
|
389
|
+
}, 8, ["class"]),
|
|
360
390
|
hasPhoneNav.value && unref(isPhone) ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
361
391
|
renderSlot(_ctx.$slots, "phone-nav")
|
|
362
392
|
])) : createCommentVNode("", true)
|
|
363
393
|
]),
|
|
364
394
|
_: 3
|
|
365
|
-
}, 16, ["data-rail", "class", "sidebar-width", "navigation", "sidebar-open"]),
|
|
395
|
+
}, 16, ["data-rail", "class", "sidebar-width", "navigation", "sidebar-open", "skip-to-content-label"]),
|
|
366
396
|
hasSidebar.value && isTablet.value ? (openBlock(), createBlock(_sfc_main$c, {
|
|
367
397
|
key: 0,
|
|
368
398
|
open: isDrawerOpen.value,
|
|
@@ -389,7 +419,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
389
419
|
isRail: false,
|
|
390
420
|
close: closeNavigation
|
|
391
421
|
})
|
|
392
|
-
])
|
|
422
|
+
]),
|
|
423
|
+
slots["nav-footer"] ? (openBlock(), createElementBlock("div", {
|
|
424
|
+
key: 0,
|
|
425
|
+
class: normalizeClass(["mt-2 shrink-0 border-t pt-2", edgeClass.value]),
|
|
426
|
+
"data-app-frame-nav-footer": "",
|
|
427
|
+
onClick: onNavClick
|
|
428
|
+
}, [
|
|
429
|
+
renderSlot(_ctx.$slots, "nav-footer", { isRail: false })
|
|
430
|
+
], 2)) : createCommentVNode("", true)
|
|
393
431
|
]),
|
|
394
432
|
_: 3
|
|
395
433
|
}, 8, ["variant"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppFrame.vue.js","sources":["../../../../src/presentation/layout/appFrame/AppFrame.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { AccountMenuProps } from '../../nav/accountMenu/AccountMenu.vue';\nimport type { AppSwitcherItem, AppSwitcherMenuProps } from '../../nav/appSwitcherMenu/AppSwitcherMenu.vue';\nimport type { BreadcrumbItem } from '../../nav/breadcrumb/Breadcrumb.vue';\n\n/** Defines how wide an `AppFrame` lets its page run. */\nexport const AppFrameContentWidth = {\n /** Refers to the shared page column: the frame's gutter, capped at `--frame-content-max` and centred. */\n Default: 'default',\n /** Refers to a page that fills the main region edge to edge — an editor, a canvas, a map. */\n Full: 'full',\n} as const;\n\nexport type AppFrameContentWidth = (typeof AppFrameContentWidth)[keyof typeof AppFrameContentWidth];\n\n/** Defines the surface an `AppFrame` paints its chrome with. */\nexport const AppFrameVariant = {\n /** Refers to the theme's glass: a translucent bar and sidebar over the ambient backdrop. The default. */\n Glass: 'glass',\n /** Refers to opaque chrome on the card colour — a dense data tool or a print-first product. */\n Solid: 'solid',\n} as const;\n\nexport type AppFrameVariant = (typeof AppFrameVariant)[keyof typeof AppFrameVariant];\n\n/**\n * Who is signed in and what the account menu offers: every `AccountMenu` prop except the three the frame binds as\n * models (`open`, `locale`, `organization`).\n */\nexport type AppFrameAccount = Omit<AccountMenuProps, 'open' | 'defaultOpen' | 'locale' | 'organization'>;\n\n/** The app switcher's own strings and breakpoint, passed through to `AppSwitcherMenu`. */\nexport type AppFrameSwitcher = Pick<\n AppSwitcherMenuProps,\n 'title' | 'sitesLabel' | 'closeLabel' | 'newTabLabel' | 'triggerLabel' | 'breakpoint'\n>;\n\n/** Defines props for the frame every app renders its places inside. */\nexport interface AppFrameProps {\n /** The version this tab loaded, shown beside the brand — `0.15.4`, `0.15.4+abc1234` or `dev`. Omitted, no badge. */\n readonly version?: string;\n\n /** The version the host serves now, from `useRunningVersion`; when it differs the badge offers a reload. */\n readonly runningVersion?: string | null;\n\n /**\n * Fires when the reader asks for the newer release. Default reloads the page.\n *\n * Kept a PROP, not an emit: its presence replaces the built-in reload, and Vue strips a declared emit's listener\n * out of `useAttrs()`, so an emit could never be detected. Bind it as `@reload`.\n */\n readonly onReload?: () => unknown;\n\n /** The trail to the current place, the last item the place itself. Empty or omitted, the bar shows none. */\n readonly crumbs?: ReadonlyArray<BreadcrumbItem>;\n\n /**\n * Opens a trail link through the app's router: a plain left click on a link whose `href` starts with `/` calls\n * this instead of loading the page. Modified clicks keep the browser's behaviour.\n *\n * Kept a PROP, not an emit, for the reason `onReload` is. Bind it as `@navigate`.\n */\n readonly onNavigate?: (href: string, event: MouseEvent) => unknown;\n\n /** The suite's apps and sites. Given, the brand becomes the app switcher; omitted, the `brand` slot stands alone. */\n readonly apps?: ReadonlyArray<AppSwitcherItem>;\n\n /** The key of this app among `apps`. */\n readonly currentApp?: string;\n\n /** The app name on the switcher. Default the current app's label. */\n readonly appLabel?: string;\n\n /** The switcher's second line — the suite or the organization. */\n readonly appSubtitle?: string;\n\n /** The switcher's own strings and breakpoint. */\n readonly appSwitcher?: AppFrameSwitcher;\n\n /** The account menu that ends the bar. Omitted, the bar ends with the `account` slot, or with nothing. */\n readonly account?: AppFrameAccount;\n\n /** The account menu's open state, controlled. The `v-model:accountOpen` binding target. */\n readonly accountOpen?: boolean;\n\n /** The current interface language. The `v-model:locale` binding target. */\n readonly locale?: string;\n\n /** The current organization's id. The `v-model:organization` binding target. */\n readonly organization?: string;\n\n /**\n * Whether the frame has a sidebar. Default follows the `nav` slot; `false` drops the sidebar, the brand cell and the\n * toggle while the slot stays declared — an app whose navigation waits for a choice.\n */\n readonly hasNavigation?: boolean;\n\n /**\n * Where this browser remembers the desktop sidebar's collapse. Read once, when the frame is created. Default\n * `wow-two.app-frame.sidebar-collapsed`; an app that kept a key of its own passes it and keeps its readers' choice.\n */\n readonly collapseStorageKey?: string;\n\n /** Whether the desktop sidebar starts as the icon rail until the reader chooses. Default `false`. */\n readonly isCollapsedByDefault?: boolean;\n\n /** How wide the page runs. Default `default`. */\n readonly contentWidth?: AppFrameContentWidth;\n\n /** The chrome's surface. Default `glass`. */\n readonly variant?: AppFrameVariant;\n\n /** The toggle's name while the desktop sidebar is open. Default `\"Collapse sidebar\"`, localized. */\n readonly collapseLabel?: string;\n\n /** The toggle's name while the desktop sidebar is the rail. Default `\"Expand sidebar\"`, localized. */\n readonly expandLabel?: string;\n\n /** The toggle's name where it opens the navigation drawer. Default `\"Open navigation\"`, localized. */\n readonly openNavigationLabel?: string;\n\n /** The navigation drawer's accessible title. Default `\"Navigation\"`, localized. */\n readonly navigationLabel?: string;\n}\n\n/** What the `brand` slot receives. */\nexport interface AppFrameBrandSlotProps {\n /** True where only the mark fits: above the icon rail and in a phone's bar. */\n readonly isRail: boolean;\n}\n\n/** What the `nav` slot receives. */\nexport interface AppFrameNavSlotProps {\n /** True in the icon rail; false in the open sidebar and in the drawer. */\n readonly isRail: boolean;\n\n /** Closes the navigation drawer. A click on any link inside the slot already does. */\n readonly close: () => void;\n}\n\n/** @internal The default slot of the collapse choice in `localStorage`. */\nconst DefaultCollapseStorageKey = 'wow-two.app-frame.sidebar-collapsed';\n\n/** @internal Accepts only a stored boolean; anything else reads as the default. */\nfunction decodeCollapsed(stored: unknown): boolean | undefined {\n return typeof stored === 'boolean' ? stored : undefined;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUpdate, shallowRef, useAttrs, useSlots, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { PanelLeft } from 'lucide-vue-next';\nimport { TailwindBreakpoints, useBreakpointBelow, useBreakpointUp } from '../../../foundation/device';\nimport { dataAttr } from '../../../foundation/dom';\nimport { Icon } from '../../../foundation/icons';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { createPersistentRef } from '../../../foundation/storage';\nimport { cn, SurfaceVariant } from '../../../foundation/styles';\nimport Button from '../../actions/button/Button.vue';\nimport VersionBadge from '../../display/versionBadge/VersionBadge.vue';\nimport AccountMenu from '../../nav/accountMenu/AccountMenu.vue';\nimport AppSwitcherMenu from '../../nav/appSwitcherMenu/AppSwitcherMenu.vue';\nimport Breadcrumb from '../../nav/breadcrumb/Breadcrumb.vue';\nimport Drawer from '../../overlays/drawer/Drawer.vue';\nimport DrawerContent from '../../overlays/drawer/DrawerContent.vue';\nimport OverlayTitle from '../../overlays/OverlayTitle.vue';\nimport AppShell, { AppShellNavigation } from '../appShell/AppShell.vue';\nimport AppShellContent from '../appShell/AppShellContent.vue';\nimport AppShellHeader from '../appShell/AppShellHeader.vue';\nimport AppShellMain from '../appShell/AppShellMain.vue';\nimport AppShellSidebar from '../appShell/AppShellSidebar.vue';\n\n/**\n * Renders the frame every app shares: a 56px bar with the brand or app switcher and the version above the sidebar,\n * the sidebar toggle, the trail, the app's own bar controls and the account menu; a sidebar that collapses to an\n * icon rail and is remembered; and the page column. The dimensions are the `--frame-*` tokens and the edges are the\n * theme's glass hairlines, so two apps on two themes hold the same frame. An app passes its brand, its navigation,\n * its app list and its slots.\n */\ndefineOptions({ name: 'AppFrame', inheritAttrs: false });\n\nconst slots = defineSlots<{\n /** The page. */\n default?(): unknown;\n\n /** The brand: a home link around the wordmark, or the mark where `isRail`. With `apps`, the switcher's mark. */\n brand?(props: AppFrameBrandSlotProps): unknown;\n\n /** The sidebar's navigation — a `SidebarMenu` bound to `isRail`. Omitted, the frame has no sidebar. */\n nav?(props: AppFrameNavSlotProps): unknown;\n\n /** Controls between the toggle and the trail. */\n 'bar-start'?(): unknown;\n\n /** Replaces the trail — a portal target, or a trail that carries a page's actions. */\n trail?(): unknown;\n\n /** The app's own bar controls, before the account menu. */\n 'bar-end'?(): unknown;\n\n /** Replaces the account menu. */\n account?(): unknown;\n\n /** The account-level destinations inside the account menu — `MenuItem` rows. */\n 'account-items'?(): unknown;\n\n /** A phone's bottom bar, below `md`. Given, a phone has no drawer and the toggle hides there. */\n 'phone-nav'?(): unknown;\n\n /** What stands above every page — a notice, a connection banner. */\n notice?(): unknown;\n}>();\n\nconst componentProps = withDefaults(defineProps<AppFrameProps>(), {\n version: undefined,\n runningVersion: undefined,\n onReload: undefined,\n crumbs: () => [],\n onNavigate: undefined,\n apps: undefined,\n currentApp: undefined,\n appLabel: undefined,\n appSubtitle: undefined,\n appSwitcher: undefined,\n account: undefined,\n accountOpen: undefined,\n locale: undefined,\n organization: undefined,\n hasNavigation: undefined,\n collapseStorageKey: DefaultCollapseStorageKey,\n isCollapsedByDefault: false,\n contentWidth: AppFrameContentWidth.Default,\n variant: AppFrameVariant.Glass,\n});\n\nconst props = useLocaleDefaults(componentProps, 'AppFrame', {\n collapseLabel: 'Collapse sidebar',\n expandLabel: 'Expand sidebar',\n openNavigationLabel: 'Open navigation',\n navigationLabel: 'Navigation',\n});\n\nconst emit = defineEmits<{\n /** Fires when the account menu opens or closes — the `v-model:accountOpen` half. */\n 'update:accountOpen': [open: boolean];\n\n /** Fires when the reader picks another interface language — the `v-model:locale` half. */\n 'update:locale': [locale: string];\n\n /** Fires when the reader picks another organization — the `v-model:organization` half. */\n 'update:organization': [organization: string];\n\n /** Fires when the reader collapses or expands the desktop sidebar. */\n collapse: [isCollapsed: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst liveSlots = useSlots();\nconst shell = useTemplateRef<InstanceType<typeof AppShell>>('shell');\nconst main = useTemplateRef<InstanceType<typeof AppShellMain>>('main');\n\n/* Mobile-first on the server and in the first render: a phone until mounted, then the real viewport. */\nconst isPhone = useBreakpointBelow(TailwindBreakpoints, 'md');\nconst isDesktop = useBreakpointUp(TailwindBreakpoints, 'lg');\n\n/* The stored choice is read as the ref is created, so a collapsed sidebar never animates in from the open one. */\nconst isCollapsed = createPersistentRef<boolean>(props.collapseStorageKey, props.isCollapsedByDefault, {\n decode: decodeCollapsed,\n});\nconst isDrawerOpen = shallowRef(false);\n\n/* Slots are not reactive: their presence is read at setup and again before each update, so a slot an app adds or\n drops with `v-if` moves the layout in the same render. */\nconst hasNavSlot = shallowRef(Boolean(liveSlots['nav']));\nconst hasPhoneNav = shallowRef(Boolean(liveSlots['phone-nav']));\nonBeforeUpdate(() => {\n hasNavSlot.value = Boolean(liveSlots['nav']);\n hasPhoneNav.value = Boolean(liveSlots['phone-nav']);\n});\n\nconst hasSidebar = computed(() => props.hasNavigation ?? hasNavSlot.value);\n\n/** Between `md` and `lg`: the rail beside the page, the full navigation in a drawer. */\nconst isTablet = computed(() => !isPhone.value && !isDesktop.value);\n\n/** The sidebar shows as the icon rail: always on tablets, by choice on desktops. */\nconst isRail = computed(() => hasSidebar.value && !isPhone.value && (!isDesktop.value || isCollapsed.value));\n\n/** A phone with a bottom bar already holds its navigation, so the toggle has nothing to open there. */\nconst hasToggle = computed(() => hasSidebar.value && !(isPhone.value && hasPhoneNav.value));\n\nconst sidebarWidth = computed(() => (isRail.value ? 'var(--frame-rail-width)' : 'var(--frame-sidebar-width)'));\nconst navigation = computed(() => (hasSidebar.value ? AppShellNavigation.Vertical : AppShellNavigation.Horizontal));\n\nconst toggleLabel = computed(() => {\n if (!isDesktop.value) return props.openNavigationLabel;\n return isCollapsed.value ? props.expandLabel : props.collapseLabel;\n});\n\n/** Desktop: collapse or expand the sidebar. Tablet and phone: open the full navigation over the page. */\nfunction toggleSidebar(): void {\n if (isDesktop.value) {\n isCollapsed.value = !isCollapsed.value;\n emit('collapse', isCollapsed.value);\n } else {\n isDrawerOpen.value = true;\n }\n}\n\nfunction setDrawerOpen(open: boolean): void {\n isDrawerOpen.value = open;\n}\n\nfunction closeNavigation(): void {\n isDrawerOpen.value = false;\n}\n\n/* Growing to a desktop puts the sidebar back beside the page; a drawer left open would cover it. */\nwatch(isDesktop, (desktop) => {\n if (desktop) closeNavigation();\n});\n\n/** Picking a destination closes the drawer; the link itself navigates. */\nfunction onNavClick(event: MouseEvent): void {\n if ((event.target as Element | null)?.closest?.('a[href]')) closeNavigation();\n}\n\n/** Hands a plain left click on a same-origin trail link to the app's router. */\nfunction onTrailClick(event: MouseEvent): void {\n if (!props.onNavigate || event.defaultPrevented || event.button !== 0) return;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n const href = (event.target as Element | null)?.closest?.('a')?.getAttribute('href');\n if (!href || !href.startsWith('/') || href.startsWith('//')) return;\n event.preventDefault();\n props.onNavigate(href, event);\n}\n\nfunction reload(): void {\n if (props.onReload) props.onReload();\n else if (typeof window !== 'undefined') window.location.reload();\n}\n\nconst isGlass = computed(() => props.variant === AppFrameVariant.Glass);\n\n/* A glass frame's menus float over the page, so they take the theme's menu glass unless the caller chose. */\nconst menuVariant = computed(() => (isGlass.value ? SurfaceVariant.GlassMenu : undefined));\nconst accountProps = computed(() => ({ variant: menuVariant.value, ...props.account }));\nconst switcherProps = computed(() => ({ variant: menuVariant.value, ...props.appSwitcher }));\n\nconst shellClasses = computed(() =>\n cn(\n 'surface-ambient transition-[grid-template-columns] duration-200 ease-out motion-reduce:transition-none',\n 'print:block print:h-auto print:overflow-visible',\n attrs.class as ClassValue,\n ),\n);\n\n/* The bar is the token's height, hairline included, plus the device's top inset; its row fills what is left. */\nconst headerClasses =\n 'h-[calc(var(--frame-bar-height)+env(safe-area-inset-top,0px))] gap-0 px-0 pt-[env(safe-area-inset-top,0px)] print:hidden';\n\n/* A glass frame draws its lines in the theme's glass edge; a solid one in the border colour its bar already uses. */\nconst edgeClass = computed(() => (isGlass.value ? 'border-glass-edge' : 'border-border'));\n\nconst brandCellClasses = computed(() =>\n cn(\n 'flex shrink-0 items-center gap-2 overflow-hidden border-e',\n edgeClass.value,\n 'transition-[width] duration-200 ease-out motion-reduce:transition-none',\n isRail.value ? 'justify-center' : 'px-3',\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** The frame's root element. */\nconst el = computed(() => shell.value?.el ?? null);\n\n/** The scrolling main region — the element a caller scrolls back to its top. */\nconst mainEl = computed(() => main.value?.el ?? null);\n\ndefineExpose({ el, mainEl, isRail, isCollapsed, toggleSidebar, closeNavigation });\n</script>\n\n<template>\n <AppShell\n ref=\"shell\"\n data-app-frame\n :data-rail=\"dataAttr(isRail)\"\n v-bind=\"rest\"\n :class=\"shellClasses\"\n sidebar-breakpoint=\"md\"\n :sidebar-width=\"sidebarWidth\"\n :navigation=\"navigation\"\n :sidebar-open=\"isPhone && isDrawerOpen\"\n @update:sidebar-open=\"setDrawerOpen\"\n >\n <AppShellHeader height=\"md\" :variant=\"props.variant\" :class=\"headerClasses\" data-app-frame-bar>\n <div class=\"flex h-full w-full min-w-0 items-stretch\">\n <!-- From tablets up the brand sits above the sidebar, as wide as it, divided from the bar by a hairline. -->\n <div\n v-if=\"hasSidebar && !isPhone\"\n :class=\"brandCellClasses\"\n :style=\"{ width: sidebarWidth }\"\n data-app-frame-brand\n >\n <AppSwitcherMenu\n v-if=\"props.apps\"\n :items=\"props.apps\"\n :current=\"props.currentApp ?? ''\"\n :label=\"props.appLabel\"\n :subtitle=\"props.appSubtitle\"\n :is-compact=\"isRail\"\n v-bind=\"switcherProps\"\n class=\"shrink\"\n >\n <template v-if=\"slots.brand\" #mark><slot name=\"brand\" :is-rail=\"true\" /></template>\n </AppSwitcherMenu>\n <slot v-else name=\"brand\" :is-rail=\"isRail\" />\n <VersionBadge\n v-if=\"props.version && !isRail\"\n :version=\"props.version\"\n :running-version=\"props.runningVersion\"\n @reload=\"reload\"\n />\n </div>\n <div class=\"flex min-w-0 flex-1 items-center gap-2 px-3 sm:gap-3 sm:px-4 lg:px-6\" data-app-frame-row>\n <!-- A phone's bar, and a frame without a sidebar, carry the brand inline. -->\n <div v-if=\"!hasSidebar || isPhone\" class=\"flex shrink-0 items-center gap-2\" data-app-frame-brand>\n <AppSwitcherMenu\n v-if=\"props.apps\"\n :items=\"props.apps\"\n :current=\"props.currentApp ?? ''\"\n :label=\"props.appLabel\"\n :subtitle=\"props.appSubtitle\"\n :is-compact=\"isPhone\"\n v-bind=\"switcherProps\"\n >\n <template v-if=\"slots.brand\" #mark><slot name=\"brand\" :is-rail=\"true\" /></template>\n </AppSwitcherMenu>\n <slot v-else name=\"brand\" :is-rail=\"isPhone\" />\n <VersionBadge\n v-if=\"props.version && !isPhone\"\n :version=\"props.version\"\n :running-version=\"props.runningVersion\"\n @reload=\"reload\"\n />\n </div>\n <Button\n v-if=\"hasToggle\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"md\"\n shape=\"square\"\n class=\"shrink-0\"\n data-app-frame-toggle\n :aria-label=\"toggleLabel\"\n :aria-expanded=\"isDesktop ? !isCollapsed : isDrawerOpen\"\n :title=\"toggleLabel\"\n @click=\"toggleSidebar\"\n >\n <Icon :icon=\"PanelLeft\" :size=\"18\" />\n </Button>\n <slot name=\"bar-start\" />\n <slot name=\"trail\">\n <Breadcrumb\n v-if=\"props.crumbs.length > 0\"\n :items=\"props.crumbs\"\n is-single-line\n class=\"flex-1\"\n @click=\"onTrailClick\"\n />\n <span v-else class=\"flex-1\" />\n </slot>\n <slot name=\"bar-end\" />\n <slot name=\"account\">\n <AccountMenu\n v-if=\"props.account\"\n v-bind=\"accountProps\"\n :open=\"props.accountOpen\"\n :locale=\"props.locale\"\n :organization=\"props.organization\"\n class=\"shrink-0\"\n @update:open=\"emit('update:accountOpen', $event)\"\n @update:locale=\"emit('update:locale', $event)\"\n @update:organization=\"emit('update:organization', $event)\"\n >\n <template v-if=\"slots['account-items']\" #items><slot name=\"account-items\" /></template>\n </AccountMenu>\n </slot>\n </div>\n </div>\n </AppShellHeader>\n <AppShellSidebar v-if=\"hasSidebar\" :variant=\"props.variant\" :class=\"[edgeClass, 'print:hidden']\">\n <div class=\"flex min-h-0 flex-1 flex-col\" @click=\"onNavClick\">\n <slot name=\"nav\" :is-rail=\"isRail\" :close=\"closeNavigation\" />\n </div>\n </AppShellSidebar>\n <AppShellMain ref=\"main\" class=\"min-w-0 print:block print:overflow-visible\">\n <AppShellContent\n v-if=\"props.contentWidth === 'default'\"\n gutter=\"lg\"\n max-width=\"var(--frame-content-max)\"\n class=\"lg:px-6 xl:px-8 print:p-0 print:*:max-w-none\"\n >\n <slot name=\"notice\" />\n <slot />\n </AppShellContent>\n <template v-else>\n <slot name=\"notice\" />\n <slot />\n </template>\n </AppShellMain>\n <div v-if=\"hasPhoneNav && isPhone\" class=\"z-sticky [grid-area:footer] print:hidden\" data-app-frame-phone-nav>\n <slot name=\"phone-nav\" />\n </div>\n </AppShell>\n <!-- A tablet keeps the rail beside the page; the full navigation opens over it. -->\n <Drawer v-if=\"hasSidebar && isTablet\" :open=\"isDrawerOpen\" side=\"left\" @update:open=\"setDrawerOpen\">\n <DrawerContent class=\"w-72 max-w-[80%]\" :variant=\"menuVariant\">\n <OverlayTitle class=\"sr-only\">{{ props.navigationLabel }}</OverlayTitle>\n <div class=\"flex min-h-0 flex-1 flex-col\" @click=\"onNavClick\">\n <slot name=\"nav\" :is-rail=\"false\" :close=\"closeNavigation\" />\n </div>\n </DrawerContent>\n </Drawer>\n</template>\n"],"names":["_useSlots","_createVNode","AppShell","_mergeProps","_unref","AppShellHeader","_createElementVNode","_createElementBlock","_openBlock","_createBlock","AppSwitcherMenu","_createSlots","_renderSlot","VersionBadge","Button","Icon","Breadcrumb","AccountMenu","AppShellSidebar","AppShellMain","AppShellContent","_Fragment","Drawer","DrawerContent","OverlayTitle","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,uBAAuB;AAAA;AAAA,EAElC,SAAS;AAAA;AAAA,EAET,MAAM;AACR;AAKO,MAAM,kBAAkB;AAAA;AAAA,EAE7B,OAAO;AAAA;AAAA,EAEP,OAAO;AACT;AAwHA,MAAM,4BAA4B;AAGlC,SAAS,gBAAgB,QAAsC;AAC7D,SAAO,OAAO,WAAW,YAAY,SAAS;AAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,UAAM,QAAQA,SAAA;AAgCd,UAAM,iBAAiB;AAsBvB,UAAM,QAAQ,kBAAkB,gBAAgB,YAAY;AAAA,MAC1D,eAAe;AAAA,MACf,aAAa;AAAA,MACb,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,IAAA,CAClB;AAED,UAAM,OAAO;AAcb,UAAM,QAAQ,SAAA;AACd,UAAM,YAAY,SAAA;AAClB,UAAM,QAAQ,eAA8C,OAAO;AACnE,UAAM,OAAO,eAAkD,MAAM;AAGrE,UAAM,UAAU,mBAAmB,qBAAqB,IAAI;AAC5D,UAAM,YAAY,gBAAgB,qBAAqB,IAAI;AAG3D,UAAM,cAAc,oBAA6B,MAAM,oBAAoB,MAAM,sBAAsB;AAAA,MACrG,QAAQ;AAAA,IAAA,CACT;AACD,UAAM,eAAe,WAAW,KAAK;AAIrC,UAAM,aAAa,WAAW,QAAQ,UAAU,KAAK,CAAC,CAAC;AACvD,UAAM,cAAc,WAAW,QAAQ,UAAU,WAAW,CAAC,CAAC;AAC9D,m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gBAAAtB,MAAA,KAAA,EAAM,eAAe,GAAA,CAAA;AAAA,kBAAA;;;gBACtDE,mBAEM,OAAA;AAAA,kBAFD,OAAM;AAAA,kBAAgC,SAAO;AAAA,gBAAA;kBAChDM,WAA6D,KAAA,QAAA,OAAA;AAAA,oBAA3C,QAAS;AAAA,oBAAQ,OAAO;AAAA,kBAAA;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"AppFrame.vue.js","sources":["../../../../src/presentation/layout/appFrame/AppFrame.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { AccountMenuProps } from '../../nav/accountMenu/AccountMenu.vue';\nimport type { AppSwitcherItem, AppSwitcherMenuProps } from '../../nav/appSwitcherMenu/AppSwitcherMenu.vue';\nimport type { HTMLAttributes } from 'vue';\nimport type { SizeValue } from '../../../foundation/styles';\nimport type { BreadcrumbItem } from '../../nav/breadcrumb/Breadcrumb.vue';\nimport type { ContainerLayoutSize } from '../containerLayout/ContainerLayout.variants';\n\n/** Defines how wide an `AppFrame` lets its page run. */\nexport const AppFrameContentWidth = {\n /** Refers to the shared page column: the frame's gutter, capped at `--frame-content-max` and centred. */\n Default: 'default',\n /** Refers to a page that fills the main region edge to edge — an editor, a canvas, a map. */\n Full: 'full',\n} as const;\n\nexport type AppFrameContentWidth = (typeof AppFrameContentWidth)[keyof typeof AppFrameContentWidth];\n\n/** Defines the surface an `AppFrame` paints its chrome with. */\nexport const AppFrameVariant = {\n /** Refers to the theme's glass: a translucent bar and sidebar over the ambient backdrop. The default. */\n Glass: 'glass',\n /** Refers to opaque chrome on the card colour — a dense data tool or a print-first product. */\n Solid: 'solid',\n} as const;\n\nexport type AppFrameVariant = (typeof AppFrameVariant)[keyof typeof AppFrameVariant];\n\n/**\n * Who is signed in and what the account menu offers: every `AccountMenu` prop except the three the frame binds as\n * models (`open`, `locale`, `organization`).\n */\nexport type AppFrameAccount = Omit<AccountMenuProps, 'open' | 'defaultOpen' | 'locale' | 'organization'>;\n\n/** The app switcher's own strings and breakpoint, passed through to `AppSwitcherMenu`. */\nexport type AppFrameSwitcher = Pick<\n AppSwitcherMenuProps,\n 'title' | 'sitesLabel' | 'closeLabel' | 'newTabLabel' | 'triggerLabel' | 'breakpoint'\n>;\n\n/** Defines props for the frame every app renders its places inside. */\nexport interface AppFrameProps {\n /** The version this tab loaded, shown beside the brand — `0.15.4`, `0.15.4+abc1234` or `dev`. Omitted, no badge. */\n readonly version?: string;\n\n /** The version the host serves now, from `useRunningVersion`; when it differs the badge offers a reload. */\n readonly runningVersion?: string | null;\n\n /**\n * Fires when the reader asks for the newer release. Default reloads the page.\n *\n * Kept a PROP, not an emit: its presence replaces the built-in reload, and Vue strips a declared emit's listener\n * out of `useAttrs()`, so an emit could never be detected. Bind it as `@reload`.\n */\n readonly onReload?: () => unknown;\n\n /** The trail to the current place, the last item the place itself. Empty or omitted, the bar shows none. */\n readonly crumbs?: ReadonlyArray<BreadcrumbItem | string>;\n\n /** The trail landmark's accessible name. Default `\"Breadcrumb\"`, localized. */\n readonly trailLabel?: string;\n\n /**\n * Opens a trail link through the app's router: a plain left click on a link whose `href` starts with `/` calls\n * this instead of loading the page. Modified clicks keep the browser's behaviour.\n *\n * Kept a PROP, not an emit, for the reason `onReload` is. Bind it as `@navigate`.\n */\n readonly onNavigate?: (href: string, event: MouseEvent) => unknown;\n\n /** The suite's apps and sites. Given, the brand becomes the app switcher; omitted, the `brand` slot stands alone. */\n readonly apps?: ReadonlyArray<AppSwitcherItem>;\n\n /** The key of this app among `apps`. */\n readonly currentApp?: string;\n\n /** The app name on the switcher. Default the current app's label. */\n readonly appLabel?: string;\n\n /** The switcher's second line — the suite or the organization. */\n readonly appSubtitle?: string;\n\n /** The switcher's own strings and breakpoint. */\n readonly appSwitcher?: AppFrameSwitcher;\n\n /** The account menu that ends the bar. Omitted, the bar ends with the `account` slot, or with nothing. */\n readonly account?: AppFrameAccount;\n\n /** The account menu's open state, controlled. The `v-model:accountOpen` binding target. */\n readonly accountOpen?: boolean;\n\n /** The current interface language. The `v-model:locale` binding target. */\n readonly locale?: string;\n\n /** The current organization's id. The `v-model:organization` binding target. */\n readonly organization?: string;\n\n /**\n * Whether the frame has a sidebar. Default follows the `nav` slot; `false` drops the sidebar, the brand cell and the\n * toggle while the slot stays declared — an app whose navigation waits for a choice.\n */\n readonly hasNavigation?: boolean;\n\n /**\n * Where this browser remembers the desktop sidebar's collapse. Read once, when the frame is created. Default\n * `wow-two.app-frame.sidebar-collapsed`; an app that kept a key of its own passes it and keeps its readers' choice.\n */\n readonly collapseStorageKey?: string;\n\n /** Whether the desktop sidebar starts as the icon rail until the reader chooses. Default `false`. */\n readonly isCollapsedByDefault?: boolean;\n\n /** How wide the page runs. Default `default`. */\n readonly contentWidth?: AppFrameContentWidth;\n\n /**\n * The cap on the page column under `contentWidth=\"default\"`: a `ContainerLayoutSize` step or any CSS length\n * (number = px). Default `--frame-content-max`, 1536px — the width every app shares unless its pages need another.\n */\n readonly contentMaxWidth?: ContainerLayoutSize | SizeValue;\n\n /** Extra classes on the bar. */\n readonly barClass?: HTMLAttributes['class'];\n\n /** Extra classes on the sidebar. */\n readonly sidebarClass?: HTMLAttributes['class'];\n\n /** Extra classes on the scrolling main region. */\n readonly mainClass?: HTMLAttributes['class'];\n\n /** Extra classes on the page column; unused under `contentWidth=\"full\"`, which renders none. */\n readonly contentClass?: HTMLAttributes['class'];\n\n /** The chrome's surface. Default `glass`. */\n readonly variant?: AppFrameVariant;\n\n /** The toggle's name while the desktop sidebar is open. Default `\"Collapse sidebar\"`, localized. */\n readonly collapseLabel?: string;\n\n /** The toggle's name while the desktop sidebar is the rail. Default `\"Expand sidebar\"`, localized. */\n readonly expandLabel?: string;\n\n /** The toggle's name where it opens the navigation drawer. Default `\"Open navigation\"`, localized. */\n readonly openNavigationLabel?: string;\n\n /** The navigation drawer's accessible title. Default `\"Navigation\"`, localized. */\n readonly navigationLabel?: string;\n\n /** The version badge's tooltip; `{version}` is the shown version. Default `\"Version {version}\"`, localized. */\n readonly versionLabel?: string;\n\n /** The stale version badge's name; `{version}` is the loaded release, `{running}` the served one. Localized. */\n readonly versionUpdateLabel?: string;\n\n /** The skip link's text. Default `\"Skip to content\"`, localized. */\n readonly skipToContentLabel?: string;\n}\n\n/** What the `brand` slot receives. */\nexport interface AppFrameBrandSlotProps {\n /** True where only the mark fits: above the icon rail and in a phone's bar. */\n readonly isRail: boolean;\n}\n\n/** What the `nav` slot receives. */\nexport interface AppFrameNavSlotProps {\n /** True in the icon rail; false in the open sidebar and in the drawer. */\n readonly isRail: boolean;\n\n /** Closes the navigation drawer. A click on any link inside the slot already does. */\n readonly close: () => void;\n}\n\n/** @internal The default slot of the collapse choice in `localStorage`. */\nconst DefaultCollapseStorageKey = 'wow-two.app-frame.sidebar-collapsed';\n\n/** @internal Accepts only a stored boolean; anything else reads as the default. */\nfunction decodeCollapsed(stored: unknown): boolean | undefined {\n return typeof stored === 'boolean' ? stored : undefined;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUpdate, shallowRef, useAttrs, useSlots, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { PanelLeft } from 'lucide-vue-next';\nimport { TailwindBreakpoints, useBreakpointBelow, useBreakpointUp } from '../../../foundation/device';\nimport { dataAttr } from '../../../foundation/dom';\nimport { Icon } from '../../../foundation/icons';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { createPersistentRef } from '../../../foundation/storage';\nimport { cn, SurfaceVariant } from '../../../foundation/styles';\nimport Button from '../../actions/button/Button.vue';\nimport VersionBadge from '../../display/versionBadge/VersionBadge.vue';\nimport AccountMenu from '../../nav/accountMenu/AccountMenu.vue';\nimport AppSwitcherMenu from '../../nav/appSwitcherMenu/AppSwitcherMenu.vue';\nimport Breadcrumb from '../../nav/breadcrumb/Breadcrumb.vue';\nimport Drawer from '../../overlays/drawer/Drawer.vue';\nimport DrawerContent from '../../overlays/drawer/DrawerContent.vue';\nimport OverlayTitle from '../../overlays/OverlayTitle.vue';\nimport AppShell, { AppShellNavigation } from '../appShell/AppShell.vue';\nimport AppShellContent from '../appShell/AppShellContent.vue';\nimport AppShellHeader from '../appShell/AppShellHeader.vue';\nimport AppShellMain from '../appShell/AppShellMain.vue';\nimport AppShellSidebar from '../appShell/AppShellSidebar.vue';\n\n/**\n * Renders the frame every app shares: a 56px bar with the brand or app switcher and the version above the sidebar,\n * the sidebar toggle, the trail, the app's own bar controls and the account menu; a sidebar that collapses to an\n * icon rail and is remembered; and the page column. The dimensions are the `--frame-*` tokens and the edges are the\n * theme's glass hairlines, so two apps on two themes hold the same frame. An app passes its brand, its navigation,\n * its app list and its slots.\n */\ndefineOptions({ name: 'AppFrame', inheritAttrs: false });\n\nconst slots = defineSlots<{\n /** The page. */\n default?(): unknown;\n\n /** The brand: a home link around the wordmark, or the mark where `isRail`. With `apps`, the switcher's mark. */\n brand?(props: AppFrameBrandSlotProps): unknown;\n\n /** The sidebar's navigation — a `SidebarMenu` bound to `isRail`. Omitted, the frame has no sidebar. */\n nav?(props: AppFrameNavSlotProps): unknown;\n\n /** What stands at the sidebar's foot, under a hairline — a home link, a help link. */\n 'nav-footer'?(props: Pick<AppFrameNavSlotProps, 'isRail'>): unknown;\n\n /** Controls between the toggle and the trail. */\n 'bar-start'?(): unknown;\n\n /** Replaces the trail — a portal target, or a trail that carries a page's actions. */\n trail?(): unknown;\n\n /** The app's own bar controls, before the account menu. */\n 'bar-end'?(): unknown;\n\n /** Replaces the account menu. */\n account?(): unknown;\n\n /** The account-level destinations inside the account menu — `MenuItem` rows. */\n 'account-items'?(): unknown;\n\n /** A phone's bottom bar, below `md`. Given, a phone has no drawer and the toggle hides there. */\n 'phone-nav'?(): unknown;\n\n /** What stands above every page — a notice, a connection banner. */\n notice?(): unknown;\n}>();\n\nconst componentProps = withDefaults(defineProps<AppFrameProps>(), {\n version: undefined,\n runningVersion: undefined,\n onReload: undefined,\n crumbs: () => [],\n onNavigate: undefined,\n apps: undefined,\n currentApp: undefined,\n appLabel: undefined,\n appSubtitle: undefined,\n appSwitcher: undefined,\n account: undefined,\n accountOpen: undefined,\n locale: undefined,\n organization: undefined,\n hasNavigation: undefined,\n collapseStorageKey: DefaultCollapseStorageKey,\n isCollapsedByDefault: false,\n contentWidth: AppFrameContentWidth.Default,\n contentMaxWidth: undefined,\n barClass: undefined,\n sidebarClass: undefined,\n mainClass: undefined,\n contentClass: undefined,\n trailLabel: undefined,\n versionLabel: undefined,\n versionUpdateLabel: undefined,\n skipToContentLabel: undefined,\n variant: AppFrameVariant.Glass,\n});\n\nconst props = useLocaleDefaults(componentProps, 'AppFrame', {\n collapseLabel: 'Collapse sidebar',\n expandLabel: 'Expand sidebar',\n openNavigationLabel: 'Open navigation',\n navigationLabel: 'Navigation',\n});\n\nconst emit = defineEmits<{\n /** Fires when the account menu opens or closes — the `v-model:accountOpen` half. */\n 'update:accountOpen': [open: boolean];\n\n /** Fires when the reader picks another interface language — the `v-model:locale` half. */\n 'update:locale': [locale: string];\n\n /** Fires when the reader picks another organization — the `v-model:organization` half. */\n 'update:organization': [organization: string];\n\n /** Fires when the reader collapses or expands the desktop sidebar. */\n collapse: [isCollapsed: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst liveSlots = useSlots();\nconst shell = useTemplateRef<InstanceType<typeof AppShell>>('shell');\nconst main = useTemplateRef<InstanceType<typeof AppShellMain>>('main');\n\n/* Mobile-first on the server and in the first render: a phone until mounted, then the real viewport. */\nconst isPhone = useBreakpointBelow(TailwindBreakpoints, 'md');\nconst isDesktop = useBreakpointUp(TailwindBreakpoints, 'lg');\n\n/* The stored choice is read as the ref is created, so a collapsed sidebar never animates in from the open one. */\nconst isCollapsed = createPersistentRef<boolean>(props.collapseStorageKey, props.isCollapsedByDefault, {\n decode: decodeCollapsed,\n});\nconst isDrawerOpen = shallowRef(false);\n\n/* Slots are not reactive: their presence is read at setup and again before each update, so a slot an app adds or\n drops with `v-if` moves the layout in the same render. */\nconst hasNavSlot = shallowRef(Boolean(liveSlots['nav']));\nconst hasPhoneNav = shallowRef(Boolean(liveSlots['phone-nav']));\nonBeforeUpdate(() => {\n hasNavSlot.value = Boolean(liveSlots['nav']);\n hasPhoneNav.value = Boolean(liveSlots['phone-nav']);\n});\n\nconst hasSidebar = computed(() => props.hasNavigation ?? hasNavSlot.value);\n\n/** Between `md` and `lg`: the rail beside the page, the full navigation in a drawer. */\nconst isTablet = computed(() => !isPhone.value && !isDesktop.value);\n\n/** The sidebar shows as the icon rail: always on tablets, by choice on desktops. */\nconst isRail = computed(() => hasSidebar.value && !isPhone.value && (!isDesktop.value || isCollapsed.value));\n\n/** A phone with a bottom bar already holds its navigation, so the toggle has nothing to open there. */\nconst hasToggle = computed(() => hasSidebar.value && !(isPhone.value && hasPhoneNav.value));\n\nconst sidebarWidth = computed(() => (isRail.value ? 'var(--frame-rail-width)' : 'var(--frame-sidebar-width)'));\nconst navigation = computed(() => (hasSidebar.value ? AppShellNavigation.Vertical : AppShellNavigation.Horizontal));\n\nconst toggleLabel = computed(() => {\n if (!isDesktop.value) return props.openNavigationLabel;\n return isCollapsed.value ? props.expandLabel : props.collapseLabel;\n});\n\n/** Desktop: collapse or expand the sidebar. Tablet and phone: open the full navigation over the page. */\nfunction toggleSidebar(): void {\n if (isDesktop.value) {\n isCollapsed.value = !isCollapsed.value;\n emit('collapse', isCollapsed.value);\n } else {\n isDrawerOpen.value = true;\n }\n}\n\nfunction setDrawerOpen(open: boolean): void {\n isDrawerOpen.value = open;\n}\n\nfunction closeNavigation(): void {\n isDrawerOpen.value = false;\n}\n\n/* Growing to a desktop puts the sidebar back beside the page; a drawer left open would cover it. */\nwatch(isDesktop, (desktop) => {\n if (desktop) closeNavigation();\n});\n\n/** Picking a destination closes the drawer; the link itself navigates. */\nfunction onNavClick(event: MouseEvent): void {\n if ((event.target as Element | null)?.closest?.('a[href]')) closeNavigation();\n}\n\n/** Hands a plain left click on a same-origin trail link to the app's router. */\nfunction onTrailClick(event: MouseEvent): void {\n if (!props.onNavigate || event.defaultPrevented || event.button !== 0) return;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n const href = (event.target as Element | null)?.closest?.('a')?.getAttribute('href');\n if (!href || !href.startsWith('/') || href.startsWith('//')) return;\n event.preventDefault();\n props.onNavigate(href, event);\n}\n\nfunction reload(): void {\n if (props.onReload) props.onReload();\n else if (typeof window !== 'undefined') window.location.reload();\n}\n\nconst isGlass = computed(() => props.variant === AppFrameVariant.Glass);\n\n/* A glass frame's menus float over the page, so they take the theme's menu glass unless the caller chose. */\nconst menuVariant = computed(() => (isGlass.value ? SurfaceVariant.GlassMenu : undefined));\nconst accountProps = computed(() => ({ variant: menuVariant.value, ...props.account }));\nconst switcherProps = computed(() => ({ variant: menuVariant.value, ...props.appSwitcher }));\n\nconst shellClasses = computed(() =>\n cn(\n 'surface-ambient transition-[grid-template-columns] duration-200 ease-out motion-reduce:transition-none',\n 'print:block print:h-auto print:overflow-visible',\n attrs.class as ClassValue,\n ),\n);\n\n/* The bar is the token's height, hairline included, plus the device's top inset; its row fills what is left. */\nconst headerClasses =\n 'h-[calc(var(--frame-bar-height)+env(safe-area-inset-top,0px))] gap-0 px-0 pt-[env(safe-area-inset-top,0px)] print:hidden';\n\n/* A glass frame draws its lines in the theme's glass edge; a solid one in the border colour its bar already uses. */\nconst edgeClass = computed(() => (isGlass.value ? 'border-glass-edge' : 'border-border'));\n\nconst brandCellClasses = computed(() =>\n cn(\n 'flex shrink-0 items-center gap-2 overflow-hidden border-e',\n edgeClass.value,\n 'transition-[width] duration-200 ease-out motion-reduce:transition-none',\n isRail.value ? 'justify-center' : 'px-3',\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** The frame's root element. */\nconst el = computed(() => shell.value?.el ?? null);\n\n/** The scrolling main region. */\nconst mainEl = computed(() => main.value?.el ?? null);\n\n/** Returns the main region to its top — for an app whose router does not reset a region's scroll. */\nfunction scrollToTop(): void {\n mainEl.value?.scrollTo?.({ top: 0 });\n}\n\n/** Plain labels become trail items, so an app without links passes its translated strings as they are. */\nconst trail = computed<BreadcrumbItem[]>(() =>\n props.crumbs.map((crumb) => (typeof crumb === 'string' ? { label: crumb } : crumb)),\n);\n\n/* Bound only when given: an `aria-label` of `undefined` would strip the breadcrumb's own localized name. */\nconst trailAttrs = computed(() => (props.trailLabel === undefined ? {} : { 'aria-label': props.trailLabel }));\n\ndefineExpose({ el, mainEl, isRail, isCollapsed, toggleSidebar, closeNavigation, scrollToTop });\n</script>\n\n<template>\n <AppShell\n ref=\"shell\"\n data-app-frame\n :data-rail=\"dataAttr(isRail)\"\n v-bind=\"rest\"\n :class=\"shellClasses\"\n sidebar-breakpoint=\"md\"\n :sidebar-width=\"sidebarWidth\"\n :navigation=\"navigation\"\n :sidebar-open=\"isPhone && isDrawerOpen\"\n :skip-to-content-label=\"props.skipToContentLabel\"\n @update:sidebar-open=\"setDrawerOpen\"\n >\n <AppShellHeader height=\"md\" :variant=\"props.variant\" :class=\"[headerClasses, props.barClass]\" data-app-frame-bar>\n <div class=\"flex h-full w-full min-w-0 items-stretch\">\n <!-- From tablets up the brand sits above the sidebar, as wide as it, divided from the bar by a hairline. -->\n <div\n v-if=\"hasSidebar && !isPhone\"\n :class=\"brandCellClasses\"\n :style=\"{ width: sidebarWidth }\"\n data-app-frame-brand\n >\n <AppSwitcherMenu\n v-if=\"props.apps\"\n :items=\"props.apps\"\n :current=\"props.currentApp ?? ''\"\n :label=\"props.appLabel\"\n :subtitle=\"props.appSubtitle\"\n :is-compact=\"isRail\"\n v-bind=\"switcherProps\"\n class=\"shrink\"\n >\n <template v-if=\"slots.brand\" #mark><slot name=\"brand\" :is-rail=\"true\" /></template>\n </AppSwitcherMenu>\n <slot v-else name=\"brand\" :is-rail=\"isRail\" />\n <VersionBadge\n v-if=\"props.version && !isRail\"\n :version=\"props.version\"\n :running-version=\"props.runningVersion\"\n :label=\"props.versionLabel\"\n :update-label=\"props.versionUpdateLabel\"\n @reload=\"reload\"\n />\n </div>\n <div class=\"flex min-w-0 flex-1 items-center gap-2 px-3 sm:gap-3 sm:px-4 lg:px-6\" data-app-frame-row>\n <!-- A phone's bar, and a frame without a sidebar, carry the brand inline. -->\n <div v-if=\"!hasSidebar || isPhone\" class=\"flex shrink-0 items-center gap-2\" data-app-frame-brand>\n <AppSwitcherMenu\n v-if=\"props.apps\"\n :items=\"props.apps\"\n :current=\"props.currentApp ?? ''\"\n :label=\"props.appLabel\"\n :subtitle=\"props.appSubtitle\"\n :is-compact=\"isPhone\"\n v-bind=\"switcherProps\"\n >\n <template v-if=\"slots.brand\" #mark><slot name=\"brand\" :is-rail=\"true\" /></template>\n </AppSwitcherMenu>\n <slot v-else name=\"brand\" :is-rail=\"isPhone\" />\n <VersionBadge\n v-if=\"props.version && !isPhone\"\n :version=\"props.version\"\n :running-version=\"props.runningVersion\"\n :label=\"props.versionLabel\"\n :update-label=\"props.versionUpdateLabel\"\n @reload=\"reload\"\n />\n </div>\n <Button\n v-if=\"hasToggle\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"md\"\n shape=\"square\"\n class=\"shrink-0\"\n data-app-frame-toggle\n :aria-label=\"toggleLabel\"\n :aria-expanded=\"isDesktop ? !isCollapsed : isDrawerOpen\"\n :title=\"toggleLabel\"\n @click=\"toggleSidebar\"\n >\n <Icon :icon=\"PanelLeft\" :size=\"18\" />\n </Button>\n <slot name=\"bar-start\" />\n <slot name=\"trail\">\n <Breadcrumb\n v-if=\"trail.length > 0\"\n :items=\"trail\"\n is-single-line\n v-bind=\"trailAttrs\"\n class=\"flex-1\"\n @click=\"onTrailClick\"\n />\n <span v-else class=\"flex-1\" />\n </slot>\n <slot name=\"bar-end\" />\n <slot name=\"account\">\n <AccountMenu\n v-if=\"props.account\"\n v-bind=\"accountProps\"\n :open=\"props.accountOpen\"\n :locale=\"props.locale\"\n :organization=\"props.organization\"\n class=\"shrink-0\"\n @update:open=\"emit('update:accountOpen', $event)\"\n @update:locale=\"emit('update:locale', $event)\"\n @update:organization=\"emit('update:organization', $event)\"\n >\n <template v-if=\"slots['account-items']\" #items><slot name=\"account-items\" /></template>\n </AccountMenu>\n </slot>\n </div>\n </div>\n </AppShellHeader>\n <AppShellSidebar\n v-if=\"hasSidebar\"\n :variant=\"props.variant\"\n :class=\"[edgeClass, 'print:hidden', props.sidebarClass]\"\n >\n <div class=\"flex min-h-0 flex-1 flex-col\" @click=\"onNavClick\">\n <slot name=\"nav\" :is-rail=\"isRail\" :close=\"closeNavigation\" />\n </div>\n <div\n v-if=\"slots['nav-footer']\"\n :class=\"['mt-2 shrink-0 border-t pt-2', edgeClass]\"\n data-app-frame-nav-footer\n @click=\"onNavClick\"\n >\n <slot name=\"nav-footer\" :is-rail=\"isRail\" />\n </div>\n </AppShellSidebar>\n <AppShellMain ref=\"main\" :class=\"['min-w-0 print:block print:overflow-visible', props.mainClass]\">\n <AppShellContent\n v-if=\"props.contentWidth === 'default'\"\n gutter=\"lg\"\n :max-width=\"props.contentMaxWidth ?? 'var(--frame-content-max)'\"\n :class=\"['lg:px-6 xl:px-8 print:p-0 print:*:max-w-none', props.contentClass]\"\n >\n <slot name=\"notice\" />\n <slot />\n </AppShellContent>\n <template v-else>\n <slot name=\"notice\" />\n <slot />\n </template>\n </AppShellMain>\n <div v-if=\"hasPhoneNav && isPhone\" class=\"z-sticky [grid-area:footer] print:hidden\" data-app-frame-phone-nav>\n <slot name=\"phone-nav\" />\n </div>\n </AppShell>\n <!-- A tablet keeps the rail beside the page; the full navigation opens over it. -->\n <Drawer v-if=\"hasSidebar && isTablet\" :open=\"isDrawerOpen\" side=\"left\" @update:open=\"setDrawerOpen\">\n <DrawerContent class=\"w-72 max-w-[80%]\" :variant=\"menuVariant\">\n <OverlayTitle class=\"sr-only\">{{ props.navigationLabel }}</OverlayTitle>\n <div class=\"flex min-h-0 flex-1 flex-col\" @click=\"onNavClick\">\n <slot name=\"nav\" :is-rail=\"false\" :close=\"closeNavigation\" />\n </div>\n <div\n v-if=\"slots['nav-footer']\"\n :class=\"['mt-2 shrink-0 border-t pt-2', edgeClass]\"\n data-app-frame-nav-footer\n @click=\"onNavClick\"\n >\n <slot name=\"nav-footer\" :is-rail=\"false\" />\n </div>\n </DrawerContent>\n </Drawer>\n</template>\n"],"names":["_useSlots","_createVNode","AppShell","_mergeProps","_unref","AppShellHeader","_normalizeClass","_createElementVNode","_createElementBlock","_openBlock","_createBlock","AppSwitcherMenu","_createSlots","_renderSlot","VersionBadge","Button","Icon","Breadcrumb","AccountMenu","AppShellSidebar","AppShellMain","AppShellContent","_Fragment","Drawer","DrawerContent","OverlayTitle","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,MAAM,uBAAuB;AAAA;AAAA,EAElC,SAAS;AAAA;AAAA,EAET,MAAM;AACR;AAKO,MAAM,kBAAkB;AAAA;AAAA,EAE7B,OAAO;AAAA;AAAA,EAEP,OAAO;AACT;AAsJA,MAAM,4BAA4B;AAGlC,SAAS,gBAAgB,QAAsC;AAC7D,SAAO,OAAO,WAAW,YAAY,SAAS;AAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,UAAM,QAAQA,SAAA;AAmCd,UAAM,iBAAiB;AA+BvB,UAAM,QAAQ,kBAAkB,gBAAgB,YAAY;AAAA,MAC1D,eAAe;AAAA,MACf,aAAa;AAAA,MACb,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,IAAA,CAClB;AAED,UAAM,OAAO;AAcb,UAAM,QAAQ,SAAA;AACd,UAAM,YAAY,SAAA;AAClB,UAAM,QAAQ,eAA8C,OAAO;AACnE,UAAM,OAAO,eAAkD,MAAM;AAGrE,UAAM,UAAU,mBAAmB,qBAAqB,IAAI;AAC5D,UAAM,YAAY,gBAAgB,qBAAqB,IAAI;AAG3D,UAAM,cAAc,oBAA6B,MAAM,oBAAoB,MAAM,sBAAsB;AAAA,MACrG,QAAQ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A;kBAChDM,WAA6D,KAAA,QAAA,OAAA;AAAA,oBAA3C,QAAS;AAAA,oBAAQ,OAAO;AAAA,kBAAA;;gBAGpC,MAAK,YAAA,kBADbL,mBAOM,OAAA;AAAA;kBALH,sDAAuC,UAAA,KAAS,CAAA;AAAA,kBACjD,6BAAA;AAAA,kBACC,SAAO;AAAA,gBAAA;kBAERK,WAA2C,KAAA,QAAA,cAAA,EAAlB,QAAS,OAAK;AAAA,gBAAA;;;;;;;;;;;"}
|
|
@@ -78,6 +78,8 @@ export interface AppShellProps {
|
|
|
78
78
|
* `vertical`, none makes it `horizontal`, so a top-bar app never reserves an empty sidebar column.
|
|
79
79
|
*/
|
|
80
80
|
readonly navigation?: AppShellNavigation;
|
|
81
|
+
/** The skip link's text. Default `"Skip to content"`, localized. */
|
|
82
|
+
readonly skipToContentLabel?: string;
|
|
81
83
|
}
|
|
82
84
|
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<AppShellProps, {
|
|
83
85
|
el: Readonly<import('vue').ShallowRef<HTMLDivElement | null>>;
|
|
@@ -94,6 +96,7 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<AppShellPr
|
|
|
94
96
|
readonly asideBreakpoint: Breakpoint;
|
|
95
97
|
readonly sidebarOpen: boolean;
|
|
96
98
|
readonly defaultSidebarOpen: boolean;
|
|
99
|
+
readonly skipToContentLabel: string;
|
|
97
100
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
98
101
|
default(): unknown;
|
|
99
102
|
}>;
|
|
@@ -58,7 +58,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
58
|
sidebarOpen: { type: Boolean, default: void 0 },
|
|
59
59
|
defaultSidebarOpen: { type: Boolean, default: false },
|
|
60
60
|
scroll: { default: AppShellScroll.Region },
|
|
61
|
-
navigation: { default: void 0 }
|
|
61
|
+
navigation: { default: void 0 },
|
|
62
|
+
skipToContentLabel: { default: void 0 }
|
|
62
63
|
},
|
|
63
64
|
emits: ["update:sidebarOpen"],
|
|
64
65
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -123,7 +124,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
124
|
style: rootStyle.value,
|
|
124
125
|
class: classes.value
|
|
125
126
|
}), [
|
|
126
|
-
createElementVNode("a", _hoisted_1, toDisplayString(unref(locale).t("AppShell.skipToContent", void 0, "Skip to content")), 1),
|
|
127
|
+
createElementVNode("a", _hoisted_1, toDisplayString(props.skipToContentLabel ?? unref(locale).t("AppShell.skipToContent", void 0, "Skip to content")), 1),
|
|
127
128
|
renderSlot(_ctx.$slots, "default")
|
|
128
129
|
], 16);
|
|
129
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.vue.js","sources":["../../../../src/presentation/layout/appShell/AppShell.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { inject, type ComputedRef, type InjectionKey, type Ref } from 'vue';\n\n/** Defines the responsive breakpoint at which `AppShell` collapses its sidebar / aside. */\nexport const Breakpoint = {\n /** Refers to the `sm` (640px) breakpoint. */\n Sm: 'sm',\n /** Refers to the `md` (768px) breakpoint. */\n Md: 'md',\n /** Refers to the `lg` (1024px) breakpoint. */\n Lg: 'lg',\n /** Refers to the `xl` (1280px) breakpoint. */\n Xl: 'xl',\n /** Refers to the `2xl` (1536px) breakpoint. */\n Xxl: '2xl',\n} as const;\n\nexport type Breakpoint = (typeof Breakpoint)[keyof typeof Breakpoint];\n\n/** Defines what scrolls inside an `AppShell`. */\nexport const AppShellScroll = {\n /** The main region scrolls; the header, sidebar and footer span the full window and hold still. */\n Region: 'region',\n /** The whole document scrolls, as a page does; the header sticks to the top. */\n Document: 'document',\n} as const;\n\nexport type AppShellScroll = (typeof AppShellScroll)[keyof typeof AppShellScroll];\n\n/** Defines where an `AppShell` places its navigation. */\nexport const AppShellNavigation = {\n /** A sidebar rail beside the main region. */\n Vertical: 'vertical',\n /** A top bar only; the main region takes the full width. */\n Horizontal: 'horizontal',\n} as const;\n\nexport type AppShellNavigation = (typeof AppShellNavigation)[keyof typeof AppShellNavigation];\n\nconst BreakpointPx: Record<Breakpoint, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\n/**\n * The value shared with `AppShellSidebar` / `AppShellAside`.\n *\n * React's context held plain values re-created on every render behind a\n * `useMemo`; here every field stays a ref or a computed, so a child reads the\n * live value and the root never re-renders to publish one.\n */\nexport interface AppShellContextValue {\n sidebarWidth: ComputedRef<string>;\n asideWidth: ComputedRef<string>;\n sidebarBreakpoint: ComputedRef<Breakpoint>;\n /** The resolved mobile-sidebar open state. Writable — an assignment routes through `setSidebarOpen`. */\n isSidebarOpen: Ref<boolean>;\n setSidebarOpen: (open: boolean) => void;\n /** True below `sidebarBreakpoint` — the sidebar renders as a `Drawer`. */\n isSidebarCollapsed: ComputedRef<boolean>;\n /** True below `asideBreakpoint` — the aside renders nothing. */\n isAsideHidden: ComputedRef<boolean>;\n /** What scrolls — the regions size and pin themselves by it. */\n scroll: ComputedRef<AppShellScroll>;\n}\n\nexport const appShellContextKey: InjectionKey<AppShellContextValue> = Symbol('wow-two.appShell');\n\nexport function useAppShellContext(): AppShellContextValue {\n const context = inject(appShellContextKey, null);\n if (!context) throw new Error('AppShell.* must be used inside <AppShell>');\n return context;\n}\n\n/** Reads the enclosing `AppShell`'s state — widths, breakpoint, and the mobile-sidebar toggle. */\nexport function useAppShell(): AppShellContextValue {\n return useAppShellContext();\n}\n\n/** Controlled axes use their canonical Vue model names; each update event requests caller state. */\nexport interface AppShellProps {\n /** The sidebar column width, any CSS length. Default `240px`. */\n readonly sidebarWidth?: string;\n\n /** The aside rail width, any CSS length. Default `280px`. */\n readonly asideWidth?: string;\n\n /** The sidebar collapses below this breakpoint. Default `lg`. */\n readonly sidebarBreakpoint?: Breakpoint;\n\n /** The aside hides below this breakpoint. Default `xl`. */\n readonly asideBreakpoint?: Breakpoint;\n\n /** The mobile-sidebar open state, controlled. The `v-model:sidebarOpen` binding target. */\n readonly sidebarOpen?: boolean;\n\n /** The initial mobile-sidebar state when uncontrolled. Default `false`. */\n readonly defaultSidebarOpen?: boolean;\n\n /**\n * What scrolls. Default `region`: the main region scrolls, so the header spans the full window even where the\n * platform draws a classic scrollbar. `document` scrolls the page, for long public pages with a closing footer.\n */\n readonly scroll?: AppShellScroll;\n\n /**\n * Where the navigation sits. Omit it and the shell reads its children: an `AppShellSidebar` makes it\n * `vertical`, none makes it `horizontal`, so a top-bar app never reserves an empty sidebar column.\n */\n readonly navigation?: AppShellNavigation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, Fragment, normalizeStyle, provide, useAttrs, useSlots, useTemplateRef, type VNode } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { useMediaQuery } from '../../../foundation/device';\n\nconst locale = useLocale();\n\n/**\n * Renders the top-level page frame. Children: `AppShellHeader` / `AppShellSidebar` /\n * `AppShellMain` / `AppShellAside` / `AppShellFooter`. CSS-grid layout; the\n * sidebar collapses to a `Drawer` below `sidebarBreakpoint`.\n */\ndefineOptions({ name: 'AppShell', inheritAttrs: false });\n\n/** The shell's regions — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/**\n * `sidebarOpen: undefined` / `sidebarOpen: undefined` are load-bearing: Vue\n * coerces an absent `Boolean` prop to `false` unless the declaration *owns* a\n * `default` key, which would strand the uncontrolled path behind a\n * permanently-closed controlled one.\n */\nconst props = withDefaults(defineProps<AppShellProps>(), {\n sidebarWidth: '240px',\n asideWidth: '280px',\n sidebarBreakpoint: 'lg',\n asideBreakpoint: 'xl',\n sidebarOpen: undefined,\n defaultSidebarOpen: false,\n scroll: AppShellScroll.Region,\n navigation: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the mobile sidebar opens or closes — the `v-model:sidebarOpen` half. */\n 'update:sidebarOpen': [open: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.sidebarOpen,\n default: () => props.defaultSidebarOpen,\n onChange: (value) => {\n emit('update:sidebarOpen', value);\n },\n});\n\nconst isSidebarWide = useMediaQuery(() => `(min-width: ${BreakpointPx[props.sidebarBreakpoint]}px)`);\nconst isAsideWide = useMediaQuery(() => `(min-width: ${BreakpointPx[props.asideBreakpoint]}px)`);\n\nconst isSidebarCollapsed = computed(() => !isSidebarWide.value);\nconst isAsideHidden = computed(() => !isAsideWide.value);\n\nprovide(appShellContextKey, {\n sidebarWidth: computed(() => props.sidebarWidth),\n asideWidth: computed(() => props.asideWidth),\n sidebarBreakpoint: computed(() => props.sidebarBreakpoint),\n isSidebarOpen: controlled.value,\n setSidebarOpen: controlled.setValue,\n isSidebarCollapsed,\n isAsideHidden,\n scroll: computed(() => props.scroll),\n});\n\nconst slots = useSlots();\n\n/** Whether the rendered children include an `AppShellSidebar`, looking through fragments and `v-for` lists. */\nfunction hasSidebar(nodes: ReadonlyArray<unknown>): boolean {\n return nodes.some((node) => {\n const vnode = node as VNode;\n if ((vnode?.type as { name?: string } | undefined)?.name === 'AppShellSidebar') return true;\n return vnode?.type === Fragment && Array.isArray(vnode.children) && hasSidebar(vnode.children);\n });\n}\n\n/* Read while rendering (the grid style is a render dependency), so the slot call is tracked and warning-free,\n and the server renders the same grid the client hydrates. */\nconst navigation = computed<AppShellNavigation>(\n () =>\n props.navigation ??\n (hasSidebar(slots.default?.() ?? []) ? AppShellNavigation.Vertical : AppShellNavigation.Horizontal),\n);\n\n/**\n * Collapsed drops the sidebar track entirely; header and footer always span the full width. The content column is\n * `minmax(0, 1fr)`: a bare `1fr` keeps an `auto` minimum, so a wide header nav or table would widen the whole shell.\n */\nconst gridTemplate = computed(() =>\n isSidebarCollapsed.value || navigation.value === AppShellNavigation.Horizontal\n ? `'header' auto 'main' 1fr 'footer' auto / minmax(0, 1fr)`\n : `'header header' auto 'sidebar main' 1fr 'sidebar footer' auto / ${props.sidebarWidth} minmax(0, 1fr)`,\n);\n\n/* A region shell owns the viewport: its rows fill the window exactly and only the main region scrolls. */\nconst classes = computed(() =>\n cn(\n 'grid bg-background text-foreground',\n props.scroll === AppShellScroll.Region ? 'h-dvh overflow-hidden' : 'min-h-svh',\n attrs.class as string | undefined,\n ),\n);\n\n/** `gridTemplate` is normalized first so a caller's `style` still wins per-property. */\nconst rootStyle = computed(() => normalizeStyle([{ gridTemplate: gridTemplate.value }, attrs.style]));\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :style=\"rootStyle\" :class=\"classes\">\n <a\n href=\"#app-shell-main\"\n class=\"sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-modal focus:rounded-md focus:bg-card focus:px-3 focus:py-2 focus:shadow\"\n >\n {{ locale.t('AppShell.skipToContent', undefined, 'Skip to content') }}\n </a>\n <slot />\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_toDisplayString","_unref","_renderSlot"],"mappings":";;;;;;;;;AAIO,MAAM,aAAa;AAAA;AAAA,EAExB,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ,KAAK;AACP;AAKO,MAAM,iBAAiB;AAAA;AAAA,EAE5B,QAAQ;AAAA;AAAA,EAER,UAAU;AACZ;AAKO,MAAM,qBAAqB;AAAA;AAAA,EAEhC,UAAU;AAAA;AAAA,EAEV,YAAY;AACd;AAIA,MAAM,eAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT;AAwBO,MAAM,qBAAyD,OAAO,kBA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WAAW,MAAM,QAAQ;AAAA,MAC/F,CAAC;AAAA,IACH;AAIA,UAAM,aAAa;AAAA,MACjB,MACE,MAAM,eACL,WAAW,MAAM,eAAe,CAAA,CAAE,IAAI,mBAAmB,WAAW,mBAAmB;AAAA,IAAA;AAO5F,UAAM,eAAe;AAAA,MAAS,MAC5B,mBAAmB,SAAS,WAAW,UAAU,mBAAmB,aAChE,4DACA,mEAAmE,MAAM,YAAY;AAAA,IAAA;AAI3F,UAAM,UAAU;AAAA,MAAS,MACvB;AAAA,QACE;AAAA,QACA,MAAM,WAAW,eAAe,SAAS,0BAA0B;AAAA,QACnE,MAAM;AAAA,MAAA;AAAA,IACR;AAIF,UAAM,YAAY,SAAS,MAAM,eAAe,CAAC,EAAE,cAAc,aAAa,MAAA,GAAS,MAAM,KAAK,CAAC,CAAC;AAGpG,UAAM,OAAO,SAAS,MAAM;AAC1B,YAAM,EAAE,OAAO,QAAQ,OAAO,QAAQ,GAAG,WAAW;AACpD,aAAO;AAAA,IACT,CAAC;AAED,aAAa,EAAE,IAAI;;AAIjB,aAAAA,UAAA,GAAAC,mBAQM,OARNC,WAQM;AAAA,iBARG;AAAA,QAAJ,KAAI;AAAA,MAAA,GAAa,KAAA,OAAI;AAAA,QAAG,OAAO,UAAA;AAAA,QAAY,OAAO,QAAA;AAAA,MAAA;QACrDC,mBAKI,KALJ,YAKIC,gBADCC,cAAO,4BAA4B,QAAS,iBAAA,CAAA,GAAA,CAAA;AAAA,QAEjDC,WAAQ,KAAA,QAAA,SAAA;AAAA,MAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"AppShell.vue.js","sources":["../../../../src/presentation/layout/appShell/AppShell.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { inject, type ComputedRef, type InjectionKey, type Ref } from 'vue';\n\n/** Defines the responsive breakpoint at which `AppShell` collapses its sidebar / aside. */\nexport const Breakpoint = {\n /** Refers to the `sm` (640px) breakpoint. */\n Sm: 'sm',\n /** Refers to the `md` (768px) breakpoint. */\n Md: 'md',\n /** Refers to the `lg` (1024px) breakpoint. */\n Lg: 'lg',\n /** Refers to the `xl` (1280px) breakpoint. */\n Xl: 'xl',\n /** Refers to the `2xl` (1536px) breakpoint. */\n Xxl: '2xl',\n} as const;\n\nexport type Breakpoint = (typeof Breakpoint)[keyof typeof Breakpoint];\n\n/** Defines what scrolls inside an `AppShell`. */\nexport const AppShellScroll = {\n /** The main region scrolls; the header, sidebar and footer span the full window and hold still. */\n Region: 'region',\n /** The whole document scrolls, as a page does; the header sticks to the top. */\n Document: 'document',\n} as const;\n\nexport type AppShellScroll = (typeof AppShellScroll)[keyof typeof AppShellScroll];\n\n/** Defines where an `AppShell` places its navigation. */\nexport const AppShellNavigation = {\n /** A sidebar rail beside the main region. */\n Vertical: 'vertical',\n /** A top bar only; the main region takes the full width. */\n Horizontal: 'horizontal',\n} as const;\n\nexport type AppShellNavigation = (typeof AppShellNavigation)[keyof typeof AppShellNavigation];\n\nconst BreakpointPx: Record<Breakpoint, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\n/**\n * The value shared with `AppShellSidebar` / `AppShellAside`.\n *\n * React's context held plain values re-created on every render behind a\n * `useMemo`; here every field stays a ref or a computed, so a child reads the\n * live value and the root never re-renders to publish one.\n */\nexport interface AppShellContextValue {\n sidebarWidth: ComputedRef<string>;\n asideWidth: ComputedRef<string>;\n sidebarBreakpoint: ComputedRef<Breakpoint>;\n /** The resolved mobile-sidebar open state. Writable — an assignment routes through `setSidebarOpen`. */\n isSidebarOpen: Ref<boolean>;\n setSidebarOpen: (open: boolean) => void;\n /** True below `sidebarBreakpoint` — the sidebar renders as a `Drawer`. */\n isSidebarCollapsed: ComputedRef<boolean>;\n /** True below `asideBreakpoint` — the aside renders nothing. */\n isAsideHidden: ComputedRef<boolean>;\n /** What scrolls — the regions size and pin themselves by it. */\n scroll: ComputedRef<AppShellScroll>;\n}\n\nexport const appShellContextKey: InjectionKey<AppShellContextValue> = Symbol('wow-two.appShell');\n\nexport function useAppShellContext(): AppShellContextValue {\n const context = inject(appShellContextKey, null);\n if (!context) throw new Error('AppShell.* must be used inside <AppShell>');\n return context;\n}\n\n/** Reads the enclosing `AppShell`'s state — widths, breakpoint, and the mobile-sidebar toggle. */\nexport function useAppShell(): AppShellContextValue {\n return useAppShellContext();\n}\n\n/** Controlled axes use their canonical Vue model names; each update event requests caller state. */\nexport interface AppShellProps {\n /** The sidebar column width, any CSS length. Default `240px`. */\n readonly sidebarWidth?: string;\n\n /** The aside rail width, any CSS length. Default `280px`. */\n readonly asideWidth?: string;\n\n /** The sidebar collapses below this breakpoint. Default `lg`. */\n readonly sidebarBreakpoint?: Breakpoint;\n\n /** The aside hides below this breakpoint. Default `xl`. */\n readonly asideBreakpoint?: Breakpoint;\n\n /** The mobile-sidebar open state, controlled. The `v-model:sidebarOpen` binding target. */\n readonly sidebarOpen?: boolean;\n\n /** The initial mobile-sidebar state when uncontrolled. Default `false`. */\n readonly defaultSidebarOpen?: boolean;\n\n /**\n * What scrolls. Default `region`: the main region scrolls, so the header spans the full window even where the\n * platform draws a classic scrollbar. `document` scrolls the page, for long public pages with a closing footer.\n */\n readonly scroll?: AppShellScroll;\n\n /**\n * Where the navigation sits. Omit it and the shell reads its children: an `AppShellSidebar` makes it\n * `vertical`, none makes it `horizontal`, so a top-bar app never reserves an empty sidebar column.\n */\n readonly navigation?: AppShellNavigation;\n\n /** The skip link's text. Default `\"Skip to content\"`, localized. */\n readonly skipToContentLabel?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { computed, Fragment, normalizeStyle, provide, useAttrs, useSlots, useTemplateRef, type VNode } from 'vue';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport { useMediaQuery } from '../../../foundation/device';\n\nconst locale = useLocale();\n\n/**\n * Renders the top-level page frame. Children: `AppShellHeader` / `AppShellSidebar` /\n * `AppShellMain` / `AppShellAside` / `AppShellFooter`. CSS-grid layout; the\n * sidebar collapses to a `Drawer` below `sidebarBreakpoint`.\n */\ndefineOptions({ name: 'AppShell', inheritAttrs: false });\n\n/** The shell's regions — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/**\n * `sidebarOpen: undefined` / `sidebarOpen: undefined` are load-bearing: Vue\n * coerces an absent `Boolean` prop to `false` unless the declaration *owns* a\n * `default` key, which would strand the uncontrolled path behind a\n * permanently-closed controlled one.\n */\nconst props = withDefaults(defineProps<AppShellProps>(), {\n sidebarWidth: '240px',\n asideWidth: '280px',\n sidebarBreakpoint: 'lg',\n asideBreakpoint: 'xl',\n sidebarOpen: undefined,\n defaultSidebarOpen: false,\n scroll: AppShellScroll.Region,\n navigation: undefined,\n skipToContentLabel: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the mobile sidebar opens or closes — the `v-model:sidebarOpen` half. */\n 'update:sidebarOpen': [open: boolean];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.sidebarOpen,\n default: () => props.defaultSidebarOpen,\n onChange: (value) => {\n emit('update:sidebarOpen', value);\n },\n});\n\nconst isSidebarWide = useMediaQuery(() => `(min-width: ${BreakpointPx[props.sidebarBreakpoint]}px)`);\nconst isAsideWide = useMediaQuery(() => `(min-width: ${BreakpointPx[props.asideBreakpoint]}px)`);\n\nconst isSidebarCollapsed = computed(() => !isSidebarWide.value);\nconst isAsideHidden = computed(() => !isAsideWide.value);\n\nprovide(appShellContextKey, {\n sidebarWidth: computed(() => props.sidebarWidth),\n asideWidth: computed(() => props.asideWidth),\n sidebarBreakpoint: computed(() => props.sidebarBreakpoint),\n isSidebarOpen: controlled.value,\n setSidebarOpen: controlled.setValue,\n isSidebarCollapsed,\n isAsideHidden,\n scroll: computed(() => props.scroll),\n});\n\nconst slots = useSlots();\n\n/** Whether the rendered children include an `AppShellSidebar`, looking through fragments and `v-for` lists. */\nfunction hasSidebar(nodes: ReadonlyArray<unknown>): boolean {\n return nodes.some((node) => {\n const vnode = node as VNode;\n if ((vnode?.type as { name?: string } | undefined)?.name === 'AppShellSidebar') return true;\n return vnode?.type === Fragment && Array.isArray(vnode.children) && hasSidebar(vnode.children);\n });\n}\n\n/* Read while rendering (the grid style is a render dependency), so the slot call is tracked and warning-free,\n and the server renders the same grid the client hydrates. */\nconst navigation = computed<AppShellNavigation>(\n () =>\n props.navigation ??\n (hasSidebar(slots.default?.() ?? []) ? AppShellNavigation.Vertical : AppShellNavigation.Horizontal),\n);\n\n/**\n * Collapsed drops the sidebar track entirely; header and footer always span the full width. The content column is\n * `minmax(0, 1fr)`: a bare `1fr` keeps an `auto` minimum, so a wide header nav or table would widen the whole shell.\n */\nconst gridTemplate = computed(() =>\n isSidebarCollapsed.value || navigation.value === AppShellNavigation.Horizontal\n ? `'header' auto 'main' 1fr 'footer' auto / minmax(0, 1fr)`\n : `'header header' auto 'sidebar main' 1fr 'sidebar footer' auto / ${props.sidebarWidth} minmax(0, 1fr)`,\n);\n\n/* A region shell owns the viewport: its rows fill the window exactly and only the main region scrolls. */\nconst classes = computed(() =>\n cn(\n 'grid bg-background text-foreground',\n props.scroll === AppShellScroll.Region ? 'h-dvh overflow-hidden' : 'min-h-svh',\n attrs.class as string | undefined,\n ),\n);\n\n/** `gridTemplate` is normalized first so a caller's `style` still wins per-property. */\nconst rootStyle = computed(() => normalizeStyle([{ gridTemplate: gridTemplate.value }, attrs.style]));\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :style=\"rootStyle\" :class=\"classes\">\n <a\n href=\"#app-shell-main\"\n class=\"sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-modal focus:rounded-md focus:bg-card focus:px-3 focus:py-2 focus:shadow\"\n >\n {{ props.skipToContentLabel ?? locale.t('AppShell.skipToContent', undefined, 'Skip to content') }}\n </a>\n <slot />\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_toDisplayString","_unref","_renderSlot"],"mappings":";;;;;;;;;AAIO,MAAM,aAAa;AAAA;AAAA,EAExB,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ,IAAI;AAAA;AAAA,EAEJ,KAAK;AACP;AAKO,MAAM,iBAAiB;AAAA;AAAA,EAE5B,QAAQ;AAAA;AAAA,EAER,UAAU;AACZ;AAKO,MAAM,qBAAqB;AAAA;AAAA,EAEhC,UAAU;AAAA;AAAA,EAEV,YAAY;AACd;AAIA,MAAM,eAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT;AAwBO,MAAM,qBAAyD,OAAO,kBAAkB;AAExF,SAAS,qBAA2C;AACzD,QAAM,UAAU,OAAO,oBAAoB,IAAI;AAC/C,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,2CAA2C;AACzE,SAAO;AACT;AAGO,SAAS,cAAoC;AAClD,SAAO,mBAAA;AACT;;;;;;;;;;;;;;;;;AA8CA,UAAM,SAAS,UAAA;AAkBf,UAAM,QAAQ;AAYd,UAAM,OAAO;AAKb,UAAM,QAAQ,SAAA;AACd,UAAM,KAAK,eAA+B,IAAI;AAE9C,UAAM,aAAa,cAAuB;AAAA,MACxC,YAAY,MAAM,MAAM;AAAA,MACxB,SAAS,MAAM,MAAM;AAAA,MACrB,UAAU,CAAC,UAAU;AACnB,aAAK,sBAAsB,KAAK;AAAA,MAClC;AAAA,IAAA,CACD;AAED,UAAM,gBAAgB,cAAc,MAAM,eAAe,aAAa,MAAM,iBAAiB,CAAC,KAAK;AACnG,UAAM,cAAc,cAAc,MAAM,eAAe,aAAa,MAAM,eAAe,CAAC,KAAK;AAE/F,UAAM,qB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