@velocity-astro/cms-ui 0.1.0-beta.1 → 0.1.0-beta.12
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/component-registry.json +93 -8
- package/dist/components/BarChart/BarChart.d.ts +23 -0
- package/dist/components/BarChart/BarChart.d.ts.map +1 -0
- package/dist/components/BarChart/BarChart.js +19 -0
- package/dist/components/BarChart/BarChart.js.map +1 -0
- package/dist/components/BarChart/BarChart.variants.d.ts +29 -0
- package/dist/components/BarChart/BarChart.variants.d.ts.map +1 -0
- package/dist/components/BarChart/BarChart.variants.js +81 -0
- package/dist/components/BarChart/BarChart.variants.js.map +1 -0
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/BarChart/index.d.ts.map +1 -0
- package/dist/components/BarChart/index.js +2 -0
- package/dist/components/BarChart/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +6 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +5 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.variants.d.ts +6 -1
- package/dist/components/Button/Button.variants.d.ts.map +1 -1
- package/dist/components/Button/Button.variants.js +13 -1
- package/dist/components/Button/Button.variants.js.map +1 -1
- package/dist/components/Card/Card.d.ts +3 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +3 -3
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.variants.d.ts +4 -1
- package/dist/components/Card/Card.variants.d.ts.map +1 -1
- package/dist/components/Card/Card.variants.js +6 -1
- package/dist/components/Card/Card.variants.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +30 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.js +32 -0
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.variants.d.ts +24 -0
- package/dist/components/ColorPicker/ColorPicker.variants.d.ts.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.variants.js +42 -0
- package/dist/components/ColorPicker/ColorPicker.variants.js.map +1 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/index.d.ts.map +1 -0
- package/dist/components/ColorPicker/index.js +2 -0
- package/dist/components/ColorPicker/index.js.map +1 -0
- package/dist/components/FileButton/FileButton.d.ts +3 -1
- package/dist/components/FileButton/FileButton.d.ts.map +1 -1
- package/dist/components/FileButton/FileButton.js +2 -2
- package/dist/components/FileButton/FileButton.js.map +1 -1
- package/dist/components/Grid/Grid.variants.d.ts +1 -0
- package/dist/components/Grid/Grid.variants.d.ts.map +1 -1
- package/dist/components/Grid/Grid.variants.js +4 -3
- package/dist/components/Grid/Grid.variants.js.map +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.js +2 -2
- package/dist/components/Heading/Heading.js.map +1 -1
- package/dist/components/Heading/Heading.variants.d.ts +1 -0
- package/dist/components/Heading/Heading.variants.d.ts.map +1 -1
- package/dist/components/Heading/Heading.variants.js +2 -0
- package/dist/components/Heading/Heading.variants.js.map +1 -1
- package/dist/components/LoadingMark/LoadingMark.d.ts +11 -0
- package/dist/components/LoadingMark/LoadingMark.d.ts.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.js +17 -0
- package/dist/components/LoadingMark/LoadingMark.js.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.variants.d.ts +22 -0
- package/dist/components/LoadingMark/LoadingMark.variants.d.ts.map +1 -0
- package/dist/components/LoadingMark/LoadingMark.variants.js +18 -0
- package/dist/components/LoadingMark/LoadingMark.variants.js.map +1 -0
- package/dist/components/LoadingMark/index.d.ts +2 -0
- package/dist/components/LoadingMark/index.d.ts.map +1 -0
- package/dist/components/LoadingMark/index.js +2 -0
- package/dist/components/LoadingMark/index.js.map +1 -0
- package/dist/components/Logo/Logo.d.ts +10 -2
- package/dist/components/Logo/Logo.d.ts.map +1 -1
- package/dist/components/Logo/Logo.js +11 -3
- package/dist/components/Logo/Logo.js.map +1 -1
- package/dist/components/Logo/Logo.variants.d.ts +5 -2
- package/dist/components/Logo/Logo.variants.d.ts.map +1 -1
- package/dist/components/Logo/Logo.variants.js +10 -1
- package/dist/components/Logo/Logo.variants.js.map +1 -1
- package/dist/components/Meter/Meter.d.ts +13 -0
- package/dist/components/Meter/Meter.d.ts.map +1 -0
- package/dist/components/Meter/Meter.js +8 -0
- package/dist/components/Meter/Meter.js.map +1 -0
- package/dist/components/Meter/Meter.variants.d.ts +14 -0
- package/dist/components/Meter/Meter.variants.d.ts.map +1 -0
- package/dist/components/Meter/Meter.variants.js +39 -0
- package/dist/components/Meter/Meter.variants.js.map +1 -0
- package/dist/components/Meter/index.d.ts +2 -0
- package/dist/components/Meter/index.d.ts.map +1 -0
- package/dist/components/Meter/index.js +2 -0
- package/dist/components/Meter/index.js.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +8 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.js +62 -17
- package/dist/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/components/RichTextEditor/index.d.ts +1 -1
- package/dist/components/RichTextEditor/index.d.ts.map +1 -1
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Segmented/Segmented.d.ts +14 -1
- package/dist/components/Segmented/Segmented.d.ts.map +1 -1
- package/dist/components/Segmented/Segmented.js +14 -5
- package/dist/components/Segmented/Segmented.js.map +1 -1
- package/dist/components/Segmented/Segmented.variants.d.ts +14 -1
- package/dist/components/Segmented/Segmented.variants.d.ts.map +1 -1
- package/dist/components/Segmented/Segmented.variants.js +19 -3
- package/dist/components/Segmented/Segmented.variants.js.map +1 -1
- package/dist/components/Spotlight/Spotlight.d.ts +16 -0
- package/dist/components/Spotlight/Spotlight.d.ts.map +1 -0
- package/dist/components/Spotlight/Spotlight.js +28 -0
- package/dist/components/Spotlight/Spotlight.js.map +1 -0
- package/dist/components/Spotlight/Spotlight.variants.d.ts +8 -0
- package/dist/components/Spotlight/Spotlight.variants.d.ts.map +1 -0
- package/dist/components/Spotlight/Spotlight.variants.js +15 -0
- package/dist/components/Spotlight/Spotlight.variants.js.map +1 -0
- package/dist/components/Spotlight/index.d.ts +2 -0
- package/dist/components/Spotlight/index.d.ts.map +1 -0
- package/dist/components/Spotlight/index.js +2 -0
- package/dist/components/Spotlight/index.js.map +1 -0
- package/dist/components/Table/Table.d.ts +8 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.js +4 -4
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.variants.d.ts +6 -2
- package/dist/components/Table/Table.variants.d.ts.map +1 -1
- package/dist/components/Table/Table.variants.js +11 -5
- package/dist/components/Table/Table.variants.js.map +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/scales.d.ts +2 -2
- package/dist/components/scales.d.ts.map +1 -1
- package/dist/components/scales.js +4 -2
- package/dist/components/scales.js.map +1 -1
- package/dist/patterns/AppShell/AppShell.d.ts +38 -8
- package/dist/patterns/AppShell/AppShell.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.js +46 -7
- package/dist/patterns/AppShell/AppShell.js.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.d.ts +89 -20
- package/dist/patterns/AppShell/AppShell.variants.d.ts.map +1 -1
- package/dist/patterns/AppShell/AppShell.variants.js +148 -23
- package/dist/patterns/AppShell/AppShell.variants.js.map +1 -1
- package/dist/patterns/AppShell/index.d.ts +1 -1
- package/dist/patterns/AppShell/index.d.ts.map +1 -1
- package/dist/patterns/AppShell/index.js.map +1 -1
- package/dist/patterns/CommandPalette/CommandPalette.d.ts +43 -0
- package/dist/patterns/CommandPalette/CommandPalette.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.js +19 -0
- package/dist/patterns/CommandPalette/CommandPalette.js.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts +18 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.js +21 -0
- package/dist/patterns/CommandPalette/CommandPalette.variants.js.map +1 -0
- package/dist/patterns/CommandPalette/index.d.ts +2 -0
- package/dist/patterns/CommandPalette/index.d.ts.map +1 -0
- package/dist/patterns/CommandPalette/index.js +2 -0
- package/dist/patterns/CommandPalette/index.js.map +1 -0
- package/dist/patterns/ImagePicker/ImagePicker.d.ts +9 -1
- package/dist/patterns/ImagePicker/ImagePicker.d.ts.map +1 -1
- package/dist/patterns/ImagePicker/ImagePicker.js +13 -8
- package/dist/patterns/ImagePicker/ImagePicker.js.map +1 -1
- package/dist/patterns/OptionPicker/OptionPicker.d.ts +2 -0
- package/dist/patterns/OptionPicker/OptionPicker.d.ts.map +1 -1
- package/dist/patterns/OptionPicker/OptionPicker.js +8 -3
- package/dist/patterns/OptionPicker/OptionPicker.js.map +1 -1
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts +10 -4
- package/dist/patterns/OptionPicker/OptionPicker.variants.d.ts.map +1 -1
- package/dist/patterns/OptionPicker/OptionPicker.variants.js +29 -6
- package/dist/patterns/OptionPicker/OptionPicker.variants.js.map +1 -1
- package/dist/patterns/Outline/Outline.d.ts +26 -0
- package/dist/patterns/Outline/Outline.d.ts.map +1 -0
- package/dist/patterns/Outline/Outline.js +21 -0
- package/dist/patterns/Outline/Outline.js.map +1 -0
- package/dist/patterns/Outline/Outline.variants.d.ts +11 -0
- package/dist/patterns/Outline/Outline.variants.d.ts.map +1 -0
- package/dist/patterns/Outline/Outline.variants.js +21 -0
- package/dist/patterns/Outline/Outline.variants.js.map +1 -0
- package/dist/patterns/Outline/index.d.ts +2 -0
- package/dist/patterns/Outline/index.d.ts.map +1 -0
- package/dist/patterns/Outline/index.js +2 -0
- package/dist/patterns/Outline/index.js.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts +33 -4
- package/dist/patterns/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.js +31 -6
- package/dist/patterns/PageHeader/PageHeader.js.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts +23 -2
- package/dist/patterns/PageHeader/PageHeader.variants.d.ts.map +1 -1
- package/dist/patterns/PageHeader/PageHeader.variants.js +33 -2
- package/dist/patterns/PageHeader/PageHeader.variants.js.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.d.ts +138 -4
- package/dist/patterns/PagePreview/PagePreview.d.ts.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.js +159 -13
- package/dist/patterns/PagePreview/PagePreview.js.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts +15 -2
- package/dist/patterns/PagePreview/PagePreview.variants.d.ts.map +1 -1
- package/dist/patterns/PagePreview/PagePreview.variants.js +22 -6
- package/dist/patterns/PagePreview/PagePreview.variants.js.map +1 -1
- package/dist/patterns/PagePreview/index.d.ts +1 -1
- package/dist/patterns/PagePreview/index.d.ts.map +1 -1
- package/dist/patterns/PagePreview/index.js.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.d.ts +20 -4
- package/dist/patterns/SaveBar/SaveBar.d.ts.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.js +22 -4
- package/dist/patterns/SaveBar/SaveBar.js.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts +27 -5
- package/dist/patterns/SaveBar/SaveBar.variants.d.ts.map +1 -1
- package/dist/patterns/SaveBar/SaveBar.variants.js +39 -6
- package/dist/patterns/SaveBar/SaveBar.variants.js.map +1 -1
- package/dist/patterns/SectionList/SectionList.d.ts.map +1 -1
- package/dist/patterns/SectionList/SectionList.js +2 -2
- package/dist/patterns/SectionList/SectionList.js.map +1 -1
- package/dist/patterns/SectionList/SectionList.variants.d.ts +4 -1
- package/dist/patterns/SectionList/SectionList.variants.d.ts.map +1 -1
- package/dist/patterns/SectionList/SectionList.variants.js +5 -2
- package/dist/patterns/SectionList/SectionList.variants.js.map +1 -1
- package/dist/patterns/SiteWindow/SiteWindow.d.ts +20 -0
- package/dist/patterns/SiteWindow/SiteWindow.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.js +8 -0
- package/dist/patterns/SiteWindow/SiteWindow.js.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts +24 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.js +25 -0
- package/dist/patterns/SiteWindow/SiteWindow.variants.js.map +1 -0
- package/dist/patterns/SiteWindow/index.d.ts +2 -0
- package/dist/patterns/SiteWindow/index.d.ts.map +1 -0
- package/dist/patterns/SiteWindow/index.js +2 -0
- package/dist/patterns/SiteWindow/index.js.map +1 -0
- package/dist/patterns/Split/Split.variants.d.ts +2 -2
- package/dist/patterns/Split/Split.variants.d.ts.map +1 -1
- package/dist/patterns/Split/Split.variants.js +2 -2
- package/dist/patterns/Split/Split.variants.js.map +1 -1
- package/dist/patterns/Welcome/Welcome.d.ts +18 -0
- package/dist/patterns/Welcome/Welcome.d.ts.map +1 -0
- package/dist/patterns/Welcome/Welcome.js +20 -0
- package/dist/patterns/Welcome/Welcome.js.map +1 -0
- package/dist/patterns/Welcome/Welcome.variants.d.ts +12 -0
- package/dist/patterns/Welcome/Welcome.variants.d.ts.map +1 -0
- package/dist/patterns/Welcome/Welcome.variants.js +12 -0
- package/dist/patterns/Welcome/Welcome.variants.js.map +1 -0
- package/dist/patterns/Welcome/index.d.ts +2 -0
- package/dist/patterns/Welcome/index.d.ts.map +1 -0
- package/dist/patterns/Welcome/index.js +2 -0
- package/dist/patterns/Welcome/index.js.map +1 -0
- package/dist/patterns/Workbench/Workbench.d.ts +35 -4
- package/dist/patterns/Workbench/Workbench.d.ts.map +1 -1
- package/dist/patterns/Workbench/Workbench.js +59 -4
- package/dist/patterns/Workbench/Workbench.js.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.d.ts +56 -4
- package/dist/patterns/Workbench/Workbench.variants.d.ts.map +1 -1
- package/dist/patterns/Workbench/Workbench.variants.js +111 -4
- package/dist/patterns/Workbench/Workbench.variants.js.map +1 -1
- package/dist/patterns/Workbench/index.d.ts +1 -1
- package/dist/patterns/Workbench/index.d.ts.map +1 -1
- package/dist/patterns/Workbench/index.js.map +1 -1
- package/dist/patterns/index.d.ts +4 -0
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +4 -0
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/page-bar.d.ts +17 -0
- package/dist/patterns/page-bar.d.ts.map +1 -0
- package/dist/patterns/page-bar.js +22 -0
- package/dist/patterns/page-bar.js.map +1 -0
- package/package.json +2 -1
- package/src/styles.css +179 -0
- package/src/tokens/tokens.css +27 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowDown, ArrowUp } from "lucide-react";
|
|
3
3
|
import { Cell, Column, Row, Table as AriaTable, TableBody, TableHeader, } from "react-aria-components";
|
|
4
|
-
import { tableCellVariants, tableClass, tableColumnLabelClass, tableColumnVariants, tableEmptyClass,
|
|
4
|
+
import { tableCellVariants, tableClass, tableColumnLabelClass, tableColumnVariants, tableEmptyClass, tableFrameVariants, tableRowClass, tableSortIconSize, } from "./Table.variants.js";
|
|
5
5
|
/** Rows of the same kind of thing, with a heading for each column. */
|
|
6
|
-
export function Table({ label, columns, rows, onRowAction, sort, onSortChange, empty, }) {
|
|
7
|
-
return (_jsx("div", { className:
|
|
6
|
+
export function Table({ label, columns, rows, onRowAction, sort, onSortChange, empty, frame = 'card', }) {
|
|
7
|
+
return (_jsx("div", { className: tableFrameVariants({ frame }), children: _jsxs(AriaTable, { "aria-label": label, className: tableClass, ...(sort && { sortDescriptor: sort }), ...(onSortChange && {
|
|
8
8
|
onSortChange: (next) => onSortChange({
|
|
9
9
|
column: String(next.column),
|
|
10
10
|
direction: next.direction,
|
|
11
11
|
}),
|
|
12
|
-
}), ...(onRowAction && { onRowAction: (key) => onRowAction(String(key)) }), children: [_jsx(TableHeader, { children: columns.map((column, index) => (_jsx(Column, { id: column.id, className: tableColumnVariants({ align: column.align }), isRowHeader: index === 0, allowsSorting: column.isSortable ?? false, textValue: column.label, children: (state) => (_jsxs("span", { className: tableColumnLabelClass, children: [column.label, state.sortDirection === "ascending" && (_jsx(ArrowUp, { "aria-hidden": true, size: tableSortIconSize })), state.sortDirection === "descending" && (_jsx(ArrowDown, { "aria-hidden": true, size: tableSortIconSize }))] })) }, column.id))) }), _jsx(TableBody, { renderEmptyState: () => (_jsx("div", { className: tableEmptyClass, children: empty })), children: rows.map((row) => (_jsx(Row, { id: row.id, className: tableRowClass, children: columns.map((column) => (_jsx(Cell, { className: tableCellVariants({ align: column.align }), children: row.cells[column.id] }, column.id))) }, row.id))) })] }) }));
|
|
12
|
+
}), ...(onRowAction && { onRowAction: (key) => onRowAction(String(key)) }), children: [_jsx(TableHeader, { children: columns.map((column, index) => (_jsx(Column, { id: column.id, className: tableColumnVariants({ align: column.align, isSecondary: index > 0 && column.isSecondary === true }), isRowHeader: index === 0, allowsSorting: column.isSortable ?? false, textValue: column.label, children: (state) => (_jsxs("span", { className: tableColumnLabelClass, children: [column.label, state.sortDirection === "ascending" && (_jsx(ArrowUp, { "aria-hidden": true, size: tableSortIconSize })), state.sortDirection === "descending" && (_jsx(ArrowDown, { "aria-hidden": true, size: tableSortIconSize }))] })) }, column.id))) }), _jsx(TableBody, { renderEmptyState: () => (_jsx("div", { className: tableEmptyClass, children: empty })), children: rows.map((row) => (_jsx(Row, { id: row.id, className: tableRowClass, children: columns.map((column, index) => (_jsx(Cell, { className: tableCellVariants({ align: column.align, isSecondary: index > 0 && column.isSecondary === true }), children: row.cells[column.id] }, column.id))) }, row.id))) })] }) }));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,IAAI,EACJ,MAAM,EACN,GAAG,EACH,KAAK,IAAI,SAAS,EAClB,SAAS,EACT,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EACL,IAAI,EACJ,MAAM,EACN,GAAG,EACH,KAAK,IAAI,SAAS,EAClB,SAAS,EACT,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AA4C7B,sEAAsE;AACtE,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,KAAK,GAAG,MAAM,GACH;IACX,OAAO,CACL,cAAK,SAAS,EAAE,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,YAC3C,MAAC,SAAS,kBACI,KAAK,EACjB,SAAS,EAAE,UAAU,KACjB,CAAC,IAAI,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,KACl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,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,KAAC,GAAG,IAAc,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,aAAa,YACnD,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,KAAC,IAAI,IAEH,SAAS,EAAE,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,GAAG,CAAC,IAAI,MAAM,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC,YAE3G,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,IAHhB,MAAM,CAAC,EAAE,CAIT,CACR,CAAC,IARM,GAAG,CAAC,EAAE,CASV,CACP,CAAC,GACQ,IACF,GACR,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
/** The card the table sits in. A table wider than the screen scrolls inside it. */
|
|
3
|
-
export declare const
|
|
2
|
+
/** The card the table sits in, or none inside a `Card` that is its frame already. A table wider than the screen scrolls inside it. */
|
|
3
|
+
export declare const tableFrameVariants: (props?: ({
|
|
4
|
+
frame?: "none" | "card" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
6
|
export declare const tableClass = "w-full border-separate border-spacing-0 text-left text-base outline-none";
|
|
5
7
|
export declare const tableColumnVariants: (props?: ({
|
|
6
8
|
align?: "end" | "start" | null | undefined;
|
|
9
|
+
isSecondary?: boolean | null | undefined;
|
|
7
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
11
|
export declare const tableColumnLabelClass = "inline-flex items-center gap-1";
|
|
9
12
|
export declare const tableRowClass: string;
|
|
10
13
|
export declare const tableCellVariants: (props?: ({
|
|
11
14
|
align?: "end" | "start" | null | undefined;
|
|
15
|
+
isSecondary?: boolean | null | undefined;
|
|
12
16
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
17
|
export declare const tableEmptyClass = "px-4 py-12 text-center text-foreground-muted";
|
|
14
18
|
/** The size of the sort arrow, in pixels. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,
|
|
1
|
+
{"version":3,"file":"Table.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,sIAAsI;AACtI,eAAO,MAAM,kBAAkB;;8EAG7B,CAAC;AAEH,eAAO,MAAM,UAAU,6EAA6E,CAAC;AAUrG,eAAO,MAAM,mBAAmB;;;8EAO/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE,eAAO,MAAM,aAAa,QAMf,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;8EAG7B,CAAC;AAEF,eAAO,MAAM,eAAe,iDAAiD,CAAC;AAE9E,6CAA6C;AAC7C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
|
-
/** The card the table sits in. A table wider than the screen scrolls inside it. */
|
|
3
|
-
export const
|
|
2
|
+
/** The card the table sits in, or none inside a `Card` that is its frame already. A table wider than the screen scrolls inside it. */
|
|
3
|
+
export const tableFrameVariants = cva('overflow-x-auto', {
|
|
4
|
+
variants: { frame: { card: 'rounded-xl border border-border bg-card', none: '' } },
|
|
5
|
+
defaultVariants: { frame: 'card' },
|
|
6
|
+
});
|
|
4
7
|
export const tableClass = 'w-full border-separate border-spacing-0 text-left text-base outline-none';
|
|
5
8
|
const align = {
|
|
6
9
|
start: 'text-left',
|
|
7
10
|
end: 'text-right',
|
|
8
11
|
};
|
|
12
|
+
/** A column a narrow window leaves out, so the main ones have its width. */
|
|
13
|
+
const isSecondary = { true: 'hidden md:table-cell', false: '' };
|
|
9
14
|
export const tableColumnVariants = cva([
|
|
10
15
|
'border-b border-border px-4 py-2.5 text-xs font-semibold whitespace-nowrap text-foreground-muted',
|
|
11
16
|
'outline-none data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset',
|
|
12
17
|
'data-allows-sorting:cursor-default data-hovered:text-foreground',
|
|
13
|
-
], { variants: { align }, defaultVariants: { align: 'start' } });
|
|
18
|
+
], { variants: { align, isSecondary }, defaultVariants: { align: 'start', isSecondary: false } });
|
|
14
19
|
export const tableColumnLabelClass = 'inline-flex items-center gap-1';
|
|
15
20
|
export const tableRowClass = [
|
|
16
21
|
'group outline-none transition-colors motion-fast',
|
|
17
22
|
'data-hovered:bg-background-secondary data-pressed:bg-background-tertiary',
|
|
18
23
|
'data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset',
|
|
19
|
-
|
|
24
|
+
// A row that opens something says so to the pointer.
|
|
25
|
+
'data-href:cursor-pointer data-action:cursor-pointer',
|
|
20
26
|
].join(' ');
|
|
21
|
-
export const tableCellVariants = cva('border-b border-border px-4 py-3 align-middle text-foreground outline-none group-last:border-b-0 data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset', { variants: { align }, defaultVariants: { align: 'start' } });
|
|
27
|
+
export const tableCellVariants = cva('border-b border-border px-4 py-3 align-middle text-foreground outline-none group-last:border-b-0 data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset', { variants: { align, isSecondary }, defaultVariants: { align: 'start', isSecondary: false } });
|
|
22
28
|
export const tableEmptyClass = 'px-4 py-12 text-center text-foreground-muted';
|
|
23
29
|
/** The size of the sort arrow, in pixels. */
|
|
24
30
|
export const tableSortIconSize = 14;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.variants.js","sourceRoot":"","sources":["../../../src/components/Table/Table.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,
|
|
1
|
+
{"version":3,"file":"Table.variants.js","sourceRoot":"","sources":["../../../src/components/Table/Table.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,sIAAsI;AACtI,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC,iBAAiB,EAAE;IACvD,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,yCAAyC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IAClF,eAAe,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,0EAA0E,CAAC;AAErG,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,YAAY;CACT,CAAC;AAEX,4EAA4E;AAC5E,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,EAAE,EAAW,CAAC;AAEzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC;IACE,kGAAkG;IAClG,mGAAmG;IACnG,iEAAiE;CAClE,EACD,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAC9F,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,gCAAgC,CAAC;AAEtE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,kDAAkD;IAClD,0EAA0E;IAC1E,sFAAsF;IACtF,qDAAqD;IACrD,qDAAqD;CACtD,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,uLAAuL,EACvL,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAC9F,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,8CAA8C,CAAC;AAE9E,6CAA6C;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC"}
|
|
@@ -2,6 +2,7 @@ export * from './Box/index.js';
|
|
|
2
2
|
export * from './Button/index.js';
|
|
3
3
|
export * from './Card/index.js';
|
|
4
4
|
export * from './Checkbox/index.js';
|
|
5
|
+
export * from './ColorPicker/index.js';
|
|
5
6
|
export * from './DateField/index.js';
|
|
6
7
|
export * from './Dialog/index.js';
|
|
7
8
|
export * from './Fieldset/index.js';
|
|
@@ -13,6 +14,7 @@ export * from './IconButton/index.js';
|
|
|
13
14
|
export * from './Inline/index.js';
|
|
14
15
|
export * from './Link/index.js';
|
|
15
16
|
export * from './Logo/index.js';
|
|
17
|
+
export * from './LoadingMark/index.js';
|
|
16
18
|
export * from './Menu/index.js';
|
|
17
19
|
export * from './NumberField/index.js';
|
|
18
20
|
export * from './SearchField/index.js';
|
|
@@ -20,6 +22,7 @@ export * from './Segmented/index.js';
|
|
|
20
22
|
export * from './Select/index.js';
|
|
21
23
|
export * from './Skeleton/index.js';
|
|
22
24
|
export * from './Spinner/index.js';
|
|
25
|
+
export * from './Spotlight/index.js';
|
|
23
26
|
export * from './Stack/index.js';
|
|
24
27
|
export * from './Stat/index.js';
|
|
25
28
|
export * from './Switch/index.js';
|
|
@@ -34,4 +37,6 @@ export * from './Thumbnail/index.js';
|
|
|
34
37
|
export * from './Toast/index.js';
|
|
35
38
|
export * from './Tooltip/index.js';
|
|
36
39
|
export type { Space } from './scales.js';
|
|
40
|
+
export * from './Meter/index.js';
|
|
41
|
+
export * from './BarChart/index.js';
|
|
37
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from './Box/index.js';
|
|
|
2
2
|
export * from './Button/index.js';
|
|
3
3
|
export * from './Card/index.js';
|
|
4
4
|
export * from './Checkbox/index.js';
|
|
5
|
+
export * from './ColorPicker/index.js';
|
|
5
6
|
export * from './DateField/index.js';
|
|
6
7
|
export * from './Dialog/index.js';
|
|
7
8
|
export * from './Fieldset/index.js';
|
|
@@ -13,6 +14,7 @@ export * from './IconButton/index.js';
|
|
|
13
14
|
export * from './Inline/index.js';
|
|
14
15
|
export * from './Link/index.js';
|
|
15
16
|
export * from './Logo/index.js';
|
|
17
|
+
export * from './LoadingMark/index.js';
|
|
16
18
|
export * from './Menu/index.js';
|
|
17
19
|
export * from './NumberField/index.js';
|
|
18
20
|
export * from './SearchField/index.js';
|
|
@@ -20,6 +22,7 @@ export * from './Segmented/index.js';
|
|
|
20
22
|
export * from './Select/index.js';
|
|
21
23
|
export * from './Skeleton/index.js';
|
|
22
24
|
export * from './Spinner/index.js';
|
|
25
|
+
export * from './Spotlight/index.js';
|
|
23
26
|
export * from './Stack/index.js';
|
|
24
27
|
export * from './Stat/index.js';
|
|
25
28
|
export * from './Switch/index.js';
|
|
@@ -33,4 +36,6 @@ export * from './TextField/index.js';
|
|
|
33
36
|
export * from './Thumbnail/index.js';
|
|
34
37
|
export * from './Toast/index.js';
|
|
35
38
|
export * from './Tooltip/index.js';
|
|
39
|
+
export * from './Meter/index.js';
|
|
40
|
+
export * from './BarChart/index.js';
|
|
36
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -37,7 +37,7 @@ export declare const paddingX: {
|
|
|
37
37
|
readonly 6: "px-6";
|
|
38
38
|
readonly 8: "px-8";
|
|
39
39
|
readonly 10: "px-10";
|
|
40
|
-
readonly 12: "px-12";
|
|
40
|
+
readonly 12: "px-4 md:px-12";
|
|
41
41
|
};
|
|
42
42
|
export declare const paddingY: {
|
|
43
43
|
readonly 0: "py-0";
|
|
@@ -48,7 +48,7 @@ export declare const paddingY: {
|
|
|
48
48
|
readonly 5: "py-5";
|
|
49
49
|
readonly 6: "py-6";
|
|
50
50
|
readonly 8: "py-8";
|
|
51
|
-
readonly 10: "py-10";
|
|
51
|
+
readonly 10: "py-6 md:py-10";
|
|
52
52
|
readonly 12: "py-12";
|
|
53
53
|
};
|
|
54
54
|
/** A step on the spacing scale, in units of 4px. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../src/components/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;CAWN,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;;;;;;;CAWV,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../src/components/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;CAWN,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;;;;;;;CAWV,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;CAYX,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;CAYX,CAAC;AAEX,oDAAoD;AACpD,MAAM,MAAM,KAAK,GAAG,MAAM,OAAO,GAAG,CAAC"}
|
|
@@ -37,7 +37,8 @@ export const paddingX = {
|
|
|
37
37
|
6: 'px-6',
|
|
38
38
|
8: 'px-8',
|
|
39
39
|
10: 'px-10',
|
|
40
|
-
|
|
40
|
+
// A screen's own gutter, which a narrow window cannot spare.
|
|
41
|
+
12: 'px-4 md:px-12',
|
|
41
42
|
};
|
|
42
43
|
export const paddingY = {
|
|
43
44
|
0: 'py-0',
|
|
@@ -48,7 +49,8 @@ export const paddingY = {
|
|
|
48
49
|
5: 'py-5',
|
|
49
50
|
6: 'py-6',
|
|
50
51
|
8: 'py-8',
|
|
51
|
-
|
|
52
|
+
// A screen's own gutter, which a narrow window cannot spare.
|
|
53
|
+
10: 'py-6 md:py-10',
|
|
52
54
|
12: 'py-12',
|
|
53
55
|
};
|
|
54
56
|
//# sourceMappingURL=scales.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scales.js","sourceRoot":"","sources":["../../src/components/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;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AAK;IACR,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,OAAO;IACX,6DAA6D;IAC7D,EAAE,EAAE,eAAe;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,6DAA6D;IAC7D,EAAE,EAAE,eAAe;IACnB,EAAE,EAAE,OAAO;CACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LucideIcon } from 'lucide-react';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
3
|
import { type MenuAction } from '../../components/Menu/index.js';
|
|
4
4
|
export interface AppShellNavItem {
|
|
5
5
|
readonly id: string;
|
|
@@ -8,11 +8,20 @@ export interface AppShellNavItem {
|
|
|
8
8
|
readonly icon?: LucideIcon;
|
|
9
9
|
/** The screen being shown is this one, or inside it. */
|
|
10
10
|
readonly isCurrent?: boolean;
|
|
11
|
+
/** A short number beside it: how many it holds, or how many are new. */
|
|
12
|
+
readonly count?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The places inside a section, such as each kind of content under "Content". While the section is
|
|
15
|
+
* the current one they are listed in a column beside the rail, under the section's name.
|
|
16
|
+
*/
|
|
17
|
+
readonly children?: readonly AppShellNavGroup[];
|
|
11
18
|
}
|
|
12
19
|
export interface AppShellNavGroup {
|
|
13
20
|
readonly id: string;
|
|
14
21
|
/** A small heading over the group, such as "Content". The first group usually has none. */
|
|
15
22
|
readonly label?: string;
|
|
23
|
+
/** `end` puts the group at the bottom of the rail: the sections a person visits least. */
|
|
24
|
+
readonly place?: 'start' | 'end';
|
|
16
25
|
readonly items: readonly AppShellNavItem[];
|
|
17
26
|
}
|
|
18
27
|
export interface AppShellAccount {
|
|
@@ -25,23 +34,44 @@ export interface AppShellAccount {
|
|
|
25
34
|
readonly actions: readonly MenuAction[];
|
|
26
35
|
readonly onAction: (id: string) => void;
|
|
27
36
|
}
|
|
37
|
+
export interface AppShellSearch {
|
|
38
|
+
/** What the button says and is called: "Search, jump to or create…". */
|
|
39
|
+
readonly label: string;
|
|
40
|
+
/** The keys that open it too, as they are shown: "⌘K". */
|
|
41
|
+
readonly shortcut?: string;
|
|
42
|
+
readonly onPress: () => void;
|
|
43
|
+
}
|
|
28
44
|
export interface AppShellProps {
|
|
29
|
-
/**
|
|
30
|
-
readonly
|
|
31
|
-
/** The site's name, at the top of the
|
|
45
|
+
/** What the mark at the top of the rail stands for, such as "Velocity", for screen readers. */
|
|
46
|
+
readonly logoLabel: string;
|
|
47
|
+
/** The site's name, at the top of a section's column and of the panel of a narrow window. */
|
|
32
48
|
readonly siteName: string;
|
|
33
|
-
/** Under the site's name: its
|
|
49
|
+
/** Under the site's name: its address, or its template. */
|
|
34
50
|
readonly siteDetail?: string;
|
|
35
51
|
/** Names the navigation for screen readers, such as "Main". */
|
|
36
52
|
readonly navLabel: string;
|
|
53
|
+
/** The sections of the rail, in groups. A section may hold places of its own (`children`). */
|
|
37
54
|
readonly nav: readonly AppShellNavGroup[];
|
|
55
|
+
/** The name of the button that opens the navigation on a narrow window, such as "Open the menu". */
|
|
56
|
+
readonly menuLabel: string;
|
|
38
57
|
/** The words of the link that jumps past the navigation, such as "Skip to content". */
|
|
39
58
|
readonly skipLabel: string;
|
|
40
|
-
/** The
|
|
59
|
+
/** The button at the end of the bar that opens the search. */
|
|
60
|
+
readonly search?: AppShellSearch;
|
|
61
|
+
/** The signed-in person, at the bottom of the rail, with their menu. */
|
|
41
62
|
readonly account?: AppShellAccount;
|
|
63
|
+
/**
|
|
64
|
+
* The screen has nothing for the bar across the top, so from `md` up there is none and the screen has the
|
|
65
|
+
* height. Home is such a screen. A phone keeps the bar, since its menu is there.
|
|
66
|
+
*/
|
|
67
|
+
readonly isBarHidden?: boolean;
|
|
42
68
|
/** The screen. */
|
|
43
69
|
readonly children: ReactNode;
|
|
44
70
|
}
|
|
45
|
-
/**
|
|
46
|
-
|
|
71
|
+
/**
|
|
72
|
+
* The frame around every screen: the rail of sections, the places of the current section beside it,
|
|
73
|
+
* the bar across the top, which holds the screen's own header (its `PageHeader` or `SaveBar`) and the
|
|
74
|
+
* search, and the main area, which holds only the screen's content.
|
|
75
|
+
*/
|
|
76
|
+
export declare function AppShell({ logoLabel, siteName, siteDetail, navLabel, nav, menuLabel, skipLabel, search, account, isBarHidden, children }: AppShellProps): import("react").JSX.Element;
|
|
47
77
|
//# sourceMappingURL=AppShell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAsDvE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC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2DAA2D;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8FAA8F;IAC9F,QAAQ,CAAC,GAAG,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC1C,oGAAoG;IACpG,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IACjC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB;IAClB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AA2CD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAmB,EAAE,QAAQ,EAAE,EAAE,aAAa,+BA0L/J"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronsUpDown } from 'lucide-react';
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronsUpDown, Menu as MenuIcon, Search } from 'lucide-react';
|
|
3
|
+
import { useCallback, useRef, useState } from 'react';
|
|
4
|
+
import { Button as AriaButton, Dialog as AriaDialog, DialogTrigger, Link, Modal, ModalOverlay } from 'react-aria-components';
|
|
5
|
+
import { Logo } from '../../components/Logo/index.js';
|
|
4
6
|
import { Menu } from '../../components/Menu/index.js';
|
|
5
|
-
import {
|
|
7
|
+
import { Tooltip } from '../../components/Tooltip/index.js';
|
|
8
|
+
import { PageBarBackContext, PageBarContext } from '../page-bar.js';
|
|
9
|
+
import { appShellAccountDetailClass, appShellAccountIconSize, appShellAccountNameClass, appShellAccountTextClass, appShellBarVariants, appShellBarSlotClass, appShellSiteClass, appShellSiteDetailClass, appShellSiteNameClass, appShellClass, appShellColumnClass, appShellDrawerAccountClass, appShellDrawerAvatarClass, appShellDrawerChildrenClass, appShellDrawerClass, appShellDrawerContentClass, appShellDrawerFooterClass, appShellDrawerNavClass, appShellDrawerOverlayClass, appShellGroupLabelClass, appShellHiddenClass, appShellMainClass, appShellMainId, appShellMenuButtonVariants, appShellMenuIconSize, appShellNavCountClass, appShellNavIconSize, appShellNavLabelClass, appShellNavLinkVariants, appShellNavListClass, appShellRailAccountClass, appShellRailAvatarClass, appShellRailBadgeClass, appShellRailClass, appShellRailGroupVariants, appShellRailIconSize, appShellRailLabelClass, appShellRailLinkVariants, appShellRailListClass, appShellRailLogoClass, appShellRailNavClass, appShellSearchVariants, appShellSearchIconSize, appShellSearchLabelVariants, appShellSearchShortcutVariants, appShellSectionNavVariants, appShellSectionVariants, appShellSkipClass, } from './AppShell.variants.js';
|
|
6
10
|
/** The first letters of up to two names: "Maya Ellison" is "ME". */
|
|
7
11
|
const initials = (name) => name
|
|
8
12
|
.split(/\s+/)
|
|
@@ -10,8 +14,43 @@ const initials = (name) => name
|
|
|
10
14
|
.slice(0, 2)
|
|
11
15
|
.map((word) => word.charAt(0).toUpperCase())
|
|
12
16
|
.join('');
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
/** One place in a list with its words showing: the column beside the rail, and the panel of a narrow window. */
|
|
18
|
+
function PlaceLink({ item, onPress }) {
|
|
19
|
+
const { label, href, icon: Icon, isCurrent = false, count } = item;
|
|
20
|
+
return (_jsxs(Link, { className: appShellNavLinkVariants({ isCurrent }), href: href, ...(isCurrent && { 'aria-current': 'page' }), ...(onPress && { onPress }), children: [Icon && _jsx(Icon, { "aria-hidden": true, size: appShellNavIconSize }), _jsx("span", { className: appShellNavLabelClass, children: label }), count !== undefined && _jsx("span", { className: appShellNavCountClass, children: count })] }));
|
|
21
|
+
}
|
|
22
|
+
/** Groups of places, each under its small heading. */
|
|
23
|
+
function PlaceGroups({ groups, onPress }) {
|
|
24
|
+
return groups.map((group) => (_jsxs("div", { role: "group", ...(group.label !== undefined && { 'aria-label': group.label }), children: [group.label !== undefined && (_jsx("div", { "aria-hidden": true, className: appShellGroupLabelClass, children: group.label })), _jsx("ul", { className: appShellNavListClass, children: group.items.map((item) => (_jsx("li", { children: _jsx(PlaceLink, { item: item, onPress: onPress }) }, item.id))) })] }, group.id)));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The frame around every screen: the rail of sections, the places of the current section beside it,
|
|
28
|
+
* the bar across the top, which holds the screen's own header (its `PageHeader` or `SaveBar`) and the
|
|
29
|
+
* search, and the main area, which holds only the screen's content.
|
|
30
|
+
*/
|
|
31
|
+
export function AppShell({ logoLabel, siteName, siteDetail, navLabel, nav, menuLabel, skipLabel, search, account, isBarHidden = false, children }) {
|
|
32
|
+
// Where the screen's header is drawn: the screen's own parts are handed it once the bar is there.
|
|
33
|
+
const [bar, setBar] = useState(null);
|
|
34
|
+
// How many parts of the screen say its bar leads back (one, or none): counted, so one leaving never undoes another.
|
|
35
|
+
const [leadingBack, setLeadingBack] = useState(0);
|
|
36
|
+
const leadsBack = useCallback((yes) => setLeadingBack((count) => Math.max(0, count + (yes ? 1 : -1))), []);
|
|
37
|
+
const isScreenLeadingBack = leadingBack > 0;
|
|
38
|
+
const site = (_jsxs("div", { className: appShellSiteClass, children: [_jsx("span", { className: appShellSiteNameClass, children: siteName }), siteDetail !== undefined && _jsx("span", { className: appShellSiteDetailClass, children: siteDetail })] }));
|
|
39
|
+
const current = nav.flatMap((group) => group.items).find((item) => item.isCurrent === true && (item.children?.length ?? 0) > 0);
|
|
40
|
+
// The column keeps showing the places it last held while it closes, so they slide away with it
|
|
41
|
+
// rather than vanish first. Once closed it is inert and hidden: nobody can reach or hear what it still holds.
|
|
42
|
+
const lastPlaces = useRef(undefined);
|
|
43
|
+
if (current !== undefined)
|
|
44
|
+
lastPlaces.current = current;
|
|
45
|
+
const places = current ?? lastPlaces.current;
|
|
46
|
+
const isColumnOpen = current !== undefined;
|
|
47
|
+
const accountWords = account !== undefined && (_jsxs(_Fragment, { children: [_jsx("span", { className: appShellHiddenClass, children: account.label }), _jsx("span", { "aria-hidden": true, className: appShellRailAvatarClass, children: initials(account.name) })] }));
|
|
48
|
+
return (_jsxs("div", { className: appShellClass, children: [_jsx("a", { className: appShellSkipClass, href: `#${appShellMainId}`,
|
|
49
|
+
// The link is followed here, not by the browser: a page with a base address would be sent
|
|
50
|
+
// to that address, off the screen the person is on.
|
|
51
|
+
onClick: (event) => {
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
document.getElementById(appShellMainId)?.focus();
|
|
54
|
+
}, children: skipLabel }), _jsxs("aside", { className: appShellRailClass, children: [_jsx("div", { className: appShellRailLogoClass, children: _jsx(Logo, { label: logoLabel, tone: "rail" }) }), _jsx("nav", { "aria-label": navLabel, className: appShellRailNavClass, children: nav.map((group) => (_jsx("div", { role: "group", className: appShellRailGroupVariants({ place: group.place }), ...(group.label !== undefined && { 'aria-label': group.label }), children: _jsx("ul", { className: appShellRailListClass, children: group.items.map(({ id, label, href, icon: Icon, isCurrent = false, count }) => (_jsx("li", { children: _jsx(Tooltip, { content: label, placement: "right", children: _jsxs(Link, { className: appShellRailLinkVariants({ isCurrent }), href: href, ...(isCurrent && { 'aria-current': 'page' }), children: [Icon && _jsx(Icon, { "aria-hidden": true, size: appShellRailIconSize }), _jsx("span", { className: appShellRailLabelClass, children: label }), count !== undefined && (_jsx("span", { "aria-hidden": true, className: appShellRailBadgeClass, children: count }))] }) }) }, id))) }) }, group.id))) }), account !== undefined && (_jsx(Menu, { placement: "top start", actions: account.actions, onAction: account.onAction, trigger: _jsxs(AriaButton, { className: appShellRailAccountClass, children: [accountWords, _jsxs("span", { className: appShellHiddenClass, children: [_jsx("span", { children: account.name }), account.detail !== undefined && _jsx("span", { children: account.detail })] })] }) }))] }), _jsx("div", { className: appShellSectionVariants({ isOpen: isColumnOpen }), inert: !isColumnOpen, ...(!isColumnOpen && { 'aria-hidden': true }), children: places?.children !== undefined && (_jsxs("nav", { "aria-label": places.label, className: appShellSectionNavVariants({ isOpen: isColumnOpen }), children: [site, _jsx(PlaceGroups, { groups: places.children })] })) }), _jsxs("div", { className: appShellColumnClass, children: [_jsxs("header", { className: appShellBarVariants({ isHidden: isBarHidden }), children: [_jsxs(DialogTrigger, { children: [_jsx(AriaButton, { "aria-label": menuLabel, className: appShellMenuButtonVariants({ isScreenLeadingBack }), children: _jsx(MenuIcon, { "aria-hidden": true, size: appShellMenuIconSize }) }), _jsx(ModalOverlay, { isDismissable: true, className: appShellDrawerOverlayClass, children: _jsx(Modal, { className: appShellDrawerClass, children: _jsx(AriaDialog, { "aria-label": menuLabel, className: appShellDrawerContentClass, children: ({ close }) => (_jsxs(_Fragment, { children: [site, _jsx("nav", { "aria-label": navLabel, className: appShellDrawerNavClass, children: nav.map((group) => (_jsxs("div", { role: "group", ...(group.label !== undefined && { 'aria-label': group.label }), children: [group.label !== undefined && (_jsx("div", { "aria-hidden": true, className: appShellGroupLabelClass, children: group.label })), _jsx("ul", { className: appShellNavListClass, children: group.items.map((item) => (_jsxs("li", { children: [_jsx(PlaceLink, { item: item, onPress: close }), item.children !== undefined && item.children.length > 0 && (_jsx("div", { className: appShellDrawerChildrenClass, children: _jsx(PlaceGroups, { groups: item.children, onPress: close }) }))] }, item.id))) })] }, group.id))) }), account !== undefined && (_jsx("div", { className: appShellDrawerFooterClass, children: _jsx(Menu, { placement: "top start", actions: account.actions, onAction: account.onAction, trigger: _jsxs(AriaButton, { className: appShellDrawerAccountClass, children: [_jsx("span", { className: appShellHiddenClass, children: account.label }), _jsx("span", { "aria-hidden": true, className: appShellDrawerAvatarClass, children: initials(account.name) }), _jsxs("span", { className: appShellAccountTextClass, children: [_jsx("span", { className: appShellAccountNameClass, children: account.name }), account.detail !== undefined && _jsx("span", { className: appShellAccountDetailClass, children: account.detail })] }), _jsx(ChevronsUpDown, { "aria-hidden": true, size: appShellAccountIconSize })] }) }) }))] })) }) }) })] }), _jsx("div", { ref: setBar, className: appShellBarSlotClass }), search !== undefined && (_jsxs(AriaButton, { className: appShellSearchVariants({ isScreenLeadingBack }), onPress: search.onPress, children: [_jsx(Search, { "aria-hidden": true, size: appShellSearchIconSize }), _jsx("span", { className: appShellSearchLabelVariants({ isScreenLeadingBack }), children: search.label }), search.shortcut !== undefined && (_jsx("kbd", { "aria-hidden": true, className: appShellSearchShortcutVariants({ isScreenLeadingBack }), children: search.shortcut }))] }))] }), _jsx("main", { id: appShellMainId, tabIndex: -1, className: appShellMainClass, children: _jsx(PageBarContext, { value: bar, children: _jsx(PageBarBackContext, { value: leadsBack, children: children }) }) })] })] }));
|
|
16
55
|
}
|
|
17
56
|
//# sourceMappingURL=AppShell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAmB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,IAAI,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CA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AAE,oBAAoB,GAAI,EACpD,MAAM,KAAK,SAAS,IAAI,CACvB,MAAC,UAAU,IAAC,SAAS,EAAE,sBAAsB,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,aAC7F,KAAC,MAAM,yBAAa,IAAI,EAAE,sBAAsB,GAAI,EACpD,eAAM,SAAS,EAAE,2BAA2B,CAAC,EAAE,mBAAmB,EAAE,CAAC,YAClE,MAAM,CAAC,KAAK,GACR,EACN,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,CAChC,mCAAiB,SAAS,EAAE,8BAA8B,CAAC,EAAE,mBAAmB,EAAE,CAAC,YAChF,MAAM,CAAC,QAAQ,GACZ,CACP,IACU,CACd,IACM,EACT,eAAM,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,iBAAiB,YAClE,KAAC,cAAc,IAAC,KAAK,EAAE,GAAG,YACxB,KAAC,kBAAkB,IAAC,KAAK,EAAE,SAAS,YAAG,QAAQ,GAAsB,GACtD,GACZ,IACH,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,35 +1,104 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* From `md` up the window has three parts side by side: the rail of sections; beside it, when the
|
|
3
|
+
* section being shown has places of its own, a column naming them; then the bar across the top and
|
|
4
|
+
* the screen under it. The rail and the column sit on the rail's dark ground, which fills the window,
|
|
5
|
+
* and the bar and the screen in one rounded panel inset from its edges. On a narrower window (a phone,
|
|
6
|
+
* a tablet held upright) the rail and the column are behind a button in the bar, so the screen has
|
|
7
|
+
* the width.
|
|
8
|
+
*/
|
|
9
|
+
export declare const appShellClass = "flex h-dvh flex-col overflow-hidden bg-background text-foreground md:flex-row md:bg-rail";
|
|
3
10
|
export declare const appShellSkipClass: string;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
export declare const appShellRailClass = "hidden w-16 shrink-0 flex-col items-center gap-1 bg-rail px-2 py-3 md:flex";
|
|
12
|
+
export declare const appShellRailLogoClass = "flex h-11 w-11 shrink-0 items-center justify-center pb-2";
|
|
13
|
+
export declare const appShellRailNavClass = "flex min-h-0 w-full flex-1 flex-col items-center gap-1 overflow-y-auto";
|
|
14
|
+
/** A group of sections. Each after the first is set off by a short rule; the group placed at the end sits at the bottom. */
|
|
15
|
+
export declare const appShellRailGroupVariants: (props?: ({
|
|
16
|
+
place?: "end" | "start" | null | undefined;
|
|
17
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
|
+
export declare const appShellRailListClass = "flex flex-col items-center gap-1";
|
|
19
|
+
export declare const appShellRailLinkVariants: (props?: ({
|
|
20
|
+
isCurrent?: boolean | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
/** The words of a section's link: read out, and shown in a tooltip, since the rail shows only the icon. */
|
|
23
|
+
export declare const appShellRailLabelClass = "sr-only";
|
|
24
|
+
/** A number on a section, such as what is new in it, at the corner of its icon. */
|
|
25
|
+
export declare const appShellRailBadgeClass = "absolute top-1 right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-rail-foreground px-1 text-xs font-bold text-rail";
|
|
26
|
+
export declare const appShellRailIconSize = 20;
|
|
27
|
+
export declare const appShellRailAccountClass: string;
|
|
28
|
+
export declare const appShellRailAvatarClass = "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-rail-current text-xs font-bold text-rail-foreground";
|
|
29
|
+
/**
|
|
30
|
+
* On the rail's dark ground with no edge of its own, in the dark theme's colours whatever the editor's theme.
|
|
31
|
+
* It opens and closes by its width, so the panel beside it makes room as it slides out and takes the room back
|
|
32
|
+
* as it goes, and its places fade and slide in a little behind it. A person who asks for less motion sees it
|
|
33
|
+
* simply open and close.
|
|
34
|
+
*/
|
|
35
|
+
export declare const appShellSectionVariants: (props?: ({
|
|
36
|
+
isOpen?: boolean | null | undefined;
|
|
37
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
|
+
/** What the column holds: as wide as the column open, so its words never wrap while it opens or closes. */
|
|
39
|
+
export declare const appShellSectionNavVariants: (props?: ({
|
|
40
|
+
isOpen?: boolean | null | undefined;
|
|
41
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
42
|
+
/** The site's name and address, at the top of a section's column and of a narrow window's panel. */
|
|
43
|
+
export declare const appShellSiteClass = "flex min-w-0 flex-col gap-0.5 px-2.5";
|
|
44
|
+
export declare const appShellSiteNameClass = "truncate text-base font-bold text-foreground";
|
|
45
|
+
export declare const appShellSiteDetailClass = "truncate text-xs text-foreground-subtle";
|
|
46
|
+
export declare const appShellGroupLabelClass = "px-2.5 pb-1.5 text-xs font-semibold tracking-widest text-foreground-subtle uppercase";
|
|
11
47
|
export declare const appShellNavListClass = "flex flex-col gap-0.5";
|
|
12
48
|
export declare const appShellNavLinkVariants: (props?: ({
|
|
13
49
|
isCurrent?: boolean | null | undefined;
|
|
14
50
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
51
|
+
export declare const appShellNavLabelClass = "min-w-0 flex-1 truncate";
|
|
52
|
+
export declare const appShellNavCountClass = "shrink-0 text-xs font-medium text-foreground-muted tabular-nums";
|
|
53
|
+
export declare const appShellNavIconSize = 16;
|
|
54
|
+
/** From `md` up, the panel: inset from the window's edges, its corners rounded, the dark ground showing around it. */
|
|
55
|
+
export declare const appShellColumnClass = "flex min-h-0 min-w-0 flex-1 flex-col view-shell-panel md:my-2 md:mr-2 md:overflow-hidden md:rounded-2xl md:border md:border-border md:bg-card md:shadow-sm";
|
|
56
|
+
/**
|
|
57
|
+
* One bar on every screen, one row on every window: the menu (on a phone), the screen's header (its title,
|
|
58
|
+
* state and buttons, which fold into a menu on a phone) and the search at the end.
|
|
59
|
+
*/
|
|
60
|
+
export declare const appShellBarVariants: (props?: ({
|
|
61
|
+
isHidden?: boolean | null | undefined;
|
|
62
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
63
|
+
/** Where a screen's `PageHeader` or `SaveBar` is drawn. */
|
|
64
|
+
export declare const appShellBarSlotClass = "flex min-w-0 flex-1 items-center";
|
|
65
|
+
/** The button that opens the search, at the end of the bar. Below `xl` it shows only its icon, and its words are read out. */
|
|
66
|
+
export declare const appShellSearchVariants: (props?: ({
|
|
67
|
+
isScreenLeadingBack?: boolean | null | undefined;
|
|
68
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
69
|
+
export declare const appShellSearchLabelVariants: (props?: ({
|
|
70
|
+
isScreenLeadingBack?: boolean | null | undefined;
|
|
71
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
72
|
+
export declare const appShellSearchShortcutVariants: (props?: ({
|
|
73
|
+
isScreenLeadingBack?: boolean | null | undefined;
|
|
74
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
75
|
+
export declare const appShellSearchIconSize = 16;
|
|
76
|
+
export declare const appShellMenuButtonVariants: (props?: ({
|
|
77
|
+
isScreenLeadingBack?: boolean | null | undefined;
|
|
78
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
79
|
+
export declare const appShellMenuIconSize = 20;
|
|
80
|
+
/** The navigation of a narrow window: a panel that slides in from the edge the button is on. */
|
|
81
|
+
export declare const appShellDrawerOverlayClass = "fixed inset-0 layer-overlay flex bg-scrim motion-scrim";
|
|
82
|
+
export declare const appShellDrawerClass = "h-full w-72 max-w-full border-r border-border bg-card shadow-xl outline-none motion-sheet-start";
|
|
83
|
+
export declare const appShellDrawerContentClass = "flex h-full flex-col gap-4 overflow-y-auto px-3 py-5 outline-none";
|
|
84
|
+
export declare const appShellDrawerNavClass = "flex flex-col gap-4";
|
|
85
|
+
/** A section's own places, under its link in the panel. */
|
|
86
|
+
export declare const appShellDrawerChildrenClass = "flex flex-col gap-0.5 border-l border-border pl-3 ml-4.5";
|
|
87
|
+
export declare const appShellDrawerFooterClass = "mt-auto border-t border-border pt-3";
|
|
88
|
+
export declare const appShellDrawerAccountClass: string;
|
|
89
|
+
export declare const appShellDrawerAvatarClass = "flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-border bg-background-tertiary text-xs font-semibold text-foreground";
|
|
18
90
|
export declare const appShellAccountTextClass = "flex min-w-0 flex-1 flex-col";
|
|
19
91
|
export declare const appShellAccountNameClass = "truncate text-sm font-semibold text-foreground";
|
|
20
92
|
export declare const appShellAccountDetailClass = "truncate text-xs text-foreground-muted";
|
|
93
|
+
/** On the rail only the initials show: the words are for screen readers, and the tooltip. */
|
|
94
|
+
export declare const appShellHiddenClass = "sr-only";
|
|
95
|
+
export declare const appShellAccountIconSize = 14;
|
|
21
96
|
/**
|
|
22
|
-
* `relative`, so that anything placed out of the flow inside the
|
|
97
|
+
* `relative`, so that anything placed out of the flow inside the screen (a label only screen readers
|
|
23
98
|
* get) scrolls with it. Without it such an element is placed against the page and makes the page
|
|
24
99
|
* itself scroll far past the frame.
|
|
25
100
|
*/
|
|
26
|
-
export declare const appShellMainClass = "relative
|
|
101
|
+
export declare const appShellMainClass = "relative min-h-0 min-w-0 flex-1 overflow-auto bg-background outline-none";
|
|
27
102
|
/** The id of the main area, which the skip link jumps to. */
|
|
28
103
|
export declare const appShellMainId = "main";
|
|
29
|
-
/** The size of a navigation icon, in pixels. */
|
|
30
|
-
export declare const appShellNavIconSize = 16;
|
|
31
|
-
/** The size of the arrows on the account button, in pixels. */
|
|
32
|
-
export declare const appShellAccountIconSize = 14;
|
|
33
|
-
/** The word that says what the button is, for screen readers only: the name and detail follow it. */
|
|
34
|
-
export declare const appShellAccountLabelClass = "sr-only";
|
|
35
104
|
//# sourceMappingURL=AppShell.variants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.variants.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"AppShell.variants.d.ts","sourceRoot":"","sources":["../../../src/patterns/AppShell/AppShell.variants.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,6FAA6F,CAAC;AAExH,eAAO,MAAM,iBAAiB,QAGnB,CAAC;AAIZ,eAAO,MAAM,iBAAiB,+EAA+E,CAAC;AAC9G,eAAO,MAAM,qBAAqB,6DAA6D,CAAC;AAChG,eAAO,MAAM,oBAAoB,2EAA2E,CAAC;AAC7G,4HAA4H;AAC5H,eAAO,MAAM,yBAAyB;;8EAQpC,CAAC;AACH,eAAO,MAAM,qBAAqB,qCAAqC,CAAC;AACxE,eAAO,MAAM,wBAAwB;;8EAcpC,CAAC;AACF,2GAA2G;AAC3G,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,yIACqG,CAAC;AACzI,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,wBAAwB,QAG1B,CAAC;AACZ,eAAO,MAAM,uBAAuB,0HACqF,CAAC;AAI1H;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;8EAKlC,CAAC;AACH,2GAA2G;AAC3G,eAAO,MAAM,0BAA0B;;8EAKrC,CAAC;AACH,oGAAoG;AACpG,eAAO,MAAM,iBAAiB,yCAAyC,CAAC;AACxE,eAAO,MAAM,qBAAqB,iDAAiD,CAAC;AACpF,eAAO,MAAM,uBAAuB,4CAA4C,CAAC;AACjF,eAAO,MAAM,uBAAuB,yFAAyF,CAAC;AAC9H,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,uBAAuB;;8EAcnC,CAAC;AACF,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAC/D,eAAO,MAAM,qBA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