@sproutsocial/seeds-react-panel 1.0.7 → 1.0.9

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.
@@ -8,14 +8,14 @@ $ tsup --dts
8
8
  CLI Cleaning output folder
9
9
  CJS Build start
10
10
  ESM Build start
11
- CJS dist/index.js 15.02 KB
12
- CJS dist/index.js.map 28.30 KB
13
- CJS ⚡️ Build success in 81ms
14
- ESM dist/esm/index.js 11.33 KB
15
- ESM dist/esm/index.js.map 27.96 KB
16
- ESM ⚡️ Build success in 81ms
11
+ CJS dist/index.js 15.38 KB
12
+ CJS dist/index.js.map 28.81 KB
13
+ CJS ⚡️ Build success in 28ms
14
+ ESM dist/esm/index.js 11.66 KB
15
+ ESM dist/esm/index.js.map 28.47 KB
16
+ ESM ⚡️ Build success in 29ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 4199ms
18
+ DTS ⚡️ Build success in 3982ms
19
19
  DTS dist/index.d.ts 9.03 KB
20
20
  DTS dist/index.d.mts 9.03 KB
21
- Done in 5.71s.
21
+ Done in 5.84s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @sproutsocial/seeds-react-panel
2
2
 
3
+ ## 1.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8e5e1ba]
8
+ - @sproutsocial/seeds-react-button@2.3.2
9
+ - @sproutsocial/seeds-react-drawer@2.2.15
10
+
11
+ ## 1.0.8
12
+
13
+ ### Patch Changes
14
+
15
+ - d27cbd1: Headerless `Panel.Content` now lays out as a flex column so its children can fill the panel height.
16
+
17
+ Headerless mode already defers overflow scrolling to the panel's children, but the content area rendered as a block container — so a child could never resolve a percentage height or flex to the panel's full height, leaving anything past the fold clipped by the content's hidden overflow with no way to scroll. This also makes the PeekIn rail's existing `flex: 1 1 auto` styles functional, letting embedded content pin its own header/footer and scroll the area between them. Non-headerless panels are unchanged.
18
+
3
19
  ## 1.0.7
4
20
 
5
21
  ### Patch Changes
package/dist/esm/index.js CHANGED
@@ -122,6 +122,15 @@ var PanelInner = styled.div`
122
122
  `;
123
123
  var Content = styled(Box2)`
124
124
  overflow-y: ${({ $scroll = true }) => $scroll ? "auto" : "hidden"};
125
+ /*
126
+ * When content owns its own scrolling ($scroll false, i.e. headerless), lay
127
+ * out as a flex column so a child can flex to the panel's full height —
128
+ * percentage heights can't resolve against a block container here.
129
+ */
130
+ ${({ $scroll = true }) => !$scroll && css`
131
+ display: flex;
132
+ flex-direction: column;
133
+ `}
125
134
  `;
