prime-ui-kit 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -18
- package/dist/chunks/{chunk-4PSQ64S4.js → chunk-7WWZYGRC.js} +3697 -3738
- package/dist/chunks/{chunk-6TPHKCUJ.js → chunk-A4WE3UNC.js} +27340 -26893
- package/dist/chunks/{chunk-A7OQWH6R.js → chunk-PRP4B6OG.js} +1 -1
- package/dist/chunks/{chunk-HDBQICPW.js → chunk-SVFWPLNW.js} +49 -20
- package/dist/color-picker.d.ts +1 -1
- package/dist/color-picker.js +3 -3
- package/dist/components/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/chart-frame/ChartFrame.d.ts +1 -1
- package/dist/components/chat/ChatRows.d.ts +5 -1
- package/dist/components/color-picker/ColorPicker.d.ts +18 -1
- package/dist/components/data-table/DataTable.d.ts +1 -1
- package/dist/components/index.d.ts +0 -4
- package/dist/components/pagination/Pagination.d.ts +5 -1
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/slider/Slider.d.ts +1 -1
- package/dist/components/smart-filter/SmartFilter.d.ts +4 -5
- package/dist/icon-set.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +5 -9
- package/dist/internal/barPlan.d.ts +44 -0
- package/dist/internal/overlay/FloatingPanel.d.ts +1 -1
- package/dist/internal/overlay/focus.d.ts +3 -2
- package/dist/internal/parts.d.ts +1 -1
- package/dist/internal/slot.d.ts +0 -30
- package/dist/layout/app-shell/AppShell.d.ts +19 -38
- package/dist/layout/index.d.ts +3 -3
- package/dist/layout/page/Page.d.ts +263 -0
- package/dist/layout/sidebar/Sidebar.d.ts +1 -1
- package/dist/skill/SKILL.md +10 -10
- package/dist/skill/anti-slop.md +101 -5
- package/dist/skill/api-contract.md +1 -1
- package/dist/skill/cheatsheet.md +27 -22
- package/dist/skill/checklist.md +7 -3
- package/dist/skill/choosing.md +9 -8
- package/dist/skill/components.md +3 -5
- package/dist/skill/composition.md +177 -152
- package/dist/skill/foundations.md +9 -9
- package/dist/skill/layouts.md +39 -98
- package/dist/skill/reference/components/avatar/COMPONENT.md +2 -2
- package/dist/skill/reference/components/avatar/examples/team-group.tsx +1 -1
- package/dist/skill/reference/components/banner/COMPONENT.md +4 -4
- package/dist/skill/reference/components/banner/examples/examples.module.css +6 -1
- package/dist/skill/reference/components/banner/examples/page-strip.tsx +24 -22
- package/dist/skill/reference/components/breadcrumb/COMPONENT.md +9 -8
- package/dist/skill/reference/components/button/COMPONENT.md +1 -0
- package/dist/skill/reference/components/button/examples/hold-to-confirm.tsx +1 -1
- package/dist/skill/reference/components/button/examples/on-colored-host.tsx +8 -8
- package/dist/skill/reference/components/card/COMPONENT.md +7 -7
- package/dist/skill/reference/components/card/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/card/examples/screen.tsx +184 -198
- package/dist/skill/reference/components/chart-frame/COMPONENT.md +1 -1
- package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +9 -9
- package/dist/skill/reference/components/chat/COMPONENT.md +4 -4
- package/dist/skill/reference/components/chat/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/chat/examples/screen.tsx +110 -117
- package/dist/skill/reference/components/chat-list/COMPONENT.md +2 -2
- package/dist/skill/reference/components/chat-list/examples/controlled.tsx +2 -2
- package/dist/skill/reference/components/chat-list/examples/examples.module.css +8 -0
- package/dist/skill/reference/components/checkbox/examples/examples.module.css +3 -2
- package/dist/skill/reference/components/code-block/COMPONENT.md +1 -1
- package/dist/skill/reference/components/code-block/examples/color-scheme.tsx +2 -4
- package/dist/skill/reference/components/code-block/examples/examples.module.css +0 -11
- package/dist/skill/reference/components/color-picker/COMPONENT.md +18 -7
- package/dist/skill/reference/components/color-picker/examples/examples.module.css +2 -5
- package/dist/skill/reference/components/color-picker/examples/overview.tsx +5 -10
- package/dist/skill/reference/components/color-picker/examples/sizes.tsx +4 -8
- package/dist/skill/reference/components/crossfade/COMPONENT.md +2 -2
- package/dist/skill/reference/components/crossfade/examples/screen.tsx +107 -112
- package/dist/skill/reference/components/data-table/COMPONENT.md +5 -5
- package/dist/skill/reference/components/data-table/examples/examples.module.css +9 -0
- package/dist/skill/reference/components/data-table/examples/screen.tsx +42 -52
- package/dist/skill/reference/components/data-table/examples/server.tsx +6 -2
- package/dist/skill/reference/components/datepicker/examples/examples.module.css +6 -0
- package/dist/skill/reference/components/datepicker/examples/inline-panel.tsx +3 -1
- package/dist/skill/reference/components/description-list/COMPONENT.md +1 -1
- package/dist/skill/reference/components/description-list/examples/screen.tsx +120 -127
- package/dist/skill/reference/components/digit-input/examples/grouped.tsx +4 -4
- package/dist/skill/reference/components/digit-input/examples/validation.tsx +1 -1
- package/dist/skill/reference/components/divider/COMPONENT.md +2 -2
- package/dist/skill/reference/components/divider/examples/examples.module.css +4 -1
- package/dist/skill/reference/components/divider/examples/vertical.tsx +22 -9
- package/dist/skill/reference/components/dnd/examples/examples.module.css +3 -1
- package/dist/skill/reference/components/drawer/COMPONENT.md +1 -1
- package/dist/skill/reference/components/drawer/examples/placement.tsx +26 -31
- package/dist/skill/reference/components/drawer/examples/screen.tsx +137 -160
- package/dist/skill/reference/components/dropdown/COMPONENT.md +1 -1
- package/dist/skill/reference/components/example-frame/COMPONENT.md +3 -3
- package/dist/skill/reference/components/field-list/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/field-list/examples/screen.tsx +19 -19
- package/dist/skill/reference/components/fieldset/COMPONENT.md +1 -1
- package/dist/skill/reference/components/fieldset/examples/states.tsx +1 -1
- package/dist/skill/reference/components/file-upload/COMPONENT.md +1 -1
- package/dist/skill/reference/components/file-upload/examples/screen.module.css +2 -2
- package/dist/skill/reference/components/file-upload/examples/screen.tsx +65 -81
- package/dist/skill/reference/components/gallery/COMPONENT.md +1 -0
- package/dist/skill/reference/components/gantt/COMPONENT.md +1 -1
- package/dist/skill/reference/components/gantt/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/gantt/examples/screen.tsx +55 -73
- package/dist/skill/reference/components/hint/examples/examples.module.css +10 -1
- package/dist/skill/reference/components/hint/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/kanban/COMPONENT.md +1 -1
- package/dist/skill/reference/components/kanban/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/kanban/examples/screen.tsx +50 -65
- package/dist/skill/reference/components/kbd/COMPONENT.md +1 -1
- package/dist/skill/reference/components/label/examples/examples.module.css +12 -1
- package/dist/skill/reference/components/label/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/list/COMPONENT.md +3 -3
- package/dist/skill/reference/components/media-viewer/examples/controlled.tsx +16 -16
- package/dist/skill/reference/components/media-viewer/examples/examples.module.css +1 -3
- package/dist/skill/reference/components/pagination/COMPONENT.md +11 -3
- package/dist/skill/reference/components/pagination/examples/controlled.tsx +2 -1
- package/dist/skill/reference/components/popover/COMPONENT.md +3 -2
- package/dist/skill/reference/components/popover/examples/width.tsx +13 -1
- package/dist/skill/reference/components/slider/COMPONENT.md +3 -3
- package/dist/skill/reference/components/slider/examples/states.tsx +14 -10
- package/dist/skill/reference/components/smart-filter/COMPONENT.md +13 -13
- package/dist/skill/reference/components/smart-filter/examples/examples.module.css +3 -0
- package/dist/skill/reference/components/smart-filter/examples/many-values.tsx +12 -8
- package/dist/skill/reference/components/smart-filter/examples/sizes.tsx +7 -3
- package/dist/skill/reference/components/sparkline/COMPONENT.md +1 -0
- package/dist/skill/reference/components/sparkline/examples/curve.tsx +16 -11
- package/dist/skill/reference/components/sparkline/examples/states.tsx +14 -10
- package/dist/skill/reference/components/switch/COMPONENT.md +1 -1
- package/dist/skill/reference/components/tabs/COMPONENT.md +1 -1
- package/dist/skill/reference/components/typography/COMPONENT.md +2 -2
- package/dist/skill/reference/foundation.md +15 -11
- package/dist/skill/reference/layout/app-shell/COMPONENT.md +25 -38
- package/dist/skill/reference/layout/app-shell/examples/footer.tsx +10 -10
- package/dist/skill/reference/layout/app-shell/examples/overview.tsx +20 -22
- package/dist/skill/reference/layout/app-shell/examples/screen.module.css +2 -2
- package/dist/skill/reference/layout/app-shell/examples/screen.tsx +25 -30
- package/dist/skill/reference/layout/app-shell/examples/template.tsx +13 -17
- package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +3 -3
- package/dist/skill/reference/layout/bottom-nav/examples/floating-action.tsx +10 -19
- package/dist/skill/reference/layout/bottom-nav/examples/floating.tsx +10 -19
- package/dist/skill/reference/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
- package/dist/skill/reference/layout/page/COMPONENT.md +353 -0
- package/dist/skill/reference/layout/page/examples/actions-collapse.tsx +45 -0
- package/dist/skill/reference/layout/page/examples/collapse.tsx +68 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/examples.module.css +33 -4
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/grid.tsx +15 -15
- package/dist/skill/reference/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
- package/dist/skill/reference/layout/page/examples/narrow.tsx +75 -0
- package/dist/skill/reference/layout/page/examples/overview.tsx +57 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/screen.module.css +1 -1
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx +29 -19
- package/dist/skill/reference/{components/page-content → layout/page}/examples/sections.tsx +17 -24
- package/dist/skill/reference/layout/page/examples/structure.tsx +41 -0
- package/dist/skill/reference/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
- package/dist/skill/reference/layout/page/examples/top-bar.tsx +85 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/variants.tsx +7 -7
- package/dist/skill/reference/layout/sidebar/COMPONENT.md +5 -4
- package/dist/skill/reference/layout/sidebar/examples/dismiss.tsx +10 -7
- package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +11 -8
- package/dist/skill/responsive.md +88 -74
- package/dist/tokens/layers.d.ts +2 -0
- package/dist/tokens/primitives.d.ts +12 -2
- package/dist/tokens/semantic.d.ts +7 -0
- package/dist/tokens/themes/dark.d.ts +7 -2
- package/package.json +2 -2
- package/src/components/avatar/COMPONENT.md +2 -2
- package/src/components/avatar/examples/team-group.tsx +1 -1
- package/src/components/banner/COMPONENT.md +4 -4
- package/src/components/banner/examples/examples.module.css +6 -1
- package/src/components/banner/examples/page-strip.tsx +24 -22
- package/src/components/breadcrumb/COMPONENT.md +9 -8
- package/src/components/button/COMPONENT.md +1 -0
- package/src/components/button/examples/hold-to-confirm.tsx +1 -1
- package/src/components/button/examples/on-colored-host.tsx +8 -8
- package/src/components/card/COMPONENT.md +7 -7
- package/src/components/card/examples/screen.module.css +1 -1
- package/src/components/card/examples/screen.tsx +184 -198
- package/src/components/chart-frame/COMPONENT.md +1 -1
- package/src/components/chart-frame/examples/fill-height.tsx +9 -9
- package/src/components/chat/COMPONENT.md +4 -4
- package/src/components/chat/examples/screen.module.css +1 -1
- package/src/components/chat/examples/screen.tsx +110 -117
- package/src/components/chat-list/COMPONENT.md +2 -2
- package/src/components/chat-list/examples/controlled.tsx +2 -2
- package/src/components/chat-list/examples/examples.module.css +8 -0
- package/src/components/checkbox/examples/examples.module.css +3 -2
- package/src/components/code-block/COMPONENT.md +1 -1
- package/src/components/code-block/examples/color-scheme.tsx +2 -4
- package/src/components/code-block/examples/examples.module.css +0 -11
- package/src/components/color-picker/COMPONENT.md +18 -7
- package/src/components/color-picker/examples/examples.module.css +2 -5
- package/src/components/color-picker/examples/overview.tsx +5 -10
- package/src/components/color-picker/examples/sizes.tsx +4 -8
- package/src/components/crossfade/COMPONENT.md +2 -2
- package/src/components/crossfade/examples/screen.tsx +107 -112
- package/src/components/data-table/COMPONENT.md +5 -5
- package/src/components/data-table/examples/examples.module.css +9 -0
- package/src/components/data-table/examples/screen.tsx +42 -52
- package/src/components/data-table/examples/server.tsx +6 -2
- package/src/components/datepicker/examples/examples.module.css +6 -0
- package/src/components/datepicker/examples/inline-panel.tsx +3 -1
- package/src/components/description-list/COMPONENT.md +1 -1
- package/src/components/description-list/examples/screen.tsx +120 -127
- package/src/components/digit-input/examples/grouped.tsx +4 -4
- package/src/components/digit-input/examples/validation.tsx +1 -1
- package/src/components/divider/COMPONENT.md +2 -2
- package/src/components/divider/examples/examples.module.css +4 -1
- package/src/components/divider/examples/vertical.tsx +22 -9
- package/src/components/dnd/examples/examples.module.css +3 -1
- package/src/components/drawer/COMPONENT.md +1 -1
- package/src/components/drawer/examples/placement.tsx +26 -31
- package/src/components/drawer/examples/screen.tsx +137 -160
- package/src/components/dropdown/COMPONENT.md +1 -1
- package/src/components/example-frame/COMPONENT.md +3 -3
- package/src/components/field-list/examples/screen.module.css +1 -1
- package/src/components/field-list/examples/screen.tsx +19 -19
- package/src/components/fieldset/COMPONENT.md +1 -1
- package/src/components/fieldset/examples/states.tsx +1 -1
- package/src/components/file-upload/COMPONENT.md +1 -1
- package/src/components/file-upload/examples/screen.module.css +2 -2
- package/src/components/file-upload/examples/screen.tsx +65 -81
- package/src/components/gallery/COMPONENT.md +1 -0
- package/src/components/gantt/COMPONENT.md +1 -1
- package/src/components/gantt/examples/screen.module.css +1 -1
- package/src/components/gantt/examples/screen.tsx +55 -73
- package/src/components/hint/examples/examples.module.css +10 -1
- package/src/components/hint/examples/overview.tsx +1 -1
- package/src/components/kanban/COMPONENT.md +1 -1
- package/src/components/kanban/examples/screen.module.css +1 -1
- package/src/components/kanban/examples/screen.tsx +50 -65
- package/src/components/kbd/COMPONENT.md +1 -1
- package/src/components/label/examples/examples.module.css +12 -1
- package/src/components/label/examples/overview.tsx +1 -1
- package/src/components/list/COMPONENT.md +3 -3
- package/src/components/media-viewer/examples/controlled.tsx +16 -16
- package/src/components/media-viewer/examples/examples.module.css +1 -3
- package/src/components/pagination/COMPONENT.md +11 -3
- package/src/components/pagination/examples/controlled.tsx +2 -1
- package/src/components/popover/COMPONENT.md +3 -2
- package/src/components/popover/examples/width.tsx +13 -1
- package/src/components/slider/COMPONENT.md +3 -3
- package/src/components/slider/examples/states.tsx +14 -10
- package/src/components/smart-filter/COMPONENT.md +13 -13
- package/src/components/smart-filter/examples/examples.module.css +3 -0
- package/src/components/smart-filter/examples/many-values.tsx +12 -8
- package/src/components/smart-filter/examples/sizes.tsx +7 -3
- package/src/components/sparkline/COMPONENT.md +1 -0
- package/src/components/sparkline/examples/curve.tsx +16 -11
- package/src/components/sparkline/examples/states.tsx +14 -10
- package/src/components/switch/COMPONENT.md +1 -1
- package/src/components/tabs/COMPONENT.md +1 -1
- package/src/components/typography/COMPONENT.md +2 -2
- package/src/layout/app-shell/COMPONENT.md +25 -38
- package/src/layout/app-shell/examples/footer.tsx +10 -10
- package/src/layout/app-shell/examples/overview.tsx +20 -22
- package/src/layout/app-shell/examples/screen.module.css +2 -2
- package/src/layout/app-shell/examples/screen.tsx +25 -30
- package/src/layout/app-shell/examples/template.tsx +13 -17
- package/src/layout/bottom-nav/COMPONENT.md +3 -3
- package/src/layout/bottom-nav/examples/floating-action.tsx +10 -19
- package/src/layout/bottom-nav/examples/floating.tsx +10 -19
- package/src/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
- package/src/layout/page/COMPONENT.md +353 -0
- package/src/layout/page/examples/actions-collapse.tsx +45 -0
- package/src/layout/page/examples/collapse.tsx +68 -0
- package/src/{components/page-content → layout/page}/examples/examples.module.css +33 -4
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/grid.tsx +15 -15
- package/src/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
- package/src/layout/page/examples/narrow.tsx +75 -0
- package/src/layout/page/examples/overview.tsx +57 -0
- package/src/{components/page-content → layout/page}/examples/screen.module.css +1 -1
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.tsx +29 -19
- package/src/{components/page-content → layout/page}/examples/sections.tsx +17 -24
- package/src/layout/page/examples/structure.tsx +41 -0
- package/src/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
- package/src/layout/page/examples/top-bar.tsx +85 -0
- package/src/{components/page-content → layout/page}/examples/variants.tsx +7 -7
- package/src/layout/sidebar/COMPONENT.md +5 -4
- package/src/layout/sidebar/examples/dismiss.tsx +10 -7
- package/src/layout/sidebar/examples/narrow.tsx +11 -8
- package/src/styles/theme-dark.css +12 -10
- package/src/styles/theme-light.css +3 -0
- package/src/styles/tokens.css +3 -1
- package/dist/components/page-content/PageContent.d.ts +0 -192
- package/dist/components/page-toolbar/PageToolbar.d.ts +0 -55
- package/dist/layout/app-header/AppHeader.d.ts +0 -118
- package/dist/skill/reference/components/page-content/COMPONENT.md +0 -264
- package/dist/skill/reference/components/page-content/examples/narrow.tsx +0 -25
- package/dist/skill/reference/components/page-content/examples/overview.tsx +0 -41
- package/dist/skill/reference/components/page-toolbar/COMPONENT.md +0 -147
- package/dist/skill/reference/components/page-toolbar/examples/examples.module.css +0 -16
- package/dist/skill/reference/components/page-toolbar/examples/overview.tsx +0 -113
- package/dist/skill/reference/components/page-toolbar/examples/save-changes.tsx +0 -43
- package/dist/skill/reference/components/page-toolbar/examples/without-search.tsx +0 -60
- package/dist/skill/reference/layout/app-header/COMPONENT.md +0 -187
- package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/dist/skill/reference/layout/app-header/examples/examples.module.css +0 -28
- package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -67
- package/dist/skill/reference/layout/app-header/examples/narrow.tsx +0 -66
- package/dist/skill/reference/layout/app-header/examples/overview.tsx +0 -34
- package/dist/skill/reference/layout/app-header/examples/page-title.tsx +0 -78
- package/dist/skill/reference/layout/app-shell/examples/contained.tsx +0 -30
- package/src/components/page-content/COMPONENT.md +0 -264
- package/src/components/page-content/examples/narrow.tsx +0 -25
- package/src/components/page-content/examples/overview.tsx +0 -41
- package/src/components/page-toolbar/COMPONENT.md +0 -147
- package/src/components/page-toolbar/examples/examples.module.css +0 -16
- package/src/components/page-toolbar/examples/overview.tsx +0 -113
- package/src/components/page-toolbar/examples/save-changes.tsx +0 -43
- package/src/components/page-toolbar/examples/without-search.tsx +0 -60
- package/src/layout/app-header/COMPONENT.md +0 -187
- package/src/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/src/layout/app-header/examples/examples.module.css +0 -28
- package/src/layout/app-header/examples/in-app-shell.tsx +0 -67
- package/src/layout/app-header/examples/narrow.tsx +0 -66
- package/src/layout/app-header/examples/overview.tsx +0 -34
- package/src/layout/app-header/examples/page-title.tsx +0 -78
- package/src/layout/app-shell/examples/contained.tsx +0 -30
- package/dist/chunks/{chunk-U3Q2I3MY.js → chunk-2ODXLPW3.js} +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** The same page
|
|
2
|
-
import { Card,
|
|
1
|
+
/** The same page at three caps: the whole main, a wide dashboard column, a reading column — `maxWidth`. */
|
|
2
|
+
import { Card, Page, Typography } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
5
5
|
|
|
@@ -9,13 +9,13 @@ const WIDTHS = [
|
|
|
9
9
|
{ value: "readable", text: "Условия использования: не шире колонки для чтения, по центру." },
|
|
10
10
|
] as const;
|
|
11
11
|
|
|
12
|
-
export default function
|
|
12
|
+
export default function PageVariantsExample() {
|
|
13
13
|
return (
|
|
14
14
|
<>
|
|
15
15
|
{WIDTHS.map(({ value, text }) => (
|
|
16
16
|
<div key={value} className={styles.main}>
|
|
17
|
-
<
|
|
18
|
-
<
|
|
17
|
+
<Page.Root maxWidth={value}>
|
|
18
|
+
<Page.Body>
|
|
19
19
|
<Card.Root>
|
|
20
20
|
<Card.Body>
|
|
21
21
|
<Typography variant="body-s" tone="secondary">
|
|
@@ -23,8 +23,8 @@ export default function PageContentVariantsExample() {
|
|
|
23
23
|
</Typography>
|
|
24
24
|
</Card.Body>
|
|
25
25
|
</Card.Root>
|
|
26
|
-
</
|
|
27
|
-
</
|
|
26
|
+
</Page.Body>
|
|
27
|
+
</Page.Root>
|
|
28
28
|
</div>
|
|
29
29
|
))}
|
|
30
30
|
</>
|
|
@@ -89,7 +89,7 @@ useSidebar() state hook for custom parts inside Root (useA
|
|
|
89
89
|
| `onModeChange` | `(mode: SidebarMode) => void` | — | Called with the new mode (Toggle, `useSidebar().setMode`). |
|
|
90
90
|
| `open` | `boolean` | — | Off-canvas panel on narrow viewports (controlled). |
|
|
91
91
|
| `defaultOpen` | `boolean` | `false` | Initial off-canvas state (uncontrolled). |
|
|
92
|
-
| `onOpenChange` | `(open: boolean) => void` | — | Off-canvas open / close: Toggle, the
|
|
92
|
+
| `onOpenChange` | `(open: boolean) => void` | — | Off-canvas open / close: Toggle, the menu button of `Page.TopBar`, scrim, Escape, an activated item, leaving the narrow viewport. |
|
|
93
93
|
| `offCanvas` | `"auto" \| "always" \| "never"` | `"auto"` | When the rail becomes an off-canvas panel opened by `open`: `auto` — below 768px (viewport); `always` — at any width; `never` — always a rail. |
|
|
94
94
|
| `closeOnOutsideClick` | `boolean` | `true` | A press on the scrim (outside the off-canvas panel) closes the panel. |
|
|
95
95
|
| `closeOnEscape` | `boolean` | `true` | Escape closes the off-canvas panel. |
|
|
@@ -294,13 +294,14 @@ The rail width does not depend on `size`.
|
|
|
294
294
|
| `closeOnEscape` (Root) | Escape closes the off-canvas panel | default; turn off with `closeOnOutsideClick` for a panel only its toggle closes | on |
|
|
295
295
|
| `asChild` (ItemAction) | the row action is the consumer's link with the button look | the action opens a page or `mailto:` | off |
|
|
296
296
|
|
|
297
|
-
Put `<Sidebar.Toggle variant="header" />` next to `Sidebar.Brand` in the header, or `Sidebar.Toggle` in the footer for a rail without a brand. Inside an `AppShell` the Sidebar publishes its navigation to the shell: on phones (`offCanvas="auto"`) or always (`offCanvas="always"`) the `
|
|
297
|
+
Put `<Sidebar.Toggle variant="header" />` next to `Sidebar.Brand` in the header, or `Sidebar.Toggle` in the footer for a rail without a brand. Inside an `AppShell` the Sidebar publishes its navigation to the shell: on phones (`offCanvas="auto"`) or always (`offCanvas="always"`) the page's `Page.TopBar` draws the menu button that opens the panel by itself, a `Sidebar.Toggle` outside the rail brings back a hidden one, and other triggers (a BottomNav «Ещё») read `useAppShellNav()`. One current item at a time; give every top-level item an icon when the rail can go compact (child items need none).
|
|
298
298
|
|
|
299
299
|
## States
|
|
300
300
|
| State | Driven by | DOM |
|
|
301
301
|
|---|---|---|
|
|
302
302
|
| mode | `mode` / `defaultMode` | Root `data-mode`, `data-panel-mode` (the last visible mode while hidden); `<nav inert>` while hidden |
|
|
303
303
|
| off-canvas | `offCanvas="always"`, or `"auto"` + viewport < 768px | Root `data-off-canvas`, `data-state="open" \| "closed"`; `<nav inert>` while closed; the kit scrim (`role="presentation"`) while open; in an `AppShell` the shell Root `data-off-canvas` |
|
|
304
|
+
| placing | the viewport crossed the off-canvas breakpoint (not a person's choice) | Root `data-placing` for one painted frame: the rail lands at its new width with no motion (no growing from 0, no folding rows, no sliding panel) |
|
|
304
305
|
| dismiss | `closeOnOutsideClick`, `closeOnEscape` | a press on the scrim / Escape closes the open panel, or not |
|
|
305
306
|
| current | `current` or a router's `aria-current` | Item `aria-current="page"`, `data-state="active"` |
|
|
306
307
|
| active path | a child of a Sub (or an item of a Group) is current | SubTrigger (or the `…` row of a folded Group) `data-active-path`; a closed Sub opens, a closed Group opens off the compact rail |
|
|
@@ -364,7 +365,7 @@ Leaving the narrow viewport closes the off-canvas panel; activating an item (a l
|
|
|
364
365
|
- A row action is its own button next to the item (never nested), named by `label` with a tooltip.
|
|
365
366
|
- The account avatar is hidden from screen readers; the name and the muted line name the button.
|
|
366
367
|
- Off-canvas: a decorative scrim (a press on it is a press outside, `closeOnOutsideClick`), focus trap and Escape (`closeOnEscape`); focus returns to the opener.
|
|
367
|
-
- Toggle, the
|
|
368
|
+
- Toggle, the menu button of `Page.TopBar` and `useAppShellNav` triggers: `aria-expanded`, `aria-controls` → the `<nav>`, label from `labels`.
|
|
368
369
|
|
|
369
370
|
### Labels
|
|
370
371
|
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
@@ -392,7 +393,7 @@ Leaving the narrow viewport closes the off-canvas panel; activating an item (a l
|
|
|
392
393
|
| [dismiss.tsx](examples/dismiss.tsx) | An off-canvas panel only its own toggle closes: a press on the scrim and Escape leave it open, a picked item still closes it — `closeOnOutsideClick`, `closeOnEscape`. |
|
|
393
394
|
| [controlled.tsx](examples/controlled.tsx) | The parent owns the rail mode: expanded, an icon rail with tooltips, or hidden; every switch is one synchronous movement — `mode`, `onModeChange`. |
|
|
394
395
|
| [controlled-open.tsx](examples/controlled-open.tsx) | Navigation behind a menu button at any width: the parent opens the off-canvas panel, the scrim, Escape, the header toggle or a navigation closes it — `offCanvas`, `open`, `onOpenChange`. |
|
|
395
|
-
| [narrow.tsx](examples/narrow.tsx) | Below 768px the rail leaves the layout and slides in over the page from the menu button the
|
|
396
|
+
| [narrow.tsx](examples/narrow.tsx) | Below 768px the rail leaves the layout and slides in over the page from the menu button the page top bar draws by itself; from 768px it is the rail again, and the button leaves — `AppShell`, `labels`. |
|
|
396
397
|
|
|
397
398
|
## Mistakes
|
|
398
399
|
- `icon={…}` / `badge={…}` props → use the `Sidebar.ItemIcon` and `Sidebar.ItemCount` parts.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** An off-canvas panel only its own toggle closes: a press on the scrim and Escape leave it open, a picked item still closes it — `closeOnOutsideClick`, `closeOnEscape`. */
|
|
2
|
-
import {
|
|
2
|
+
import { AppShell, Icon, Page, Sidebar } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
5
5
|
|
|
@@ -35,12 +35,15 @@ export default function SidebarDismissExample() {
|
|
|
35
35
|
</Sidebar.Content>
|
|
36
36
|
</Sidebar.Root>
|
|
37
37
|
</AppShell.Nav>
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
<AppShell.Main>
|
|
39
|
+
<Page.Root>
|
|
40
|
+
<Page.TopBar>
|
|
41
|
+
<Page.Heading>
|
|
42
|
+
<Page.Title>Сборка заказов</Page.Title>
|
|
43
|
+
</Page.Heading>
|
|
44
|
+
</Page.TopBar>
|
|
45
|
+
</Page.Root>
|
|
46
|
+
</AppShell.Main>
|
|
44
47
|
</AppShell.Root>
|
|
45
48
|
</div>
|
|
46
49
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** Below 768px the rail leaves the layout and slides in over the page from the menu button the
|
|
2
|
-
import {
|
|
1
|
+
/** Below 768px the rail leaves the layout and slides in over the page from the menu button the page top bar draws by itself; from 768px it is the rail again, and the button leaves — `AppShell`, `labels`. */
|
|
2
|
+
import { AppShell, Icon, Page, Sidebar } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
5
5
|
|
|
@@ -43,12 +43,15 @@ export default function SidebarNarrowExample() {
|
|
|
43
43
|
</Sidebar.Content>
|
|
44
44
|
</Sidebar.Root>
|
|
45
45
|
</AppShell.Nav>
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
<AppShell.Main>
|
|
47
|
+
<Page.Root>
|
|
48
|
+
<Page.TopBar>
|
|
49
|
+
<Page.Heading>
|
|
50
|
+
<Page.Title>Сделки</Page.Title>
|
|
51
|
+
</Page.Heading>
|
|
52
|
+
</Page.TopBar>
|
|
53
|
+
</Page.Root>
|
|
54
|
+
</AppShell.Main>
|
|
52
55
|
</AppShell.Root>
|
|
53
56
|
</div>
|
|
54
57
|
);
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
--prime-color-chart-scale-5: var(--prime-ref-color-cobalt-200);
|
|
33
33
|
--prime-color-chart-scale-fg: var(--prime-ref-color-gray-950);
|
|
34
34
|
--prime-color-control-thumb: var(--prime-ref-color-gray-100);
|
|
35
|
+
--prime-color-control-thumb-disabled: var(--prime-ref-color-gray-600);
|
|
35
36
|
--prime-color-danger-border: var(--prime-ref-color-red-400);
|
|
36
37
|
--prime-color-danger-hover: var(--prime-ref-color-red-500);
|
|
37
38
|
--prime-color-danger-soft: color-mix(in srgb, var(--prime-ref-color-red-500) 16%, transparent);
|
|
@@ -50,35 +51,35 @@
|
|
|
50
51
|
--prime-color-layer-0-bg: #0d0f13;
|
|
51
52
|
--prime-color-layer-0-fill: #14161a;
|
|
52
53
|
--prime-color-layer-0-fill-hover: #1a1c21;
|
|
53
|
-
--prime-color-layer-0-selected: #
|
|
54
|
+
--prime-color-layer-0-selected: #303237;
|
|
54
55
|
--prime-color-layer-1-bg: #14161a;
|
|
55
56
|
--prime-color-layer-1-fill: #1a1c21;
|
|
56
57
|
--prime-color-layer-1-fill-hover: #212428;
|
|
57
|
-
--prime-color-layer-1-selected: #
|
|
58
|
+
--prime-color-layer-1-selected: #383a3f;
|
|
58
59
|
--prime-color-layer-2-bg: #1a1c21;
|
|
59
60
|
--prime-color-layer-2-fill: #212428;
|
|
60
61
|
--prime-color-layer-2-fill-hover: #292b2f;
|
|
61
|
-
--prime-color-layer-2-selected: #
|
|
62
|
+
--prime-color-layer-2-selected: #3f4247;
|
|
62
63
|
--prime-color-layer-3-bg: #212428;
|
|
63
64
|
--prime-color-layer-3-fill: #292b2f;
|
|
64
65
|
--prime-color-layer-3-fill-hover: #303237;
|
|
65
|
-
--prime-color-layer-3-selected: #
|
|
66
|
+
--prime-color-layer-3-selected: #474a4f;
|
|
66
67
|
--prime-color-layer-4-bg: #292b2f;
|
|
67
68
|
--prime-color-layer-4-fill: #303237;
|
|
68
69
|
--prime-color-layer-4-fill-hover: #383a3f;
|
|
69
|
-
--prime-color-layer-4-selected: #
|
|
70
|
+
--prime-color-layer-4-selected: #4f5257;
|
|
70
71
|
--prime-color-layer-floating-bg: #1a1c21;
|
|
71
72
|
--prime-color-layer-floating-fill: #212428;
|
|
72
73
|
--prime-color-layer-floating-fill-hover: #292b2f;
|
|
73
|
-
--prime-color-layer-floating-selected: #
|
|
74
|
+
--prime-color-layer-floating-selected: #3f4247;
|
|
74
75
|
--prime-color-layer-floating1-bg: #212328;
|
|
75
76
|
--prime-color-layer-floating1-fill: #282a2f;
|
|
76
77
|
--prime-color-layer-floating1-fill-hover: #303237;
|
|
77
|
-
--prime-color-layer-floating1-selected: #
|
|
78
|
+
--prime-color-layer-floating1-selected: #47494e;
|
|
78
79
|
--prime-color-layer-floating2-bg: #282a2f;
|
|
79
80
|
--prime-color-layer-floating2-fill: #303237;
|
|
80
81
|
--prime-color-layer-floating2-fill-hover: #373a3e;
|
|
81
|
-
--prime-color-layer-floating2-selected: #
|
|
82
|
+
--prime-color-layer-floating2-selected: #4f5257;
|
|
82
83
|
--prime-color-message-outgoing-accent: var(--prime-ref-color-white);
|
|
83
84
|
--prime-color-message-outgoing-accent-fg: var(--prime-ref-color-cobalt-700);
|
|
84
85
|
--prime-color-message-outgoing-bg: var(--prime-ref-color-cobalt-700);
|
|
@@ -128,6 +129,7 @@
|
|
|
128
129
|
--prime-color-palette-yellow-soft: color-mix(in srgb, var(--prime-ref-color-yellow-500) 16%, transparent);
|
|
129
130
|
--prime-color-palette-yellow-solid-fg: var(--prime-ref-color-gray-950);
|
|
130
131
|
--prime-color-palette-yellow-text: var(--prime-ref-color-yellow-300);
|
|
132
|
+
--prime-color-skeleton-fill: color-mix(in srgb, var(--prime-ref-color-gray-100) 10%, transparent);
|
|
131
133
|
--prime-color-success-default: var(--prime-ref-color-green-400);
|
|
132
134
|
--prime-color-success-fg: var(--prime-ref-color-gray-950);
|
|
133
135
|
--prime-color-success-hover: var(--prime-ref-color-green-300);
|
|
@@ -135,8 +137,8 @@
|
|
|
135
137
|
--prime-color-success-text: var(--prime-ref-color-green-300);
|
|
136
138
|
--prime-color-text-disabled: var(--prime-ref-color-gray-600);
|
|
137
139
|
--prime-color-text-inverse: var(--prime-ref-color-gray-925);
|
|
138
|
-
--prime-color-text-muted: var(--prime-ref-color-gray-
|
|
139
|
-
--prime-color-text-placeholder: var(--prime-ref-color-gray-
|
|
140
|
+
--prime-color-text-muted: var(--prime-ref-color-gray-350);
|
|
141
|
+
--prime-color-text-placeholder: var(--prime-ref-color-gray-350);
|
|
140
142
|
--prime-color-text-primary: var(--prime-ref-color-gray-100);
|
|
141
143
|
--prime-color-text-secondary: var(--prime-ref-color-gray-300);
|
|
142
144
|
--prime-color-tooltip-bg: var(--prime-ref-color-gray-100);
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
--prime-color-chart-scale-5: var(--prime-ref-color-cobalt-800);
|
|
98
98
|
--prime-color-chart-scale-fg: var(--prime-ref-color-white);
|
|
99
99
|
--prime-color-control-thumb: var(--prime-ref-color-white);
|
|
100
|
+
--prime-color-control-thumb-disabled: var(--prime-ref-color-white);
|
|
100
101
|
--prime-color-danger-border: var(--prime-ref-color-red-500);
|
|
101
102
|
--prime-color-danger-default: var(--prime-ref-color-red-600);
|
|
102
103
|
--prime-color-danger-fg: var(--prime-ref-color-white);
|
|
@@ -203,6 +204,7 @@
|
|
|
203
204
|
--prime-color-palette-yellow-solid: var(--prime-ref-color-yellow-400);
|
|
204
205
|
--prime-color-palette-yellow-solid-fg: var(--prime-ref-color-gray-925);
|
|
205
206
|
--prime-color-palette-yellow-text: var(--prime-ref-color-yellow-800);
|
|
207
|
+
--prime-color-skeleton-fill: color-mix(in srgb, var(--prime-ref-color-gray-925) 6%, transparent);
|
|
206
208
|
--prime-color-success-default: var(--prime-ref-color-green-700);
|
|
207
209
|
--prime-color-success-fg: var(--prime-ref-color-white);
|
|
208
210
|
--prime-color-success-hover: var(--prime-ref-color-green-800);
|
|
@@ -318,6 +320,7 @@
|
|
|
318
320
|
--prime-focus-offset-inset: -2px;
|
|
319
321
|
--prime-focus-space: 4px;
|
|
320
322
|
--prime-focus-width: 2px;
|
|
323
|
+
--prime-font-family-key: var(--prime-ref-font-family-key);
|
|
321
324
|
--prime-font-family-mono: var(--prime-ref-font-family-mono);
|
|
322
325
|
--prime-font-family-sans: var(--prime-ref-font-family-sans);
|
|
323
326
|
--prime-font-tracking-normal: var(--prime-ref-font-tracking-normal);
|
package/src/styles/tokens.css
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
--prime-ref-color-gray-100: #e8eaee;
|
|
29
29
|
--prime-ref-color-gray-150: #e0e3e8;
|
|
30
30
|
--prime-ref-color-gray-300: #b9bec8;
|
|
31
|
+
--prime-ref-color-gray-350: #a1a8b6;
|
|
31
32
|
--prime-ref-color-gray-400: #949bab;
|
|
32
33
|
--prime-ref-color-gray-50: #f3f4f6;
|
|
33
34
|
--prime-ref-color-gray-500: #636a79;
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
--prime-ref-easing-enter: cubic-bezier(0, 0, 0, 1);
|
|
101
102
|
--prime-ref-easing-exit: cubic-bezier(0.23, 1, 0.32, 1);
|
|
102
103
|
--prime-ref-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
104
|
+
--prime-ref-font-family-key: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, system-ui, -apple-system, "Segoe UI Symbol", Menlo, Consolas, monospace;
|
|
103
105
|
--prime-ref-font-family-mono: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
104
106
|
--prime-ref-font-family-sans: "Golos Text", "Golos Text Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
105
107
|
--prime-ref-font-line-height-12: 0.75rem;
|
|
@@ -145,7 +147,7 @@
|
|
|
145
147
|
--prime-ref-radius-6: 6px;
|
|
146
148
|
--prime-ref-radius-8: 8px;
|
|
147
149
|
--prime-ref-radius-full: 9999px;
|
|
148
|
-
--prime-ref-space-0:
|
|
150
|
+
--prime-ref-space-0: 0rem;
|
|
149
151
|
--prime-ref-space-1: 0.25rem;
|
|
150
152
|
--prime-ref-space-10: 2.5rem;
|
|
151
153
|
--prime-ref-space-12: 3rem;
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/** Cap of the page column inside `main`. */
|
|
3
|
-
export type PageContentMaxWidth = "full" | "readable" | "wide";
|
|
4
|
-
/** The element of the page column: a plain column, or a `<section>` that a heading names. */
|
|
5
|
-
export type PageContentRootAs = "div" | "section";
|
|
6
|
-
export type PageContentRootProps = React.HTMLAttributes<HTMLElement> & {
|
|
7
|
-
/**
|
|
8
|
-
* `section` — the whole app page as a region; name it with `aria-labelledby` → the Title `id`.
|
|
9
|
-
*/
|
|
10
|
-
as?: PageContentRootAs;
|
|
11
|
-
/**
|
|
12
|
-
* Cap of the column, centred: `full` — the whole main; `readable` — the reading measure `--prime-layout-reading-max-width` (42rem); `wide` — the content width `--prime-layout-content-max-width` (75rem).
|
|
13
|
-
*/
|
|
14
|
-
maxWidth?: PageContentMaxWidth;
|
|
15
|
-
/**
|
|
16
|
-
* The page takes the height of main (`AppShell.Root fillViewport`) and the body takes what the header leaves: for a full-height table, board, chat or `PageContent.Split`.
|
|
17
|
-
*/
|
|
18
|
-
fill?: boolean;
|
|
19
|
-
ref?: React.Ref<HTMLElement>;
|
|
20
|
-
};
|
|
21
|
-
declare function PageContentRoot({ as: Tag, maxWidth, fill, className, ref, ...rest }: PageContentRootProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
declare namespace PageContentRoot {
|
|
23
|
-
var displayName: string;
|
|
24
|
-
}
|
|
25
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
26
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
27
|
-
};
|
|
28
|
-
export type PageContentActionsProps = DivProps;
|
|
29
|
-
/** Page-level actions (buttons) next to the title; wrap below the heading on narrow columns. */
|
|
30
|
-
declare function PageContentActions({ className, ...rest }: PageContentActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
declare namespace PageContentActions {
|
|
32
|
-
var displayName: string;
|
|
33
|
-
}
|
|
34
|
-
export type PageContentHeaderProps = DivProps;
|
|
35
|
-
/** Title and description stack on the left; `PageContent.Actions` children go to the end. */
|
|
36
|
-
declare function PageContentHeader({ className, children, ...rest }: PageContentHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
declare namespace PageContentHeader {
|
|
38
|
-
var displayName: string;
|
|
39
|
-
}
|
|
40
|
-
export type PageContentTitleProps = React.HTMLAttributes<HTMLHeadingElement> & {
|
|
41
|
-
ref?: React.Ref<HTMLHeadingElement>;
|
|
42
|
-
};
|
|
43
|
-
declare function PageContentTitle({ className, ...rest }: PageContentTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
declare namespace PageContentTitle {
|
|
45
|
-
var displayName: string;
|
|
46
|
-
}
|
|
47
|
-
export type PageContentDescriptionMeasure = "readable" | "full";
|
|
48
|
-
export type PageContentDescriptionProps = React.HTMLAttributes<HTMLParagraphElement> & {
|
|
49
|
-
/**
|
|
50
|
-
* `readable` — no wider than the reading measure `--prime-layout-reading-max-width` (42rem); `full` — the full width of the parent.
|
|
51
|
-
*/
|
|
52
|
-
measure?: PageContentDescriptionMeasure;
|
|
53
|
-
ref?: React.Ref<HTMLParagraphElement>;
|
|
54
|
-
};
|
|
55
|
-
declare function PageContentDescription({ className, measure, ...rest }: PageContentDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
declare namespace PageContentDescription {
|
|
57
|
-
var displayName: string;
|
|
58
|
-
}
|
|
59
|
-
export type PageContentBodyProps = DivProps;
|
|
60
|
-
declare function PageContentBody({ className, ...rest }: PageContentBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
-
declare namespace PageContentBody {
|
|
62
|
-
var displayName: string;
|
|
63
|
-
}
|
|
64
|
-
/** Where the heading of a section stands: over its content or in a column beside it. */
|
|
65
|
-
export type PageContentSectionLayout = "stack" | "aside";
|
|
66
|
-
export type PageContentSectionProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
67
|
-
/**
|
|
68
|
-
* The visible heading (`h2`); it also names the section.
|
|
69
|
-
*/
|
|
70
|
-
label: React.ReactNode;
|
|
71
|
-
/**
|
|
72
|
-
* One line of context under the heading, in secondary body-s.
|
|
73
|
-
*/
|
|
74
|
-
description?: React.ReactNode;
|
|
75
|
-
/**
|
|
76
|
-
* `stack` — the heading over the content; `aside` — a ~16rem heading column beside it (a settings page), above it once the content would get narrower than 30rem.
|
|
77
|
-
*/
|
|
78
|
-
layout?: PageContentSectionLayout;
|
|
79
|
-
ref?: React.Ref<HTMLElement>;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* A titled section of the page: an `h2` heading (with an optional description and
|
|
83
|
-
* `PageContent.Actions` at its end) over its content. Sections stand further apart than the plain
|
|
84
|
-
* blocks of the body, so the air shows where a new topic starts.
|
|
85
|
-
*/
|
|
86
|
-
declare function PageContentSection({ label, description, layout, className, children, ...rest }: PageContentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
87
|
-
declare namespace PageContentSection {
|
|
88
|
-
var displayName: string;
|
|
89
|
-
}
|
|
90
|
-
export type PageContentGridProps = DivProps;
|
|
91
|
-
/**
|
|
92
|
-
* The grid of the page's tiles (KPI cards, charts, panels): 12 columns, one gap on both axes.
|
|
93
|
-
* Columns follow the grid's own width, so tiles fold on a narrow panel by themselves.
|
|
94
|
-
*/
|
|
95
|
-
declare function PageContentGrid({ className, ...rest }: PageContentGridProps): import("react/jsx-runtime").JSX.Element;
|
|
96
|
-
declare namespace PageContentGrid {
|
|
97
|
-
var displayName: string;
|
|
98
|
-
}
|
|
99
|
-
/** Columns of 12 a cell spans on a wide grid. */
|
|
100
|
-
export type PageContentCellSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
101
|
-
/** Rows a cell spans. */
|
|
102
|
-
export type PageContentCellRows = 1 | 2 | 3 | 4;
|
|
103
|
-
export type PageContentCellProps = DivProps & {
|
|
104
|
-
/**
|
|
105
|
-
* Columns of 12 on a wide grid (64rem+). Narrower grids round it: see Grid columns in COMPONENT.md.
|
|
106
|
-
*/
|
|
107
|
-
span?: PageContentCellSpan;
|
|
108
|
-
/**
|
|
109
|
-
* Rows the cell spans from 40rem: a chart beside two stacked tiles (`ChartFrame.Plot height="fill"` fills the height).
|
|
110
|
-
*/
|
|
111
|
-
rows?: PageContentCellRows;
|
|
112
|
-
};
|
|
113
|
-
/** One tile place in `PageContent.Grid`; its child (a Card, a ChartFrame) fills it. */
|
|
114
|
-
declare function PageContentCell({ span, rows, className, ...rest }: PageContentCellProps): import("react/jsx-runtime").JSX.Element;
|
|
115
|
-
declare namespace PageContentCell {
|
|
116
|
-
var displayName: string;
|
|
117
|
-
}
|
|
118
|
-
export type PageContentLabels = {
|
|
119
|
-
/** Name of `PageContent.BackButton` (back from the detail to the list on a narrow split). */
|
|
120
|
-
back: string;
|
|
121
|
-
};
|
|
122
|
-
export declare const PAGE_CONTENT_LABELS: PageContentLabels;
|
|
123
|
-
export type PageContentSplitProps = DivProps & {
|
|
124
|
-
/**
|
|
125
|
-
* The detail is open (a record is chosen), controlled. On a narrow split it takes the place of the list; on a wide one both panes stay.
|
|
126
|
-
*/
|
|
127
|
-
open?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Initial open state, uncontrolled.
|
|
130
|
-
*/
|
|
131
|
-
defaultOpen?: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* `PageContent.BackButton` closes the detail (`false`); clear the chosen record there.
|
|
134
|
-
*/
|
|
135
|
-
onOpenChange?: (open: boolean) => void;
|
|
136
|
-
/**
|
|
137
|
-
* Built-in strings, see Labels.
|
|
138
|
-
*/
|
|
139
|
-
labels?: Partial<PageContentLabels>;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* List + detail (mail, a messenger, a ticket queue): two panes side by side from 48rem of its own
|
|
143
|
-
* width, one at a time below it — the list, or the open detail with a back button. Takes the free
|
|
144
|
-
* height of a filling page; each pane gives its last child the free height.
|
|
145
|
-
*/
|
|
146
|
-
declare function PageContentSplit({ open: openProp, defaultOpen, onOpenChange, labels, className, children, ...rest }: PageContentSplitProps): import("react/jsx-runtime").JSX.Element;
|
|
147
|
-
declare namespace PageContentSplit {
|
|
148
|
-
var displayName: string;
|
|
149
|
-
}
|
|
150
|
-
/** Which pane of the split a panel is. */
|
|
151
|
-
export type PageContentPanelKind = "list" | "detail";
|
|
152
|
-
export type PageContentPanelProps = DivProps & {
|
|
153
|
-
/**
|
|
154
|
-
* `list` — the 16–20rem column, or the whole split while closed; going back refocuses its last control. `detail` — the rest, or the whole split while open; focus lands here when it opens.
|
|
155
|
-
*/
|
|
156
|
-
kind: PageContentPanelKind;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* A pane of the split. `list` — a fixed column on a wide split, the whole split while the detail
|
|
160
|
-
* is closed; it remembers the control that had focus, so going back returns there. `detail` — the
|
|
161
|
-
* rest of a wide split; on a narrow one it replaces the list while open.
|
|
162
|
-
*/
|
|
163
|
-
declare function PageContentPanel({ kind, className, ref, onFocus, onAnimationEnd, ...rest }: PageContentPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
164
|
-
declare namespace PageContentPanel {
|
|
165
|
-
var displayName: string;
|
|
166
|
-
}
|
|
167
|
-
export type PageContentBackButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children"> & {
|
|
168
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
169
|
-
};
|
|
170
|
-
/**
|
|
171
|
-
* Back from the detail to the list: a soft neutral icon Button named by `labels.back`, shown only
|
|
172
|
-
* while the split shows one pane. Put it at the start of the detail's header.
|
|
173
|
-
*/
|
|
174
|
-
declare function PageContentBackButton({ className, onClick, ...rest }: PageContentBackButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
175
|
-
declare namespace PageContentBackButton {
|
|
176
|
-
var displayName: string;
|
|
177
|
-
}
|
|
178
|
-
export declare const PageContent: {
|
|
179
|
-
Root: typeof PageContentRoot;
|
|
180
|
-
Header: typeof PageContentHeader;
|
|
181
|
-
Actions: typeof PageContentActions;
|
|
182
|
-
Title: typeof PageContentTitle;
|
|
183
|
-
Description: typeof PageContentDescription;
|
|
184
|
-
Body: typeof PageContentBody;
|
|
185
|
-
Section: typeof PageContentSection;
|
|
186
|
-
Grid: typeof PageContentGrid;
|
|
187
|
-
Cell: typeof PageContentCell;
|
|
188
|
-
Split: typeof PageContentSplit;
|
|
189
|
-
Panel: typeof PageContentPanel;
|
|
190
|
-
BackButton: typeof PageContentBackButton;
|
|
191
|
-
};
|
|
192
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type * as React from "react";
|
|
2
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
4
|
-
};
|
|
5
|
-
export type PageToolbarRootProps = DivProps;
|
|
6
|
-
/**
|
|
7
|
-
* The panel at the top of a page: search and filter, sections, view options and the primary
|
|
8
|
-
* action, with the active filters under the top row. It lays itself out from its own width — one
|
|
9
|
-
* row when wide, stacked rows when narrow — so the slots keep fixed places at any width. Parts may
|
|
10
|
-
* be left out; whatever the JSX order, the DOM (and Tab) order is Tools, Sections, View, Actions,
|
|
11
|
-
* Chips. Named (`aria-label`), it is a `group`.
|
|
12
|
-
*/
|
|
13
|
-
declare function PageToolbarRoot({ className, children, ref, ...rest }: PageToolbarRootProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare namespace PageToolbarRoot {
|
|
15
|
-
var displayName: string;
|
|
16
|
-
}
|
|
17
|
-
export type PageToolbarSectionsProps = DivProps;
|
|
18
|
-
/** Sections of the page — a `fullWidth` SegmentedControl; after the Tools when wide, a full row under the chips when narrow. */
|
|
19
|
-
declare function PageToolbarSections({ className, ...rest }: PageToolbarSectionsProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
declare namespace PageToolbarSections {
|
|
21
|
-
var displayName: string;
|
|
22
|
-
}
|
|
23
|
-
export type PageToolbarToolsProps = DivProps;
|
|
24
|
-
/** Search and filter button (`SmartFilter.Toolbar`): the first slot and the stretchy one; the Chips sit under the top row. */
|
|
25
|
-
declare function PageToolbarTools({ className, ...rest }: PageToolbarToolsProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
declare namespace PageToolbarTools {
|
|
27
|
-
var displayName: string;
|
|
28
|
-
}
|
|
29
|
-
export type PageToolbarViewProps = DivProps;
|
|
30
|
-
/** How the data is shown: period, table / cards, columns. Sized by content when wide; its own full row when narrow, its controls sharing it. */
|
|
31
|
-
declare function PageToolbarView({ className, ...rest }: PageToolbarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
declare namespace PageToolbarView {
|
|
33
|
-
var displayName: string;
|
|
34
|
-
}
|
|
35
|
-
export type PageToolbarActionsProps = DivProps;
|
|
36
|
-
/** The primary action of the page: the top row's end at every width, never wraps down. */
|
|
37
|
-
declare function PageToolbarActions({ className, ...rest }: PageToolbarActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
declare namespace PageToolbarActions {
|
|
39
|
-
var displayName: string;
|
|
40
|
-
}
|
|
41
|
-
export type PageToolbarChipsProps = DivProps;
|
|
42
|
-
/** Active filters (`SmartFilter.Chips`) in their own row under the top row; the row disappears when empty. */
|
|
43
|
-
declare function PageToolbarChips({ className, ...rest }: PageToolbarChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
declare namespace PageToolbarChips {
|
|
45
|
-
var displayName: string;
|
|
46
|
-
}
|
|
47
|
-
export declare const PageToolbar: {
|
|
48
|
-
Root: typeof PageToolbarRoot;
|
|
49
|
-
Sections: typeof PageToolbarSections;
|
|
50
|
-
Tools: typeof PageToolbarTools;
|
|
51
|
-
View: typeof PageToolbarView;
|
|
52
|
-
Actions: typeof PageToolbarActions;
|
|
53
|
-
Chips: typeof PageToolbarChips;
|
|
54
|
-
};
|
|
55
|
-
export {};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type DividerProps } from "../../components/divider/Divider";
|
|
3
|
-
export type AppHeaderLabels = {
|
|
4
|
-
/** Name of the menu button that opens the off-canvas Sidebar. */
|
|
5
|
-
menu: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const APP_HEADER_LABELS: AppHeaderLabels;
|
|
8
|
-
type HeaderProps = React.HTMLAttributes<HTMLElement> & {
|
|
9
|
-
ref?: React.Ref<HTMLElement>;
|
|
10
|
-
};
|
|
11
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
12
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
13
|
-
};
|
|
14
|
-
export type AppHeaderRootProps = HeaderProps & {
|
|
15
|
-
/**
|
|
16
|
-
* Built-in strings, see Labels.
|
|
17
|
-
*/
|
|
18
|
-
labels?: Partial<AppHeaderLabels>;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The page's bar at the very top of the content panel: a title row as high as the Sidebar brand
|
|
22
|
-
* row (so the two read as one line) with only what the current page needs — the page title, the
|
|
23
|
-
* page's own buttons — and the page tools (`AppHeader.Tools`) as a second row under it. Sticky;
|
|
24
|
-
* lays itself out from its own width (narrow: the title icon goes, the title and its line of data
|
|
25
|
-
* truncate). Inside an `AppShell` a header the page renders moves into the shell's header row, and
|
|
26
|
-
* while the Sidebar is off-canvas the row starts with the menu button that opens it.
|
|
27
|
-
*/
|
|
28
|
-
declare function AppHeaderRoot(props: AppHeaderRootProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
declare namespace AppHeaderRoot {
|
|
30
|
-
var displayName: string;
|
|
31
|
-
}
|
|
32
|
-
export type AppHeaderStartProps = DivProps;
|
|
33
|
-
/** The leading zone: the menu button, a back button, the title or breadcrumbs. Takes the free width. */
|
|
34
|
-
declare function AppHeaderStart({ className, children, ...rest }: AppHeaderStartProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
declare namespace AppHeaderStart {
|
|
36
|
-
var displayName: string;
|
|
37
|
-
}
|
|
38
|
-
export type AppHeaderTitleProps = DivProps;
|
|
39
|
-
/**
|
|
40
|
-
* Where you are: an optional `AppHeader.Icon`, the name and an optional `AppHeader.Description`
|
|
41
|
-
* under it — the same anatomy as the Sidebar brand. The name is the page's `<h1>` (an app page
|
|
42
|
-
* titles itself in the header); the description stays outside the heading's name. The name
|
|
43
|
-
* truncates.
|
|
44
|
-
*/
|
|
45
|
-
declare function AppHeaderTitle({ className, children, ...rest }: AppHeaderTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
declare namespace AppHeaderTitle {
|
|
47
|
-
var displayName: string;
|
|
48
|
-
}
|
|
49
|
-
export type AppHeaderIconProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
50
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Decorative glyph before the title on a tile shaped like the bar's soft buttons (control m).
|
|
54
|
-
* Not a Thumbnail: its tiers (32 · 40) miss the control height the buttons beside it have.
|
|
55
|
-
*/
|
|
56
|
-
declare function AppHeaderIcon({ className, ...rest }: AppHeaderIconProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
declare namespace AppHeaderIcon {
|
|
58
|
-
var displayName: string;
|
|
59
|
-
}
|
|
60
|
-
export type AppHeaderDescriptionProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
61
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
62
|
-
};
|
|
63
|
-
/** Muted line of data under the title (a period, a count); on a narrow header it truncates. */
|
|
64
|
-
declare function AppHeaderDescription({ className, ...rest }: AppHeaderDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
-
declare namespace AppHeaderDescription {
|
|
66
|
-
var displayName: string;
|
|
67
|
-
}
|
|
68
|
-
export type AppHeaderSeparatorProps = Omit<DividerProps, "orientation" | "children" | "align" | "size" | "inset">;
|
|
69
|
-
/**
|
|
70
|
-
* A short vertical line between groups in a zone (a back button | the path), with air on both
|
|
71
|
-
* sides: the inset vertical Divider, one text line tall.
|
|
72
|
-
*/
|
|
73
|
-
declare function AppHeaderSeparator({ className, ...rest }: AppHeaderSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
-
declare namespace AppHeaderSeparator {
|
|
75
|
-
var displayName: string;
|
|
76
|
-
}
|
|
77
|
-
export type AppHeaderToolsProps = DivProps;
|
|
78
|
-
/**
|
|
79
|
-
* The page's tools in the header — a `PageToolbar.Root` (sections, period, filters, the primary
|
|
80
|
-
* action): the header's second row, the full width under the title row, so the toolbar lays
|
|
81
|
-
* itself out from that width (one row when wide, two when narrow). Root places it there wherever
|
|
82
|
-
* it is written — directly, in a fragment or inside a component of the page.
|
|
83
|
-
*/
|
|
84
|
-
declare function AppHeaderTools(props: AppHeaderToolsProps): import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
declare namespace AppHeaderTools {
|
|
86
|
-
var displayName: string;
|
|
87
|
-
}
|
|
88
|
-
export type AppHeaderActionsProps = DivProps;
|
|
89
|
-
/** Buttons at the end: one primary action, notifications, the account. Never wraps. */
|
|
90
|
-
declare function AppHeaderActions({ className, ...rest }: AppHeaderActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
91
|
-
declare namespace AppHeaderActions {
|
|
92
|
-
var displayName: string;
|
|
93
|
-
}
|
|
94
|
-
export type AppHeaderMenuButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children" | "aria-expanded" | "aria-controls"> & {
|
|
95
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Opens the off-canvas Sidebar of the shell: an icon button named by `labels.menu`, with
|
|
99
|
-
* `aria-expanded` and `aria-controls` from the shell. The bar draws one itself; this part moves it
|
|
100
|
-
* to another place in the header. Renders nothing while the Sidebar is a rail on screen, or
|
|
101
|
-
* outside a shell with a Sidebar.
|
|
102
|
-
*/
|
|
103
|
-
declare function AppHeaderMenuButton(props: AppHeaderMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
104
|
-
declare namespace AppHeaderMenuButton {
|
|
105
|
-
var displayName: string;
|
|
106
|
-
}
|
|
107
|
-
export declare const AppHeader: {
|
|
108
|
-
Root: typeof AppHeaderRoot;
|
|
109
|
-
Start: typeof AppHeaderStart;
|
|
110
|
-
Title: typeof AppHeaderTitle;
|
|
111
|
-
Icon: typeof AppHeaderIcon;
|
|
112
|
-
Description: typeof AppHeaderDescription;
|
|
113
|
-
Separator: typeof AppHeaderSeparator;
|
|
114
|
-
Tools: typeof AppHeaderTools;
|
|
115
|
-
Actions: typeof AppHeaderActions;
|
|
116
|
-
MenuButton: typeof AppHeaderMenuButton;
|
|
117
|
-
};
|
|
118
|
-
export {};
|