diff --git a/.changeset/astryx-discover-lists-the-lab-dialogheroheader-component.md b/.changeset/astryx-discover-lists-the-lab-dialogheroheader-component.md new file mode 100644 index 0000000000000..3db5d97f1372a --- /dev/null +++ b/.changeset/astryx-discover-lists-the-lab-dialogheroheader-component.md @@ -0,0 +1,6 @@ +--- +'@astryxdesign/cli': patch +--- + +[feat] `astryx discover` lists the Lab DialogHeroHeader component from `@astryxdesign/lab`. (#4182) +@jiunshinn diff --git a/.github/scripts/story-play-guard.js b/.github/scripts/story-play-guard.js index 17883bc7c33a1..be285a737c081 100644 --- a/.github/scripts/story-play-guard.js +++ b/.github/scripts/story-play-guard.js @@ -347,6 +347,20 @@ const TARGETS = [ guards: 'the rendered RTL wrapper mirrors fixed-track item order while responsive and span geometry remain bounded', }, + { + component: 'DialogHeroHeader', + story: 'lab-dialogheroheader--media-bleed-geometry', + guards: + 'media reaches the dialog edges at theme-default, 0/2/8 padding, a ' + + 'theme override, and RTL while the title keeps the cancelled inset', + }, + { + component: 'DialogHeroHeader', + story: 'lab-dialogheroheader--custom-heading-focus-after-rerender', + guards: + 'a custom heading keeps focus and keeps naming the open modal while ' + + 'the header re-renders with a new title element', + }, { component: 'TabList', story: 'core-tablist--full-bleed-geometry', diff --git a/apps/storybook/stories/DialogHeroHeader.stories.tsx b/apps/storybook/stories/DialogHeroHeader.stories.tsx new file mode 100644 index 0000000000000..4c124c45aac53 --- /dev/null +++ b/apps/storybook/stories/DialogHeroHeader.stories.tsx @@ -0,0 +1,622 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. + +/** + * @file DialogHeroHeader.stories.tsx + * @input DialogHeroHeader and its Dialog, Layout, Heading, and media composition + * @output Inline visual states, an interactive modal example, and a media + * bleed geometry guard across Dialog paddings and RTL + * @position Storybook coverage for the experimental hero header; the geometry + * story's play function is required CI via story-play-guard.js + */ + +import { + useEffect, + useId, + useState, + type ComponentProps, + type CSSProperties, +} from 'react'; +import type {Meta, StoryObj} from '@storybook/react'; +import {DialogHeroHeader} from '@astryxdesign/lab'; +import {Dialog} from '@astryxdesign/core/Dialog'; +import { + Layout, + LayoutContent, + LayoutFooter, + HStack, +} from '@astryxdesign/core/Layout'; +import {Button} from '@astryxdesign/core/Button'; +import {Heading} from '@astryxdesign/core/Heading'; +import {Icon} from '@astryxdesign/core/Icon'; +import {Text} from '@astryxdesign/core/Text'; +import * as stylex from '@stylexjs/stylex'; + +const styles = stylex.create({ + heroSvg: { + display: 'block', + }, +}); + +// Self-contained stand-in for a hero image / illustration. A real app would +// pass an ,