126
135
  var Footer = styled(Box2)`
127
136
  flex: 0 0 auto;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Panel.tsx","../../src/PanelContext.tsx","../../src/PanelHeader.tsx","../../src/PanelCloseButton.tsx","../../src/PanelContent.tsx","../../src/styles.ts","../../src/PanelFooter.tsx","../../src/PanelMobileActionsHeader.tsx","../../src/PanelProvider.tsx","../../src/PanelTypes.ts","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport { useIsMobile } from \"@sproutsocial/seeds-react-hooks\";\nimport { usePanelContext, PanelContext } from \"./PanelContext\";\nimport { PanelHeader } from \"./PanelHeader\";\nimport { PanelContent } from \"./PanelContent\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport { PanelFooter } from \"./PanelFooter\";\nimport { PanelMobileActionsHeader } from \"./PanelMobileActionsHeader\";\nimport { PanelContainer, PanelInner } from \"./styles\";\nimport type { TypePanelProps, TypePanelContext } from \"./PanelTypes\";\n\nconst PanelComponent = ({\n children,\n closeButtonLabel,\n header,\n headerless = false,\n footer,\n title,\n titleId,\n direction = \"right\",\n width = 384,\n gap = 4,\n mobileBreakpoint,\n zIndex,\n id,\n snapPoints,\n defaultSnapPoint,\n snapPoint,\n onSnapPointChange,\n snapToSequentialPoints,\n actions,\n actionsInHeader,\n \"aria-labelledby\": ariaLabelledByProp,\n \"aria-label\": ariaLabel,\n ...rest\n}: TypePanelProps) => {\n const panelContext = usePanelContext();\n const { isPanelOpen, closePanel } = panelContext;\n const isMobile = useIsMobile(mobileBreakpoint);\n\n // Expose closeButtonLabel through context so PanelCloseButton can read it\n // without prop drilling — same pattern as DrawerContext.\n const enrichedValue = React.useMemo<TypePanelContext>(\n () => ({ ...panelContext, closeButtonLabel, headerless }),\n [panelContext, closeButtonLabel, headerless]\n );\n\n // Freeze the last-rendered children during the collapse so consumers that\n // conditionally render content don't produce an empty panel shell while the\n // flex-basis animation runs.\n const prevChildrenRef = React.useRef<React.ReactNode>(null);\n if (isPanelOpen) {\n prevChildrenRef.current = children;\n }\n const renderedChildren = isPanelOpen ? children : prevChildrenRef.current;\n\n // When the consumer relies on the default header, its title element renders\n // with `id={titleId}`. Auto-wire `aria-labelledby` so the dialog/aside has an\n // accessible name without forcing every caller to repeat the id.\n const effectiveAriaLabelledBy =\n ariaLabelledByProp ?? (!headerless && header == null ? titleId : undefined);\n\n if (isMobile) {\n // With `actionsInHeader`, Drawer suppresses the floating rail and expects\n // the consumer to render the actions inside a custom header. Auto-compose\n // one (title + action pills + close pill) when the consumer hasn't\n // supplied their own header; otherwise we'd drop `actions` on the floor.\n const shouldRenderActionsHeader =\n !headerless &&\n header == null &&\n actionsInHeader === true &&\n !!actions &&\n actions.length > 0;\n\n // Headerless suppresses the built-in header entirely; the children own all\n // chrome in that mode.\n let defaultMobileHeader: React.ReactNode = null;\n if (!headerless) {\n defaultMobileHeader = shouldRenderActionsHeader ? (\n <PanelMobileActionsHeader\n title={title}\n titleId={titleId}\n actions={actions!}\n />\n ) : (\n <Drawer.Header title={title} id={titleId} />\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <Drawer\n {...rest}\n open={isPanelOpen}\n onClose={closePanel}\n direction=\"bottom\"\n closeButtonLabel={closeButtonLabel}\n zIndex={zIndex}\n snapPoints={snapPoints}\n defaultSnapPoint={defaultSnapPoint}\n snapPoint={snapPoint}\n onSnapPointChange={onSnapPointChange}\n snapToSequentialPoints={snapToSequentialPoints}\n actions={actions}\n actionsInHeader={actionsInHeader}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n {header ?? defaultMobileHeader}\n <PanelContent>{children}</PanelContent>\n {footer}\n </Drawer>\n </PanelContext.Provider>\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <PanelContainer\n {...rest}\n $isOpen={isPanelOpen}\n $direction={direction}\n $width={width}\n $gap={gap}\n data-qa-panel={id}\n data-qa-panel-isopen={isPanelOpen}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n <PanelInner $direction={direction} $width={width}>\n {header ??\n (headerless ? null : <PanelHeader title={title} id={titleId} />)}\n <PanelContent>{renderedChildren}</PanelContent>\n {footer}\n </PanelInner>\n </PanelContainer>\n </PanelContext.Provider>\n );\n};\n\nPanelComponent.Header = PanelHeader;\nPanelComponent.Content = PanelContent;\nPanelComponent.CloseButton = PanelCloseButton;\nPanelComponent.Footer = PanelFooter;\n\nexport const Panel = PanelComponent;\nexport default PanelComponent;\n","import * as React from \"react\";\nimport type { TypePanelContext } from \"./PanelTypes\";\n\nexport const PanelContext = React.createContext<TypePanelContext | null>(null);\n\nexport const usePanelContext = (): TypePanelContext => {\n const ctx = React.useContext(PanelContext);\n if (!ctx) {\n throw new Error(\n \"usePanelContext must be used within a <PanelProvider>. Wrap the consuming tree in <PanelProvider> to provide isPanelOpen / togglePanel.\"\n );\n }\n return ctx;\n};\n","import Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { usePanelContext } from \"./PanelContext\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport type { TypePanelHeaderProps } from \"./PanelTypes\";\n\nexport const PanelHeader = ({\n title = \"\",\n id = undefined,\n children,\n render,\n ...rest\n}: TypePanelHeaderProps) => {\n const panelContext = usePanelContext();\n\n if (render) {\n return render(panelContext);\n }\n\n return (\n <Box\n display=\"flex\"\n flex=\"0 0 auto\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n p={400}\n borderBottom=\"1px solid\"\n borderColor=\"container.border.base\"\n {...rest}\n >\n {children || (\n <>\n <Text.Headline id={id}>{title}</Text.Headline>\n <PanelCloseButton />\n </>\n )}\n </Box>\n );\n};\n\nPanelHeader.displayName = \"Panel.Header\";\n","import * as React from \"react\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelCloseButtonProps } from \"./PanelTypes\";\n\nexport const PanelCloseButton = (props: TypePanelCloseButtonProps) => {\n const panelContext = usePanelContext();\n\n if (props.render) {\n return props.render(panelContext) ?? null;\n }\n\n return (\n <Button\n appearance=\"pill\"\n aria-label={panelContext.closeButtonLabel}\n onClick={panelContext.closePanel}\n {...props}\n >\n {props.children || <Icon aria-hidden name=\"x-outline\" />}\n </Button>\n );\n};\n\nPanelCloseButton.displayName = \"Panel.CloseButton\";\n","import * as React from \"react\";\nimport { Content } from \"./styles\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelContentProps } from \"./PanelTypes\";\n\nexport const PanelContent = ({ children, ...rest }: TypePanelContentProps) => {\n // In headerless mode the content renders flush and defers overflow scrolling\n // to its children, so the panel can host content that owns its own chrome.\n const { headerless } = usePanelContext();\n\n return (\n <Content\n flex=\"1 1 auto\"\n minHeight=\"0\"\n p={headerless ? 0 : 450}\n $scroll={!headerless}\n color=\"text.body\"\n data-panel-content=\"\"\n {...rest}\n >\n {children}\n </Content>\n );\n};\n\nPanelContent.displayName = \"Panel.Content\";\n","import styled, { css } from \"styled-components\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeSystemCommonProps } from \"@sproutsocial/seeds-react-system-props\";\nimport { MOTION_DURATION_MEDIUM } from \"@sproutsocial/seeds-motion/unitless\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport type { PanelDirection } from \"./PanelTypes\";\n\ninterface PanelContainerProps extends TypeSystemCommonProps {\n $isOpen: boolean;\n $direction: PanelDirection;\n $width: number;\n $gap: number;\n}\n\nconst gapSide = (direction: PanelDirection): \"left\" | \"right\" | \"top\" => {\n if (direction === \"right\") return \"left\";\n if (direction === \"left\") return \"right\";\n return \"top\";\n};\n\nexport const PanelContainer = styled.aside<PanelContainerProps>`\n background: ${(props) => props.theme.colors.container.background.base};\n flex-grow: 0;\n flex-shrink: 0;\n overflow: hidden;\n transition: flex-basis ${MOTION_DURATION_MEDIUM}s ease-in-out,\n margin ${MOTION_DURATION_MEDIUM}s ease-in-out;\n flex-basis: ${(props) => (props.$isOpen ? `${props.$width}px` : \"0px\")};\n margin-${(props) => gapSide(props.$direction)}: ${(props) =>\n props.$isOpen && props.$gap ? `${props.$gap}px` : \"0px\"};\n border-radius: ${({ theme }) => theme.radii[800]};\n\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n width: 100%;\n `\n : css`\n align-self: stretch;\n `}\n\n ${COMMON}\n`;\n\nexport const PanelInner = styled.div<{\n $direction: PanelDirection;\n $width: number;\n}>`\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n min-height: ${props.$width}px;\n width: 100%;\n `\n : css`\n min-width: ${props.$width}px;\n height: 100%;\n `}\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n\nexport const Content = styled(Box)<{ $scroll?: boolean }>`\n overflow-y: ${({ $scroll = true }) => ($scroll ? \"auto\" : \"hidden\")};\n`;\n\nexport const Footer = styled(Box)`\n flex: 0 0 auto;\n overflow: hidden;\n /*\n * On mobile the Panel renders inside the Drawer's bottom sheet, whose popup\n * deliberately bleeds 3rem (--bleed) below the viewport for elastic\n * overscroll (see seeds-react-drawer/src/styles.ts). A footer pinned to the\n * end of that popup would land inside the bleed and clip below the fold, so\n * we lift it by the inherited --bleed; the gap left behind shows the popup's\n * own background, so there is no visible seam. On desktop --bleed is unset,\n * so the 0px fallback leaves the footer untouched.\n */\n margin-bottom: var(--bleed, 0px);\n`;\n","import * as React from \"react\";\nimport { Footer } from \"./styles\";\nimport type { TypePanelFooterProps } from \"./PanelTypes\";\n\nexport const PanelFooter = ({ children, ...rest }: TypePanelFooterProps) => (\n <Footer p={450} data-panel-footer=\"\" {...rest}>\n {children}\n </Footer>\n);\n\nPanelFooter.displayName = \"Panel.Footer\";\n","import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\n// eslint-disable-next-line import/no-deprecated\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport type { TypeDrawerActionProps } from \"@sproutsocial/seeds-react-drawer\";\n\ninterface TypePanelMobileActionsHeaderProps {\n title?: string;\n titleId?: string;\n actions: TypeDrawerActionProps[];\n}\n\n/**\n * Mobile bottom-sheet header used by Panel when `actionsInHeader` is set and\n * no custom `header` is provided. Renders the title on the left and the\n * forwarded actions plus a close button as pills on the right — mirrors the\n * pattern in `seeds-react-peek-in/PeekIn.tsx`. The Drawer's floating rail is\n * suppressed in this combination (`actionsInHeader` opts out), so without this\n * header the actions would render nowhere.\n */\nexport const PanelMobileActionsHeader = ({\n title,\n titleId,\n actions,\n}: TypePanelMobileActionsHeaderProps) => (\n <Drawer.Header\n render={(ctx) => (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n pt={400}\n px={450}\n flex=\"0 0 auto\"\n >\n <Text\n as=\"h2\"\n fontSize={400}\n fontWeight=\"semibold\"\n color=\"text.headline\"\n id={titleId}\n >\n {title}\n </Text>\n <Box display=\"flex\" alignItems=\"center\" gap={200}>\n {actions.map((action, i) => (\n <Button\n key={i}\n appearance=\"pill\"\n aria-label={action[\"aria-label\"]}\n onClick={action.onClick}\n disabled={action.disabled}\n >\n {action.iconName && <Icon aria-hidden name={action.iconName} />}\n </Button>\n ))}\n <Button\n appearance=\"pill\"\n aria-label={ctx.closeButtonLabel}\n onClick={ctx.onClose}\n >\n <Icon aria-hidden name=\"x-outline\" />\n </Button>\n </Box>\n </Box>\n )}\n />\n);\n\nPanelMobileActionsHeader.displayName = \"PanelMobileActionsHeader\";\n","import * as React from \"react\";\nimport { PanelContext } from \"./PanelContext\";\nimport type { TypePanelContext, TypePanelProviderProps } from \"./PanelTypes\";\n\nexport const PanelProvider = ({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n}: TypePanelProviderProps) => {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const isPanelOpen = isControlled ? controlledOpen : internalOpen;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const openPanel = React.useCallback(() => setOpen(true), [setOpen]);\n const closePanel = React.useCallback(() => setOpen(false), [setOpen]);\n const togglePanel = React.useCallback(\n () => setOpen(!isPanelOpen),\n [setOpen, isPanelOpen]\n );\n\n const value = React.useMemo<TypePanelContext>(\n () => ({ isPanelOpen, openPanel, closePanel, togglePanel }),\n [isPanelOpen, openPanel, closePanel, togglePanel]\n );\n\n return (\n <PanelContext.Provider value={value}>{children}</PanelContext.Provider>\n );\n};\n","import * as React from \"react\";\nimport type {\n TypeSystemCommonProps,\n TypeStyledComponentsCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\nimport type { TypeButtonProps } from \"@sproutsocial/seeds-react-button\";\nimport type {\n TypeDrawerSnapPoint,\n TypeDrawerActionProps,\n} from \"@sproutsocial/seeds-react-drawer\";\n\nexport type { TypeDrawerActionProps as TypePanelActionProps };\n\nexport type PanelDirection = \"left\" | \"right\" | \"bottom\";\n\nexport interface TypePanelContext {\n isPanelOpen: boolean;\n togglePanel: () => void;\n openPanel: () => void;\n closePanel: () => void;\n closeButtonLabel?: string;\n /**\n * Set by `Panel` when rendered headerless. `Panel.Content` reads this to\n * render flush (no padding) and defer overflow scrolling to its children.\n */\n headerless?: boolean;\n}\n\nexport interface TypePanelProviderProps {\n children: React.ReactNode;\n /** Initial open state for uncontrolled usage. */\n defaultOpen?: boolean;\n /** Controlled open state. When provided, the provider becomes controlled. */\n open?: boolean;\n /** Called whenever the open state changes. Required for controlled usage. */\n onOpenChange?: (open: boolean) => void;\n}\n\nexport interface TypePanelProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"div\">, \"color\"> {\n children: React.ReactNode;\n\n /** Label for the close button. Usually \"Close\". */\n closeButtonLabel: string;\n\n /**\n * Custom header content. When provided, replaces the auto-rendered default\n * header entirely — `title` and `titleId` are ignored.\n */\n header?: React.ReactNode;\n\n /** Custom footer content. Not rendered when omitted. */\n footer?: React.ReactNode;\n\n /**\n * Renders children flush, without the built-in header/close button or content\n * padding, and lets the children own overflow scrolling. Use when the content\n * provides its own chrome (e.g. an embedded agent UI). Provide `aria-label`\n * (or `aria-labelledby`) for an accessible name, since no header title is\n * rendered. `title`, `titleId`, and `closeButtonLabel` are ignored in this\n * mode. Defaults to false.\n */\n headerless?: boolean;\n\n /** Title shown in the auto-rendered default header. Ignored when `header` is provided. */\n title?: string;\n\n /**\n * Sets the `id` on the title element of the auto-rendered header. When the\n * default header is used, Panel automatically wires `aria-labelledby` to this\n * id so the dialog/aside has an accessible name. Pass an explicit\n * `aria-labelledby` to override (e.g. when pointing at a different element).\n * Ignored when `header` is provided — supply your own `aria-labelledby` in\n * that case.\n */\n titleId?: string;\n\n /** Side the panel anchors to on desktop. Defaults to \"right\". */\n direction?: PanelDirection;\n\n /**\n * Width (px) when direction is \"left\" or \"right\", or height (px) when\n * direction is \"bottom\". Defaults to 384 to match the existing web-app-core\n * Panel.\n */\n width?: number;\n\n /**\n * Visual gap (px) between the panel and the adjacent content. Applied as\n * margin on the side facing the content (left when direction=\"right\",\n * right when direction=\"left\", top when direction=\"bottom\"). Animates with\n * the panel's open/close transition and collapses to 0 when closed so the\n * gap does not remain visible alongside a zero-width panel. Defaults to 0.\n */\n gap?: number;\n\n /**\n * Forwarded to `useIsMobile`. Accepts a px number or any CSS media-query\n * length. Below this width, the panel renders as an overlay bottom sheet\n * (via seeds-react-drawer). Defaults to the theme's `breakpoints.sm`.\n */\n mobileBreakpoint?: number | string;\n\n /** Applies only to the mobile bottom-sheet rendering. */\n zIndex?: number;\n\n /** Optional id used for data-qa-panel attributes. */\n id?: string;\n\n /**\n * Snap points the panel can rest at when rendered as a mobile bottom sheet.\n * Numbers 0–1 are viewport-height fractions; numbers > 1 are pixels; strings\n * accept `px`/`rem` (e.g. `\"480px\"`, `\"30rem\"`). Order matters — the last\n * entry is the \"expanded\" state. Ignored on the desktop side-panel rendering.\n */\n snapPoints?: TypeDrawerSnapPoint[];\n\n /** Initial snap point for uncontrolled use. Mobile only. */\n defaultSnapPoint?: TypeDrawerSnapPoint | null;\n\n /** Controlled active snap point. Pair with `onSnapPointChange`. Mobile only. */\n snapPoint?: TypeDrawerSnapPoint | null;\n\n /** Fires when the active snap point changes. Mobile only. */\n onSnapPointChange?: (snapPoint: TypeDrawerSnapPoint | null) => void;\n\n /**\n * When true, fast swipes can't skip past adjacent snap points. Mobile only.\n */\n snapToSequentialPoints?: boolean;\n\n /**\n * Action buttons shown in a floating rail above the panel on mobile (the\n * bottom-sheet rendering). Ignored on desktop side-panel rendering — pass\n * actions through `header`/`footer` slots there. The rail owns the close\n * button so the default header omits its built-in close affordance.\n */\n actions?: TypeDrawerActionProps[];\n\n /**\n * Opt out of the floating mobile rail and render the `actions` inline in the\n * header as pill buttons instead. Useful for nested bottom sheets and\n * snap-point layouts where the floating rail would collide with surrounding\n * UI. Defaults to `false`.\n *\n * When `header` is omitted, Panel auto-composes a mobile header that renders\n * the title, the `actions` as pills, and a close-button pill. When `header`\n * is provided, the consumer is responsible for rendering the actions inside\n * their own header — `actions` is forwarded for context only.\n */\n actionsInHeader?: boolean;\n}\n\nexport interface TypePanelHeaderProps extends TypeBoxProps {\n title?: string;\n /**\n * When children are provided, `<Panel.CloseButton />` is NOT rendered\n * automatically. Include it yourself to preserve keyboard accessibility.\n */\n children?: React.ReactNode;\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n}\n\nexport interface TypePanelContentProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelFooterProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelCloseButtonProps\n extends Omit<TypeButtonProps, \"children\"> {\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n children?: React.ReactNode;\n}\n","import Panel from \"./Panel\";\n\nexport default Panel;\nexport { Panel };\nexport { PanelContext, usePanelContext } from \"./PanelContext\";\nexport { PanelProvider } from \"./PanelProvider\";\nexport { PanelHeader } from \"./PanelHeader\";\nexport { PanelContent } from \"./PanelContent\";\nexport { PanelCloseButton } from \"./PanelCloseButton\";\nexport { PanelFooter } from \"./PanelFooter\";\nexport * from \"./PanelTypes\";\n"],"mappings":";AAAA,YAAYA,YAAW;AACvB,OAAOC,aAAY;AACnB,SAAS,mBAAmB;;;ACF5B,YAAY,WAAW;AAGhB,IAAM,eAAqB,oBAAuC,IAAI;AAEtE,IAAM,kBAAkB,MAAwB;AACrD,QAAM,MAAY,iBAAW,YAAY;AACzC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;ACbA,OAAO,SAAS;AAChB,OAAO,UAAU;;;ACDjB,OAAuB;AACvB,OAAO,YAAY;AACnB,OAAO,UAAU;AAkBQ;AAdlB,IAAM,mBAAmB,CAAC,UAAqC;AACpE,QAAM,eAAe,gBAAgB;AAErC,MAAI,MAAM,QAAQ;AAChB,WAAO,MAAM,OAAO,YAAY,KAAK;AAAA,EACvC;AAEA,SACE;AAAA,IAAC;AAAA;AAA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ClE,QAAM,aAAmB,mBAAY,MAAM,QAAQ,KAAK,GAAG,CAAC,OAAO,CAAC;AACpE,QAAM,cAAoB;AAAA,IACxB,MAAM,QAAQ,CAAC,WAAW;AAAA,IAC1B,CAAC,SAAS,WAAW;AAAA,EACvB;AAEA,QAAM,QAAc;AAAA,IAClB,OAAO,EAAE,aAAa,WAAW,YAAY,YAAY;AAAA,IACzD,CAAC,aAAa,WAAW,YAAY,WAAW;AAAA,EAClD;AAEA,SACE,gBAAAA,KAAC,aAAa,UAAb,EAAsB,OAAe,UAAS;AAEnD;;;ACrCA,OAAuB;;;ACEvB,IAAO,gBAAQ;","names":["React","Drawer","jsx","Box","jsx","jsx","Box","Button","Icon","Text","jsx","jsxs","jsx","jsxs","Drawer","React","jsx"]}
