diff --git a/packages/ui/src/form/primitives/stories/e2e/item-popup.story.tsx b/packages/ui/src/form/primitives/stories/e2e/item-popup.story.tsx new file mode 100644 index 00000000000000..88f9b941f6a51b --- /dev/null +++ b/packages/ui/src/form/primitives/stories/e2e/item-popup.story.tsx @@ -0,0 +1,219 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; +import type { CSSProperties } from 'react'; +import * as Autocomplete from '../../autocomplete'; +import * as Combobox from '../../combobox'; +import * as Select from '../../select'; +import { Stack } from '../../../../stack'; + +const matrixStyle: CSSProperties = { + display: 'grid', + gridTemplateColumns: 'repeat(2, minmax(0, 320px))', + gap: 24, + padding: 24, +}; + +const headingStyle: CSSProperties = { + fontSize: 16, + marginBlock: '0 12px', +}; + +const avatarStyle: CSSProperties = { + background: 'var(--wpds-color-background-interactive-brand-strong)', + borderRadius: '50%', + flexShrink: 0, + height: 16, + width: 16, +}; + +const avatarLabelLayout = ; + +const comboboxItems = [ + 'Apple', + 'Banana', + 'Blackberry', + 'Blueberry', + 'Pineapple', + 'Create fruit', +]; + +const autocompleteItems = [ + 'Apple', + 'Apricot', + 'Avocado', + 'Blackberry', + 'Pineapple', +]; + +function RichItemLayouts() { + return ( +
+
+

Combobox items

+ + + + + + Apple + + + Banana + + + + Blackberry + + + 99 in stock + + + + + + + + + Pineapple with a long label that wraps onto + a second line in a narrow popup + + + Sweet, tangy fruit with a firm texture that + works well in salads, smoothies, and + desserts. + + + + + Create fruit + + + + + +
+
+

Autocomplete items

+ + + + + + + Apple + + + + + Apricot + + + 12 in stock + + + + + + + + + Black + berry + + + + + Pineapple with a long label that wraps onto + a second line in a narrow popup + + + Sweet, tangy fruit with a firm texture that + works well in salads, smoothies, and + desserts. + + + + + +
+
+ ); +} + +function SelectItemLayouts() { + return ( +
+

Select items

+ + + + + Apple + + Sweet and crisp. + + + + Banana + + + + Pineapple with a long label that wraps onto a second + line + + + Sweet, tangy fruit with a firm texture that works + well in salads, smoothies, and desserts. + + + + +
+ ); +} + +const meta: Meta = { + title: 'Design System/Components/Popup item layouts', + id: 'design-system-components-popup-item-layouts', +}; +export default meta; + +type Story = StoryObj; + +export const RichItems: Story = { + render: () => , +}; + +export const SelectItems: Story = { + render: () => , +};