@astryxdesign/cli 0.7.17-canary.g4ea41ce → 0.7.17-canary.g5a3fd39
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 +7 -2
- package/api/build/_adapter.d.mts +7 -6
- package/api/build/_adapter.mjs +18 -11
- package/api/build/build.type.mjs +1 -1
- package/api/build/kit/kind.d.mts +6 -0
- package/api/build/kit/kind.mjs +1 -1
- package/api/build/kit/rank.d.mts +7 -1
- package/api/build/kit/rank.mjs +15 -5
- package/api/build/kit/signals.mjs +58 -57
- package/api/build/kit/start.d.mts +2 -1
- package/api/build/kit/start.mjs +62 -9
- package/api/build/kit/words.d.mts +6 -2
- package/api/build/kit/words.mjs +7 -3
- package/api/component/__fixtures__/resolutions/modules.txt +2 -2
- package/api/component/_adapter.d.mts +30 -24
- package/api/component/_adapter.mjs +72 -31
- package/api/component/component.mjs +4 -4
- package/api/component/detail/detail.d.mts +2 -2
- package/api/component/detail/detail.mjs +1 -1
- package/api/component/list/list.d.mts +2 -2
- package/api/component/list/list.mjs +4 -4
- package/api/discover/_adapter.mjs +15 -15
- package/api/docs/_adapter.d.mts +13 -5
- package/api/docs/_adapter.mjs +37 -10
- package/api/doctor/_adapter.d.mts +32 -0
- package/api/doctor/_adapter.mjs +56 -1
- package/api/doctor/doctor.mjs +28 -5
- package/api/doctor/theme-checks.mjs +165 -83
- package/api/error.d.mts +4 -3
- package/api/error.mjs +3 -2
- package/api/hook/_adapter.d.mts +5 -4
- package/api/hook/_adapter.mjs +6 -5
- package/api/icon/_options.d.mts +17 -0
- package/api/icon/_options.mjs +54 -0
- package/api/icon/exportIconIndex.doc.d.mts +10 -0
- package/api/icon/exportIconIndex.doc.mjs +59 -0
- package/api/icon/icon.mjs +11 -34
- package/api/icon/icon.type.d.mts +49 -0
- package/api/icon/icon.type.mjs +24 -0
- package/api/icon/rankIconIndex.doc.d.mts +10 -0
- package/api/icon/rankIconIndex.doc.mjs +79 -0
- package/api/icon/search/icon-index.d.mts +41 -0
- package/api/icon/search/icon-index.mjs +139 -0
- package/api/icon/search/search.d.mts +18 -0
- package/api/icon/search/search.mjs +13 -0
- package/api/index.d.mts +1 -0
- package/api/index.mjs +1 -0
- package/api/search/_adapter.d.mts +8 -5
- package/api/search/_adapter.mjs +14 -10
- package/api/search/_gather-components.d.mts +4 -4
- package/api/search/_gather-components.mjs +4 -3
- package/api/search/_gather-hooks.d.mts +2 -2
- package/api/search/_gather-hooks.mjs +1 -1
- package/api/search/_lexical.mjs +12 -2
- package/api/search/_priority.d.mts +10 -2
- package/api/search/_priority.mjs +37 -7
- package/api/search/_score.d.mts +12 -3
- package/api/search/_score.mjs +6 -3
- package/api/search/_words.mjs +12 -3
- package/api/search/search.d.mts +7 -1
- package/api/search/search.mjs +37 -4
- package/api/swizzle/_adapter.d.mts +7 -5
- package/api/swizzle/_adapter.mjs +7 -3
- package/api/swizzle/copy/copy.mjs +5 -4
- package/api/theme/build/build.d.mts +5 -0
- package/api/theme/build/build.mjs +400 -21
- package/api/theme/build/family.mjs +18 -7
- package/api/theme/build/font-warning.mjs +5 -4
- package/api/theme/build/input-fields.d.mts +21 -6
- package/api/theme/build/input-fields.mjs +104 -13
- package/api/theme/build/typography-values.d.mts +22 -0
- package/api/theme/build/typography-values.mjs +172 -22
- package/api/theme/build/written-values.d.mts +7 -0
- package/api/theme/build/written-values.mjs +57 -8
- package/api/theme/generateTonalPalette.doc.mjs +1 -1
- package/api/theme/palette/generate/generator.d.mts +14 -2
- package/api/theme/palette/generate/generator.mjs +94 -8
- package/api/theme/theme.type.d.mts +21 -4
- package/api/theme/theme.type.mjs +14 -5
- package/api/theme/themePaletteGenerate.doc.mjs +1 -1
- package/api/theme/themeTemplate.doc.mjs +18 -3
- package/api/theme-edit/_adapter.d.mts +1 -1
- package/api/theme-edit/_adapter.mjs +1 -1
- package/api/theme-edit/_catalog.d.mts +10 -4
- package/api/theme-edit/_catalog.mjs +81 -22
- package/api/theme-edit/_check.mjs +402 -88
- package/api/theme-edit/_color.d.mts +11 -2
- package/api/theme-edit/_color.mjs +23 -7
- package/api/theme-edit/_compiler.mjs +11 -3
- package/api/theme-edit/_context.d.mts +87 -6
- package/api/theme-edit/_context.mjs +224 -17
- package/api/theme-edit/_css.mjs +4 -0
- package/api/theme-edit/_edit.mjs +331 -58
- package/api/theme-edit/_how-question.d.mts +11 -0
- package/api/theme-edit/_how-question.mjs +2514 -234
- package/api/theme-edit/_how.mjs +79 -14
- package/api/theme-edit/_missed.mjs +294 -32
- package/api/theme-edit/_normal.d.mts +3 -1
- package/api/theme-edit/_normal.mjs +4 -1
- package/api/theme-edit/_palette.mjs +36 -5
- package/api/theme-edit/_part-words.mjs +20 -2
- package/api/theme-edit/_parts.d.mts +12 -1
- package/api/theme-edit/_parts.mjs +116 -11
- package/api/theme-edit/_preview-app.mjs +40 -2
- package/api/theme-edit/_preview.d.mts +45 -5
- package/api/theme-edit/_preview.mjs +173 -21
- package/api/theme-edit/_settings.d.mts +20 -0
- package/api/theme-edit/_settings.mjs +1033 -94
- package/api/theme-edit/_tables.mjs +2 -2
- package/api/theme-edit/theme-edit.type.d.mts +6 -5
- package/api/theme-edit/theme-edit.type.mjs +8 -8
- package/api/upgrade/_adapter.mjs +13 -2
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/tree/authoring.doc.mjs +1 -0
- package/assets/docs/tree/cli.doc.mjs +1 -0
- package/assets/docs/tree/computer-agent-guide.doc.mjs +1 -1
- package/assets/docs/tree/generate-a-palette.doc.mjs +2 -2
- package/assets/docs/tree/global.doc.mjs +1 -0
- package/assets/docs/tree/single-component.doc.mjs +40 -2
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/who-answers.doc.mjs +2 -2
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -1
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.tsx +4 -4
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx +1 -0
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx +2 -2
- package/assets/templates/blocks/components/Card/CardElevations.tsx +1 -1
- package/assets/templates/blocks/components/Card/CardWithInnerLayout.tsx +19 -3
- package/assets/templates/blocks/components/Card/ClickableCardWithNestedButton.tsx +11 -1
- package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardMulti.tsx +1 -1
- package/assets/templates/blocks/components/Center/CenterHorizontal.tsx +1 -1
- package/assets/templates/blocks/components/Center/CenterInsideACard.tsx +1 -1
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.tsx +8 -0
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx +8 -2
- package/assets/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +1 -0
- package/assets/templates/blocks/components/ChatLayout/ChatLayoutShowcase.tsx +1 -1
- package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleCustomContent.tsx +9 -1
- package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleMetadata.tsx +12 -2
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.tsx +28 -7
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +35 -7
- package/assets/templates/blocks/components/Collapsible/CollapsibleShowcase.tsx +1 -1
- package/assets/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +20 -4
- package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListBasic.tsx +15 -3
- package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListShowcase.tsx +29 -6
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +2 -2
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.tsx +1 -1
- package/assets/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +2 -2
- package/assets/templates/blocks/components/Divider/DividerFullBleed.tsx +1 -1
- package/assets/templates/blocks/components/Divider/DividerShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Divider/DividerVariants.tsx +1 -1
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +23 -4
- package/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx +18 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx +20 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx +16 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx +11 -1
- package/assets/templates/blocks/components/Heading/HeadingTruncation.tsx +12 -2
- package/assets/templates/blocks/components/InternationalizationProvider/useDirectionHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +1 -1
- package/assets/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx +1 -1
- package/assets/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +17 -3
- package/assets/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx +17 -3
- package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx +15 -3
- package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +9 -2
- package/assets/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +1 -1
- package/assets/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx +1 -1
- package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.tsx +1 -1
- package/assets/templates/blocks/components/MultiSelector/MultiSelectorGhostToolbar.tsx +14 -2
- package/assets/templates/blocks/components/Outline/OutlineDensity.tsx +2 -0
- package/assets/templates/blocks/components/OverflowList/OverflowListShowcase.tsx +6 -1
- package/assets/templates/blocks/components/Pagination/PaginationVariants.tsx +4 -0
- package/assets/templates/blocks/components/Popover/PopoverHookUsage.tsx +17 -2
- package/assets/templates/blocks/components/SegmentedControl/SegmentedControlFillLayout.tsx +1 -1
- package/assets/templates/blocks/components/Selector/SelectorGhostToolbar.tsx +14 -2
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.tsx +8 -1
- package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +2 -2
- package/assets/templates/blocks/components/SideNavHeading/SideNavHeadingShowcase.tsx +2 -0
- package/assets/templates/blocks/components/Switch/SwitchWithStatus.tsx +1 -1
- package/assets/templates/blocks/components/TabList/TabListTabsFillLayout.tsx +1 -1
- package/assets/templates/blocks/components/TabList/TabListTabsWithActions.tsx +12 -1
- package/assets/templates/blocks/components/Table/TableBulkActionsTable.tsx +11 -1
- package/assets/templates/blocks/components/Table/TableInCard.tsx +2 -2
- package/assets/templates/blocks/components/Text/TextTruncation.tsx +1 -1
- package/assets/templates/blocks/components/Text/TextWordBreak.tsx +12 -2
- package/assets/templates/blocks/components/Text/TextWrap.tsx +19 -4
- package/assets/templates/blocks/components/TextArea/TextAreaCharacterCount.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaShowcase.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaStates.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaValidation.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.tsx +1 -1
- package/assets/templates/blocks/components/TextInput/TextInputStatusVariant.tsx +2 -2
- package/assets/templates/blocks/components/Timestamp/TimestampAutoFormat.tsx +15 -1
- package/assets/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx +15 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +8 -0
- package/assets/templates/blocks/components/Toolbar/ToolbarSizes.tsx +12 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +18 -3
- package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx +6 -0
- package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx +7 -1
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +2 -2
- package/assets/templates/blocks/components/TopNav/TopNavShowcase.tsx +9 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +102 -6
- package/assets/templates/pages/canvas-editor/page.tsx +73 -2
- package/assets/templates/pages/centered-hero/page.tsx +10 -4
- package/assets/templates/pages/course-detail/page.tsx +46 -2
- package/assets/templates/pages/dashboard/page.tsx +45 -16
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +31 -20
- package/assets/templates/pages/dashboard-comparison/page.tsx +9 -0
- package/assets/templates/pages/dashboard-composition/page.tsx +22 -9
- package/assets/templates/pages/dashboard-progress/page.tsx +27 -15
- package/assets/templates/pages/dashboard-scorecard/page.tsx +9 -0
- package/assets/templates/pages/detail-page/page.tsx +105 -77
- package/assets/templates/pages/documentation/page.tsx +15 -2
- package/assets/templates/pages/documentation-design/page.tsx +7 -34
- package/assets/templates/pages/documentation-technical/page.tsx +76 -12
- package/assets/templates/pages/editor/page.tsx +26 -21
- package/assets/templates/pages/file-explorer/page.tsx +35 -1
- package/assets/templates/pages/form-two-column/page.tsx +2 -3
- package/assets/templates/pages/form-wizard/page.tsx +31 -3
- package/assets/templates/pages/form-wizard-vertical/page.tsx +32 -3
- package/assets/templates/pages/gallery-hero/page.tsx +2 -1
- package/assets/templates/pages/ide/page.tsx +15 -1
- package/assets/templates/pages/incident-console/page.tsx +2 -1
- package/assets/templates/pages/incident-console/template.doc.mjs +1 -1
- package/assets/templates/pages/kanban-board/page.tsx +39 -2
- package/assets/templates/pages/payment-form/page.tsx +77 -39
- package/assets/templates/pages/product-gallery/page.tsx +16 -14
- package/assets/templates/pages/settings/page.tsx +35 -3
- package/assets/templates/pages/settings-dialog/page.tsx +34 -5
- package/assets/templates/pages/settings-sidebar/page.tsx +23 -3
- package/assets/templates/pages/shell-nav/page.tsx +28 -12
- package/assets/templates/pages/shell-side-nav/page.tsx +16 -1
- package/assets/templates/pages/shell-top-nav/page.tsx +27 -1
- package/assets/templates/pages/side-gallery/page.tsx +1 -1
- package/assets/templates/pages/table/page.tsx +2 -1
- package/assets/templates/pages/table/template.doc.mjs +1 -1
- package/assets/templates/pages/table-collapsible/page.tsx +1 -1
- package/assets/templates/pages/table-comparison/page.tsx +1 -1
- package/assets/templates/pages/table-filter/page.tsx +9 -2
- package/assets/templates/pages/table-grouped/page.tsx +16 -6
- package/assets/templates/pages/table-inbox/page.tsx +60 -1
- package/assets/templates/pages/table-page/page.tsx +10 -2
- package/assets/templates/pages/table-tree/page.tsx +95 -13
- package/assets/templates/pages/theme-showcase/page.tsx +107 -11
- package/assets/templates/pages/work-item-detail/page.tsx +88 -74
- package/assets/templates/pages/work-item-detail/template.doc.mjs +0 -1
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/gothic/gothicTheme.ts +5 -0
- package/assets/templates/themes/neutral/neutralTheme.ts +1 -1
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/y2k/y2kTheme.ts +1 -1
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/_schema.d.mts +22 -8
- package/authoring/doctypes/_schema.mjs +31 -0
- package/authoring/doctypes/command/command.doc.mjs +24 -0
- package/authoring/doctypes/command/type.ts +31 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/component/type.ts +8 -5
- package/authoring/doctypes/namespace/namespace.doc.mjs +6 -0
- package/authoring/doctypes/namespace/type.ts +4 -0
- package/authoring/doctypes/template/type.ts +0 -7
- package/authoring/index.d.ts +6 -1
- package/authoring/integration/integration.doc.mjs +7 -0
- package/authoring/integration/schema.d.mts +6 -0
- package/authoring/integration/schema.mjs +3 -0
- package/authoring/integration/type.ts +34 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -0
- package/clients/cli/commands/component.mjs +5 -1
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/experimental/index.mjs +4 -1
- package/clients/cli/commands/experimental/theme.mjs +139 -64
- package/clients/cli/commands/experimental-render.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-add.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +3 -1
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +3 -2
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +2 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +3 -2
- package/clients/cli/commands/experimental-theme-eject.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-remove.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-targets.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-template.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-use.doc.mjs +2 -0
- package/clients/cli/commands/gap-report.doc.mjs +1 -0
- package/clients/cli/commands/hook.doc.mjs +1 -1
- package/clients/cli/commands/init.doc.mjs +1 -1
- package/clients/cli/commands/integration-add.doc.mjs +1 -0
- package/clients/cli/commands/manifest.mjs +10 -3
- package/clients/cli/commands/swizzle.doc.mjs +8 -1
- package/clients/cli/commands/swizzle.mjs +13 -6
- package/clients/cli/commands/template.doc.mjs +3 -0
- package/clients/cli/commands/theme-add.doc.mjs +2 -1
- package/clients/cli/commands/theme-build.doc.mjs +2 -1
- package/clients/cli/commands/theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -2
- package/clients/cli/commands/theme-remove.doc.mjs +2 -1
- package/clients/cli/commands/theme-targets.doc.mjs +1 -0
- package/clients/cli/commands/theme-template.doc.mjs +1 -0
- package/clients/cli/commands/theme-use.doc.mjs +2 -1
- package/clients/cli/commands/theme.doc.mjs +7 -2
- package/clients/cli/commands/theme.mjs +21 -5
- package/clients/cli/index.mjs +167 -59
- package/clients/cli/lib/base-gate.mjs +522 -0
- package/clients/cli/lib/command-path.mjs +26 -0
- package/clients/cli/lib/define-command.mjs +161 -12
- package/clients/cli/lib/json-shim.mjs +34 -31
- package/clients/cli/lib/manifest.d.ts +14 -0
- package/clients/cli/lib/manifest.mjs +78 -22
- package/clients/cli/lib/root-args.mjs +79 -0
- package/clients/cli/lib/stray-option.mjs +21 -8
- package/clients/cli/lib/unknown-command.mjs +27 -6
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +13 -1
- package/foundation/agent-docs/computer-agent-text.mjs +1 -1
- package/foundation/bases/core-docs.d.mts +10 -0
- package/foundation/bases/core-docs.mjs +42 -0
- package/foundation/bases/core.d.mts +11 -0
- package/foundation/bases/core.mjs +32 -0
- package/foundation/bases/requirements.d.mts +128 -0
- package/foundation/bases/requirements.mjs +193 -0
- package/foundation/bases/resolve.d.mts +134 -0
- package/foundation/bases/resolve.mjs +295 -0
- package/foundation/bases/state.d.mts +24 -0
- package/foundation/bases/state.mjs +46 -0
- package/foundation/bases/steps.d.mts +49 -0
- package/foundation/bases/steps.mjs +88 -0
- package/foundation/config/project.d.mts +14 -0
- package/foundation/config/project.mjs +68 -1
- package/foundation/discovery/cli-self-docs.mjs +9 -1
- package/foundation/discovery/command-pointers.d.mts +28 -0
- package/foundation/discovery/command-pointers.mjs +31 -0
- package/foundation/discovery/component-discovery.d.mts +9 -8
- package/foundation/discovery/component-discovery.mjs +9 -4
- package/foundation/discovery/docs-discovery.d.mts +13 -5
- package/foundation/discovery/docs-discovery.mjs +25 -6
- package/foundation/discovery/hook-discovery.d.mts +6 -6
- package/foundation/discovery/hook-discovery.mjs +6 -4
- package/foundation/discovery/template-adapter.mjs +5 -0
- package/foundation/discovery/template-ids.d.mts +1 -1
- package/foundation/discovery/template-ids.mjs +5 -1
- package/foundation/discovery/theme-discovery.mjs +3 -0
- package/foundation/discovery/theme-imports.mjs +19 -1
- package/foundation/doc-compiler/tree.d.mts +4 -2
- package/foundation/doc-compiler/tree.mjs +46 -1
- package/foundation/env/package-manager.d.mts +7 -0
- package/foundation/env/package-manager.mjs +21 -0
- package/foundation/fonts/font-stylesheet.d.mts +8 -0
- package/foundation/fonts/font-stylesheet.mjs +26 -2
- package/foundation/fs/gather-cache.mjs +44 -13
- package/foundation/fs/own-modules.d.mts +29 -0
- package/foundation/fs/own-modules.mjs +57 -0
- package/foundation/fs/paths.d.mts +30 -2
- package/foundation/fs/paths.mjs +49 -2
- package/foundation/integrations/integrations.d.mts +4 -0
- package/foundation/integrations/integrations.mjs +6 -1
- package/foundation/release/choose.d.mts +7 -0
- package/foundation/release/choose.mjs +16 -2
- package/foundation/release/notices.d.mts +26 -0
- package/foundation/release/notices.mjs +48 -19
- package/foundation/release/project.d.mts +3 -2
- package/foundation/release/project.mjs +4 -5
- package/foundation/release/run-context.d.mts +7 -2
- package/foundation/release/run-context.mjs +6 -2
- package/foundation/render/css-cut.mjs +86 -6
- package/foundation/render/cut-short.d.mts +35 -0
- package/foundation/render/cut-short.mjs +124 -0
- package/foundation/render/font-probe.d.mts +27 -0
- package/foundation/render/font-probe.mjs +77 -0
- package/foundation/render/layers.d.mts +1 -9
- package/foundation/render/layers.mjs +2 -111
- package/foundation/render/page-worker.mjs +83 -6
- package/foundation/render/picture-chrome.mjs +24 -2
- package/foundation/render/picture-playwright.mjs +22 -2
- package/foundation/render/picture-window.d.mts +20 -4
- package/foundation/render/picture-window.mjs +137 -4
- package/foundation/response/base.d.ts +25 -0
- package/foundation/response/error-codes.d.mts +4 -1
- package/foundation/response/error-codes.d.ts +4 -1
- package/foundation/response/error-codes.doc.mjs +17 -0
- package/foundation/response/error-codes.mjs +21 -0
- package/foundation/response/json.d.mts +3 -1
- package/foundation/response/json.mjs +7 -2
- package/foundation/response/response-types.doc.mjs +2 -2
- package/foundation/suggest/name-index.d.mts +2 -1
- package/foundation/suggest/name-index.mjs +1 -1
- package/foundation/suggest/other-command.d.mts +4 -1
- package/foundation/suggest/other-command.mjs +23 -6
- package/foundation/text/string-utils.d.mts +7 -2
- package/foundation/text/string-utils.mjs +24 -10
- package/package.json +6 -6
- package/assets/templates/pages/access-denied/page.tsx +0 -101
- package/assets/templates/pages/access-denied/template.doc.mjs +0 -24
- package/assets/templates/pages/error-page/page.tsx +0 -130
- package/assets/templates/pages/error-page/template.doc.mjs +0 -22
- package/assets/templates/pages/not-found/page.tsx +0 -124
- package/assets/templates/pages/not-found/template.doc.mjs +0 -30
- package/assets/templates/pages/review-workspace/page.tsx +0 -551
- package/assets/templates/pages/review-workspace/template.doc.mjs +0 -31
- package/assets/templates/pages/run-console/page.tsx +0 -945
- package/assets/templates/pages/run-console/template.doc.mjs +0 -27
- package/assets/templates/pages/welcome-portal/page.tsx +0 -538
- package/assets/templates/pages/welcome-portal/template.doc.mjs +0 -38
|
@@ -38,6 +38,7 @@ import {ProgressBar} from '@astryxdesign/core/ProgressBar';
|
|
|
38
38
|
import {Selector} from '@astryxdesign/core/Selector';
|
|
39
39
|
import {Table, proportional, pixel} from '@astryxdesign/core/Table';
|
|
40
40
|
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
41
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
41
42
|
import {
|
|
42
43
|
BarChart,
|
|
43
44
|
Bar,
|
|
@@ -767,6 +768,7 @@ function labelFor(
|
|
|
767
768
|
}
|
|
768
769
|
|
|
769
770
|
export default function DataDashboardPage() {
|
|
771
|
+
const showToast = useToast();
|
|
770
772
|
// Matches TREND_DAYS — the fixtures render a full quarter.
|
|
771
773
|
const [range, setRange] = useState<DateRange>('90d');
|
|
772
774
|
const [segment, setSegment] = useState<Segment>('all');
|
|
@@ -817,6 +819,13 @@ export default function DataDashboardPage() {
|
|
|
817
819
|
label="Export"
|
|
818
820
|
variant="secondary"
|
|
819
821
|
icon={<Icon icon={ArrowDownTrayIcon} size="sm" />}
|
|
822
|
+
onClick={() =>
|
|
823
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
824
|
+
showToast({
|
|
825
|
+
body: 'Demo: this dashboard would export here',
|
|
826
|
+
uniqueID: 'export-dashboard',
|
|
827
|
+
})
|
|
828
|
+
}
|
|
820
829
|
/>
|
|
821
830
|
</HStack>
|
|
822
831
|
</HStack>
|
|
@@ -18,6 +18,7 @@ import {Button} from '@astryxdesign/core/Button';
|
|
|
18
18
|
import {Table, proportional} from '@astryxdesign/core/Table';
|
|
19
19
|
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
20
20
|
import {Divider} from '@astryxdesign/core/Divider';
|
|
21
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
21
22
|
import {
|
|
22
23
|
AreaChart,
|
|
23
24
|
Area,
|
|
@@ -656,6 +657,7 @@ function AssetRow({
|
|
|
656
657
|
// ============= MAIN COMPONENT =============
|
|
657
658
|
|
|
658
659
|
export default function DashboardPortfolioTemplate() {
|
|
660
|
+
const showToast = useToast();
|
|
659
661
|
const [timeRange, setTimeRange] = useState('1 year');
|
|
660
662
|
|
|
661
663
|
return (
|
|
@@ -736,7 +738,18 @@ export default function DashboardPortfolioTemplate() {
|
|
|
736
738
|
Past 24 hours
|
|
737
739
|
</Text>
|
|
738
740
|
</VStack>
|
|
739
|
-
<Button
|
|
741
|
+
<Button
|
|
742
|
+
label="View more"
|
|
743
|
+
variant="secondary"
|
|
744
|
+
size="lg"
|
|
745
|
+
onClick={() =>
|
|
746
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
747
|
+
showToast({
|
|
748
|
+
body: 'Demo: the full market overview would open here',
|
|
749
|
+
uniqueID: 'more-market',
|
|
750
|
+
})
|
|
751
|
+
}
|
|
752
|
+
/>
|
|
740
753
|
</HStack>
|
|
741
754
|
|
|
742
755
|
{/* Market index cards */}
|
|
@@ -748,16 +761,16 @@ export default function DashboardPortfolioTemplate() {
|
|
|
748
761
|
|
|
749
762
|
{/* Trending stocks table */}
|
|
750
763
|
<Card>
|
|
751
|
-
<VStack
|
|
764
|
+
<VStack paddingBlockEnd={4}>
|
|
752
765
|
<Heading level={3}>Trending Stocks</Heading>
|
|
753
|
-
<Table<StockRow>
|
|
754
|
-
data={trendingStocks}
|
|
755
|
-
columns={trendingColumns}
|
|
756
|
-
idKey="id"
|
|
757
|
-
hasHover
|
|
758
|
-
dividers="rows"
|
|
759
|
-
/>
|
|
760
766
|
</VStack>
|
|
767
|
+
<Table<StockRow>
|
|
768
|
+
data={trendingStocks}
|
|
769
|
+
columns={trendingColumns}
|
|
770
|
+
idKey="id"
|
|
771
|
+
hasHover
|
|
772
|
+
dividers="rows"
|
|
773
|
+
/>
|
|
761
774
|
</Card>
|
|
762
775
|
</VStack>
|
|
763
776
|
</LayoutContent>
|
|
@@ -49,6 +49,7 @@ import {Table, proportional} from '@astryxdesign/core/Table';
|
|
|
49
49
|
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
50
50
|
import {Timestamp} from '@astryxdesign/core/Timestamp';
|
|
51
51
|
import {EmptyState} from '@astryxdesign/core/EmptyState';
|
|
52
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
52
53
|
import {
|
|
53
54
|
BarChart,
|
|
54
55
|
Bar,
|
|
@@ -571,6 +572,7 @@ function ProgramHeader({
|
|
|
571
572
|
phase: Phase;
|
|
572
573
|
onPhaseChange: (phase: Phase) => void;
|
|
573
574
|
}) {
|
|
575
|
+
const showToast = useToast();
|
|
574
576
|
return (
|
|
575
577
|
<LayoutHeader padding={6} hasDivider>
|
|
576
578
|
<HStack
|
|
@@ -612,6 +614,13 @@ function ProgramHeader({
|
|
|
612
614
|
label="Export status"
|
|
613
615
|
variant="secondary"
|
|
614
616
|
icon={<Icon icon={ArrowDownTrayIcon} size="sm" />}
|
|
617
|
+
onClick={() =>
|
|
618
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
619
|
+
showToast({
|
|
620
|
+
body: 'Demo: the program status would export here',
|
|
621
|
+
uniqueID: 'export-status',
|
|
622
|
+
})
|
|
623
|
+
}
|
|
615
624
|
/>
|
|
616
625
|
</HStack>
|
|
617
626
|
</HStack>
|
|
@@ -666,7 +675,9 @@ function GanttChart({milestones}: {milestones: Milestone[]}) {
|
|
|
666
675
|
|
|
667
676
|
return (
|
|
668
677
|
<VStack gap={3}>
|
|
669
|
-
|
|
678
|
+
{/* A chart keeps its axes in every reading direction: time runs left to
|
|
679
|
+
right and the row labels stay beside their bars. */}
|
|
680
|
+
<ResponsiveContainer width="100%" height={height} dir="ltr">
|
|
670
681
|
<BarChart
|
|
671
682
|
data={data}
|
|
672
683
|
layout="vertical"
|
|
@@ -853,7 +864,8 @@ const BURNDOWN_HEIGHT = DONUT_SIZE;
|
|
|
853
864
|
function BurndownChart() {
|
|
854
865
|
return (
|
|
855
866
|
<VStack gap={3}>
|
|
856
|
-
|
|
867
|
+
{/* Left to right in every reading direction, like every chart. */}
|
|
868
|
+
<ResponsiveContainer width="100%" height={BURNDOWN_HEIGHT} dir="ltr">
|
|
857
869
|
<LineChart
|
|
858
870
|
data={BURNDOWN}
|
|
859
871
|
margin={{top: 16, right: 4, left: 4, bottom: 4}}>
|
|
@@ -1111,24 +1123,24 @@ export default function ProjectStatusPage() {
|
|
|
1111
1123
|
</Grid>
|
|
1112
1124
|
|
|
1113
1125
|
<Card padding={6}>
|
|
1114
|
-
<VStack
|
|
1126
|
+
<VStack paddingBlockEnd={4}>
|
|
1115
1127
|
<CardHeading
|
|
1116
1128
|
title="Workstreams"
|
|
1117
1129
|
meta={`${workstreams.length} of ${WORKSTREAMS.length}`}
|
|
1118
1130
|
/>
|
|
1119
|
-
{workstreams.length === 0 ? (
|
|
1120
|
-
<PhaseEmptyState noun="workstreams" />
|
|
1121
|
-
) : (
|
|
1122
|
-
<Table<Workstream>
|
|
1123
|
-
data={workstreams}
|
|
1124
|
-
columns={WORKSTREAM_COLUMNS}
|
|
1125
|
-
idKey="id"
|
|
1126
|
-
density="balanced"
|
|
1127
|
-
dividers="rows"
|
|
1128
|
-
hasHover
|
|
1129
|
-
/>
|
|
1130
|
-
)}
|
|
1131
1131
|
</VStack>
|
|
1132
|
+
{workstreams.length === 0 ? (
|
|
1133
|
+
<PhaseEmptyState noun="workstreams" />
|
|
1134
|
+
) : (
|
|
1135
|
+
<Table<Workstream>
|
|
1136
|
+
data={workstreams}
|
|
1137
|
+
columns={WORKSTREAM_COLUMNS}
|
|
1138
|
+
idKey="id"
|
|
1139
|
+
density="balanced"
|
|
1140
|
+
dividers="rows"
|
|
1141
|
+
hasHover
|
|
1142
|
+
/>
|
|
1143
|
+
)}
|
|
1132
1144
|
</Card>
|
|
1133
1145
|
</VStack>
|
|
1134
1146
|
</Section>
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
SegmentedControlItem,
|
|
28
28
|
} from '@astryxdesign/core/SegmentedControl';
|
|
29
29
|
import {Timestamp} from '@astryxdesign/core/Timestamp';
|
|
30
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
30
31
|
import {
|
|
31
32
|
AreaChart,
|
|
32
33
|
Area,
|
|
@@ -750,6 +751,7 @@ const pageStyles = stylex.create({
|
|
|
750
751
|
// ============= MAIN =============
|
|
751
752
|
|
|
752
753
|
export default function ExecutiveReviewPage() {
|
|
754
|
+
const showToast = useToast();
|
|
753
755
|
const [period, setPeriod] = useState<Period>('WoW');
|
|
754
756
|
// The narrative rail needs ~400px of its own; below that the content column
|
|
755
757
|
// would be too cramped for the 2-up trend grid, so the rail folds inline.
|
|
@@ -798,6 +800,13 @@ export default function ExecutiveReviewPage() {
|
|
|
798
800
|
label="Export"
|
|
799
801
|
variant="secondary"
|
|
800
802
|
icon={<Icon icon={ArrowDownTrayIcon} size="sm" />}
|
|
803
|
+
onClick={() =>
|
|
804
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
805
|
+
showToast({
|
|
806
|
+
body: 'Demo: this review would export here',
|
|
807
|
+
uniqueID: 'export-review',
|
|
808
|
+
})
|
|
809
|
+
}
|
|
801
810
|
/>
|
|
802
811
|
</HStack>
|
|
803
812
|
</HStack>
|
|
@@ -30,7 +30,7 @@ import {ProgressBar} from '@astryxdesign/core/ProgressBar';
|
|
|
30
30
|
import {Collapsible} from '@astryxdesign/core/Collapsible';
|
|
31
31
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
32
32
|
import {Thumbnail} from '@astryxdesign/core/Thumbnail';
|
|
33
|
-
import {
|
|
33
|
+
import {useImperativeAlertDialog} from '@astryxdesign/core/AlertDialog';
|
|
34
34
|
import {
|
|
35
35
|
CalendarIcon,
|
|
36
36
|
FlagIcon,
|
|
@@ -171,7 +171,10 @@ function PageHeader({
|
|
|
171
171
|
const showToast = useToast();
|
|
172
172
|
const restock = () =>
|
|
173
173
|
// Demo only: replace this toast with the call that performs the action.
|
|
174
|
-
showToast({
|
|
174
|
+
showToast({
|
|
175
|
+
body: 'Demo: a restock would be requested for order #1001 here',
|
|
176
|
+
uniqueID: 'restock',
|
|
177
|
+
});
|
|
175
178
|
return (
|
|
176
179
|
<LayoutHeader hasDivider padding={4} paddingBlockEnd={0}>
|
|
177
180
|
<VStack gap={3}>
|
|
@@ -237,7 +240,17 @@ function PageHeader({
|
|
|
237
240
|
{!isNarrow && (
|
|
238
241
|
<HStack gap={2}>
|
|
239
242
|
<Button label="Restock" variant="secondary" onClick={restock} />
|
|
240
|
-
<Button
|
|
243
|
+
<Button
|
|
244
|
+
label="Edit"
|
|
245
|
+
variant="secondary"
|
|
246
|
+
onClick={() =>
|
|
247
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
248
|
+
showToast({
|
|
249
|
+
body: 'Demo: the order editor would open here',
|
|
250
|
+
uniqueID: 'edit',
|
|
251
|
+
})
|
|
252
|
+
}
|
|
253
|
+
/>
|
|
241
254
|
</HStack>
|
|
242
255
|
)}
|
|
243
256
|
</HStack>
|
|
@@ -254,7 +267,17 @@ function PageHeader({
|
|
|
254
267
|
</StackItem>
|
|
255
268
|
<StackItem size="fill">
|
|
256
269
|
<VStack hAlign="stretch">
|
|
257
|
-
<Button
|
|
270
|
+
<Button
|
|
271
|
+
label="Edit"
|
|
272
|
+
variant="secondary"
|
|
273
|
+
onClick={() =>
|
|
274
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
275
|
+
showToast({
|
|
276
|
+
body: 'Demo: the order editor would open here',
|
|
277
|
+
uniqueID: 'edit',
|
|
278
|
+
})
|
|
279
|
+
}
|
|
280
|
+
/>
|
|
258
281
|
</VStack>
|
|
259
282
|
</StackItem>
|
|
260
283
|
</HStack>
|
|
@@ -279,14 +302,16 @@ function PageHeader({
|
|
|
279
302
|
/>
|
|
280
303
|
</TabList>
|
|
281
304
|
</StackItem>
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
305
|
+
{!isNarrow && (
|
|
306
|
+
<Button
|
|
307
|
+
label={isPanelOpen ? 'Hide panel' : 'Show panel'}
|
|
308
|
+
variant="ghost"
|
|
309
|
+
size="md"
|
|
310
|
+
icon={<Icon icon={ViewColumnsIcon} size="sm" />}
|
|
311
|
+
isIconOnly
|
|
312
|
+
onClick={onTogglePanel}
|
|
313
|
+
/>
|
|
314
|
+
)}
|
|
290
315
|
</HStack>
|
|
291
316
|
</VStack>
|
|
292
317
|
</LayoutHeader>
|
|
@@ -313,7 +338,7 @@ function ItemsCard() {
|
|
|
313
338
|
onClick={() =>
|
|
314
339
|
// Demo only: replace this toast with the call that performs the action.
|
|
315
340
|
showToast({
|
|
316
|
-
body: `
|
|
341
|
+
body: `Demo: fulfillment would start for ${PRODUCTS.length} items here`,
|
|
317
342
|
uniqueID: 'fulfill',
|
|
318
343
|
})
|
|
319
344
|
}
|
|
@@ -324,7 +349,7 @@ function ItemsCard() {
|
|
|
324
349
|
onClick={() =>
|
|
325
350
|
// Demo only: replace this toast with the call that performs the action.
|
|
326
351
|
showToast({
|
|
327
|
-
body: '
|
|
352
|
+
body: 'Demo: a shipping label would be created for order #1001 here',
|
|
328
353
|
uniqueID: 'label',
|
|
329
354
|
})
|
|
330
355
|
}
|
|
@@ -346,7 +371,13 @@ function ItemsCard() {
|
|
|
346
371
|
))}
|
|
347
372
|
</VStack>
|
|
348
373
|
}
|
|
349
|
-
onClick={() =>
|
|
374
|
+
onClick={() =>
|
|
375
|
+
// Demo only: replace this toast with the link to the product.
|
|
376
|
+
showToast({
|
|
377
|
+
body: `Demo: ${product.name} would open here`,
|
|
378
|
+
uniqueID: `product-${i}`,
|
|
379
|
+
})
|
|
380
|
+
}
|
|
350
381
|
startContent={
|
|
351
382
|
<Thumbnail
|
|
352
383
|
src={product.image}
|
|
@@ -375,6 +406,7 @@ function ItemsCard() {
|
|
|
375
406
|
// ─── Invoice Card ───────────────────────────────────────────────────────────
|
|
376
407
|
function InvoiceCard() {
|
|
377
408
|
const showToast = useToast();
|
|
409
|
+
const confirm = useImperativeAlertDialog();
|
|
378
410
|
return (
|
|
379
411
|
<Section>
|
|
380
412
|
<VStack gap={4}>
|
|
@@ -390,10 +422,18 @@ function InvoiceCard() {
|
|
|
390
422
|
label="Refund"
|
|
391
423
|
variant="ghost"
|
|
392
424
|
onClick={() =>
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
425
|
+
confirm.show({
|
|
426
|
+
title: 'Refund this order?',
|
|
427
|
+
description: "This demo won't refund anything.",
|
|
428
|
+
actionLabel: 'Refund',
|
|
429
|
+
onAction: () => {
|
|
430
|
+
confirm.hide();
|
|
431
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
432
|
+
showToast({
|
|
433
|
+
body: 'Demo: the refund would be issued here',
|
|
434
|
+
uniqueID: 'refund',
|
|
435
|
+
});
|
|
436
|
+
},
|
|
397
437
|
})
|
|
398
438
|
}
|
|
399
439
|
/>
|
|
@@ -403,7 +443,7 @@ function InvoiceCard() {
|
|
|
403
443
|
onClick={() =>
|
|
404
444
|
// Demo only: replace this toast with the call that performs the action.
|
|
405
445
|
showToast({
|
|
406
|
-
body: '
|
|
446
|
+
body: 'Demo: the invoice would be sent to janedoe@email.com here',
|
|
407
447
|
uniqueID: 'invoice',
|
|
408
448
|
})
|
|
409
449
|
}
|
|
@@ -466,6 +506,7 @@ function InvoiceCard() {
|
|
|
466
506
|
</HStack>
|
|
467
507
|
</MetadataListItem>
|
|
468
508
|
</MetadataList>
|
|
509
|
+
{confirm.element}
|
|
469
510
|
</VStack>
|
|
470
511
|
</Section>
|
|
471
512
|
);
|
|
@@ -473,6 +514,7 @@ function InvoiceCard() {
|
|
|
473
514
|
|
|
474
515
|
// ─── Timeline ───────────────────────────────────────────────────────────────
|
|
475
516
|
function TimelineSection() {
|
|
517
|
+
const showToast = useToast();
|
|
476
518
|
return (
|
|
477
519
|
<Section>
|
|
478
520
|
<VStack gap={4}>
|
|
@@ -485,6 +527,13 @@ function TimelineSection() {
|
|
|
485
527
|
variant="ghost"
|
|
486
528
|
icon={<Icon icon={FunnelIcon} />}
|
|
487
529
|
isIconOnly
|
|
530
|
+
onClick={() =>
|
|
531
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
532
|
+
showToast({
|
|
533
|
+
body: 'Demo: timeline filters would open here',
|
|
534
|
+
uniqueID: 'timeline-filters',
|
|
535
|
+
})
|
|
536
|
+
}
|
|
488
537
|
/>
|
|
489
538
|
</HStack>
|
|
490
539
|
|
|
@@ -614,66 +663,45 @@ function RightPanel() {
|
|
|
614
663
|
// ─── Main Page ──────────────────────────────────────────────────────────────
|
|
615
664
|
export default function DetailPage2Template() {
|
|
616
665
|
const [activeTab, setActiveTab] = useState('details');
|
|
617
|
-
|
|
618
|
-
//
|
|
666
|
+
// Mobile first: the server render and a shared static copy, which run no
|
|
667
|
+
// script, get the narrow layout, which reads well at every width. Once
|
|
668
|
+
// script runs, wide screens move the order details to the side panel.
|
|
669
|
+
const isNarrow = useMediaQuery('(max-width: 1024px)', true);
|
|
670
|
+
// Wide screens: a fixed-width `end`-slot side panel that can be hidden.
|
|
619
671
|
const [showSidePanel, setShowSidePanel] = useState(true);
|
|
620
|
-
// Mobile: the panel opens as a full-screen dialog (the side slot would squish
|
|
621
|
-
// the main content), driven by the same toolbar button.
|
|
622
|
-
const [isPanelDialogOpen, setPanelDialogOpen] = useState(false);
|
|
623
|
-
|
|
624
|
-
const isPanelShown = isNarrow ? isPanelDialogOpen : showSidePanel;
|
|
625
|
-
const togglePanel = () =>
|
|
626
|
-
isNarrow
|
|
627
|
-
? setPanelDialogOpen(prev => !prev)
|
|
628
|
-
: setShowSidePanel(prev => !prev);
|
|
629
672
|
|
|
630
673
|
return (
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
isNarrow={isNarrow}
|
|
643
|
-
/>
|
|
644
|
-
}
|
|
645
|
-
content={
|
|
646
|
-
<LayoutContent role="main">
|
|
647
|
-
<VStack gap={4}>
|
|
648
|
-
<ItemsCard />
|
|
649
|
-
<InvoiceCard />
|
|
650
|
-
<TimelineSection />
|
|
651
|
-
</VStack>
|
|
652
|
-
</LayoutContent>
|
|
653
|
-
}
|
|
654
|
-
end={!isNarrow && showSidePanel ? <RightPanel /> : undefined}
|
|
655
|
-
/>
|
|
656
|
-
{/* Mobile: the side-panel content uses the full viewport so order details
|
|
657
|
-
are not squeezed beside narrow page chrome. Drawer remains available
|
|
658
|
-
for side-overlay flows that intentionally preserve page context. */}
|
|
659
|
-
<Dialog
|
|
660
|
-
variant="fullscreen"
|
|
661
|
-
isOpen={isNarrow && isPanelDialogOpen}
|
|
662
|
-
onOpenChange={setPanelDialogOpen}>
|
|
663
|
-
<Layout
|
|
664
|
-
header={
|
|
665
|
-
<DialogHeader
|
|
666
|
-
title="Order details"
|
|
667
|
-
onOpenChange={setPanelDialogOpen}
|
|
668
|
-
/>
|
|
669
|
-
}
|
|
670
|
-
content={
|
|
671
|
-
<LayoutContent padding={4}>
|
|
672
|
-
<PanelContent />
|
|
673
|
-
</LayoutContent>
|
|
674
|
-
}
|
|
674
|
+
<Layout
|
|
675
|
+
height="fill"
|
|
676
|
+
contentWidth={1000}
|
|
677
|
+
defaultHasDividers
|
|
678
|
+
header={
|
|
679
|
+
<PageHeader
|
|
680
|
+
activeTab={activeTab}
|
|
681
|
+
onTabChange={setActiveTab}
|
|
682
|
+
isPanelOpen={showSidePanel}
|
|
683
|
+
onTogglePanel={() => setShowSidePanel(prev => !prev)}
|
|
684
|
+
isNarrow={isNarrow}
|
|
675
685
|
/>
|
|
676
|
-
|
|
677
|
-
|
|
686
|
+
}
|
|
687
|
+
content={
|
|
688
|
+
<LayoutContent role="main">
|
|
689
|
+
<VStack gap={4}>
|
|
690
|
+
<ItemsCard />
|
|
691
|
+
<InvoiceCard />
|
|
692
|
+
<TimelineSection />
|
|
693
|
+
{/* Narrow screens: the order details follow the main column
|
|
694
|
+
instead of squeezing beside it. */}
|
|
695
|
+
{isNarrow && (
|
|
696
|
+
<VStack gap={4}>
|
|
697
|
+
<Heading level={2}>Order details</Heading>
|
|
698
|
+
<PanelContent />
|
|
699
|
+
</VStack>
|
|
700
|
+
)}
|
|
701
|
+
</VStack>
|
|
702
|
+
</LayoutContent>
|
|
703
|
+
}
|
|
704
|
+
end={!isNarrow && showSidePanel ? <RightPanel /> : undefined}
|
|
705
|
+
/>
|
|
678
706
|
);
|
|
679
707
|
}
|
|
@@ -10,6 +10,7 @@ import {ClickableCard} from '@astryxdesign/core/ClickableCard';
|
|
|
10
10
|
import {HStack, VStack, StackItem} from '@astryxdesign/core/Stack';
|
|
11
11
|
import {Layout, LayoutContent} from '@astryxdesign/core/Layout';
|
|
12
12
|
import {Grid} from '@astryxdesign/core/Grid';
|
|
13
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
13
14
|
|
|
14
15
|
const previewCard: CSSProperties = {
|
|
15
16
|
borderRadius: 'var(--radius-element)',
|
|
@@ -207,6 +208,7 @@ const COMPONENT_CATEGORIES = [
|
|
|
207
208
|
// ---------------------------------------------------------------------------
|
|
208
209
|
|
|
209
210
|
export default function DocumentationOverviewPage() {
|
|
211
|
+
const showToast = useToast();
|
|
210
212
|
return (
|
|
211
213
|
<Layout
|
|
212
214
|
height="fill"
|
|
@@ -224,7 +226,12 @@ export default function DocumentationOverviewPage() {
|
|
|
224
226
|
beautiful, accessible products.
|
|
225
227
|
</Text>
|
|
226
228
|
<HStack>
|
|
227
|
-
<Button
|
|
229
|
+
<Button
|
|
230
|
+
label="Get started"
|
|
231
|
+
variant="primary"
|
|
232
|
+
size="lg"
|
|
233
|
+
href="#"
|
|
234
|
+
/>
|
|
228
235
|
</HStack>
|
|
229
236
|
</VStack>
|
|
230
237
|
</StackItem>
|
|
@@ -240,7 +247,13 @@ export default function DocumentationOverviewPage() {
|
|
|
240
247
|
<ClickableCard
|
|
241
248
|
key={item.key}
|
|
242
249
|
label={`Open ${item.name}`}
|
|
243
|
-
onClick={() =>
|
|
250
|
+
onClick={() =>
|
|
251
|
+
// Demo only: replace this toast with the link to the section.
|
|
252
|
+
showToast({
|
|
253
|
+
body: `Demo: the ${item.name} docs would open here`,
|
|
254
|
+
uniqueID: `open-${item.key}`,
|
|
255
|
+
})
|
|
256
|
+
}
|
|
244
257
|
variant="transparent"
|
|
245
258
|
padding={2}>
|
|
246
259
|
<VStack gap={3}>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {useState, useMemo, type CSSProperties} from 'react';
|
|
6
6
|
import {Heading, Text} from '@astryxdesign/core/Text';
|
|
7
7
|
import {Button} from '@astryxdesign/core/Button';
|
|
8
8
|
import {IconButton} from '@astryxdesign/core/IconButton';
|
|
@@ -13,7 +13,6 @@ import {Token} from '@astryxdesign/core/Token';
|
|
|
13
13
|
import {Banner} from '@astryxdesign/core/Banner';
|
|
14
14
|
import {CodeBlock} from '@astryxdesign/core/CodeBlock';
|
|
15
15
|
import {TabList, Tab} from '@astryxdesign/core/TabList';
|
|
16
|
-
import {Selector} from '@astryxdesign/core/Selector';
|
|
17
16
|
import {HStack, VStack, StackItem} from '@astryxdesign/core/Stack';
|
|
18
17
|
import {Layout, LayoutContent, LayoutPanel} from '@astryxdesign/core/Layout';
|
|
19
18
|
import {useMediaQuery} from '@astryxdesign/core/hooks';
|
|
@@ -45,11 +44,6 @@ const COMPONENT_OUTLINE_ITEMS: OutlineItem[] = [
|
|
|
45
44
|
{id: 'examples', label: 'Examples', level: 2},
|
|
46
45
|
];
|
|
47
46
|
|
|
48
|
-
const COMPONENT_OUTLINE_OPTIONS = COMPONENT_OUTLINE_ITEMS.map(item => ({
|
|
49
|
-
value: item.id,
|
|
50
|
-
label: item.label,
|
|
51
|
-
}));
|
|
52
|
-
|
|
53
47
|
// ---------------------------------------------------------------------------
|
|
54
48
|
// DialogPreview — stateful dialog preview for component previews
|
|
55
49
|
// ---------------------------------------------------------------------------
|
|
@@ -506,19 +500,10 @@ function getComponentDocs(key: string) {
|
|
|
506
500
|
|
|
507
501
|
function ComponentDetailView({activeNav}: {activeNav: string}) {
|
|
508
502
|
const [exampleTabs, setExampleTabs] = useState<Record<string, string>>({});
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
513
|
-
|
|
514
|
-
const scrollToId = useCallback((id: string) => {
|
|
515
|
-
setActiveId(id);
|
|
516
|
-
const target = document.getElementById(id);
|
|
517
|
-
if (target != null) {
|
|
518
|
-
target.scrollIntoView({behavior: 'smooth', block: 'start'});
|
|
519
|
-
window.history.pushState(null, '', `#${id}`);
|
|
520
|
-
}
|
|
521
|
-
}, []);
|
|
503
|
+
// Mobile first: the server render and a shared static copy, which run no
|
|
504
|
+
// script, get one column with the section links on top. That reads well at
|
|
505
|
+
// every width; once script runs, wide screens move the links to the rail.
|
|
506
|
+
const isMobile = useMediaQuery('(max-width: 768px)', true);
|
|
522
507
|
|
|
523
508
|
const EXAMPLE_PREVIEWS: Record<string, React.ReactNode[]> = {
|
|
524
509
|
button: [
|
|
@@ -583,10 +568,7 @@ function ComponentDetailView({activeNav}: {activeNav: string}) {
|
|
|
583
568
|
label="On this page"
|
|
584
569
|
role="complementary"
|
|
585
570
|
style={outlinePanel}>
|
|
586
|
-
<Outline
|
|
587
|
-
items={COMPONENT_OUTLINE_ITEMS}
|
|
588
|
-
onActiveIdChange={setActiveId}
|
|
589
|
-
/>
|
|
571
|
+
<Outline items={COMPONENT_OUTLINE_ITEMS} />
|
|
590
572
|
</LayoutPanel>
|
|
591
573
|
)
|
|
592
574
|
}
|
|
@@ -598,16 +580,7 @@ function ComponentDetailView({activeNav}: {activeNav: string}) {
|
|
|
598
580
|
<Text type="supporting" color="secondary">
|
|
599
581
|
March 30, 2026 · Updated 5:40 p.m. PST
|
|
600
582
|
</Text>
|
|
601
|
-
{isMobile &&
|
|
602
|
-
<Selector
|
|
603
|
-
label="On this page"
|
|
604
|
-
isLabelHidden
|
|
605
|
-
options={COMPONENT_OUTLINE_OPTIONS}
|
|
606
|
-
value={activeId}
|
|
607
|
-
onChange={scrollToId}
|
|
608
|
-
width="100%"
|
|
609
|
-
/>
|
|
610
|
-
)}
|
|
583
|
+
{isMobile && <Outline items={COMPONENT_OUTLINE_ITEMS} />}
|
|
611
584
|
</VStack>
|
|
612
585
|
|
|
613
586
|
<Card variant="muted" padding={0}>
|