1
+ {"version":3,"sources":["../../src/Panel.tsx","../../src/PanelContext.tsx","../../src/PanelHeader.tsx","../../src/PanelCloseButton.tsx","../../src/PanelContent.tsx","../../src/styles.ts","../../src/PanelFooter.tsx","../../src/PanelMobileActionsHeader.tsx","../../src/PanelProvider.tsx","../../src/PanelTypes.ts","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport { useIsMobile } from \"@sproutsocial/seeds-react-hooks\";\nimport { usePanelContext, PanelContext } from \"./PanelContext\";\nimport { PanelHeader } from \"./PanelHeader\";\nimport { PanelContent } from \"./PanelContent\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport { PanelFooter } from \"./PanelFooter\";\nimport { PanelMobileActionsHeader } from \"./PanelMobileActionsHeader\";\nimport { PanelContainer, PanelInner } from \"./styles\";\nimport type { TypePanelProps, TypePanelContext } from \"./PanelTypes\";\n\nconst PanelComponent = ({\n children,\n closeButtonLabel,\n header,\n headerless = false,\n footer,\n title,\n titleId,\n direction = \"right\",\n width = 384,\n gap = 4,\n mobileBreakpoint,\n zIndex,\n id,\n snapPoints,\n defaultSnapPoint,\n snapPoint,\n onSnapPointChange,\n snapToSequentialPoints,\n actions,\n actionsInHeader,\n \"aria-labelledby\": ariaLabelledByProp,\n \"aria-label\": ariaLabel,\n ...rest\n}: TypePanelProps) => {\n const panelContext = usePanelContext();\n const { isPanelOpen, closePanel } = panelContext;\n const isMobile = useIsMobile(mobileBreakpoint);\n\n // Expose closeButtonLabel through context so PanelCloseButton can read it\n // without prop drilling — same pattern as DrawerContext.\n const enrichedValue = React.useMemo<TypePanelContext>(\n () => ({ ...panelContext, closeButtonLabel, headerless }),\n [panelContext, closeButtonLabel, headerless]\n );\n\n // Freeze the last-rendered children during the collapse so consumers that\n // conditionally render content don't produce an empty panel shell while the\n // flex-basis animation runs.\n const prevChildrenRef = React.useRef<React.ReactNode>(null);\n if (isPanelOpen) {\n prevChildrenRef.current = children;\n }\n const renderedChildren = isPanelOpen ? children : prevChildrenRef.current;\n\n // When the consumer relies on the default header, its title element renders\n // with `id={titleId}`. Auto-wire `aria-labelledby` so the dialog/aside has an\n // accessible name without forcing every caller to repeat the id.\n const effectiveAriaLabelledBy =\n ariaLabelledByProp ?? (!headerless && header == null ? titleId : undefined);\n\n if (isMobile) {\n // With `actionsInHeader`, Drawer suppresses the floating rail and expects\n // the consumer to render the actions inside a custom header. Auto-compose\n // one (title + action pills + close pill) when the consumer hasn't\n // supplied their own header; otherwise we'd drop `actions` on the floor.\n const shouldRenderActionsHeader =\n !headerless &&\n header == null &&\n actionsInHeader === true &&\n !!actions &&\n actions.length > 0;\n\n // Headerless suppresses the built-in header entirely; the children own all\n // chrome in that mode.\n let defaultMobileHeader: React.ReactNode = null;\n if (!headerless) {\n defaultMobileHeader = shouldRenderActionsHeader ? (\n <PanelMobileActionsHeader\n title={title}\n titleId={titleId}\n actions={actions!}\n />\n ) : (\n <Drawer.Header title={title} id={titleId} />\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <Drawer\n {...rest}\n open={isPanelOpen}\n onClose={closePanel}\n direction=\"bottom\"\n closeButtonLabel={closeButtonLabel}\n zIndex={zIndex}\n snapPoints={snapPoints}\n defaultSnapPoint={defaultSnapPoint}\n snapPoint={snapPoint}\n onSnapPointChange={onSnapPointChange}\n snapToSequentialPoints={snapToSequentialPoints}\n actions={actions}\n actionsInHeader={actionsInHeader}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n {header ?? defaultMobileHeader}\n <PanelContent>{children}</PanelContent>\n {footer}\n </Drawer>\n </PanelContext.Provider>\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <PanelContainer\n {...rest}\n $isOpen={isPanelOpen}\n $direction={direction}\n $width={width}\n $gap={gap}\n data-qa-panel={id}\n data-qa-panel-isopen={isPanelOpen}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n <PanelInner $direction={direction} $width={width}>\n {header ??\n (headerless ? null : <PanelHeader title={title} id={titleId} />)}\n <PanelContent>{renderedChildren}</PanelContent>\n {footer}\n </PanelInner>\n </PanelContainer>\n </PanelContext.Provider>\n );\n};\n\nPanelComponent.Header = PanelHeader;\nPanelComponent.Content = PanelContent;\nPanelComponent.CloseButton = PanelCloseButton;\nPanelComponent.Footer = PanelFooter;\n\nexport const Panel = PanelComponent;\nexport default PanelComponent;\n","import * as React from \"react\";\nimport type { TypePanelContext } from \"./PanelTypes\";\n\nexport const PanelContext = React.createContext<TypePanelContext | null>(null);\n\nexport const usePanelContext = (): TypePanelContext => {\n const ctx = React.useContext(PanelContext);\n if (!ctx) {\n throw new Error(\n \"usePanelContext must be used within a <PanelProvider>. Wrap the consuming tree in <PanelProvider> to provide isPanelOpen / togglePanel.\"\n );\n }\n return ctx;\n};\n","import Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { usePanelContext } from \"./PanelContext\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport type { TypePanelHeaderProps } from \"./PanelTypes\";\n\nexport const PanelHeader = ({\n title = \"\",\n id = undefined,\n children,\n render,\n ...rest\n}: TypePanelHeaderProps) => {\n const panelContext = usePanelContext();\n\n if (render) {\n return render(panelContext);\n }\n\n return (\n <Box\n display=\"flex\"\n flex=\"0 0 auto\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n p={400}\n borderBottom=\"1px solid\"\n borderColor=\"container.border.base\"\n {...rest}\n >\n {children || (\n <>\n <Text.Headline id={id}>{title}</Text.Headline>\n <PanelCloseButton />\n </>\n )}\n </Box>\n );\n};\n\nPanelHeader.displayName = \"Panel.Header\";\n","import * as React from \"react\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelCloseButtonProps } from \"./PanelTypes\";\n\nexport const PanelCloseButton = (props: TypePanelCloseButtonProps) => {\n const panelContext = usePanelContext();\n\n if (props.render) {\n return props.render(panelContext) ?? null;\n }\n\n return (\n <Button\n appearance=\"pill\"\n aria-label={panelContext.closeButtonLabel}\n onClick={panelContext.closePanel}\n {...props}\n >\n {props.children || <Icon aria-hidden name=\"x-outline\" />}\n </Button>\n );\n};\n\nPanelCloseButton.displayName = \"Panel.CloseButton\";\n","import * as React from \"react\";\nimport { Content } from \"./styles\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelContentProps } from \"./PanelTypes\";\n\nexport const PanelContent = ({ children, ...rest }: TypePanelContentProps) => {\n // In headerless mode the content renders flush as a flex column and defers\n // overflow scrolling to its children, so the panel can host content that\n // owns its own chrome and fills the panel height (e.g. via flex: 1 1 auto).\n const { headerless } = usePanelContext();\n\n return (\n <Content\n flex=\"1 1 auto\"\n minHeight=\"0\"\n p={headerless ? 0 : 450}\n $scroll={!headerless}\n color=\"text.body\"\n data-panel-content=\"\"\n {...rest}\n >\n {children}\n </Content>\n );\n};\n\nPanelContent.displayName = \"Panel.Content\";\n","import styled, { css } from \"styled-components\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeSystemCommonProps } from \"@sproutsocial/seeds-react-system-props\";\nimport { MOTION_DURATION_MEDIUM } from \"@sproutsocial/seeds-motion/unitless\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport type { PanelDirection } from \"./PanelTypes\";\n\ninterface PanelContainerProps extends TypeSystemCommonProps {\n $isOpen: boolean;\n $direction: PanelDirection;\n $width: number;\n $gap: number;\n}\n\nconst gapSide = (direction: PanelDirection): \"left\" | \"right\" | \"top\" => {\n if (direction === \"right\") return \"left\";\n if (direction === \"left\") return \"right\";\n return \"top\";\n};\n\nexport const PanelContainer = styled.aside<PanelContainerProps>`\n background: ${(props) => props.theme.colors.container.background.base};\n flex-grow: 0;\n flex-shrink: 0;\n overflow: hidden;\n transition: flex-basis ${MOTION_DURATION_MEDIUM}s ease-in-out,\n margin ${MOTION_DURATION_MEDIUM}s ease-in-out;\n flex-basis: ${(props) => (props.$isOpen ? `${props.$width}px` : \"0px\")};\n margin-${(props) => gapSide(props.$direction)}: ${(props) =>\n props.$isOpen && props.$gap ? `${props.$gap}px` : \"0px\"};\n border-radius: ${({ theme }) => theme.radii[800]};\n\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n width: 100%;\n `\n : css`\n align-self: stretch;\n `}\n\n ${COMMON}\n`;\n\nexport const PanelInner = styled.div<{\n $direction: PanelDirection;\n $width: number;\n}>`\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n min-height: ${props.$width}px;\n width: 100%;\n `\n : css`\n min-width: ${props.$width}px;\n height: 100%;\n `}\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n\nexport const Content = styled(Box)<{ $scroll?: boolean }>`\n overflow-y: ${({ $scroll = true }) => ($scroll ? \"auto\" : \"hidden\")};\n /*\n * When content owns its own scrolling ($scroll false, i.e. headerless), lay\n * out as a flex column so a child can flex to the panel's full height —\n * percentage heights can't resolve against a block container here.\n */\n ${({ $scroll = true }) =>\n !$scroll &&\n css`\n display: flex;\n flex-direction: column;\n `}\n`;\n\nexport const Footer = styled(Box)`\n flex: 0 0 auto;\n overflow: hidden;\n /*\n * On mobile the Panel renders inside the Drawer's bottom sheet, whose popup\n * deliberately bleeds 3rem (--bleed) below the viewport for elastic\n * overscroll (see seeds-react-drawer/src/styles.ts). A footer pinned to the\n * end of that popup would land inside the bleed and clip below the fold, so\n * we lift it by the inherited --bleed; the gap left behind shows the popup's\n * own background, so there is no visible seam. On desktop --bleed is unset,\n * so the 0px fallback leaves the footer untouched.\n */\n margin-bottom: var(--bleed, 0px);\n`;\n","import * as React from \"react\";\nimport { Footer } from \"./styles\";\nimport type { TypePanelFooterProps } from \"./PanelTypes\";\n\nexport const PanelFooter = ({ children, ...rest }: TypePanelFooterProps) => (\n <Footer p={450} data-panel-footer=\"\" {...rest}>\n {children}\n </Footer>\n);\n\nPanelFooter.displayName = \"Panel.Footer\";\n","import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\n// eslint-disable-next-line import/no-deprecated\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport type { TypeDrawerActionProps } from \"@sproutsocial/seeds-react-drawer\";\n\ninterface TypePanelMobileActionsHeaderProps {\n title?: string;\n titleId?: string;\n actions: TypeDrawerActionProps[];\n}\n\n/**\n * Mobile bottom-sheet header used by Panel when `actionsInHeader` is set and\n * no custom `header` is provided. Renders the title on the left and the\n * forwarded actions plus a close button as pills on the right — mirrors the\n * pattern in `seeds-react-peek-in/PeekIn.tsx`. The Drawer's floating rail is\n * suppressed in this combination (`actionsInHeader` opts out), so without this\n * header the actions would render nowhere.\n */\nexport const PanelMobileActionsHeader = ({\n title,\n titleId,\n actions,\n}: TypePanelMobileActionsHeaderProps) => (\n <Drawer.Header\n render={(ctx) => (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n pt={400}\n px={450}\n flex=\"0 0 auto\"\n >\n <Text\n as=\"h2\"\n fontSize={400}\n fontWeight=\"semibold\"\n color=\"text.headline\"\n id={titleId}\n >\n {title}\n </Text>\n <Box display=\"flex\" alignItems=\"center\" gap={200}>\n {actions.map((action, i) => (\n <Button\n key={i}\n appearance=\"pill\"\n aria-label={action[\"aria-label\"]}\n onClick={action.onClick}\n disabled={action.disabled}\n >\n {action.iconName && <Icon aria-hidden name={action.iconName} />}\n </Button>\n ))}\n <Button\n appearance=\"pill\"\n aria-label={ctx.closeButtonLabel}\n onClick={ctx.onClose}\n >\n <Icon aria-hidden name=\"x-outline\" />\n </Button>\n </Box>\n </Box>\n )}\n />\n);\n\nPanelMobileActionsHeader.displayName = \"PanelMobileActionsHeader\";\n","import * as React from \"react\";\nimport { PanelContext } from \"./PanelContext\";\nimport type { TypePanelContext, TypePanelProviderProps } from \"./PanelTypes\";\n\nexport const PanelProvider = ({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n}: TypePanelProviderProps) => {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const isPanelOpen = isControlled ? controlledOpen : internalOpen;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const openPanel = React.useCallback(() => setOpen(true), [setOpen]);\n const closePanel = React.useCallback(() => setOpen(false), [setOpen]);\n const togglePanel = React.useCallback(\n () => setOpen(!isPanelOpen),\n [setOpen, isPanelOpen]\n );\n\n const value = React.useMemo<TypePanelContext>(\n () => ({ isPanelOpen, openPanel, closePanel, togglePanel }),\n [isPanelOpen, openPanel, closePanel, togglePanel]\n );\n\n return (\n <PanelContext.Provider value={value}>{children}</PanelContext.Provider>\n );\n};\n","import * as React from \"react\";\nimport type {\n TypeSystemCommonProps,\n TypeStyledComponentsCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\nimport type { TypeButtonProps } from \"@sproutsocial/seeds-react-button\";\nimport type {\n TypeDrawerSnapPoint,\n TypeDrawerActionProps,\n} from \"@sproutsocial/seeds-react-drawer\";\n\nexport type { TypeDrawerActionProps as TypePanelActionProps };\n\nexport type PanelDirection = \"left\" | \"right\" | \"bottom\";\n\nexport interface TypePanelContext {\n isPanelOpen: boolean;\n togglePanel: () => void;\n openPanel: () => void;\n closePanel: () => void;\n closeButtonLabel?: string;\n /**\n * Set by `Panel` when rendered headerless. `Panel.Content` reads this to\n * render flush (no padding) and defer overflow scrolling to its children.\n */\n headerless?: boolean;\n}\n\nexport interface TypePanelProviderProps {\n children: React.ReactNode;\n /** Initial open state for uncontrolled usage. */\n defaultOpen?: boolean;\n /** Controlled open state. When provided, the provider becomes controlled. */\n open?: boolean;\n /** Called whenever the open state changes. Required for controlled usage. */\n onOpenChange?: (open: boolean) => void;\n}\n\nexport interface TypePanelProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"div\">, \"color\"> {\n children: React.ReactNode;\n\n /** Label for the close button. Usually \"Close\". */\n closeButtonLabel: string;\n\n /**\n * Custom header content. When provided, replaces the auto-rendered default\n * header entirely — `title` and `titleId` are ignored.\n */\n header?: React.ReactNode;\n\n /** Custom footer content. Not rendered when omitted. */\n footer?: React.ReactNode;\n\n /**\n * Renders children flush, without the built-in header/close button or content\n * padding, and lets the children own overflow scrolling. Use when the content\n * provides its own chrome (e.g. an embedded agent UI). Provide `aria-label`\n * (or `aria-labelledby`) for an accessible name, since no header title is\n * rendered. `title`, `titleId`, and `closeButtonLabel` are ignored in this\n * mode. Defaults to false.\n */\n headerless?: boolean;\n\n /** Title shown in the auto-rendered default header. Ignored when `header` is provided. */\n title?: string;\n\n /**\n * Sets the `id` on the title element of the auto-rendered header. When the\n * default header is used, Panel automatically wires `aria-labelledby` to this\n * id so the dialog/aside has an accessible name. Pass an explicit\n * `aria-labelledby` to override (e.g. when pointing at a different element).\n * Ignored when `header` is provided — supply your own `aria-labelledby` in\n * that case.\n */\n titleId?: string;\n\n /** Side the panel anchors to on desktop. Defaults to \"right\". */\n direction?: PanelDirection;\n\n /**\n * Width (px) when direction is \"left\" or \"right\", or height (px) when\n * direction is \"bottom\". Defaults to 384 to match the existing web-app-core\n * Panel.\n */\n width?: number;\n\n /**\n * Visual gap (px) between the panel and the adjacent content. Applied as\n * margin on the side facing the content (left when direction=\"right\",\n * right when direction=\"left\", top when direction=\"bottom\"). Animates with\n * the panel's open/close transition and collapses to 0 when closed so the\n * gap does not remain visible alongside a zero-width panel. Defaults to 0.\n */\n gap?: number;\n\n /**\n * Forwarded to `useIsMobile`. Accepts a px number or any CSS media-query\n * length. Below this width, the panel renders as an overlay bottom sheet\n * (via seeds-react-drawer). Defaults to the theme's `breakpoints.sm`.\n */\n mobileBreakpoint?: number | string;\n\n /** Applies only to the mobile bottom-sheet rendering. */\n zIndex?: number;\n\n /** Optional id used for data-qa-panel attributes. */\n id?: string;\n\n /**\n * Snap points the panel can rest at when rendered as a mobile bottom sheet.\n * Numbers 0–1 are viewport-height fractions; numbers > 1 are pixels; strings\n * accept `px`/`rem` (e.g. `\"480px\"`, `\"30rem\"`). Order matters — the last\n * entry is the \"expanded\" state. Ignored on the desktop side-panel rendering.\n */\n snapPoints?: TypeDrawerSnapPoint[];\n\n /** Initial snap point for uncontrolled use. Mobile only. */\n defaultSnapPoint?: TypeDrawerSnapPoint | null;\n\n /** Controlled active snap point. Pair with `onSnapPointChange`. Mobile only. */\n snapPoint?: TypeDrawerSnapPoint | null;\n\n /** Fires when the active snap point changes. Mobile only. */\n onSnapPointChange?: (snapPoint: TypeDrawerSnapPoint | null) => void;\n\n /**\n * When true, fast swipes can't skip past adjacent snap points. Mobile only.\n */\n snapToSequentialPoints?: boolean;\n\n /**\n * Action buttons shown in a floating rail above the panel on mobile (the\n * bottom-sheet rendering). Ignored on desktop side-panel rendering — pass\n * actions through `header`/`footer` slots there. The rail owns the close\n * button so the default header omits its built-in close affordance.\n */\n actions?: TypeDrawerActionProps[];\n\n /**\n * Opt out of the floating mobile rail and render the `actions` inline in the\n * header as pill buttons instead. Useful for nested bottom sheets and\n * snap-point layouts where the floating rail would collide with surrounding\n * UI. Defaults to `false`.\n *\n * When `header` is omitted, Panel auto-composes a mobile header that renders\n * the title, the `actions` as pills, and a close-button pill. When `header`\n * is provided, the consumer is responsible for rendering the actions inside\n * their own header — `actions` is forwarded for context only.\n */\n actionsInHeader?: boolean;\n}\n\nexport interface TypePanelHeaderProps extends TypeBoxProps {\n title?: string;\n /**\n * When children are provided, `<Panel.CloseButton />` is NOT rendered\n * automatically. Include it yourself to preserve keyboard accessibility.\n */\n children?: React.ReactNode;\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n}\n\nexport interface TypePanelContentProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelFooterProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelCloseButtonProps\n extends Omit<TypeButtonProps, \"children\"> {\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n children?: React.ReactNode;\n}\n","import Panel from \"./Panel\";\n\nexport default Panel;\nexport { Panel };\nexport { PanelContext, usePanelContext } from \"./PanelContext\";\nexport { PanelProvider } from \"./PanelProvider\";\nexport { PanelHeader } from \"./PanelHeader\";\nexport { PanelContent } from \"./PanelContent\";\nexport { PanelCloseButton } from \"./PanelCloseButton\";\nexport { PanelFooter } from \"./PanelFooter\";\nexport * from \"./PanelTypes\";\n"],"mappings":";AAAA,YAAYA,YAAW;AACvB,OAAOC,aAAY;AACnB,SAAS,mBAAmB;;;ACF5B,YAAY,WAAW;AAGhB,IAAM,eAAqB,oBAAuC,IAAI;AAEtE,IAAM,kBAAkB,MAAwB;AACrD,QAAM,MAAY,iBAAW,YAAY;AACzC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,S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cAAc;AAAA,EACd,MAAM;AAAA,EACN;AACF,MAA8B;AAC5B,QAAM,CAAC,cAAc,eAAe,IAAU,gBAAS,WAAW;AAClE,QAAM,eAAe,mBAAmB;AACxC,QAAM,cAAc,eAAe,iBAAiB;AAEpD,QAAM,UAAgB;AAAA,IACpB,CAAC,SAAkB;AACjB,UAAI,CAAC,aAAc,iBAAgB,IAAI;AACvC,qBAAe,IAAI;AAAA,IACrB;AAAA,IACA,CAAC,cAAc,YAAY;AAAA,EAC7B;AAEA,QAAM,YAAkB,mBAAY,MAAM,QAAQ,IAAI,GAAG,CAAC,OAAO,CAAC;AAClE,QAAM,aAAmB,mBAAY,MAAM,QAAQ,KAAK,GAAG,CAAC,OAAO,CAAC;AACpE,QAAM,cAAoB;AAAA,IACxB,MAAM,QAAQ,CAAC,WAAW;AAAA,IAC1B,CAAC,SAAS,WAAW;AAAA,EACvB;AAEA,QAAM,QAAc;AAAA,IAClB,OAAO,EAAE,aAAa,WAAW,YAAY,YAAY;AAAA,IACzD,CAAC,aAAa,WAAW,YAAY,WAAW;AAAA,EAClD;AAEA,SACE,gBAAAA,KAAC,aAAa,UAAb,EAAsB,OAAe,UAAS;AAEnD;;;ACrCA,OAAuB;;;ACEvB,IAAO,gBAAQ;","names":["React","Drawer","jsx","Box","jsx","jsx","Box","Button","Icon","Text","jsx","jsxs","jsx","jsxs","Drawer","React","jsx"]}
package/dist/index.js CHANGED
@@ -166,6 +166,15 @@ var PanelInner = import_styled_components.default.div`
166
166
  `;
