@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
|
@@ -32,6 +32,7 @@ import {Section} from '@astryxdesign/core/Section';
|
|
|
32
32
|
import {Center} from '@astryxdesign/core/Center';
|
|
33
33
|
import {Thumbnail} from '@astryxdesign/core/Thumbnail';
|
|
34
34
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
35
|
+
import {useImperativeAlertDialog} from '@astryxdesign/core/AlertDialog';
|
|
35
36
|
import {ShieldCheckIcon} from '@heroicons/react/24/outline';
|
|
36
37
|
import {LockClosedIcon} from '@heroicons/react/24/outline';
|
|
37
38
|
import {CheckCircleIcon} from '@heroicons/react/24/outline';
|
|
@@ -200,6 +201,7 @@ const cardLogo: CSSProperties = {
|
|
|
200
201
|
|
|
201
202
|
export default function PaymentFormPage() {
|
|
202
203
|
const showToast = useToast();
|
|
204
|
+
const confirm = useImperativeAlertDialog();
|
|
203
205
|
const isMobile = useMediaQuery('(max-width: 767px)');
|
|
204
206
|
const [firstName, setFirstName] = useState('');
|
|
205
207
|
const [lastName, setLastName] = useState('');
|
|
@@ -235,41 +237,35 @@ export default function PaymentFormPage() {
|
|
|
235
237
|
});
|
|
236
238
|
const [submitted, setSubmitted] = useState(false);
|
|
237
239
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
? 'Required'
|
|
268
|
-
: undefined,
|
|
269
|
-
billingState:
|
|
270
|
-
!billingMatchesShipping && !billingState ? 'Required' : undefined,
|
|
271
|
-
}
|
|
272
|
-
: {};
|
|
240
|
+
// What is missing, checked on every render; shown only after Place Order.
|
|
241
|
+
const problems = {
|
|
242
|
+
firstName: !firstName.trim() ? 'Required' : undefined,
|
|
243
|
+
lastName: !lastName.trim() ? 'Required' : undefined,
|
|
244
|
+
address: !address.trim() ? 'Required' : undefined,
|
|
245
|
+
city: !city.trim() ? 'Required' : undefined,
|
|
246
|
+
zip: !zip.trim() ? 'Required' : undefined,
|
|
247
|
+
state: !state ? 'Required' : undefined,
|
|
248
|
+
email: !email.trim() ? 'Required' : undefined,
|
|
249
|
+
phone: !phone.trim() ? 'Required' : undefined,
|
|
250
|
+
expiry: !expiry ? 'Required' : undefined,
|
|
251
|
+
expYear: !expYear ? 'Required' : undefined,
|
|
252
|
+
cvc: !cvc.trim() ? 'Required' : undefined,
|
|
253
|
+
cardNumber:
|
|
254
|
+
paymentMethod === 'card' && !cardNumber.trim() ? 'Required' : undefined,
|
|
255
|
+
cardName:
|
|
256
|
+
paymentMethod === 'card' && !cardName.trim() ? 'Required' : undefined,
|
|
257
|
+
billingAddress:
|
|
258
|
+
!billingMatchesShipping && !billingAddress.trim()
|
|
259
|
+
? 'Required'
|
|
260
|
+
: undefined,
|
|
261
|
+
billingCity:
|
|
262
|
+
!billingMatchesShipping && !billingCity.trim() ? 'Required' : undefined,
|
|
263
|
+
billingZip:
|
|
264
|
+
!billingMatchesShipping && !billingZip.trim() ? 'Required' : undefined,
|
|
265
|
+
billingState:
|
|
266
|
+
!billingMatchesShipping && !billingState ? 'Required' : undefined,
|
|
267
|
+
};
|
|
268
|
+
const errors: Partial<typeof problems> = submitted ? problems : {};
|
|
273
269
|
|
|
274
270
|
return (
|
|
275
271
|
<Layout
|
|
@@ -833,14 +829,30 @@ export default function PaymentFormPage() {
|
|
|
833
829
|
variant="primary"
|
|
834
830
|
size="lg"
|
|
835
831
|
style={fullWidth}
|
|
836
|
-
onClick={() =>
|
|
832
|
+
onClick={() => {
|
|
833
|
+
setSubmitted(true);
|
|
834
|
+
if (Object.values(problems).some(Boolean)) {
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
838
|
+
showToast({
|
|
839
|
+
body: 'Demo: your order would be placed here',
|
|
840
|
+
uniqueID: 'place-order',
|
|
841
|
+
});
|
|
842
|
+
}}
|
|
837
843
|
/>
|
|
838
844
|
<Button
|
|
839
845
|
label="Continue Shopping"
|
|
840
846
|
variant="secondary"
|
|
841
847
|
size="lg"
|
|
842
848
|
style={fullWidth}
|
|
843
|
-
onClick={() =>
|
|
849
|
+
onClick={() =>
|
|
850
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
851
|
+
showToast({
|
|
852
|
+
body: 'Demo: the store would open here',
|
|
853
|
+
uniqueID: 'continue-shopping',
|
|
854
|
+
})
|
|
855
|
+
}
|
|
844
856
|
/>
|
|
845
857
|
</VStack>
|
|
846
858
|
<Divider />
|
|
@@ -921,10 +933,35 @@ export default function PaymentFormPage() {
|
|
|
921
933
|
max={10}
|
|
922
934
|
isIntegerOnly
|
|
923
935
|
/>
|
|
924
|
-
<Link
|
|
936
|
+
<Link
|
|
937
|
+
type="supporting"
|
|
938
|
+
onClick={() =>
|
|
939
|
+
confirm.show({
|
|
940
|
+
title: `Remove ${item.name} from your cart?`,
|
|
941
|
+
description:
|
|
942
|
+
"This demo won't change your cart.",
|
|
943
|
+
actionLabel: 'Remove',
|
|
944
|
+
onAction: () => {
|
|
945
|
+
confirm.hide();
|
|
946
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
947
|
+
showToast({
|
|
948
|
+
body: `Demo: ${item.name} would be removed from your cart here`,
|
|
949
|
+
uniqueID: 'remove-item',
|
|
950
|
+
});
|
|
951
|
+
},
|
|
952
|
+
})
|
|
953
|
+
}>
|
|
925
954
|
Remove
|
|
926
955
|
</Link>
|
|
927
|
-
<Link
|
|
956
|
+
<Link
|
|
957
|
+
type="supporting"
|
|
958
|
+
onClick={() =>
|
|
959
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
960
|
+
showToast({
|
|
961
|
+
body: 'Demo: this item would be saved for later here',
|
|
962
|
+
uniqueID: 'save-for-later',
|
|
963
|
+
})
|
|
964
|
+
}>
|
|
928
965
|
Save
|
|
929
966
|
</Link>
|
|
930
967
|
</HStack>
|
|
@@ -934,6 +971,7 @@ export default function PaymentFormPage() {
|
|
|
934
971
|
<Divider />
|
|
935
972
|
</VStack>
|
|
936
973
|
))}
|
|
974
|
+
{confirm.element}
|
|
937
975
|
|
|
938
976
|
{/* Order total subsection */}
|
|
939
977
|
<VStack gap={3}>
|
|
@@ -9,6 +9,7 @@ import {Grid} from '@astryxdesign/core/Grid';
|
|
|
9
9
|
import {AspectRatio} from '@astryxdesign/core/AspectRatio';
|
|
10
10
|
import {Card} from '@astryxdesign/core/Card';
|
|
11
11
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
12
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
12
13
|
import {ArrowRightIcon} from '@heroicons/react/24/outline';
|
|
13
14
|
import type {CSSProperties} from 'react';
|
|
14
15
|
|
|
@@ -39,8 +40,7 @@ const PRODUCTS: Product[] = [
|
|
|
39
40
|
description:
|
|
40
41
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
41
42
|
price: 75.0,
|
|
42
|
-
image:
|
|
43
|
-
'/template-assets/illustrative-horizontal-1.png',
|
|
43
|
+
image: '/template-assets/illustrative-horizontal-1.png',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: 2,
|
|
@@ -48,8 +48,7 @@ const PRODUCTS: Product[] = [
|
|
|
48
48
|
description:
|
|
49
49
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
50
50
|
price: 80.0,
|
|
51
|
-
image:
|
|
52
|
-
'/template-assets/illustrative-vertical-1.png',
|
|
51
|
+
image: '/template-assets/illustrative-vertical-1.png',
|
|
53
52
|
},
|
|
54
53
|
{
|
|
55
54
|
id: 3,
|
|
@@ -57,8 +56,7 @@ const PRODUCTS: Product[] = [
|
|
|
57
56
|
description:
|
|
58
57
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
59
58
|
price: 75.0,
|
|
60
|
-
image:
|
|
61
|
-
'/template-assets/illustrative-horizontal-3.png',
|
|
59
|
+
image: '/template-assets/illustrative-horizontal-3.png',
|
|
62
60
|
},
|
|
63
61
|
{
|
|
64
62
|
id: 4,
|
|
@@ -66,8 +64,7 @@ const PRODUCTS: Product[] = [
|
|
|
66
64
|
description:
|
|
67
65
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
68
66
|
price: 75.0,
|
|
69
|
-
image:
|
|
70
|
-
'/template-assets/illustrative-horizontal-4.png',
|
|
67
|
+
image: '/template-assets/illustrative-horizontal-4.png',
|
|
71
68
|
},
|
|
72
69
|
{
|
|
73
70
|
id: 5,
|
|
@@ -75,8 +72,7 @@ const PRODUCTS: Product[] = [
|
|
|
75
72
|
description:
|
|
76
73
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
77
74
|
price: 60.0,
|
|
78
|
-
image:
|
|
79
|
-
'/template-assets/illustrative-horizontal-5.png',
|
|
75
|
+
image: '/template-assets/illustrative-horizontal-5.png',
|
|
80
76
|
},
|
|
81
77
|
{
|
|
82
78
|
id: 6,
|
|
@@ -84,8 +80,7 @@ const PRODUCTS: Product[] = [
|
|
|
84
80
|
description:
|
|
85
81
|
"Sometimes all it takes is one small thing to turn your whole day around. That's what good design is for.",
|
|
86
82
|
price: 80.0,
|
|
87
|
-
image:
|
|
88
|
-
'/template-assets/illustrative-horizontal-2.png',
|
|
83
|
+
image: '/template-assets/illustrative-horizontal-2.png',
|
|
89
84
|
},
|
|
90
85
|
];
|
|
91
86
|
|
|
@@ -125,7 +120,7 @@ export default function ProductGalleryTemplate() {
|
|
|
125
120
|
<LayoutContent padding={6}>
|
|
126
121
|
<VStack gap={6}>
|
|
127
122
|
{/* Header — Grid handles responsive stacking */}
|
|
128
|
-
<Grid columns={{minWidth: 280}} gap={4} align="start">
|
|
123
|
+
<Grid columns={{minWidth: 280, max: 2}} gap={4} align="start">
|
|
129
124
|
<Heading level={1}>
|
|
130
125
|
Make every day a little more delightful, one small detail at a
|
|
131
126
|
time.
|
|
@@ -140,7 +135,14 @@ export default function ProductGalleryTemplate() {
|
|
|
140
135
|
<Button
|
|
141
136
|
label="Get started"
|
|
142
137
|
variant="primary"
|
|
143
|
-
|
|
138
|
+
href="#"
|
|
139
|
+
endContent={
|
|
140
|
+
<Icon
|
|
141
|
+
icon={ArrowRightIcon}
|
|
142
|
+
color="inherit"
|
|
143
|
+
xstyle={rtlStyles.mirror}
|
|
144
|
+
/>
|
|
145
|
+
}
|
|
144
146
|
/>
|
|
145
147
|
</VStack>
|
|
146
148
|
</Grid>
|
|
@@ -24,6 +24,7 @@ import {CheckboxInput} from '@astryxdesign/core/CheckboxInput';
|
|
|
24
24
|
import {Typeahead} from '@astryxdesign/core/Typeahead';
|
|
25
25
|
import {MagnifyingGlassIcon} from '@heroicons/react/24/outline';
|
|
26
26
|
import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
|
|
27
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
27
28
|
|
|
28
29
|
const NAV_ITEMS = [
|
|
29
30
|
'Profile',
|
|
@@ -54,6 +55,7 @@ const settingsSearchSource: SearchSource<SearchableItem> = {
|
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
export default function SettingsTemplate() {
|
|
58
|
+
const showToast = useToast();
|
|
57
59
|
const isNarrow = useMediaQuery('(max-width: 768px)');
|
|
58
60
|
const [activeNav, setActiveNav] = useState('Profile');
|
|
59
61
|
const [username, setUsername] = useState('nicol43');
|
|
@@ -150,7 +152,17 @@ export default function SettingsTemplate() {
|
|
|
150
152
|
onChange={setEmail}
|
|
151
153
|
/>
|
|
152
154
|
<HStack>
|
|
153
|
-
<Button
|
|
155
|
+
<Button
|
|
156
|
+
label="Save"
|
|
157
|
+
variant="primary"
|
|
158
|
+
onClick={() =>
|
|
159
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
160
|
+
showToast({
|
|
161
|
+
body: 'Demo: your basic information would be saved here',
|
|
162
|
+
uniqueID: 'save-basic',
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
/>
|
|
154
166
|
</HStack>
|
|
155
167
|
</VStack>
|
|
156
168
|
</Grid>
|
|
@@ -184,7 +196,17 @@ export default function SettingsTemplate() {
|
|
|
184
196
|
onChange={setConfirmPw}
|
|
185
197
|
/>
|
|
186
198
|
<HStack>
|
|
187
|
-
<Button
|
|
199
|
+
<Button
|
|
200
|
+
label="Save"
|
|
201
|
+
variant="primary"
|
|
202
|
+
onClick={() =>
|
|
203
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
204
|
+
showToast({
|
|
205
|
+
body: 'Demo: your new password would be saved here',
|
|
206
|
+
uniqueID: 'save-password',
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
/>
|
|
188
210
|
</HStack>
|
|
189
211
|
</VStack>
|
|
190
212
|
</Grid>
|
|
@@ -218,7 +240,17 @@ export default function SettingsTemplate() {
|
|
|
218
240
|
onChange={setTwoFactor}
|
|
219
241
|
/>
|
|
220
242
|
<HStack>
|
|
221
|
-
<Button
|
|
243
|
+
<Button
|
|
244
|
+
label="Save"
|
|
245
|
+
variant="primary"
|
|
246
|
+
onClick={() =>
|
|
247
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
248
|
+
showToast({
|
|
249
|
+
body: 'Demo: your advanced settings would be saved here',
|
|
250
|
+
uniqueID: 'save-advanced',
|
|
251
|
+
})
|
|
252
|
+
}
|
|
253
|
+
/>
|
|
222
254
|
</HStack>
|
|
223
255
|
</VStack>
|
|
224
256
|
</Grid>
|
|
@@ -55,9 +55,12 @@
|
|
|
55
55
|
* preview per `SelectableCard`; many choices use one `Selector` and one live
|
|
56
56
|
* preview below it. Prefer the real component being configured so the sample
|
|
57
57
|
* cannot drift. For detail most readers do not need, expand a `Collapsible`
|
|
58
|
-
* inside the row. Never open a dialog from this dialog
|
|
59
|
-
* two overlapping dismiss paths are not progressive
|
|
60
|
-
* is too large to expand in place, it belongs on a
|
|
58
|
+
* inside the row. Never open a dialog from this dialog to show more detail:
|
|
59
|
+
* nested focus traps and two overlapping dismiss paths are not progressive
|
|
60
|
+
* disclosure. If the detail is too large to expand in place, it belongs on a
|
|
61
|
+
* page. The one exception is an `AlertDialog` that confirms a destructive
|
|
62
|
+
* action, such as deleting the account: it asks one question, and Escape
|
|
63
|
+
* closes only the alert, never this dialog.
|
|
61
64
|
*/
|
|
62
65
|
|
|
63
66
|
import {Button} from '@astryxdesign/core/Button';
|
|
@@ -92,6 +95,7 @@ import {neutralTheme} from '@astryxdesign/theme-neutral/built';
|
|
|
92
95
|
import {Token} from '@astryxdesign/core/Token';
|
|
93
96
|
import {Tooltip} from '@astryxdesign/core/Tooltip';
|
|
94
97
|
import {VStack} from '@astryxdesign/core/VStack';
|
|
98
|
+
import {useImperativeAlertDialog} from '@astryxdesign/core/AlertDialog';
|
|
95
99
|
import {
|
|
96
100
|
ArrowDownOnSquareIcon,
|
|
97
101
|
ArrowDownTrayIcon,
|
|
@@ -1979,6 +1983,7 @@ function LanguagePanel({settings, update}: PanelProps) {
|
|
|
1979
1983
|
|
|
1980
1984
|
function PrivacyPanel({settings, update}: PanelProps) {
|
|
1981
1985
|
const showToast = useToast();
|
|
1986
|
+
const confirm = useImperativeAlertDialog();
|
|
1982
1987
|
return (
|
|
1983
1988
|
<VStack gap={5}>
|
|
1984
1989
|
<SettingsCard title="Visibility">
|
|
@@ -2060,9 +2065,32 @@ function PrivacyPanel({settings, update}: PanelProps) {
|
|
|
2060
2065
|
title="Delete my account"
|
|
2061
2066
|
description="Permanent, and it takes the workspace with it."
|
|
2062
2067
|
icon={TrashIcon}
|
|
2063
|
-
control={
|
|
2068
|
+
control={
|
|
2069
|
+
<Button
|
|
2070
|
+
label="Delete"
|
|
2071
|
+
variant="destructive"
|
|
2072
|
+
size="sm"
|
|
2073
|
+
onClick={() =>
|
|
2074
|
+
confirm.show({
|
|
2075
|
+
title: 'Delete your account?',
|
|
2076
|
+
description:
|
|
2077
|
+
"This demo won't delete anything. In your app, this would permanently delete your account and the workspace with it.",
|
|
2078
|
+
actionLabel: 'Delete account',
|
|
2079
|
+
onAction: () => {
|
|
2080
|
+
confirm.hide();
|
|
2081
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
2082
|
+
showToast({
|
|
2083
|
+
body: 'Demo: your account would be deleted here',
|
|
2084
|
+
uniqueID: 'delete-account',
|
|
2085
|
+
});
|
|
2086
|
+
},
|
|
2087
|
+
})
|
|
2088
|
+
}
|
|
2089
|
+
/>
|
|
2090
|
+
}
|
|
2064
2091
|
/>
|
|
2065
2092
|
</SettingsCard>
|
|
2093
|
+
{confirm.element}
|
|
2066
2094
|
</VStack>
|
|
2067
2095
|
);
|
|
2068
2096
|
}
|
|
@@ -2699,7 +2727,8 @@ export default function SettingsDialogTemplate() {
|
|
|
2699
2727
|
// transform or `overflow: hidden` can clip — an open one inside a scaled
|
|
2700
2728
|
// preview tile paints over the whole gallery instead of inside its tile.
|
|
2701
2729
|
// The docsite's own preview is also a Dialog, which a modal here would
|
|
2702
|
-
// then nest inside, and Astryx
|
|
2730
|
+
// then nest inside, and Astryx does not nest dialogs, apart from an
|
|
2731
|
+
// AlertDialog that confirms a destructive action.
|
|
2703
2732
|
//
|
|
2704
2733
|
// Everything else on this page is the composition you want: drop
|
|
2705
2734
|
// `isInline`, drive `isOpen` from state, hand `onOpenChange` the setter,
|
|
@@ -26,6 +26,8 @@ import {TabList, Tab} from '@astryxdesign/core/TabList';
|
|
|
26
26
|
import {Badge} from '@astryxdesign/core/Badge';
|
|
27
27
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
28
28
|
import {Center} from '@astryxdesign/core/Center';
|
|
29
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
30
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
29
31
|
import {
|
|
30
32
|
UserIcon,
|
|
31
33
|
LockClosedIcon,
|
|
@@ -221,6 +223,7 @@ const TIMEZONES = [
|
|
|
221
223
|
];
|
|
222
224
|
|
|
223
225
|
export default function SettingsSecurityTemplate() {
|
|
226
|
+
const showToast = useToast();
|
|
224
227
|
const isNarrow = useMediaQuery('(max-width: 768px)');
|
|
225
228
|
// Mobile is a master→detail drill-down: 'nav' shows the menu, 'detail' shows
|
|
226
229
|
// the selected section with a back button. Desktop shows both side-by-side.
|
|
@@ -267,7 +270,12 @@ export default function SettingsSecurityTemplate() {
|
|
|
267
270
|
startContent={<Icon icon={item.icon} />}
|
|
268
271
|
endContent={
|
|
269
272
|
isNarrow ? (
|
|
270
|
-
<Icon
|
|
273
|
+
<Icon
|
|
274
|
+
icon={ChevronRightIcon}
|
|
275
|
+
size="sm"
|
|
276
|
+
color="secondary"
|
|
277
|
+
xstyle={rtlStyles.mirror}
|
|
278
|
+
/>
|
|
271
279
|
) : undefined
|
|
272
280
|
}
|
|
273
281
|
isSelected={!isNarrow && activeNav === item.label}
|
|
@@ -280,7 +288,13 @@ export default function SettingsSecurityTemplate() {
|
|
|
280
288
|
<ListItem
|
|
281
289
|
label="Professional hosting tools"
|
|
282
290
|
startContent={<Icon icon={WrenchScrewdriverIcon} />}
|
|
283
|
-
onClick={() =>
|
|
291
|
+
onClick={() =>
|
|
292
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
293
|
+
showToast({
|
|
294
|
+
body: 'Demo: professional hosting tools would open here',
|
|
295
|
+
uniqueID: 'hosting-tools',
|
|
296
|
+
})
|
|
297
|
+
}
|
|
284
298
|
/>
|
|
285
299
|
</List>
|
|
286
300
|
</VStack>
|
|
@@ -327,7 +341,13 @@ export default function SettingsSecurityTemplate() {
|
|
|
327
341
|
variant="ghost"
|
|
328
342
|
size="sm"
|
|
329
343
|
isIconOnly
|
|
330
|
-
icon={
|
|
344
|
+
icon={
|
|
345
|
+
<Icon
|
|
346
|
+
icon={ArrowLeftIcon}
|
|
347
|
+
size="sm"
|
|
348
|
+
xstyle={rtlStyles.mirror}
|
|
349
|
+
/>
|
|
350
|
+
}
|
|
331
351
|
onClick={() => setMobileView('nav')}
|
|
332
352
|
/>
|
|
333
353
|
<Heading level={2}>{SECTION_TITLES[activeNav]}</Heading>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import {Fragment, useState, useMemo
|
|
5
|
+
import {Fragment, useState, useMemo} from 'react';
|
|
6
6
|
import {AppShell} from '@astryxdesign/core/AppShell';
|
|
7
7
|
import {Layout, LayoutHeader, LayoutContent} from '@astryxdesign/core/Layout';
|
|
8
8
|
import {TopNav} from '@astryxdesign/core/TopNav';
|
|
@@ -21,6 +21,8 @@ import {Button} from '@astryxdesign/core/Button';
|
|
|
21
21
|
import {TextInput} from '@astryxdesign/core/TextInput';
|
|
22
22
|
import {Card} from '@astryxdesign/core/Card';
|
|
23
23
|
import {Stack, VStack, HStack} from '@astryxdesign/core/Stack';
|
|
24
|
+
import {useHotkeys} from '@astryxdesign/core/hooks';
|
|
25
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
24
26
|
import {
|
|
25
27
|
PlayIcon,
|
|
26
28
|
MagnifyingGlassIcon,
|
|
@@ -179,19 +181,16 @@ const COMMANDS = [
|
|
|
179
181
|
];
|
|
180
182
|
|
|
181
183
|
export default function ShellNav() {
|
|
184
|
+
const showToast = useToast();
|
|
182
185
|
const [isPaletteOpen, setIsPaletteOpen] = useState(false);
|
|
183
186
|
const searchSource = useMemo(() => createStaticSource(COMMANDS), []);
|
|
184
187
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
};
|
|
192
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
193
|
-
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
194
|
-
}, []);
|
|
188
|
+
// Both combos on every platform, as the page has always accepted.
|
|
189
|
+
const openPalette = () => setIsPaletteOpen(true);
|
|
190
|
+
useHotkeys([
|
|
191
|
+
{keys: 'meta+k', onPress: openPalette, allowInInputs: true},
|
|
192
|
+
{keys: 'ctrl+k', onPress: openPalette, allowInInputs: true},
|
|
193
|
+
]);
|
|
195
194
|
|
|
196
195
|
return (
|
|
197
196
|
<>
|
|
@@ -246,8 +245,25 @@ export default function ShellNav() {
|
|
|
246
245
|
tooltip="Run"
|
|
247
246
|
variant="ghost"
|
|
248
247
|
icon={<Icon icon={PlayIcon} size="sm" />}
|
|
248
|
+
onClick={() =>
|
|
249
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
250
|
+
showToast({
|
|
251
|
+
body: 'Demo: the project would run here',
|
|
252
|
+
uniqueID: 'run',
|
|
253
|
+
})
|
|
254
|
+
}
|
|
255
|
+
/>
|
|
256
|
+
<Button
|
|
257
|
+
label="Share"
|
|
258
|
+
variant="secondary"
|
|
259
|
+
onClick={() =>
|
|
260
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
261
|
+
showToast({
|
|
262
|
+
body: 'Demo: sharing would start here',
|
|
263
|
+
uniqueID: 'share',
|
|
264
|
+
})
|
|
265
|
+
}
|
|
249
266
|
/>
|
|
250
|
-
<Button label="Share" variant="secondary" />
|
|
251
267
|
</>
|
|
252
268
|
}
|
|
253
269
|
/>
|
|
@@ -21,6 +21,7 @@ import {StatusDot} from '@astryxdesign/core/StatusDot';
|
|
|
21
21
|
import type {StatusDotVariant} from '@astryxdesign/core/StatusDot';
|
|
22
22
|
import {Card} from '@astryxdesign/core/Card';
|
|
23
23
|
import {Stack, VStack, HStack} from '@astryxdesign/core/Stack';
|
|
24
|
+
import {useImperativeAlertDialog} from '@astryxdesign/core/AlertDialog';
|
|
24
25
|
import {
|
|
25
26
|
SparklesIcon,
|
|
26
27
|
PlusIcon,
|
|
@@ -130,6 +131,7 @@ function ConversationItem({
|
|
|
130
131
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
131
132
|
const showMenu = isHovered || isMenuOpen;
|
|
132
133
|
const showToast = useToast();
|
|
134
|
+
const confirm = useImperativeAlertDialog();
|
|
133
135
|
// Demo only: replace these toasts with the calls that act on the conversation.
|
|
134
136
|
const demoAction = (verb: string) =>
|
|
135
137
|
showToast({
|
|
@@ -155,7 +157,19 @@ function ConversationItem({
|
|
|
155
157
|
{label: 'Pin', onClick: () => demoAction('pinned')},
|
|
156
158
|
{label: 'Rename', onClick: () => demoAction('renamed')},
|
|
157
159
|
{label: 'Archive', onClick: () => demoAction('archived')},
|
|
158
|
-
{
|
|
160
|
+
{
|
|
161
|
+
label: 'Delete',
|
|
162
|
+
onClick: () =>
|
|
163
|
+
confirm.show({
|
|
164
|
+
title: `Delete ${label}?`,
|
|
165
|
+
description: "This demo won't delete anything.",
|
|
166
|
+
actionLabel: 'Delete',
|
|
167
|
+
onAction: () => {
|
|
168
|
+
confirm.hide();
|
|
169
|
+
demoAction('deleted');
|
|
170
|
+
},
|
|
171
|
+
}),
|
|
172
|
+
},
|
|
159
173
|
]}
|
|
160
174
|
/>
|
|
161
175
|
) : (
|
|
@@ -163,6 +177,7 @@ function ConversationItem({
|
|
|
163
177
|
)
|
|
164
178
|
}
|
|
165
179
|
/>
|
|
180
|
+
{confirm.element}
|
|
166
181
|
</Stack>
|
|
167
182
|
);
|
|
168
183
|
}
|
|
@@ -21,6 +21,7 @@ import {Badge} from '@astryxdesign/core/Badge';
|
|
|
21
21
|
import {Card} from '@astryxdesign/core/Card';
|
|
22
22
|
import {Grid} from '@astryxdesign/core/Grid';
|
|
23
23
|
import {Stack, VStack} from '@astryxdesign/core/Stack';
|
|
24
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
24
25
|
import {
|
|
25
26
|
ShoppingBagIcon,
|
|
26
27
|
ShoppingCartIcon,
|
|
@@ -133,6 +134,7 @@ function MegaFeatured(props: {
|
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
export default function ShellTopNav() {
|
|
137
|
+
const showToast = useToast();
|
|
136
138
|
return (
|
|
137
139
|
<AppShell
|
|
138
140
|
variant="surface"
|
|
@@ -190,13 +192,37 @@ export default function ShellTopNav() {
|
|
|
190
192
|
tooltip="Search"
|
|
191
193
|
variant="ghost"
|
|
192
194
|
icon={<Icon icon={MagnifyingGlassIcon} size="sm" />}
|
|
195
|
+
onClick={() =>
|
|
196
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
197
|
+
showToast({
|
|
198
|
+
body: 'Demo: product search would open here',
|
|
199
|
+
uniqueID: 'search',
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
/>
|
|
203
|
+
<Button
|
|
204
|
+
label="Sign in"
|
|
205
|
+
variant="ghost"
|
|
206
|
+
onClick={() =>
|
|
207
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
208
|
+
showToast({
|
|
209
|
+
body: 'Demo: sign-in would open here',
|
|
210
|
+
uniqueID: 'sign-in',
|
|
211
|
+
})
|
|
212
|
+
}
|
|
193
213
|
/>
|
|
194
|
-
<Button label="Sign in" variant="ghost" />
|
|
195
214
|
<Button
|
|
196
215
|
label="Checkout"
|
|
197
216
|
variant="primary"
|
|
198
217
|
icon={<Icon icon={ShoppingCartIcon} size="sm" />}
|
|
199
218
|
endContent={<Badge label={3} />}
|
|
219
|
+
onClick={() =>
|
|
220
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
221
|
+
showToast({
|
|
222
|
+
body: 'Demo: checkout would open here',
|
|
223
|
+
uniqueID: 'checkout',
|
|
224
|
+
})
|
|
225
|
+
}
|
|
200
226
|
/>
|
|
201
227
|
</>
|
|
202
228
|
}
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
pixel,
|
|
33
33
|
} from '@astryxdesign/core/Table';
|
|
34
34
|
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
35
|
+
import {VisuallyHidden} from '@astryxdesign/core/VisuallyHidden';
|
|
35
36
|
import {
|
|
36
37
|
ArrowDownTrayIcon,
|
|
37
38
|
DocumentDuplicateIcon,
|
|
@@ -413,7 +414,7 @@ export default function SimpleTableTemplate() {
|
|
|
413
414
|
},
|
|
414
415
|
{
|
|
415
416
|
key: 'actions',
|
|
416
|
-
header:
|
|
417
|
+
header: <VisuallyHidden>Actions</VisuallyHidden>,
|
|
417
418
|
width: pixel(56),
|
|
418
419
|
renderCell: member => (
|
|
419
420
|
<DropdownMenu
|