167
167
  var Content = (0, import_styled_components.default)(import_seeds_react_box2.default)`
168
168
  overflow-y: ${({ $scroll = true }) => $scroll ? "auto" : "hidden"};
169
+ /*
170
+ * When content owns its own scrolling ($scroll false, i.e. headerless), lay
171
+ * out as a flex column so a child can flex to the panel's full height —
172
+ * percentage heights can't resolve against a block container here.
173
+ */
174
+ ${({ $scroll = true }) => !$scroll && import_styled_components.css`
175
+ display: flex;
176
+ flex-direction: column;
177
+ `}
169
178
  `;
170
179
  var Footer = (0, import_styled_components.default)(import_seeds_react_box2.default)`
171
180
  flex: 0 0 auto;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/Panel.tsx","../src/PanelContext.tsx","../src/PanelHeader.tsx","../src/PanelCloseButton.tsx","../src/PanelContent.tsx","../src/styles.ts","../src/PanelFooter.tsx","../src/PanelMobileActionsHeader.tsx","../src/PanelProvider.tsx","../src/PanelTypes.ts"],"sourcesContent":["import Panel from \"./Panel\";\n\nexport default Panel;\nexport { Panel };\nexport { PanelContext, usePanelContext } from \"./PanelContext\";\nexport { PanelProvider } from \"./PanelProvider\";\nexport { PanelHeader } from \"./PanelHeader\";\nexport { PanelContent } from \"./PanelContent\";\nexport { PanelCloseButton } from \"./PanelCloseButton\";\nexport { PanelFooter } from \"./PanelFooter\";\nexport * from \"./PanelTypes\";\n","import * as React from \"react\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport { useIsMobile } from \"@sproutsocial/seeds-react-hooks\";\nimport { usePanelContext, PanelContext } from \"./PanelContext\";\nimport { PanelHeader } from \"./PanelHeader\";\nimport { PanelContent } from \"./PanelContent\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport { PanelFooter } from \"./PanelFooter\";\nimport { PanelMobileActionsHeader } from \"./PanelMobileActionsHeader\";\nimport { PanelContainer, PanelInner } from \"./styles\";\nimport type { TypePanelProps, TypePanelContext } from \"./PanelTypes\";\n\nconst PanelComponent = ({\n children,\n closeButtonLabel,\n header,\n headerless = false,\n footer,\n title,\n titleId,\n direction = \"right\",\n width = 384,\n gap = 4,\n mobileBreakpoint,\n zIndex,\n id,\n snapPoints,\n defaultSnapPoint,\n snapPoint,\n onSnapPointChange,\n snapToSequentialPoints,\n actions,\n actionsInHeader,\n \"aria-labelledby\": ariaLabelledByProp,\n \"aria-label\": ariaLabel,\n ...rest\n}: TypePanelProps) => {\n const panelContext = usePanelContext();\n const { isPanelOpen, closePanel } = panelContext;\n const isMobile = useIsMobile(mobileBreakpoint);\n\n // Expose closeButtonLabel through context so PanelCloseButton can read it\n // without prop drilling — same pattern as DrawerContext.\n const enrichedValue = React.useMemo<TypePanelContext>(\n () => ({ ...panelContext, closeButtonLabel, headerless }),\n [panelContext, closeButtonLabel, headerless]\n );\n\n // Freeze the last-rendered children during the collapse so consumers that\n // conditionally render content don't produce an empty panel shell while the\n // flex-basis animation runs.\n const prevChildrenRef = React.useRef<React.ReactNode>(null);\n if (isPanelOpen) {\n prevChildrenRef.current = children;\n }\n const renderedChildren = isPanelOpen ? children : prevChildrenRef.current;\n\n // When the consumer relies on the default header, its title element renders\n // with `id={titleId}`. Auto-wire `aria-labelledby` so the dialog/aside has an\n // accessible name without forcing every caller to repeat the id.\n const effectiveAriaLabelledBy =\n ariaLabelledByProp ?? (!headerless && header == null ? titleId : undefined);\n\n if (isMobile) {\n // With `actionsInHeader`, Drawer suppresses the floating rail and expects\n // the consumer to render the actions inside a custom header. Auto-compose\n // one (title + action pills + close pill) when the consumer hasn't\n // supplied their own header; otherwise we'd drop `actions` on the floor.\n const shouldRenderActionsHeader =\n !headerless &&\n header == null &&\n actionsInHeader === true &&\n !!actions &&\n actions.length > 0;\n\n // Headerless suppresses the built-in header entirely; the children own all\n // chrome in that mode.\n let defaultMobileHeader: React.ReactNode = null;\n if (!headerless) {\n defaultMobileHeader = shouldRenderActionsHeader ? (\n <PanelMobileActionsHeader\n title={title}\n titleId={titleId}\n actions={actions!}\n />\n ) : (\n <Drawer.Header title={title} id={titleId} />\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <Drawer\n {...rest}\n open={isPanelOpen}\n onClose={closePanel}\n direction=\"bottom\"\n closeButtonLabel={closeButtonLabel}\n zIndex={zIndex}\n snapPoints={snapPoints}\n defaultSnapPoint={defaultSnapPoint}\n snapPoint={snapPoint}\n onSnapPointChange={onSnapPointChange}\n snapToSequentialPoints={snapToSequentialPoints}\n actions={actions}\n actionsInHeader={actionsInHeader}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n {header ?? defaultMobileHeader}\n <PanelContent>{children}</PanelContent>\n {footer}\n </Drawer>\n </PanelContext.Provider>\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <PanelContainer\n {...rest}\n $isOpen={isPanelOpen}\n $direction={direction}\n $width={width}\n $gap={gap}\n data-qa-panel={id}\n data-qa-panel-isopen={isPanelOpen}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n <PanelInner $direction={direction} $width={width}>\n {header ??\n (headerless ? null : <PanelHeader title={title} id={titleId} />)}\n <PanelContent>{renderedChildren}</PanelContent>\n {footer}\n </PanelInner>\n </PanelContainer>\n </PanelContext.Provider>\n );\n};\n\nPanelComponent.Header = PanelHeader;\nPanelComponent.Content = PanelContent;\nPanelComponent.CloseButton = PanelCloseButton;\nPanelComponent.Footer = PanelFooter;\n\nexport const Panel = PanelComponent;\nexport default PanelComponent;\n","import * as React from \"react\";\nimport type { TypePanelContext } from \"./PanelTypes\";\n\nexport const PanelContext = React.createContext<TypePanelContext | null>(null);\n\nexport const usePanelContext = (): TypePanelContext => {\n const ctx = React.useContext(PanelContext);\n if (!ctx) {\n throw new Error(\n \"usePanelContext must be used within a <PanelProvider>. Wrap the consuming tree in <PanelProvider> to provide isPanelOpen / togglePanel.\"\n );\n }\n return ctx;\n};\n","import Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { usePanelContext } from \"./PanelContext\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport type { TypePanelHeaderProps } from \"./PanelTypes\";\n\nexport const PanelHeader = ({\n title = \"\",\n id = undefined,\n children,\n render,\n ...rest\n}: TypePanelHeaderProps) => {\n const panelContext = usePanelContext();\n\n if (render) {\n return render(panelContext);\n }\n\n return (\n <Box\n display=\"flex\"\n flex=\"0 0 auto\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n p={400}\n borderBottom=\"1px solid\"\n borderColor=\"container.border.base\"\n {...rest}\n >\n {children || (\n <>\n <Text.Headline id={id}>{title}</Text.Headline>\n <PanelCloseButton />\n </>\n )}\n </Box>\n );\n};\n\nPanelHeader.displayName = \"Panel.Header\";\n","import * as React from \"react\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelCloseButtonProps } from \"./PanelTypes\";\n\nexport const PanelCloseButton = (props: TypePanelCloseButtonProps) => {\n const panelContext = usePanelContext();\n\n if (props.render) {\n return props.render(panelContext) ?? null;\n }\n\n return (\n <Button\n appearance=\"pill\"\n aria-label={panelContext.closeButtonLabel}\n onClick={panelContext.closePanel}\n {...props}\n >\n {props.children || <Icon aria-hidden name=\"x-outline\" />}\n </Button>\n );\n};\n\nPanelCloseButton.displayName = \"Panel.CloseButton\";\n","import * as React from \"react\";\nimport { Content } from \"./styles\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelContentProps } from \"./PanelTypes\";\n\nexport const PanelContent = ({ children, ...rest }: TypePanelContentProps) => {\n // In headerless mode the content renders flush and defers overflow scrolling\n // to its children, so the panel can host content that owns its own chrome.\n const { headerless } = usePanelContext();\n\n return (\n <Content\n flex=\"1 1 auto\"\n minHeight=\"0\"\n p={headerless ? 0 : 450}\n $scroll={!headerless}\n color=\"text.body\"\n data-panel-content=\"\"\n {...rest}\n >\n {children}\n </Content>\n );\n};\n\nPanelContent.displayName = \"Panel.Content\";\n","import styled, { css } from \"styled-components\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeSystemCommonProps } from \"@sproutsocial/seeds-react-system-props\";\nimport { MOTION_DURATION_MEDIUM } from \"@sproutsocial/seeds-motion/unitless\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport type { PanelDirection } from \"./PanelTypes\";\n\ninterface PanelContainerProps extends TypeSystemCommonProps {\n $isOpen: boolean;\n $direction: PanelDirection;\n $width: number;\n $gap: number;\n}\n\nconst gapSide = (direction: PanelDirection): \"left\" | \"right\" | \"top\" => {\n if (direction === \"right\") return \"left\";\n if (direction === \"left\") return \"right\";\n return \"top\";\n};\n\nexport const PanelContainer = styled.aside<PanelContainerProps>`\n background: ${(props) => props.theme.colors.container.background.base};\n flex-grow: 0;\n flex-shrink: 0;\n overflow: hidden;\n transition: flex-basis ${MOTION_DURATION_MEDIUM}s ease-in-out,\n margin ${MOTION_DURATION_MEDIUM}s ease-in-out;\n flex-basis: ${(props) => (props.$isOpen ? `${props.$width}px` : \"0px\")};\n margin-${(props) => gapSide(props.$direction)}: ${(props) =>\n props.$isOpen && props.$gap ? `${props.$gap}px` : \"0px\"};\n border-radius: ${({ theme }) => theme.radii[800]};\n\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n width: 100%;\n `\n : css`\n align-self: stretch;\n `}\n\n ${COMMON}\n`;\n\nexport const PanelInner = styled.div<{\n $direction: PanelDirection;\n $width: number;\n}>`\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n min-height: ${props.$width}px;\n width: 100%;\n `\n : css`\n min-width: ${props.$width}px;\n height: 100%;\n `}\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n\nexport const Content = styled(Box)<{ $scroll?: boolean }>`\n overflow-y: ${({ $scroll = true }) => ($scroll ? \"auto\" : \"hidden\")};\n`;\n\nexport const Footer = styled(Box)`\n flex: 0 0 auto;\n overflow: hidden;\n /*\n * On mobile the Panel renders inside the Drawer's bottom sheet, whose popup\n * deliberately bleeds 3rem (--bleed) below the viewport for elastic\n * overscroll (see seeds-react-drawer/src/styles.ts). A footer pinned to the\n * end of that popup would land inside the bleed and clip below the fold, so\n * we lift it by the inherited --bleed; the gap left behind shows the popup's\n * own background, so there is no visible seam. On desktop --bleed is unset,\n * so the 0px fallback leaves the footer untouched.\n */\n margin-bottom: var(--bleed, 0px);\n`;\n","import * as React from \"react\";\nimport { Footer } from \"./styles\";\nimport type { TypePanelFooterProps } from \"./PanelTypes\";\n\nexport const PanelFooter = ({ children, ...rest }: TypePanelFooterProps) => (\n <Footer p={450} data-panel-footer=\"\" {...rest}>\n {children}\n </Footer>\n);\n\nPanelFooter.displayName = \"Panel.Footer\";\n","import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\n// eslint-disable-next-line import/no-deprecated\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport type { TypeDrawerActionProps } from \"@sproutsocial/seeds-react-drawer\";\n\ninterface TypePanelMobileActionsHeaderProps {\n title?: string;\n titleId?: string;\n actions: TypeDrawerActionProps[];\n}\n\n/**\n * Mobile bottom-sheet header used by Panel when `actionsInHeader` is set and\n * no custom `header` is provided. Renders the title on the left and the\n * forwarded actions plus a close button as pills on the right — mirrors the\n * pattern in `seeds-react-peek-in/PeekIn.tsx`. The Drawer's floating rail is\n * suppressed in this combination (`actionsInHeader` opts out), so without this\n * header the actions would render nowhere.\n */\nexport const PanelMobileActionsHeader = ({\n title,\n titleId,\n actions,\n}: TypePanelMobileActionsHeaderProps) => (\n <Drawer.Header\n render={(ctx) => (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n pt={400}\n px={450}\n flex=\"0 0 auto\"\n >\n <Text\n as=\"h2\"\n fontSize={400}\n fontWeight=\"semibold\"\n color=\"text.headline\"\n id={titleId}\n >\n {title}\n </Text>\n <Box display=\"flex\" alignItems=\"center\" gap={200}>\n {actions.map((action, i) => (\n <Button\n key={i}\n appearance=\"pill\"\n aria-label={action[\"aria-label\"]}\n onClick={action.onClick}\n disabled={action.disabled}\n >\n {action.iconName && <Icon aria-hidden name={action.iconName} />}\n </Button>\n ))}\n <Button\n appearance=\"pill\"\n aria-label={ctx.closeButtonLabel}\n onClick={ctx.onClose}\n >\n <Icon aria-hidden name=\"x-outline\" />\n </Button>\n </Box>\n </Box>\n )}\n />\n);\n\nPanelMobileActionsHeader.displayName = \"PanelMobileActionsHeader\";\n","import * as React from \"react\";\nimport { PanelContext } from \"./PanelContext\";\nimport type { TypePanelContext, TypePanelProviderProps } from \"./PanelTypes\";\n\nexport const PanelProvider = ({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n}: TypePanelProviderProps) => {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const isPanelOpen = isControlled ? controlledOpen : internalOpen;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const openPanel = React.useCallback(() => setOpen(true), [setOpen]);\n const closePanel = React.useCallback(() => setOpen(false), [setOpen]);\n const togglePanel = React.useCallback(\n () => setOpen(!isPanelOpen),\n [setOpen, isPanelOpen]\n );\n\n const value = React.useMemo<TypePanelContext>(\n () => ({ isPanelOpen, openPanel, closePanel, togglePanel }),\n [isPanelOpen, openPanel, closePanel, togglePanel]\n );\n\n return (\n <PanelContext.Provider value={value}>{children}</PanelContext.Provider>\n );\n};\n","import * as React from \"react\";\nimport type {\n TypeSystemCommonProps,\n TypeStyledComponentsCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\nimport type { TypeButtonProps } from \"@sproutsocial/seeds-react-button\";\nimport type {\n TypeDrawerSnapPoint,\n TypeDrawerActionProps,\n} from \"@sproutsocial/seeds-react-drawer\";\n\nexport type { TypeDrawerActionProps as TypePanelActionProps };\n\nexport type PanelDirection = \"left\" | \"right\" | \"bottom\";\n\nexport interface TypePanelContext {\n isPanelOpen: boolean;\n togglePanel: () => void;\n openPanel: () => void;\n closePanel: () => void;\n closeButtonLabel?: string;\n /**\n * Set by `Panel` when rendered headerless. `Panel.Content` reads this to\n * render flush (no padding) and defer overflow scrolling to its children.\n */\n headerless?: boolean;\n}\n\nexport interface TypePanelProviderProps {\n children: React.ReactNode;\n /** Initial open state for uncontrolled usage. */\n defaultOpen?: boolean;\n /** Controlled open state. When provided, the provider becomes controlled. */\n open?: boolean;\n /** Called whenever the open state changes. Required for controlled usage. */\n onOpenChange?: (open: boolean) => void;\n}\n\nexport interface TypePanelProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"div\">, \"color\"> {\n children: React.ReactNode;\n\n /** Label for the close button. Usually \"Close\". */\n closeButtonLabel: string;\n\n /**\n * Custom header content. When provided, replaces the auto-rendered default\n * header entirely — `title` and `titleId` are ignored.\n */\n header?: React.ReactNode;\n\n /** Custom footer content. Not rendered when omitted. */\n footer?: React.ReactNode;\n\n /**\n * Renders children flush, without the built-in header/close button or content\n * padding, and lets the children own overflow scrolling. Use when the content\n * provides its own chrome (e.g. an embedded agent UI). Provide `aria-label`\n * (or `aria-labelledby`) for an accessible name, since no header title is\n * rendered. `title`, `titleId`, and `closeButtonLabel` are ignored in this\n * mode. Defaults to false.\n */\n headerless?: boolean;\n\n /** Title shown in the auto-rendered default header. Ignored when `header` is provided. */\n title?: string;\n\n /**\n * Sets the `id` on the title element of the auto-rendered header. When the\n * default header is used, Panel automatically wires `aria-labelledby` to this\n * id so the dialog/aside has an accessible name. Pass an explicit\n * `aria-labelledby` to override (e.g. when pointing at a different element).\n * Ignored when `header` is provided — supply your own `aria-labelledby` in\n * that case.\n */\n titleId?: string;\n\n /** Side the panel anchors to on desktop. Defaults to \"right\". */\n direction?: PanelDirection;\n\n /**\n * Width (px) when direction is \"left\" or \"right\", or height (px) when\n * direction is \"bottom\". Defaults to 384 to match the existing web-app-core\n * Panel.\n */\n width?: number;\n\n /**\n * Visual gap (px) between the panel and the adjacent content. Applied as\n * margin on the side facing the content (left when direction=\"right\",\n * right when direction=\"left\", top when direction=\"bottom\"). Animates with\n * the panel's open/close transition and collapses to 0 when closed so the\n * gap does not remain visible alongside a zero-width panel. Defaults to 0.\n */\n gap?: number;\n\n /**\n * Forwarded to `useIsMobile`. Accepts a px number or any CSS media-query\n * length. Below this width, the panel renders as an overlay bottom sheet\n * (via seeds-react-drawer). Defaults to the theme's `breakpoints.sm`.\n */\n mobileBreakpoint?: number | string;\n\n /** Applies only to the mobile bottom-sheet rendering. */\n zIndex?: number;\n\n /** Optional id used for data-qa-panel attributes. */\n id?: string;\n\n /**\n * Snap points the panel can rest at when rendered as a mobile bottom sheet.\n * Numbers 0–1 are viewport-height fractions; numbers > 1 are pixels; strings\n * accept `px`/`rem` (e.g. `\"480px\"`, `\"30rem\"`). Order matters — the last\n * entry is the \"expanded\" state. Ignored on the desktop side-panel rendering.\n */\n snapPoints?: TypeDrawerSnapPoint[];\n\n /** Initial snap point for uncontrolled use. Mobile only. */\n defaultSnapPoint?: TypeDrawerSnapPoint | null;\n\n /** Controlled active snap point. Pair with `onSnapPointChange`. Mobile only. */\n snapPoint?: TypeDrawerSnapPoint | null;\n\n /** Fires when the active snap point changes. Mobile only. */\n onSnapPointChange?: (snapPoint: TypeDrawerSnapPoint | null) => void;\n\n /**\n * When true, fast swipes can't skip past adjacent snap points. Mobile only.\n */\n snapToSequentialPoints?: boolean;\n\n /**\n * Action buttons shown in a floating rail above the panel on mobile (the\n * bottom-sheet rendering). Ignored on desktop side-panel rendering — pass\n * actions through `header`/`footer` slots there. The rail owns the close\n * button so the default header omits its built-in close affordance.\n */\n actions?: TypeDrawerActionProps[];\n\n /**\n * Opt out of the floating mobile rail and render the `actions` inline in the\n * header as pill buttons instead. Useful for nested bottom sheets and\n * snap-point layouts where the floating rail would collide with surrounding\n * UI. Defaults to `false`.\n *\n * When `header` is omitted, Panel auto-composes a mobile header that renders\n * the title, the `actions` as pills, and a close-button pill. When `header`\n * is provided, the consumer is responsible for rendering the actions inside\n * their own header — `actions` is forwarded for context only.\n */\n actionsInHeader?: boolean;\n}\n\nexport interface TypePanelHeaderProps extends TypeBoxProps {\n title?: string;\n /**\n * When children are provided, `<Panel.CloseButton />` is NOT rendered\n * automatically. Include it yourself to preserve keyboard accessibility.\n */\n children?: React.ReactNode;\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n}\n\nexport interface TypePanelContentProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelFooterProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelCloseButtonProps\n extends Omit<TypeButtonProps, \"children\"> {\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n children?: React.ReactNode;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;AACvB,IAAAC,6BAAmB;AACnB,+BAA4B;;;ACF5B,YAAuB;AAGhB,IAAM,eAAqB,oBAAuC,IAAI;AAEtE,IAAM,kBAAkB,MAAwB;AACrD,QAAM,MAAY,iBAAW,YAAY;AACzC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;ACbA,6BAAgB;AAChB,8BAAiB;;;ACDjB,IAAAC,SAAuB;AACvB,gCAAmB;AACnB,8BAAiB;AAkBQ;AAdlB,IAAM,mBAAmB,CAAC,UAAqC;AACpE,QAAM,eAAe,gBAAgB;AAErC,MAAI,MAAM,QAAQ;AAChB,WAAO,MAAM,OAAO,YAAY,KAAK;AAAA,EACvC;AAEA,SACE;AAAA,IAAC,0BAAAC;AAAA,IAAA;AAAA,MACC,YAAW;AAAA,MACX,cAAY,aAAa;AAAA,MACzB,SAAS,aAAa;AAAA,MACrB,GAAG;AAAA,MAEH,gBAAM,YAAY,4CAAC,wBAAAC,SAAA,EAAK,eAAW,MAAC,MAAK,aAAY;AAAA;AAAA,EACxD;AAEJ;AAEA,iBAAiB,cAAc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YAAY,YAAY;AAAA,IACzD,CAAC,aAAa,WAAW,YAAY,WAAW;AAAA,EAClD;AAEA,SACE,6CAAC,aAAa,UAAb,EAAsB,OAAe,UAAS;AAEnD;;;ACrCA,IAAAC,SAAuB;;;AVEvB,IAAO,gBAAQ;","names":["React","import_seeds_react_drawer","React","Button","Icon","import_jsx_runtime","Box","Text","React","import_seeds_react_box","styled","Box","import_jsx_runtime","React","import_jsx_runtime","React","import_seeds_react_box","import_seeds_react_button","import_seeds_react_icon","import_seeds_react_text","import_jsx_runtime","Drawer","Box","Text","Button","Icon","import_jsx_runtime","Drawer","React","import_jsx_runtime","React"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/Panel.tsx","../src/PanelContext.tsx","../src/PanelHeader.tsx","../src/PanelCloseButton.tsx","../src/PanelContent.tsx","../src/styles.ts","../src/PanelFooter.tsx","../src/PanelMobileActionsHeader.tsx","../src/PanelProvider.tsx","../src/PanelTypes.ts"],"sourcesContent":["import Panel from \"./Panel\";\n\nexport default Panel;\nexport { Panel };\nexport { PanelContext, usePanelContext } from \"./PanelContext\";\nexport { PanelProvider } from \"./PanelProvider\";\nexport { PanelHeader } from \"./PanelHeader\";\nexport { PanelContent } from \"./PanelContent\";\nexport { PanelCloseButton } from \"./PanelCloseButton\";\nexport { PanelFooter } from \"./PanelFooter\";\nexport * from \"./PanelTypes\";\n","import * as React from \"react\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport { useIsMobile } from \"@sproutsocial/seeds-react-hooks\";\nimport { usePanelContext, PanelContext } from \"./PanelContext\";\nimport { PanelHeader } from \"./PanelHeader\";\nimport { PanelContent } from \"./PanelContent\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport { PanelFooter } from \"./PanelFooter\";\nimport { PanelMobileActionsHeader } from \"./PanelMobileActionsHeader\";\nimport { PanelContainer, PanelInner } from \"./styles\";\nimport type { TypePanelProps, TypePanelContext } from \"./PanelTypes\";\n\nconst PanelComponent = ({\n children,\n closeButtonLabel,\n header,\n headerless = false,\n footer,\n title,\n titleId,\n direction = \"right\",\n width = 384,\n gap = 4,\n mobileBreakpoint,\n zIndex,\n id,\n snapPoints,\n defaultSnapPoint,\n snapPoint,\n onSnapPointChange,\n snapToSequentialPoints,\n actions,\n actionsInHeader,\n \"aria-labelledby\": ariaLabelledByProp,\n \"aria-label\": ariaLabel,\n ...rest\n}: TypePanelProps) => {\n const panelContext = usePanelContext();\n const { isPanelOpen, closePanel } = panelContext;\n const isMobile = useIsMobile(mobileBreakpoint);\n\n // Expose closeButtonLabel through context so PanelCloseButton can read it\n // without prop drilling — same pattern as DrawerContext.\n const enrichedValue = React.useMemo<TypePanelContext>(\n () => ({ ...panelContext, closeButtonLabel, headerless }),\n [panelContext, closeButtonLabel, headerless]\n );\n\n // Freeze the last-rendered children during the collapse so consumers that\n // conditionally render content don't produce an empty panel shell while the\n // flex-basis animation runs.\n const prevChildrenRef = React.useRef<React.ReactNode>(null);\n if (isPanelOpen) {\n prevChildrenRef.current = children;\n }\n const renderedChildren = isPanelOpen ? children : prevChildrenRef.current;\n\n // When the consumer relies on the default header, its title element renders\n // with `id={titleId}`. Auto-wire `aria-labelledby` so the dialog/aside has an\n // accessible name without forcing every caller to repeat the id.\n const effectiveAriaLabelledBy =\n ariaLabelledByProp ?? (!headerless && header == null ? titleId : undefined);\n\n if (isMobile) {\n // With `actionsInHeader`, Drawer suppresses the floating rail and expects\n // the consumer to render the actions inside a custom header. Auto-compose\n // one (title + action pills + close pill) when the consumer hasn't\n // supplied their own header; otherwise we'd drop `actions` on the floor.\n const shouldRenderActionsHeader =\n !headerless &&\n header == null &&\n actionsInHeader === true &&\n !!actions &&\n actions.length > 0;\n\n // Headerless suppresses the built-in header entirely; the children own all\n // chrome in that mode.\n let defaultMobileHeader: React.ReactNode = null;\n if (!headerless) {\n defaultMobileHeader = shouldRenderActionsHeader ? (\n <PanelMobileActionsHeader\n title={title}\n titleId={titleId}\n actions={actions!}\n />\n ) : (\n <Drawer.Header title={title} id={titleId} />\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <Drawer\n {...rest}\n open={isPanelOpen}\n onClose={closePanel}\n direction=\"bottom\"\n closeButtonLabel={closeButtonLabel}\n zIndex={zIndex}\n snapPoints={snapPoints}\n defaultSnapPoint={defaultSnapPoint}\n snapPoint={snapPoint}\n onSnapPointChange={onSnapPointChange}\n snapToSequentialPoints={snapToSequentialPoints}\n actions={actions}\n actionsInHeader={actionsInHeader}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n {header ?? defaultMobileHeader}\n <PanelContent>{children}</PanelContent>\n {footer}\n </Drawer>\n </PanelContext.Provider>\n );\n }\n\n return (\n <PanelContext.Provider value={enrichedValue}>\n <PanelContainer\n {...rest}\n $isOpen={isPanelOpen}\n $direction={direction}\n $width={width}\n $gap={gap}\n data-qa-panel={id}\n data-qa-panel-isopen={isPanelOpen}\n aria-labelledby={effectiveAriaLabelledBy}\n aria-label={ariaLabel}\n >\n <PanelInner $direction={direction} $width={width}>\n {header ??\n (headerless ? null : <PanelHeader title={title} id={titleId} />)}\n <PanelContent>{renderedChildren}</PanelContent>\n {footer}\n </PanelInner>\n </PanelContainer>\n </PanelContext.Provider>\n );\n};\n\nPanelComponent.Header = PanelHeader;\nPanelComponent.Content = PanelContent;\nPanelComponent.CloseButton = PanelCloseButton;\nPanelComponent.Footer = PanelFooter;\n\nexport const Panel = PanelComponent;\nexport default PanelComponent;\n","import * as React from \"react\";\nimport type { TypePanelContext } from \"./PanelTypes\";\n\nexport const PanelContext = React.createContext<TypePanelContext | null>(null);\n\nexport const usePanelContext = (): TypePanelContext => {\n const ctx = React.useContext(PanelContext);\n if (!ctx) {\n throw new Error(\n \"usePanelContext must be used within a <PanelProvider>. Wrap the consuming tree in <PanelProvider> to provide isPanelOpen / togglePanel.\"\n );\n }\n return ctx;\n};\n","import Box from \"@sproutsocial/seeds-react-box\";\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport { usePanelContext } from \"./PanelContext\";\nimport { PanelCloseButton } from \"./PanelCloseButton\";\nimport type { TypePanelHeaderProps } from \"./PanelTypes\";\n\nexport const PanelHeader = ({\n title = \"\",\n id = undefined,\n children,\n render,\n ...rest\n}: TypePanelHeaderProps) => {\n const panelContext = usePanelContext();\n\n if (render) {\n return render(panelContext);\n }\n\n return (\n <Box\n display=\"flex\"\n flex=\"0 0 auto\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n p={400}\n borderBottom=\"1px solid\"\n borderColor=\"container.border.base\"\n {...rest}\n >\n {children || (\n <>\n <Text.Headline id={id}>{title}</Text.Headline>\n <PanelCloseButton />\n </>\n )}\n </Box>\n );\n};\n\nPanelHeader.displayName = \"Panel.Header\";\n","import * as React from \"react\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelCloseButtonProps } from \"./PanelTypes\";\n\nexport const PanelCloseButton = (props: TypePanelCloseButtonProps) => {\n const panelContext = usePanelContext();\n\n if (props.render) {\n return props.render(panelContext) ?? null;\n }\n\n return (\n <Button\n appearance=\"pill\"\n aria-label={panelContext.closeButtonLabel}\n onClick={panelContext.closePanel}\n {...props}\n >\n {props.children || <Icon aria-hidden name=\"x-outline\" />}\n </Button>\n );\n};\n\nPanelCloseButton.displayName = \"Panel.CloseButton\";\n","import * as React from \"react\";\nimport { Content } from \"./styles\";\nimport { usePanelContext } from \"./PanelContext\";\nimport type { TypePanelContentProps } from \"./PanelTypes\";\n\nexport const PanelContent = ({ children, ...rest }: TypePanelContentProps) => {\n // In headerless mode the content renders flush as a flex column and defers\n // overflow scrolling to its children, so the panel can host content that\n // owns its own chrome and fills the panel height (e.g. via flex: 1 1 auto).\n const { headerless } = usePanelContext();\n\n return (\n <Content\n flex=\"1 1 auto\"\n minHeight=\"0\"\n p={headerless ? 0 : 450}\n $scroll={!headerless}\n color=\"text.body\"\n data-panel-content=\"\"\n {...rest}\n >\n {children}\n </Content>\n );\n};\n\nPanelContent.displayName = \"Panel.Content\";\n","import styled, { css } from \"styled-components\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeSystemCommonProps } from \"@sproutsocial/seeds-react-system-props\";\nimport { MOTION_DURATION_MEDIUM } from \"@sproutsocial/seeds-motion/unitless\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport type { PanelDirection } from \"./PanelTypes\";\n\ninterface PanelContainerProps extends TypeSystemCommonProps {\n $isOpen: boolean;\n $direction: PanelDirection;\n $width: number;\n $gap: number;\n}\n\nconst gapSide = (direction: PanelDirection): \"left\" | \"right\" | \"top\" => {\n if (direction === \"right\") return \"left\";\n if (direction === \"left\") return \"right\";\n return \"top\";\n};\n\nexport const PanelContainer = styled.aside<PanelContainerProps>`\n background: ${(props) => props.theme.colors.container.background.base};\n flex-grow: 0;\n flex-shrink: 0;\n overflow: hidden;\n transition: flex-basis ${MOTION_DURATION_MEDIUM}s ease-in-out,\n margin ${MOTION_DURATION_MEDIUM}s ease-in-out;\n flex-basis: ${(props) => (props.$isOpen ? `${props.$width}px` : \"0px\")};\n margin-${(props) => gapSide(props.$direction)}: ${(props) =>\n props.$isOpen && props.$gap ? `${props.$gap}px` : \"0px\"};\n border-radius: ${({ theme }) => theme.radii[800]};\n\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n width: 100%;\n `\n : css`\n align-self: stretch;\n `}\n\n ${COMMON}\n`;\n\nexport const PanelInner = styled.div<{\n $direction: PanelDirection;\n $width: number;\n}>`\n ${(props) =>\n props.$direction === \"bottom\"\n ? css`\n min-height: ${props.$width}px;\n width: 100%;\n `\n : css`\n min-width: ${props.$width}px;\n height: 100%;\n `}\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n\nexport const Content = styled(Box)<{ $scroll?: boolean }>`\n overflow-y: ${({ $scroll = true }) => ($scroll ? \"auto\" : \"hidden\")};\n /*\n * When content owns its own scrolling ($scroll false, i.e. headerless), lay\n * out as a flex column so a child can flex to the panel's full height —\n * percentage heights can't resolve against a block container here.\n */\n ${({ $scroll = true }) =>\n !$scroll &&\n css`\n display: flex;\n flex-direction: column;\n `}\n`;\n\nexport const Footer = styled(Box)`\n flex: 0 0 auto;\n overflow: hidden;\n /*\n * On mobile the Panel renders inside the Drawer's bottom sheet, whose popup\n * deliberately bleeds 3rem (--bleed) below the viewport for elastic\n * overscroll (see seeds-react-drawer/src/styles.ts). A footer pinned to the\n * end of that popup would land inside the bleed and clip below the fold, so\n * we lift it by the inherited --bleed; the gap left behind shows the popup's\n * own background, so there is no visible seam. On desktop --bleed is unset,\n * so the 0px fallback leaves the footer untouched.\n */\n margin-bottom: var(--bleed, 0px);\n`;\n","import * as React from \"react\";\nimport { Footer } from \"./styles\";\nimport type { TypePanelFooterProps } from \"./PanelTypes\";\n\nexport const PanelFooter = ({ children, ...rest }: TypePanelFooterProps) => (\n <Footer p={450} data-panel-footer=\"\" {...rest}>\n {children}\n </Footer>\n);\n\nPanelFooter.displayName = \"Panel.Footer\";\n","import * as React from \"react\";\nimport Box from \"@sproutsocial/seeds-react-box\";\nimport Button from \"@sproutsocial/seeds-react-button\";\nimport Drawer from \"@sproutsocial/seeds-react-drawer\";\nimport Icon from \"@sproutsocial/seeds-react-icon\";\n// eslint-disable-next-line import/no-deprecated\nimport Text from \"@sproutsocial/seeds-react-text\";\nimport type { TypeDrawerActionProps } from \"@sproutsocial/seeds-react-drawer\";\n\ninterface TypePanelMobileActionsHeaderProps {\n title?: string;\n titleId?: string;\n actions: TypeDrawerActionProps[];\n}\n\n/**\n * Mobile bottom-sheet header used by Panel when `actionsInHeader` is set and\n * no custom `header` is provided. Renders the title on the left and the\n * forwarded actions plus a close button as pills on the right — mirrors the\n * pattern in `seeds-react-peek-in/PeekIn.tsx`. The Drawer's floating rail is\n * suppressed in this combination (`actionsInHeader` opts out), so without this\n * header the actions would render nowhere.\n */\nexport const PanelMobileActionsHeader = ({\n title,\n titleId,\n actions,\n}: TypePanelMobileActionsHeaderProps) => (\n <Drawer.Header\n render={(ctx) => (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n pt={400}\n px={450}\n flex=\"0 0 auto\"\n >\n <Text\n as=\"h2\"\n fontSize={400}\n fontWeight=\"semibold\"\n color=\"text.headline\"\n id={titleId}\n >\n {title}\n </Text>\n <Box display=\"flex\" alignItems=\"center\" gap={200}>\n {actions.map((action, i) => (\n <Button\n key={i}\n appearance=\"pill\"\n aria-label={action[\"aria-label\"]}\n onClick={action.onClick}\n disabled={action.disabled}\n >\n {action.iconName && <Icon aria-hidden name={action.iconName} />}\n </Button>\n ))}\n <Button\n appearance=\"pill\"\n aria-label={ctx.closeButtonLabel}\n onClick={ctx.onClose}\n >\n <Icon aria-hidden name=\"x-outline\" />\n </Button>\n </Box>\n </Box>\n )}\n />\n);\n\nPanelMobileActionsHeader.displayName = \"PanelMobileActionsHeader\";\n","import * as React from \"react\";\nimport { PanelContext } from \"./PanelContext\";\nimport type { TypePanelContext, TypePanelProviderProps } from \"./PanelTypes\";\n\nexport const PanelProvider = ({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n}: TypePanelProviderProps) => {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const isPanelOpen = isControlled ? controlledOpen : internalOpen;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const openPanel = React.useCallback(() => setOpen(true), [setOpen]);\n const closePanel = React.useCallback(() => setOpen(false), [setOpen]);\n const togglePanel = React.useCallback(\n () => setOpen(!isPanelOpen),\n [setOpen, isPanelOpen]\n );\n\n const value = React.useMemo<TypePanelContext>(\n () => ({ isPanelOpen, openPanel, closePanel, togglePanel }),\n [isPanelOpen, openPanel, closePanel, togglePanel]\n );\n\n return (\n <PanelContext.Provider value={value}>{children}</PanelContext.Provider>\n );\n};\n","import * as React from \"react\";\nimport type {\n TypeSystemCommonProps,\n TypeStyledComponentsCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\nimport type { TypeButtonProps } from \"@sproutsocial/seeds-react-button\";\nimport type {\n TypeDrawerSnapPoint,\n TypeDrawerActionProps,\n} from \"@sproutsocial/seeds-react-drawer\";\n\nexport type { TypeDrawerActionProps as TypePanelActionProps };\n\nexport type PanelDirection = \"left\" | \"right\" | \"bottom\";\n\nexport interface TypePanelContext {\n isPanelOpen: boolean;\n togglePanel: () => void;\n openPanel: () => void;\n closePanel: () => void;\n closeButtonLabel?: string;\n /**\n * Set by `Panel` when rendered headerless. `Panel.Content` reads this to\n * render flush (no padding) and defer overflow scrolling to its children.\n */\n headerless?: boolean;\n}\n\nexport interface TypePanelProviderProps {\n children: React.ReactNode;\n /** Initial open state for uncontrolled usage. */\n defaultOpen?: boolean;\n /** Controlled open state. When provided, the provider becomes controlled. */\n open?: boolean;\n /** Called whenever the open state changes. Required for controlled usage. */\n onOpenChange?: (open: boolean) => void;\n}\n\nexport interface TypePanelProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"div\">, \"color\"> {\n children: React.ReactNode;\n\n /** Label for the close button. Usually \"Close\". */\n closeButtonLabel: string;\n\n /**\n * Custom header content. When provided, replaces the auto-rendered default\n * header entirely — `title` and `titleId` are ignored.\n */\n header?: React.ReactNode;\n\n /** Custom footer content. Not rendered when omitted. */\n footer?: React.ReactNode;\n\n /**\n * Renders children flush, without the built-in header/close button or content\n * padding, and lets the children own overflow scrolling. Use when the content\n * provides its own chrome (e.g. an embedded agent UI). Provide `aria-label`\n * (or `aria-labelledby`) for an accessible name, since no header title is\n * rendered. `title`, `titleId`, and `closeButtonLabel` are ignored in this\n * mode. Defaults to false.\n */\n headerless?: boolean;\n\n /** Title shown in the auto-rendered default header. Ignored when `header` is provided. */\n title?: string;\n\n /**\n * Sets the `id` on the title element of the auto-rendered header. When the\n * default header is used, Panel automatically wires `aria-labelledby` to this\n * id so the dialog/aside has an accessible name. Pass an explicit\n * `aria-labelledby` to override (e.g. when pointing at a different element).\n * Ignored when `header` is provided — supply your own `aria-labelledby` in\n * that case.\n */\n titleId?: string;\n\n /** Side the panel anchors to on desktop. Defaults to \"right\". */\n direction?: PanelDirection;\n\n /**\n * Width (px) when direction is \"left\" or \"right\", or height (px) when\n * direction is \"bottom\". Defaults to 384 to match the existing web-app-core\n * Panel.\n */\n width?: number;\n\n /**\n * Visual gap (px) between the panel and the adjacent content. Applied as\n * margin on the side facing the content (left when direction=\"right\",\n * right when direction=\"left\", top when direction=\"bottom\"). Animates with\n * the panel's open/close transition and collapses to 0 when closed so the\n * gap does not remain visible alongside a zero-width panel. Defaults to 0.\n */\n gap?: number;\n\n /**\n * Forwarded to `useIsMobile`. Accepts a px number or any CSS media-query\n * length. Below this width, the panel renders as an overlay bottom sheet\n * (via seeds-react-drawer). Defaults to the theme's `breakpoints.sm`.\n */\n mobileBreakpoint?: number | string;\n\n /** Applies only to the mobile bottom-sheet rendering. */\n zIndex?: number;\n\n /** Optional id used for data-qa-panel attributes. */\n id?: string;\n\n /**\n * Snap points the panel can rest at when rendered as a mobile bottom sheet.\n * Numbers 0–1 are viewport-height fractions; numbers > 1 are pixels; strings\n * accept `px`/`rem` (e.g. `\"480px\"`, `\"30rem\"`). Order matters — the last\n * entry is the \"expanded\" state. Ignored on the desktop side-panel rendering.\n */\n snapPoints?: TypeDrawerSnapPoint[];\n\n /** Initial snap point for uncontrolled use. Mobile only. */\n defaultSnapPoint?: TypeDrawerSnapPoint | null;\n\n /** Controlled active snap point. Pair with `onSnapPointChange`. Mobile only. */\n snapPoint?: TypeDrawerSnapPoint | null;\n\n /** Fires when the active snap point changes. Mobile only. */\n onSnapPointChange?: (snapPoint: TypeDrawerSnapPoint | null) => void;\n\n /**\n * When true, fast swipes can't skip past adjacent snap points. Mobile only.\n */\n snapToSequentialPoints?: boolean;\n\n /**\n * Action buttons shown in a floating rail above the panel on mobile (the\n * bottom-sheet rendering). Ignored on desktop side-panel rendering — pass\n * actions through `header`/`footer` slots there. The rail owns the close\n * button so the default header omits its built-in close affordance.\n */\n actions?: TypeDrawerActionProps[];\n\n /**\n * Opt out of the floating mobile rail and render the `actions` inline in the\n * header as pill buttons instead. Useful for nested bottom sheets and\n * snap-point layouts where the floating rail would collide with surrounding\n * UI. Defaults to `false`.\n *\n * When `header` is omitted, Panel auto-composes a mobile header that renders\n * the title, the `actions` as pills, and a close-button pill. When `header`\n * is provided, the consumer is responsible for rendering the actions inside\n * their own header — `actions` is forwarded for context only.\n */\n actionsInHeader?: boolean;\n}\n\nexport interface TypePanelHeaderProps extends TypeBoxProps {\n title?: string;\n /**\n * When children are provided, `<Panel.CloseButton />` is NOT rendered\n * automatically. Include it yourself to preserve keyboard accessibility.\n */\n children?: React.ReactNode;\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n}\n\nexport interface TypePanelContentProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelFooterProps extends TypeBoxProps {\n children?: React.ReactNode;\n}\n\nexport interface TypePanelCloseButtonProps\n extends Omit<TypeButtonProps, \"children\"> {\n /** Render-prop override that receives the parent panel context. */\n render?: React.FC<TypePanelContext>;\n children?: React.ReactNode;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;AACvB,IAAAC,6BAAmB;AACnB,+BAA4B;;;ACF5B,YAAuB;AAGhB,IAAM,eAAqB,oBAAuC,IAAI;AAEtE,IAAM,kBAAkB,MAAwB;AACrD,QAAM,MAAY,iBAAW,YAAY;AACzC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA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Ac;AAAA,EACd,MAAM;AAAA,EACN;AACF,MAA8B;AAC5B,QAAM,CAAC,cAAc,eAAe,IAAU,gBAAS,WAAW;AAClE,QAAM,eAAe,mBAAmB;AACxC,QAAM,cAAc,eAAe,iBAAiB;AAEpD,QAAM,UAAgB;AAAA,IACpB,CAAC,SAAkB;AACjB,UAAI,CAAC,aAAc,iBAAgB,IAAI;AACvC,qBAAe,IAAI;AAAA,IACrB;AAAA,IACA,CAAC,cAAc,YAAY;AAAA,EAC7B;AAEA,QAAM,YAAkB,mBAAY,MAAM,QAAQ,IAAI,GAAG,CAAC,OAAO,CAAC;AAClE,QAAM,aAAmB,mBAAY,MAAM,QAAQ,KAAK,GAAG,CAAC,OAAO,CAAC;AACpE,QAAM,cAAoB;AAAA,IACxB,MAAM,QAAQ,CAAC,WAAW;AAAA,IAC1B,CAAC,SAAS,WAAW;AAAA,EACvB;AAEA,QAAM,QAAc;AAAA,IAClB,OAAO,EAAE,aAAa,WAAW,YAAY,YAAY;AAAA,IACzD,CAAC,aAAa,WAAW,YAAY,WAAW;AAAA,EAClD;AAEA,SACE,6CAAC,aAAa,UAAb,EAAsB,OAAe,UAAS;AAEnD;;;ACrCA,IAAAC,SAAuB;;;AVEvB,IAAO,gBAAQ;","names":["React","import_seeds_react_drawer","React","Button","Icon","import_jsx_runtime","Box","Text","React","import_seeds_react_box","styled","Box","import_jsx_runtime","React","import_jsx_runtime","React","import_seeds_react_box","import_seeds_react_button","import_seeds_react_icon","import_seeds_react_text","import_jsx_runtime","Drawer","Box","Text","Button","Icon","import_jsx_runtime","Drawer","React","import_jsx_runtime","React"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/seeds-react-panel",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Seeds React Panel",
5
5
  "author": "Sprout Social, Inc.",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  "@sproutsocial/seeds-react-theme": "^4.3.1",
22
22
  "@sproutsocial/seeds-react-system-props": "^3.1.3",
23
23
  "@sproutsocial/seeds-react-box": "^1.1.27",
24
- "@sproutsocial/seeds-react-button": "^2.3.1",
24
+ "@sproutsocial/seeds-react-button": "^2.3.2",
25
25
  "@sproutsocial/seeds-react-icon": "^2.4.6",
26
26
  "@sproutsocial/seeds-react-text": "^1.5.2",
27
27
  "@sproutsocial/seeds-motion": "^1.8.2",
@@ -4,8 +4,9 @@ import { usePanelContext } from "./PanelContext";
4
4
  import type { TypePanelContentProps } from "./PanelTypes";
5
5
 
6
6
  export const PanelContent = ({ children, ...rest }: TypePanelContentProps) => {
7
- // In headerless mode the content renders flush and defers overflow scrolling
8
- // to its children, so the panel can host content that owns its own chrome.
7
+ // In headerless mode the content renders flush as a flex column and defers
8
+ // overflow scrolling to its children, so the panel can host content that
9
+ // owns its own chrome and fills the panel height (e.g. via flex: 1 1 auto).
9
10
  const { headerless } = usePanelContext();
10
11
 
11
12
  return (
@@ -152,6 +152,17 @@ describe("Panel (desktop / inline mode)", () => {
152
152
  ).toBeInTheDocument();
153
153
  });
154
154
 
155
+ it("lays Panel.Content out as a flex column so children can fill the panel height", () => {
156
+ renderPanel({ defaultOpen: true, headerless: true });
157
+
158
+ const content = screen
159
+ .getByText(/panel content/i)
160
+ .closest("[data-panel-content]");
161
+ expect(content).toHaveStyle("display: flex");
162
+ expect(content).toHaveStyle("flex-direction: column");
163
+ expect(content).toHaveStyle("overflow-y: hidden");
164
+ });
165
+
155
166
  it("still opens and closes via context", async () => {
156
167
  const { user } = renderPanel({ defaultOpen: false, headerless: true });
157
168
  const panel = screen.getByRole("complementary");
package/src/styles.ts CHANGED
@@ -63,6 +63,17 @@ export const PanelInner = styled.div<{
63
63
 
64
64
  export const Content = styled(Box)<{ $scroll?: boolean }>`
65
65
  overflow-y: ${({ $scroll = true }) => ($scroll ? "auto" : "hidden")};
66
+ /*
67
+ * When content owns its own scrolling ($scroll false, i.e. headerless), lay
68
+ * out as a flex column so a child can flex to the panel's full height —
69
+ * percentage heights can't resolve against a block container here.
70
+ */
71
+ ${({ $scroll = true }) =>
72
+ !$scroll &&
73
+ css`
74
+ display: flex;
75
+ flex-direction: column;
76
+ `}
66
77
  `;
67
78
 
68
79
  export const Footer = styled(Box)`