@bitrise/bitkit-v2 0.3.546 → 0.3.548

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.
Files changed (68) hide show
  1. package/AGENTS.md +2 -1
  2. package/dist/components/BitkitActionBar/BitkitActionBar.js +2 -1
  3. package/dist/components/BitkitActionBar/BitkitActionBar.js.map +1 -1
  4. package/dist/components/BitkitButton/BitkitButton.js +7 -2
  5. package/dist/components/BitkitButton/BitkitButton.js.map +1 -1
  6. package/dist/components/BitkitCalendar/BitkitCalendar.js +3 -2
  7. package/dist/components/BitkitCalendar/BitkitCalendar.js.map +1 -1
  8. package/dist/components/BitkitContentWrapper/BitkitContentWrapperStickyBar.d.ts +1 -1
  9. package/dist/components/BitkitContentWrapper/BitkitContentWrapperStickyBar.js.map +1 -1
  10. package/dist/components/BitkitDialog/DialogShell.js +2 -1
  11. package/dist/components/BitkitDialog/DialogShell.js.map +1 -1
  12. package/dist/components/BitkitDrawer/BitkitDrawer.js +5 -1
  13. package/dist/components/BitkitDrawer/BitkitDrawer.js.map +1 -1
  14. package/dist/components/BitkitIconButton/BitkitIconButton.js +7 -2
  15. package/dist/components/BitkitIconButton/BitkitIconButton.js.map +1 -1
  16. package/dist/components/BitkitLightbox/BitkitLightbox.js +2 -1
  17. package/dist/components/BitkitLightbox/BitkitLightbox.js.map +1 -1
  18. package/dist/components/BitkitPageHeader/BitkitPageHeader.d.ts +27 -23
  19. package/dist/components/BitkitPageHeader/BitkitPageHeader.js +42 -9
  20. package/dist/components/BitkitPageHeader/BitkitPageHeader.js.map +1 -1
  21. package/dist/components/BitkitPageHeader/pageHeaderBottom.d.ts +18 -0
  22. package/dist/components/BitkitPageHeader/pageHeaderBottom.js +21 -0
  23. package/dist/components/BitkitPageHeader/pageHeaderBottom.js.map +1 -0
  24. package/dist/components/BitkitPageHeader/usePageHeaderBottom.d.ts +7 -0
  25. package/dist/components/BitkitPageHeader/usePageHeaderBottom.js +38 -0
  26. package/dist/components/BitkitPageHeader/usePageHeaderBottom.js.map +1 -0
  27. package/dist/components/BitkitPageHeader/useSelfSticky.d.ts +16 -0
  28. package/dist/components/BitkitPageHeader/useSelfSticky.js +76 -0
  29. package/dist/components/BitkitPageHeader/useSelfSticky.js.map +1 -0
  30. package/dist/components/BitkitPageSidebar/BitkitPageSidebar.d.ts +6 -0
  31. package/dist/components/BitkitPageSidebar/BitkitPageSidebar.js +5 -2
  32. package/dist/components/BitkitPageSidebar/BitkitPageSidebar.js.map +1 -1
  33. package/dist/components/BitkitPopover/BitkitPopover.js +3 -2
  34. package/dist/components/BitkitPopover/BitkitPopover.js.map +1 -1
  35. package/dist/components/BitkitSplitButton/BitkitSplitButton.js +4 -1
  36. package/dist/components/BitkitSplitButton/BitkitSplitButton.js.map +1 -1
  37. package/dist/components/BitkitToggleButton/BitkitToggleButton.js +4 -1
  38. package/dist/components/BitkitToggleButton/BitkitToggleButton.js.map +1 -1
  39. package/dist/components/BitkitUIHeader/BitkitUIHeader.d.ts +1 -0
  40. package/dist/components/BitkitUIHeader/BitkitUIHeader.js +2 -1
  41. package/dist/components/BitkitUIHeader/BitkitUIHeader.js.map +1 -1
  42. package/dist/components/BitkitUIHeader/usePublishedBottom.d.ts +1 -0
  43. package/dist/components/BitkitUIHeader/usePublishedBottom.js +1 -1
  44. package/dist/components/BitkitUIHeader/usePublishedBottom.js.map +1 -1
  45. package/dist/components/BitkitUIHeader/useUiHeaderBottom.d.ts +6 -0
  46. package/dist/components/BitkitUIHeader/useUiHeaderBottom.js +29 -0
  47. package/dist/components/BitkitUIHeader/useUiHeaderBottom.js.map +1 -0
  48. package/dist/components/index.d.ts +2 -2
  49. package/dist/main.js +5 -2
  50. package/dist/theme/global-css.js +6 -0
  51. package/dist/theme/global-css.js.map +1 -1
  52. package/dist/theme/slot-recipes/Breadcrumb.recipe.js +5 -1
  53. package/dist/theme/slot-recipes/Breadcrumb.recipe.js.map +1 -1
  54. package/dist/theme/slot-recipes/PageHeader.recipe.js.map +1 -1
  55. package/dist/theme/slot-recipes/PageSidebar.recipe.d.ts +32 -0
  56. package/dist/theme/slot-recipes/PageSidebar.recipe.js +30 -0
  57. package/dist/theme/slot-recipes/PageSidebar.recipe.js.map +1 -1
  58. package/dist/theme/slot-recipes/index.d.ts +25 -0
  59. package/dist/theme/tokens/index.d.ts +3 -0
  60. package/dist/theme/tokens/keyframes.js +5 -0
  61. package/dist/theme/tokens/keyframes.js.map +1 -1
  62. package/dist/theme/tokens/zIndex.d.ts +3 -0
  63. package/dist/theme/tokens/zIndex.js +1 -0
  64. package/dist/theme/tokens/zIndex.js.map +1 -1
  65. package/dist/utilities/ControlSizeContext.d.ts +15 -0
  66. package/dist/utilities/ControlSizeContext.js +20 -0
  67. package/dist/utilities/ControlSizeContext.js.map +1 -0
  68. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitPageSidebar.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitPageSidebar/BitkitPageSidebar.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { Drawer } from '@chakra-ui/react/drawer';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Separator, type SeparatorProps } from '@chakra-ui/react/separator';\nimport { chakra, type HTMLChakraProps, useChakraContext, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type KeyboardEvent, type MouseEvent, type ReactNode, type Ref } from 'react';\n\nimport useResponsive from '../../hooks/useResponsive';\nimport { type BitkitIconComponent } from '../../icons';\nimport IconChevronLeft from '../../icons/IconChevronLeft';\nimport { type BitkitColorToken } from '../../theme/themeUtils';\nimport focusableDisabledProps from '../../utilities/focusableDisabledProps';\nimport useIsTruncated from '../../utilities/useIsTruncated';\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\nimport BitkitControlButton from '../BitkitControlButton/BitkitControlButton';\nimport BitkitGroupHeading, { type BitkitGroupHeadingProps } from '../BitkitGroupHeading/BitkitGroupHeading';\nimport BitkitOverflowTooltip from '../BitkitOverflowTooltip/BitkitOverflowTooltip';\nimport BitkitTooltip from '../BitkitTooltip/BitkitTooltip';\nimport pageSidebarPart from './pageSidebarPart';\n\n// The 16 and 24 icons are separate drawings, not one scaled to two sizes, so the breakpoint swap\n// cannot live in the recipe — both are rendered and one is hidden. A `useBreakpointValue` would\n// render a single icon, but it only re-reads on mount: resize a live page across `tablet` and the\n// row resizes underneath an icon that keeps its old size.\nconst showAtDesktop = { display: { base: 'none', tablet: 'block' } };\nconst showAtMobile = { display: { base: 'block', tablet: 'none' } };\n\n// ----- BitkitPageSidebar (Root) -----\n\nexport interface BitkitPageSidebarProps extends BoxProps {\n children: ReactNode;\n /**\n * Header of the mobile drawer panel, naming what the navigation belongs to — pass a\n * `BitkitPageSidebar.DrawerHeader`. Only rendered in drawer mode.\n */\n drawerHeader?: ReactNode;\n /**\n * Mobile drawer visibility. Controlled, because the page header's menu button is what opens it.\n * Passing `onOpenChange` is what opts the sidebar into the drawer below `tablet`; without it the\n * sidebar stays in the flow at full width there. Both are ignored from `tablet` up.\n *\n * Style props and `css` apply to the sidebar beside the page only — the drawer panel sizes\n * itself, so a desktop `width` or padding never reaches the navigation inside it.\n */\n onOpenChange?: (open: boolean) => void;\n open?: boolean;\n}\n\n/**\n * Page-level navigation sidebar. It expects three children, in this order:\n *\n * ```tsx\n * <BitkitPageSidebar>\n * <BitkitPageSidebar.Title>Title</BitkitPageSidebar.Title>\n * <BitkitPageSidebar.Body>\n * <BitkitPageSidebar.Item icon={IconWorkflow}>Workflows</BitkitPageSidebar.Item>\n * </BitkitPageSidebar.Body>\n * <BitkitPageSidebar.Footer>…</BitkitPageSidebar.Footer>\n * </BitkitPageSidebar>\n * ```\n *\n * `Title` and `Footer` are optional. The sidebar scrolls as a single block: when the navigation is\n * taller than the viewport the whole thing — footer included — grows and scrolls with the page,\n * which is why `Body` keeps a minimum gap above the footer so the two blocks never touch.\n *\n * A `Section` between `Body` and `Footer` changes that: the section takes the space left under the\n * navigation and scrolls on its own, and `Body` scrolls too once the section is down to its\n * `minHeight`. See `BitkitPageSidebar.Section`.\n *\n * The `<nav>` carries a default `aria-label` so it is not announced as an unnamed landmark. A page\n * with more than one sidebar should name each one — pass your own `aria-label` (or\n * `aria-labelledby`), which overrides the default.\n *\n * It stands at least viewport-tall by default. An embedded panel that should size to its content\n * opts out with `minHeight=\"auto\"`.\n *\n * Below the `tablet` breakpoint it switches to the mobile design on its own — full width, 48px\n * rows, larger icons and labels, a squared-off selection edge. A sidebar that sits beside page\n * content has nowhere to go at that width, so it can become a drawer instead: pass `open` and\n * `onOpenChange` (opened by `BitkitPageHeader`'s menu button) and below `tablet` it slides in\n * from the trailing edge over a backdrop, with its close button on the backdrop beside the panel\n * and a `drawerHeader` naming the page. Both props are ignored from `tablet` up.\n */\nconst BitkitPageSidebar = forwardRef<HTMLElement, BitkitPageSidebarProps>((props, ref) => {\n const { children, css, drawerHeader, onOpenChange, open = false, ...rest } = props;\n\n const { isMobile } = useResponsive();\n const { splitCssProps } = useChakraContext();\n const hasDrawer = onOpenChange !== undefined;\n const isDrawer = isMobile && hasDrawer;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ layout: isDrawer ? 'drawer' : hasDrawer ? 'hidden' : 'static' });\n\n if (!isDrawer) {\n return (\n <Box ref={ref} aria-label=\"Page navigation\" asChild css={[styles.root, css]} {...rest}>\n <nav>{children}</nav>\n </Box>\n );\n }\n\n // The consumer's sizing is for the sidebar beside the page; inside the panel only the recipe\n // lays the navigation out.\n const [, navProps] = splitCssProps(rest);\n\n return (\n <Drawer.Root onOpenChange={(details) => onOpenChange(details.open)} open={open}>\n <Portal>\n <Drawer.Backdrop css={styles.drawerBackdrop} />\n <Drawer.Positioner>\n <Drawer.Content aria-label=\"Navigation\" css={styles.drawerContent}>\n {drawerHeader}\n <Box ref={ref} aria-label=\"Page navigation\" asChild css={styles.root} {...navProps}>\n <nav>{children}</nav>\n </Box>\n <Box css={styles.drawerCloseButton}>\n <BitkitCloseButton\n aria-label=\"Close navigation\"\n colorVariant=\"white\"\n onClick={() => onOpenChange(false)}\n size=\"md\"\n />\n </Box>\n </Drawer.Content>\n </Drawer.Positioner>\n </Portal>\n </Drawer.Root>\n );\n});\n\nBitkitPageSidebar.displayName = 'BitkitPageSidebar';\n\n// ----- BitkitPageSidebar.Item -----\n\ninterface BitkitPageSidebarItemCommonProps {\n badge?: ReactNode;\n /**\n * The item's label. Typed as a string rather than `ReactNode` because the row truncates it with\n * an ellipsis, and the overflow tooltip needs the full text to reveal.\n */\n children: string;\n /**\n * Why the item is unavailable, shown in a tooltip on it while `state` is `\"disabled\"`. The item\n * then stays focusable and is announced as disabled (`aria-disabled`), so the tooltip opens on\n * hover and focus. It still neither navigates nor activates. Use it instead of wrapping a disabled\n * item in `BitkitTooltip`.\n */\n disabledReason?: string;\n icon?: BitkitIconComponent;\n /**\n * Marks the item as the current page. Mutually exclusive with `state=\"disabled\"` — you cannot be\n * on a page whose nav item is unavailable — but the two are not type-checked against each other:\n * the combination only ever arrives from a computed `selected`, which no union can catch, and\n * checking it would break the ordinary `selected={item.id === currentId}` mapping. If both do\n * turn up, disabled wins, since that is the one of the two the design actually defines.\n */\n selected?: boolean;\n state?: 'disabled';\n suffixIcon?: BitkitIconComponent;\n}\n\ninterface BitkitPageSidebarItemLinkProps\n extends Omit<HTMLChakraProps<'a'>, 'children'>, BitkitPageSidebarItemCommonProps {\n href: string;\n}\n\ninterface BitkitPageSidebarItemButtonProps\n extends Omit<HTMLChakraProps<'button'>, 'children' | 'disabled'>, BitkitPageSidebarItemCommonProps {\n href?: never;\n}\n\nexport type BitkitPageSidebarItemProps = BitkitPageSidebarItemButtonProps | BitkitPageSidebarItemLinkProps;\n\nconst BitkitPageSidebarItem = forwardRef<HTMLButtonElement | HTMLAnchorElement, BitkitPageSidebarItemProps>(\n (props, ref) => {\n const { badge, children, disabledReason, icon: Icon, selected, state, suffixIcon: SuffixIcon, ...rest } = props;\n\n const isDisabled = state === 'disabled';\n const hasReason = isDisabled && !!disabledReason;\n // `selected` and `state=\"disabled\"` are not checked against each other in the types, so this is\n // the single place the overlap is resolved: disabled wins, and the two recipe variants can never\n // both claim the same slot.\n const isSelected = selected === true && !isDisabled;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ isDisabled, selected: isSelected });\n\n // The design gives neither a selected row nor a disabled one a trailing icon — the desktop\n // (`20014:6498`, `20014:6494`) and mobile (`9221:4417`) items drop it in those states.\n const VisibleSuffixIcon = isSelected || isDisabled ? undefined : SuffixIcon;\n\n const { isTruncated, ref: labelRef } = useIsTruncated<HTMLSpanElement>(children);\n\n const itemContent = (\n <>\n {/* `span`, not the default `div`: in button mode these sit inside a `<button>`, whose\n content model allows phrasing content only. */}\n <Box as=\"span\" css={styles.contentBlock}>\n {Icon && (\n <>\n <Icon css={[styles.itemIcon, showAtDesktop]} size=\"16\" />\n <Icon css={[styles.itemIcon, showAtMobile]} size=\"24\" />\n </>\n )}\n <Text as=\"span\" css={styles.itemLabel} ref={labelRef}>\n {children}\n </Text>\n </Box>\n {badge}\n {VisibleSuffixIcon && (\n <>\n <VisibleSuffixIcon css={[styles.suffixIcon, showAtDesktop]} size=\"16\" />\n <VisibleSuffixIcon css={[styles.suffixIcon, showAtMobile]} size=\"24\" />\n </>\n )}\n {isSelected && <Box as=\"span\" css={styles.selectionMarker} />}\n </>\n );\n\n // The overflow tooltip anchors to the row itself, which is the focusable element: anchored to an\n // inner node it would only ever open on hover, leaving keyboard users unable to read a truncated\n // label. `Tooltip.Trigger` renders `asChild` and composes refs, so the consumer's forwarded ref\n // survives, and the ref measuring the truncation sits on the label further in.\n // The reason tooltip is always rendered so a state change can't remount the row and drop its focus.\n const withTooltip = (row: ReactNode) => (\n <BitkitTooltip disabled={!hasReason} placement=\"right\" text={disabledReason ?? ''}>\n <BitkitOverflowTooltip disabled={!isTruncated || hasReason} text={children}>\n {row}\n </BitkitOverflowTooltip>\n </BitkitTooltip>\n );\n\n // `chakra.a` / `chakra.button` rather than a named primitive: the item carries its own slot recipe,\n // and Chakra's `Button`/`Link` would layer their own recipe styles on top of it.\n if (rest.href !== undefined) {\n const { className, href, onClick, onKeyDown, ...linkRest } = rest;\n const handleClick = isDisabled\n ? (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n event.stopPropagation();\n }\n : onClick;\n const handleKeyDown = isDisabled\n ? (event: KeyboardEvent<HTMLAnchorElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n : onKeyDown;\n\n return withTooltip(\n <chakra.a\n ref={ref as Ref<HTMLAnchorElement>}\n {...linkRest}\n aria-current={isSelected ? 'page' : undefined}\n aria-disabled={isDisabled || undefined}\n className={className ? `group ${className}` : 'group'}\n css={styles.item}\n // Dropping the attribute is what actually disables the link, the way `BitkitLink` and\n // `BitkitControlButton` do it. The handlers below only block `click` and `Enter`/`Space`;\n // a middle click fires `auxclick`, and \"Open link in new tab\" never reaches the page at\n // all, so both would still navigate while an `href` is there to follow.\n href={isDisabled ? undefined : href}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n // Without `href` the anchor is neither a link nor focusable, and the reason tooltip needs both.\n {...(hasReason && { role: 'link', tabIndex: 0 })}\n >\n {itemContent}\n </chakra.a>,\n );\n }\n\n const { className, href: _href, ...buttonRest } = rest;\n\n return withTooltip(\n <chakra.button\n ref={ref as Ref<HTMLButtonElement>}\n {...buttonRest}\n aria-current={isSelected ? 'page' : undefined}\n className={className ? `group ${className}` : 'group'}\n css={styles.item}\n disabled={isDisabled && !hasReason}\n type=\"button\"\n {...(hasReason && focusableDisabledProps)}\n >\n {itemContent}\n </chakra.button>,\n );\n },\n);\n\nBitkitPageSidebarItem.displayName = 'BitkitPageSidebarItem';\n\n// ----- BitkitPageSidebar.ProgressItem -----\n\nexport interface BitkitPageSidebarProgressItemProps extends Omit<HTMLChakraProps<'button'>, 'children' | 'disabled'> {\n /**\n * Trailing content between the label and the connector — a `BitkitBadge` counting what the stage\n * is waiting on. Sized to itself; the connector takes the rest.\n *\n * The design draws it 20px tall, which is `size=\"xs\"`. The badge arrives as a node, so the\n * component cannot set that for you — a taller one grows the row past its 40px.\n */\n badge?: ReactNode;\n /** The row's label. */\n children: ReactNode;\n /**\n * The status icon. Unlike `Item`, whose icon colour the sidebar owns, this one carries the\n * stage's status, so `iconColor` is the consumer's to set — `selected`, `notRequired` and\n * `state=\"disabled\"` still win over it, since those describe the row rather than the status.\n */\n icon: BitkitIconComponent;\n /**\n * A semantic token for the status the icon is showing. Left out, the icon takes the sidebar's own\n * `icon/secondary` — which is what the design gives a stage whose icon carries no status, such as\n * an approvals step.\n *\n * Narrowed to the `icon/*` and `color/*` tokens, so a name that does not exist is a compile error\n * rather than a colour that silently does not apply. Both families are here because the statuses\n * need both: the design takes success and failure from `icon/*` but in-progress from\n * `color/orange/bold`, which the `icon/*` set has no equivalent of.\n */\n iconColor?: BitkitColorToken<'color' | 'icon'>;\n /**\n * A stage the release does not have to clear. Steps the icon and the label down one level, so the\n * row reads as present but not awaited.\n */\n notRequired?: boolean;\n /** Follows the label after a middle dot — `auto-upload`, `not required`. */\n secondaryText?: string;\n selected?: boolean;\n state?: 'disabled';\n /**\n * Draws the dashed rule that runs from the badge to the trailing edge, tying one stage to the\n * next. The last stage in a list has nothing to tie to, so it goes without.\n */\n withConnector?: boolean;\n}\n\n/**\n * A stage of something that progresses, as a row of the page sidebar — a release running through\n * its steps, and whatever comes to look like it.\n *\n * It is a sibling of `Item` rather than a variant of it: the row reports where a stage stands\n * rather than navigating, so its icon is status-coloured, its label does not grow, and a dashed\n * connector runs to the trailing edge between the stages.\n *\n * Always a `<button>`, and always interactive — it carries the shared row's pointer cursor and\n * hover background, so a row without an `onClick` looks actionable and is not. `Item`'s\n * button-or-anchor union is deliberately not here: a stage is selected within the page it is\n * already on rather than navigated to.\n */\nconst BitkitPageSidebarProgressItem = forwardRef<HTMLButtonElement, BitkitPageSidebarProgressItemProps>(\n (props, ref) => {\n const {\n badge,\n children,\n className,\n css,\n icon: Icon,\n iconColor,\n notRequired,\n secondaryText,\n selected,\n state,\n withConnector,\n ...rest\n } = props;\n\n const isDisabled = state === 'disabled';\n // Disabled is the whole state of the row, so the other two are dropped rather than merged: the\n // recipe resolves a combination in its own order, and a disabled row came out of it carrying\n // the selected icon colour. Nothing about a disabled stage is selected or not-required.\n const isSelected = selected && !isDisabled;\n // And `selected` wins over `notRequired`, which the design decides rather than declaration\n // order: its `selected=yes, notRequired=true` variant draws the selected row's icon and label\n // and keeps `not required` in the secondary text -- which is what dropping this produces.\n const isNotRequired = notRequired && !isDisabled && !isSelected;\n\n const statusColor = isDisabled || isNotRequired || isSelected ? undefined : iconColor;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ isDisabled, notRequired: isNotRequired, selected: isSelected });\n\n return (\n <chakra.button\n ref={ref}\n {...rest}\n // `step` rather than the `page` an `Item` carries: these are stages of one thing, not\n // separate pages.\n aria-current={isSelected ? 'step' : undefined}\n className={className ? `group ${className}` : 'group'}\n css={[styles.item, styles.progressRow, css]}\n disabled={isDisabled}\n type=\"button\"\n >\n <Box as=\"span\" css={[styles.contentBlock, styles.progressContentBlock]}>\n {/* Two icons, one per size, for the reason `Item` has two -- see `showAtDesktop`.\n The status colour applies while the row is ordinary: `selected`, `notRequired` and\n disabled are states of the row rather than of the status, and the design recolours the\n icon in all three, so the recipe takes it back there. */}\n <Icon color={statusColor} css={[styles.progressIcon, showAtDesktop]} size=\"16\" />\n <Icon color={statusColor} css={[styles.progressIcon, showAtMobile]} size=\"24\" />\n <Box as=\"span\" css={styles.progressTextBlock}>\n <Text as=\"span\" css={styles.progressLabel}>\n {children}\n </Text>\n {secondaryText && (\n <Text as=\"span\" css={styles.progressSecondaryText}>\n {`\\u00b7 ${secondaryText}`}\n </Text>\n )}\n </Box>\n {(badge || withConnector) && (\n <Box as=\"span\" css={styles.progressBlocker}>\n {badge}\n {/* Decorative: it ties the stages together visually and has nothing to separate in\n the button's accessibility tree. */}\n {withConnector && <Separator aria-hidden css={styles.progressConnector} />}\n </Box>\n )}\n </Box>\n {isSelected && <Box as=\"span\" css={styles.selectionMarker} />}\n </chakra.button>\n );\n },\n);\n\nBitkitPageSidebarProgressItem.displayName = 'BitkitPageSidebarProgressItem';\n\n// ----- BitkitPageSidebar.Title -----\n\ninterface BitkitPageSidebarTitleCommonProps extends BoxProps {\n backLabel?: string;\n children: ReactNode;\n}\n\ninterface BitkitPageSidebarTitleLinkProps extends BitkitPageSidebarTitleCommonProps {\n backHref: string;\n onBackClick?: never;\n}\n\ninterface BitkitPageSidebarTitleButtonProps extends BitkitPageSidebarTitleCommonProps {\n backHref?: never;\n onBackClick: () => void;\n}\n\ninterface BitkitPageSidebarTitlePlainProps extends BitkitPageSidebarTitleCommonProps {\n backHref?: never;\n onBackClick?: never;\n}\n\nexport type BitkitPageSidebarTitleProps =\n BitkitPageSidebarTitleButtonProps | BitkitPageSidebarTitleLinkProps | BitkitPageSidebarTitlePlainProps;\n\nconst BitkitPageSidebarTitle = forwardRef<HTMLDivElement, BitkitPageSidebarTitleProps>((props, ref) => {\n const { backHref, backLabel = 'Back', children, css, onBackClick, ...rest } = props;\n\n const hasBack = backHref !== undefined || onBackClick !== undefined;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ hasBack });\n\n return (\n <Box ref={ref} css={[styles.title, css]} {...rest}>\n <Box css={styles.titleBlock}>\n {/* The label tooltip opens to the right. Its default `top` has nowhere to go here — the\n button sits at the very top of the sidebar, so the tooltip jams against the viewport\n edge and covers the header instead of flipping. */}\n {hasBack &&\n (backHref !== undefined ? (\n <BitkitControlButton\n href={backHref}\n icon={IconChevronLeft}\n label={backLabel}\n size=\"xs\"\n tooltipProps={{ placement: 'right' }}\n />\n ) : (\n <BitkitControlButton\n icon={IconChevronLeft}\n label={backLabel}\n onClick={onBackClick}\n size=\"xs\"\n tooltipProps={{ placement: 'right' }}\n />\n ))}\n <Text as=\"span\" css={styles.titleText}>\n {children}\n </Text>\n </Box>\n </Box>\n );\n});\n\nBitkitPageSidebarTitle.displayName = 'BitkitPageSidebarTitle';\n\n// ----- BitkitPageSidebar.Body -----\n\nexport interface BitkitPageSidebarBodyProps extends BoxProps {\n children: ReactNode;\n}\n\n/**\n * Holds the navigation items. It absorbs the space left between `Title` and `Footer`, so the footer\n * sits at the bottom of the viewport on a short navigation, and keeps a minimum gap above the\n * footer so the two blocks stay visually separate however long the list gets.\n *\n * Next to a `Section` it keeps its natural height instead and leaves the free space to the section.\n * When the sidebar runs out of room, it scrolls on its own, with a fade at the bottom while there is\n * more below. The rule reaches `Body` even when it is wrapped, e.g. in an element that animates it,\n * but then the wrapper is what has to shrink: give it `flex=\"0 1 auto\"` and `minHeight={0}`, and make\n * it a flex column so `Body` can shrink inside it. Otherwise the wrapper keeps its content height,\n * `Body` never scrolls, and the sidebar overflows.\n */\nconst BitkitPageSidebarBody = forwardRef<HTMLDivElement, BitkitPageSidebarBodyProps>((props, ref) => {\n const { children, css, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n return (\n <Box ref={ref} {...pageSidebarPart('body')} css={[styles.body, css]} {...rest}>\n {children}\n </Box>\n );\n});\n\nBitkitPageSidebarBody.displayName = 'BitkitPageSidebarBody';\n\n// ----- BitkitPageSidebar.Section -----\n\nexport interface BitkitPageSidebarSectionProps extends Omit<BoxProps, 'title'> {\n children: ReactNode;\n /** Shown above the content and kept in view while the content scrolls. */\n title?: string;\n /**\n * The title's heading level. The look stays `heading/h4` at every level: the level comes from\n * where the section sits in the page's outline, so pick the one that follows the page's own\n * headings.\n */\n titleAs?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /**\n * The full-width rule along the top, which separates the section from the navigation above it.\n * Turn it off when nothing is shown above the section, e.g. while the page hides its navigation.\n * That also drops the title's top padding, since the sidebar's own top padding then makes the gap.\n */\n withDivider?: boolean;\n}\n\n/**\n * A second area of the sidebar, between `Body` and `Footer`, for content that is not navigation: a\n * file tree, a list, filters. It takes the space left under the navigation and scrolls inside\n * itself on both axes, so wide content scrolls sideways instead of wrapping.\n *\n * ```tsx\n * <BitkitPageSidebar>\n * <BitkitPageSidebar.Body>…</BitkitPageSidebar.Body>\n * <BitkitPageSidebar.Section minHeight=\"128\" title=\"Configuration modules\">…</BitkitPageSidebar.Section>\n * <BitkitPageSidebar.Footer>…</BitkitPageSidebar.Footer>\n * </BitkitPageSidebar>\n * ```\n *\n * When space runs out, the section gives up its height first, down to its `minHeight`, and only then\n * does `Body` start to scroll. How small it may get depends on the content, so `minHeight` is a\n * plain style prop rather than a recipe value.\n */\nconst BitkitPageSidebarSection = forwardRef<HTMLDivElement, BitkitPageSidebarSectionProps>((props, ref) => {\n const { children, css, title, titleAs = 'h2', withDivider = true, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ withDivider });\n\n return (\n <Box ref={ref} {...pageSidebarPart('section')} css={[styles.section, css]} {...rest}>\n {title && (\n <Text as={titleAs} css={styles.sectionTitle}>\n {title}\n </Text>\n )}\n <Box css={styles.sectionContent}>{children}</Box>\n </Box>\n );\n});\n\nBitkitPageSidebarSection.displayName = 'BitkitPageSidebarSection';\n\n// ----- BitkitPageSidebar.Footer -----\n\nexport interface BitkitPageSidebarFooterProps extends BoxProps {\n children: ReactNode;\n}\n\nconst BitkitPageSidebarFooter = forwardRef<HTMLDivElement, BitkitPageSidebarFooterProps>((props, ref) => {\n const { children, css, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n return (\n <Box ref={ref} css={[styles.footer, css]} {...rest}>\n {children}\n </Box>\n );\n});\n\nBitkitPageSidebarFooter.displayName = 'BitkitPageSidebarFooter';\n\n// ----- BitkitPageSidebar.Project -----\n\nexport interface BitkitPageSidebarProjectProps extends BoxProps {\n label: string;\n value: string;\n}\n\nconst BitkitPageSidebarProject = forwardRef<HTMLDivElement, BitkitPageSidebarProjectProps>((props, ref) => {\n const { css, label, value, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n const { isTruncated, ref: valueRef } = useIsTruncated<HTMLSpanElement>(value);\n\n return (\n <Box ref={ref} css={[styles.project, css]} {...rest}>\n <Text as=\"span\" css={styles.projectLabel}>\n {label}\n </Text>\n {/* Wrapper for the same reason as in Item: the trigger cannot be the element being measured. */}\n <BitkitOverflowTooltip disabled={!isTruncated} text={value}>\n <Box css={styles.projectValueWrapper}>\n <Text as=\"span\" css={styles.projectValue} ref={valueRef}>\n {value}\n </Text>\n </Box>\n </BitkitOverflowTooltip>\n </Box>\n );\n});\n\nBitkitPageSidebarProject.displayName = 'BitkitPageSidebarProject';\n\n// ----- BitkitPageSidebar.GroupHeading -----\n\nexport type BitkitPageSidebarGroupHeadingProps = BitkitGroupHeadingProps;\n\nconst BitkitPageSidebarGroupHeading = forwardRef<HTMLDivElement, BitkitPageSidebarGroupHeadingProps>((props, ref) => {\n return <BitkitGroupHeading ref={ref} paddingBlockEnd=\"8\" paddingBlockStart=\"16\" paddingInline=\"24\" {...props} />;\n});\n\nBitkitPageSidebarGroupHeading.displayName = 'BitkitPageSidebarGroupHeading';\n\n// ----- BitkitPageSidebar.DrawerHeader -----\n\nexport interface BitkitPageSidebarDrawerHeaderProps extends Omit<BoxProps, 'title'> {\n /** App icon or user avatar before the title — a 32px `BitkitAvatar`. */\n avatar?: ReactNode;\n /** The entity's secondary line, an app's bundle id or a user's email. Its presence selects the entity layout. */\n secondaryText?: string;\n /** What the navigation belongs to: the page, app or user. */\n title: string;\n}\n\n/**\n * Header of the sidebar's mobile drawer (Figma `mobilePageSidebarHeader`). Pass it as the\n * sidebar's `drawerHeader`; it is what the panel opens with, above the navigation.\n */\nconst BitkitPageSidebarDrawerHeader = forwardRef<HTMLDivElement, BitkitPageSidebarDrawerHeaderProps>((props, ref) => {\n const { avatar, css, secondaryText, title, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ hasSecondaryText: secondaryText !== undefined });\n\n return (\n <Box ref={ref} css={[styles.drawerHeader, css]} {...rest}>\n {avatar !== undefined && <Box css={styles.drawerHeaderAvatar}>{avatar}</Box>}\n <Box css={styles.drawerHeaderTextBlock}>\n <Text css={styles.drawerHeaderTitle}>{title}</Text>\n {secondaryText !== undefined && <Text css={styles.drawerHeaderSecondaryText}>{secondaryText}</Text>}\n </Box>\n </Box>\n );\n});\n\nBitkitPageSidebarDrawerHeader.displayName = 'BitkitPageSidebarDrawerHeader';\n\n// ----- BitkitPageSidebar.Divider -----\n\nexport type BitkitPageSidebarDividerProps = SeparatorProps;\n\nconst BitkitPageSidebarDivider = forwardRef<HTMLDivElement, BitkitPageSidebarDividerProps>((props, ref) => {\n const { css, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n return <Separator ref={ref} css={[styles.divider, css]} {...rest} />;\n});\n\nBitkitPageSidebarDivider.displayName = 'BitkitPageSidebarDivider';\n\nexport default withSubComponents(BitkitPageSidebar, {\n Body: BitkitPageSidebarBody,\n Divider: BitkitPageSidebarDivider,\n DrawerHeader: BitkitPageSidebarDrawerHeader,\n Footer: BitkitPageSidebarFooter,\n GroupHeading: BitkitPageSidebarGroupHeading,\n Item: BitkitPageSidebarItem,\n ProgressItem: BitkitPageSidebarProgressItem,\n Project: BitkitPageSidebarProject,\n Section: BitkitPageSidebarSection,\n Title: BitkitPageSidebarTitle,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,IAAM,gBAAgB,EAAE,SAAS;CAAE,MAAM;CAAQ,QAAQ;AAAQ,EAAE;AACnE,IAAM,eAAe,EAAE,SAAS;CAAE,MAAM;CAAS,QAAQ;AAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Ac;;;;;AAiB5C,IAAM,gCAAgC,YAAgE,OAAO,QAAQ;CACnH,MAAM,EAAE,QAAQ,KAAK,eAAe,OAAO,GAAG,SAAS;CAGvD,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO,EAAE,kBAAkB,kBAAkB,KAAA,EAAU,CAAC;CAEvE,OACE,qBAAC,KAAD;EAAU;EAAK,KAAK,CAAC,OAAO,cAAc,GAAG;EAAG,GAAI;EAApD,UAAA,CACG,WAAW,KAAA,KAAa,oBAAC,KAAD;GAAK,KAAK,OAAO;GAAqB,UAAA;EAAY,CAAA,GAC3E,qBAAC,KAAD;GAAK,KAAK,OAAO;GAAjB,UAAA,CACE,oBAAC,MAAD;IAAM,KAAK,OAAO;IAAoB,UAAA;GAAY,CAAA,GACjD,kBAAkB,KAAA,KAAa,oBAAC,MAAD;IAAM,KAAK,OAAO;IAA4B,UAAA;GAAoB,CAAA,CAC/F;EACF,CAAA,CAAA;;AAET,CAAC;AAED,8BAA8B,cAAc;AAM5C,IAAM,2BAA2B,YAA2D,OAAO,QAAQ;CACzG,MAAM,EAAE,KAAK,GAAG,SAAS;CAGzB,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO;CAEtB,OAAO,oBAAC,WAAD;EAAgB;EAAK,KAAK,CAAC,OAAO,SAAS,GAAG;EAAG,GAAI;CAAO,CAAA;AACrE,CAAC;AAED,yBAAyB,cAAc;AAEvC,IAAA,4BAAe,kBAAkB,mBAAmB;CAClD,MAAM;CACN,SAAS;CACT,cAAc;CACd,QAAQ;CACR,cAAc;CACd,MAAM;CACN,cAAc;CACd,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"BitkitPageSidebar.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitPageSidebar/BitkitPageSidebar.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { Drawer } from '@chakra-ui/react/drawer';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Separator, type SeparatorProps } from '@chakra-ui/react/separator';\nimport { chakra, type HTMLChakraProps, useChakraContext, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type KeyboardEvent, type MouseEvent, type ReactNode, type Ref } from 'react';\n\nimport useResponsive from '../../hooks/useResponsive';\nimport { type BitkitIconComponent } from '../../icons';\nimport IconChevronLeft from '../../icons/IconChevronLeft';\nimport { type BitkitColorToken } from '../../theme/themeUtils';\nimport focusableDisabledProps from '../../utilities/focusableDisabledProps';\nimport useIsTruncated from '../../utilities/useIsTruncated';\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\nimport BitkitControlButton from '../BitkitControlButton/BitkitControlButton';\nimport BitkitGroupHeading, { type BitkitGroupHeadingProps } from '../BitkitGroupHeading/BitkitGroupHeading';\nimport BitkitOverflowTooltip from '../BitkitOverflowTooltip/BitkitOverflowTooltip';\nimport BitkitTooltip from '../BitkitTooltip/BitkitTooltip';\nimport pageSidebarPart from './pageSidebarPart';\n\n// The 16 and 24 icons are separate drawings, not one scaled to two sizes, so the breakpoint swap\n// cannot live in the recipe — both are rendered and one is hidden. A `useBreakpointValue` would\n// render a single icon, but it only re-reads on mount: resize a live page across `tablet` and the\n// row resizes underneath an icon that keeps its old size.\nconst showAtDesktop = { display: { base: 'none', tablet: 'block' } };\nconst showAtMobile = { display: { base: 'block', tablet: 'none' } };\n\n// ----- BitkitPageSidebar (Root) -----\n\nexport interface BitkitPageSidebarProps extends BoxProps {\n children: ReactNode;\n /**\n * Header of the mobile drawer panel, naming what the navigation belongs to — pass a\n * `BitkitPageSidebar.DrawerHeader`. Only rendered in drawer mode.\n */\n drawerHeader?: ReactNode;\n /**\n * Mobile drawer visibility. Controlled, because the page header's menu button is what opens it.\n * Passing `onOpenChange` is what opts the sidebar into the drawer below `tablet`; without it the\n * sidebar stays in the flow at full width there. Both are ignored from `tablet` up.\n *\n * Style props and `css` apply to the sidebar beside the page only — the drawer panel sizes\n * itself, so a desktop `width` or padding never reaches the navigation inside it.\n */\n onOpenChange?: (open: boolean) => void;\n open?: boolean;\n /**\n * For a sidebar below a `sticky` `BitkitPageHeader`: from `tablet` it sticks right under the header\n * and fits the viewport below it, scrolling on its own, so its footer stays in view. Its height\n * follows the page's scroll from the top, so the page header has to start the page.\n */\n sticky?: boolean;\n}\n\n/**\n * Page-level navigation sidebar. It expects three children, in this order:\n *\n * ```tsx\n * <BitkitPageSidebar>\n * <BitkitPageSidebar.Title>Title</BitkitPageSidebar.Title>\n * <BitkitPageSidebar.Body>\n * <BitkitPageSidebar.Item icon={IconWorkflow}>Workflows</BitkitPageSidebar.Item>\n * </BitkitPageSidebar.Body>\n * <BitkitPageSidebar.Footer>…</BitkitPageSidebar.Footer>\n * </BitkitPageSidebar>\n * ```\n *\n * `Title` and `Footer` are optional. The sidebar scrolls as a single block: when the navigation is\n * taller than the viewport the whole thing — footer included — grows and scrolls with the page,\n * which is why `Body` keeps a minimum gap above the footer so the two blocks never touch.\n *\n * A `Section` between `Body` and `Footer` changes that: the section takes the space left under the\n * navigation and scrolls on its own, and `Body` scrolls too once the section is down to its\n * `minHeight`. See `BitkitPageSidebar.Section`.\n *\n * The `<nav>` carries a default `aria-label` so it is not announced as an unnamed landmark. A page\n * with more than one sidebar should name each one — pass your own `aria-label` (or\n * `aria-labelledby`), which overrides the default.\n *\n * It stands at least viewport-tall by default. An embedded panel that should size to its content\n * opts out with `minHeight=\"auto\"`.\n *\n * Below the `tablet` breakpoint it switches to the mobile design on its own — full width, 48px\n * rows, larger icons and labels, a squared-off selection edge. A sidebar that sits beside page\n * content has nowhere to go at that width, so it can become a drawer instead: pass `open` and\n * `onOpenChange` (opened by `BitkitPageHeader`'s menu button) and below `tablet` it slides in\n * from the trailing edge over a backdrop, with its close button on the backdrop beside the panel\n * and a `drawerHeader` naming the page. Both props are ignored from `tablet` up.\n */\nconst BitkitPageSidebar = forwardRef<HTMLElement, BitkitPageSidebarProps>((props, ref) => {\n const { children, css, drawerHeader, onOpenChange, open = false, sticky, ...rest } = props;\n\n const { isMobile } = useResponsive();\n const { splitCssProps } = useChakraContext();\n const hasDrawer = onOpenChange !== undefined;\n const isDrawer = isMobile && hasDrawer;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({\n isSticky: sticky && !isDrawer,\n layout: isDrawer ? 'drawer' : hasDrawer ? 'hidden' : 'static',\n });\n\n if (!isDrawer) {\n return (\n <Box ref={ref} aria-label=\"Page navigation\" asChild css={[styles.root, css]} {...rest}>\n <nav>{children}</nav>\n </Box>\n );\n }\n\n // The consumer's sizing is for the sidebar beside the page; inside the panel only the recipe\n // lays the navigation out.\n const [, navProps] = splitCssProps(rest);\n\n return (\n <Drawer.Root onOpenChange={(details) => onOpenChange(details.open)} open={open}>\n <Portal>\n <Drawer.Backdrop css={styles.drawerBackdrop} />\n <Drawer.Positioner>\n <Drawer.Content aria-label=\"Navigation\" css={styles.drawerContent}>\n {drawerHeader}\n <Box ref={ref} aria-label=\"Page navigation\" asChild css={styles.root} {...navProps}>\n <nav>{children}</nav>\n </Box>\n <Box css={styles.drawerCloseButton}>\n <BitkitCloseButton\n aria-label=\"Close navigation\"\n colorVariant=\"white\"\n onClick={() => onOpenChange(false)}\n size=\"md\"\n />\n </Box>\n </Drawer.Content>\n </Drawer.Positioner>\n </Portal>\n </Drawer.Root>\n );\n});\n\nBitkitPageSidebar.displayName = 'BitkitPageSidebar';\n\n// ----- BitkitPageSidebar.Item -----\n\ninterface BitkitPageSidebarItemCommonProps {\n badge?: ReactNode;\n /**\n * The item's label. Typed as a string rather than `ReactNode` because the row truncates it with\n * an ellipsis, and the overflow tooltip needs the full text to reveal.\n */\n children: string;\n /**\n * Why the item is unavailable, shown in a tooltip on it while `state` is `\"disabled\"`. The item\n * then stays focusable and is announced as disabled (`aria-disabled`), so the tooltip opens on\n * hover and focus. It still neither navigates nor activates. Use it instead of wrapping a disabled\n * item in `BitkitTooltip`.\n */\n disabledReason?: string;\n icon?: BitkitIconComponent;\n /**\n * Marks the item as the current page. Mutually exclusive with `state=\"disabled\"` — you cannot be\n * on a page whose nav item is unavailable — but the two are not type-checked against each other:\n * the combination only ever arrives from a computed `selected`, which no union can catch, and\n * checking it would break the ordinary `selected={item.id === currentId}` mapping. If both do\n * turn up, disabled wins, since that is the one of the two the design actually defines.\n */\n selected?: boolean;\n state?: 'disabled';\n suffixIcon?: BitkitIconComponent;\n}\n\ninterface BitkitPageSidebarItemLinkProps\n extends Omit<HTMLChakraProps<'a'>, 'children'>, BitkitPageSidebarItemCommonProps {\n href: string;\n}\n\ninterface BitkitPageSidebarItemButtonProps\n extends Omit<HTMLChakraProps<'button'>, 'children' | 'disabled'>, BitkitPageSidebarItemCommonProps {\n href?: never;\n}\n\nexport type BitkitPageSidebarItemProps = BitkitPageSidebarItemButtonProps | BitkitPageSidebarItemLinkProps;\n\nconst BitkitPageSidebarItem = forwardRef<HTMLButtonElement | HTMLAnchorElement, BitkitPageSidebarItemProps>(\n (props, ref) => {\n const { badge, children, disabledReason, icon: Icon, selected, state, suffixIcon: SuffixIcon, ...rest } = props;\n\n const isDisabled = state === 'disabled';\n const hasReason = isDisabled && !!disabledReason;\n // `selected` and `state=\"disabled\"` are not checked against each other in the types, so this is\n // the single place the overlap is resolved: disabled wins, and the two recipe variants can never\n // both claim the same slot.\n const isSelected = selected === true && !isDisabled;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ isDisabled, selected: isSelected });\n\n // The design gives neither a selected row nor a disabled one a trailing icon — the desktop\n // (`20014:6498`, `20014:6494`) and mobile (`9221:4417`) items drop it in those states.\n const VisibleSuffixIcon = isSelected || isDisabled ? undefined : SuffixIcon;\n\n const { isTruncated, ref: labelRef } = useIsTruncated<HTMLSpanElement>(children);\n\n const itemContent = (\n <>\n {/* `span`, not the default `div`: in button mode these sit inside a `<button>`, whose\n content model allows phrasing content only. */}\n <Box as=\"span\" css={styles.contentBlock}>\n {Icon && (\n <>\n <Icon css={[styles.itemIcon, showAtDesktop]} size=\"16\" />\n <Icon css={[styles.itemIcon, showAtMobile]} size=\"24\" />\n </>\n )}\n <Text as=\"span\" css={styles.itemLabel} ref={labelRef}>\n {children}\n </Text>\n </Box>\n {badge}\n {VisibleSuffixIcon && (\n <>\n <VisibleSuffixIcon css={[styles.suffixIcon, showAtDesktop]} size=\"16\" />\n <VisibleSuffixIcon css={[styles.suffixIcon, showAtMobile]} size=\"24\" />\n </>\n )}\n {isSelected && <Box as=\"span\" css={styles.selectionMarker} />}\n </>\n );\n\n // The overflow tooltip anchors to the row itself, which is the focusable element: anchored to an\n // inner node it would only ever open on hover, leaving keyboard users unable to read a truncated\n // label. `Tooltip.Trigger` renders `asChild` and composes refs, so the consumer's forwarded ref\n // survives, and the ref measuring the truncation sits on the label further in.\n // The reason tooltip is always rendered so a state change can't remount the row and drop its focus.\n const withTooltip = (row: ReactNode) => (\n <BitkitTooltip disabled={!hasReason} placement=\"right\" text={disabledReason ?? ''}>\n <BitkitOverflowTooltip disabled={!isTruncated || hasReason} text={children}>\n {row}\n </BitkitOverflowTooltip>\n </BitkitTooltip>\n );\n\n // `chakra.a` / `chakra.button` rather than a named primitive: the item carries its own slot recipe,\n // and Chakra's `Button`/`Link` would layer their own recipe styles on top of it.\n if (rest.href !== undefined) {\n const { className, href, onClick, onKeyDown, ...linkRest } = rest;\n const handleClick = isDisabled\n ? (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n event.stopPropagation();\n }\n : onClick;\n const handleKeyDown = isDisabled\n ? (event: KeyboardEvent<HTMLAnchorElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n : onKeyDown;\n\n return withTooltip(\n <chakra.a\n ref={ref as Ref<HTMLAnchorElement>}\n {...linkRest}\n aria-current={isSelected ? 'page' : undefined}\n aria-disabled={isDisabled || undefined}\n className={className ? `group ${className}` : 'group'}\n css={styles.item}\n // Dropping the attribute is what actually disables the link, the way `BitkitLink` and\n // `BitkitControlButton` do it. The handlers below only block `click` and `Enter`/`Space`;\n // a middle click fires `auxclick`, and \"Open link in new tab\" never reaches the page at\n // all, so both would still navigate while an `href` is there to follow.\n href={isDisabled ? undefined : href}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n // Without `href` the anchor is neither a link nor focusable, and the reason tooltip needs both.\n {...(hasReason && { role: 'link', tabIndex: 0 })}\n >\n {itemContent}\n </chakra.a>,\n );\n }\n\n const { className, href: _href, ...buttonRest } = rest;\n\n return withTooltip(\n <chakra.button\n ref={ref as Ref<HTMLButtonElement>}\n {...buttonRest}\n aria-current={isSelected ? 'page' : undefined}\n className={className ? `group ${className}` : 'group'}\n css={styles.item}\n disabled={isDisabled && !hasReason}\n type=\"button\"\n {...(hasReason && focusableDisabledProps)}\n >\n {itemContent}\n </chakra.button>,\n );\n },\n);\n\nBitkitPageSidebarItem.displayName = 'BitkitPageSidebarItem';\n\n// ----- BitkitPageSidebar.ProgressItem -----\n\nexport interface BitkitPageSidebarProgressItemProps extends Omit<HTMLChakraProps<'button'>, 'children' | 'disabled'> {\n /**\n * Trailing content between the label and the connector — a `BitkitBadge` counting what the stage\n * is waiting on. Sized to itself; the connector takes the rest.\n *\n * The design draws it 20px tall, which is `size=\"xs\"`. The badge arrives as a node, so the\n * component cannot set that for you — a taller one grows the row past its 40px.\n */\n badge?: ReactNode;\n /** The row's label. */\n children: ReactNode;\n /**\n * The status icon. Unlike `Item`, whose icon colour the sidebar owns, this one carries the\n * stage's status, so `iconColor` is the consumer's to set — `selected`, `notRequired` and\n * `state=\"disabled\"` still win over it, since those describe the row rather than the status.\n */\n icon: BitkitIconComponent;\n /**\n * A semantic token for the status the icon is showing. Left out, the icon takes the sidebar's own\n * `icon/secondary` — which is what the design gives a stage whose icon carries no status, such as\n * an approvals step.\n *\n * Narrowed to the `icon/*` and `color/*` tokens, so a name that does not exist is a compile error\n * rather than a colour that silently does not apply. Both families are here because the statuses\n * need both: the design takes success and failure from `icon/*` but in-progress from\n * `color/orange/bold`, which the `icon/*` set has no equivalent of.\n */\n iconColor?: BitkitColorToken<'color' | 'icon'>;\n /**\n * A stage the release does not have to clear. Steps the icon and the label down one level, so the\n * row reads as present but not awaited.\n */\n notRequired?: boolean;\n /** Follows the label after a middle dot — `auto-upload`, `not required`. */\n secondaryText?: string;\n selected?: boolean;\n state?: 'disabled';\n /**\n * Draws the dashed rule that runs from the badge to the trailing edge, tying one stage to the\n * next. The last stage in a list has nothing to tie to, so it goes without.\n */\n withConnector?: boolean;\n}\n\n/**\n * A stage of something that progresses, as a row of the page sidebar — a release running through\n * its steps, and whatever comes to look like it.\n *\n * It is a sibling of `Item` rather than a variant of it: the row reports where a stage stands\n * rather than navigating, so its icon is status-coloured, its label does not grow, and a dashed\n * connector runs to the trailing edge between the stages.\n *\n * Always a `<button>`, and always interactive — it carries the shared row's pointer cursor and\n * hover background, so a row without an `onClick` looks actionable and is not. `Item`'s\n * button-or-anchor union is deliberately not here: a stage is selected within the page it is\n * already on rather than navigated to.\n */\nconst BitkitPageSidebarProgressItem = forwardRef<HTMLButtonElement, BitkitPageSidebarProgressItemProps>(\n (props, ref) => {\n const {\n badge,\n children,\n className,\n css,\n icon: Icon,\n iconColor,\n notRequired,\n secondaryText,\n selected,\n state,\n withConnector,\n ...rest\n } = props;\n\n const isDisabled = state === 'disabled';\n // Disabled is the whole state of the row, so the other two are dropped rather than merged: the\n // recipe resolves a combination in its own order, and a disabled row came out of it carrying\n // the selected icon colour. Nothing about a disabled stage is selected or not-required.\n const isSelected = selected && !isDisabled;\n // And `selected` wins over `notRequired`, which the design decides rather than declaration\n // order: its `selected=yes, notRequired=true` variant draws the selected row's icon and label\n // and keeps `not required` in the secondary text -- which is what dropping this produces.\n const isNotRequired = notRequired && !isDisabled && !isSelected;\n\n const statusColor = isDisabled || isNotRequired || isSelected ? undefined : iconColor;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ isDisabled, notRequired: isNotRequired, selected: isSelected });\n\n return (\n <chakra.button\n ref={ref}\n {...rest}\n // `step` rather than the `page` an `Item` carries: these are stages of one thing, not\n // separate pages.\n aria-current={isSelected ? 'step' : undefined}\n className={className ? `group ${className}` : 'group'}\n css={[styles.item, styles.progressRow, css]}\n disabled={isDisabled}\n type=\"button\"\n >\n <Box as=\"span\" css={[styles.contentBlock, styles.progressContentBlock]}>\n {/* Two icons, one per size, for the reason `Item` has two -- see `showAtDesktop`.\n The status colour applies while the row is ordinary: `selected`, `notRequired` and\n disabled are states of the row rather than of the status, and the design recolours the\n icon in all three, so the recipe takes it back there. */}\n <Icon color={statusColor} css={[styles.progressIcon, showAtDesktop]} size=\"16\" />\n <Icon color={statusColor} css={[styles.progressIcon, showAtMobile]} size=\"24\" />\n <Box as=\"span\" css={styles.progressTextBlock}>\n <Text as=\"span\" css={styles.progressLabel}>\n {children}\n </Text>\n {secondaryText && (\n <Text as=\"span\" css={styles.progressSecondaryText}>\n {`\\u00b7 ${secondaryText}`}\n </Text>\n )}\n </Box>\n {(badge || withConnector) && (\n <Box as=\"span\" css={styles.progressBlocker}>\n {badge}\n {/* Decorative: it ties the stages together visually and has nothing to separate in\n the button's accessibility tree. */}\n {withConnector && <Separator aria-hidden css={styles.progressConnector} />}\n </Box>\n )}\n </Box>\n {isSelected && <Box as=\"span\" css={styles.selectionMarker} />}\n </chakra.button>\n );\n },\n);\n\nBitkitPageSidebarProgressItem.displayName = 'BitkitPageSidebarProgressItem';\n\n// ----- BitkitPageSidebar.Title -----\n\ninterface BitkitPageSidebarTitleCommonProps extends BoxProps {\n backLabel?: string;\n children: ReactNode;\n}\n\ninterface BitkitPageSidebarTitleLinkProps extends BitkitPageSidebarTitleCommonProps {\n backHref: string;\n onBackClick?: never;\n}\n\ninterface BitkitPageSidebarTitleButtonProps extends BitkitPageSidebarTitleCommonProps {\n backHref?: never;\n onBackClick: () => void;\n}\n\ninterface BitkitPageSidebarTitlePlainProps extends BitkitPageSidebarTitleCommonProps {\n backHref?: never;\n onBackClick?: never;\n}\n\nexport type BitkitPageSidebarTitleProps =\n BitkitPageSidebarTitleButtonProps | BitkitPageSidebarTitleLinkProps | BitkitPageSidebarTitlePlainProps;\n\nconst BitkitPageSidebarTitle = forwardRef<HTMLDivElement, BitkitPageSidebarTitleProps>((props, ref) => {\n const { backHref, backLabel = 'Back', children, css, onBackClick, ...rest } = props;\n\n const hasBack = backHref !== undefined || onBackClick !== undefined;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ hasBack });\n\n return (\n <Box ref={ref} css={[styles.title, css]} {...rest}>\n <Box css={styles.titleBlock}>\n {/* The label tooltip opens to the right. Its default `top` has nowhere to go here — the\n button sits at the very top of the sidebar, so the tooltip jams against the viewport\n edge and covers the header instead of flipping. */}\n {hasBack &&\n (backHref !== undefined ? (\n <BitkitControlButton\n href={backHref}\n icon={IconChevronLeft}\n label={backLabel}\n size=\"xs\"\n tooltipProps={{ placement: 'right' }}\n />\n ) : (\n <BitkitControlButton\n icon={IconChevronLeft}\n label={backLabel}\n onClick={onBackClick}\n size=\"xs\"\n tooltipProps={{ placement: 'right' }}\n />\n ))}\n <Text as=\"span\" css={styles.titleText}>\n {children}\n </Text>\n </Box>\n </Box>\n );\n});\n\nBitkitPageSidebarTitle.displayName = 'BitkitPageSidebarTitle';\n\n// ----- BitkitPageSidebar.Body -----\n\nexport interface BitkitPageSidebarBodyProps extends BoxProps {\n children: ReactNode;\n}\n\n/**\n * Holds the navigation items. It absorbs the space left between `Title` and `Footer`, so the footer\n * sits at the bottom of the viewport on a short navigation, and keeps a minimum gap above the\n * footer so the two blocks stay visually separate however long the list gets.\n *\n * Next to a `Section` it keeps its natural height instead and leaves the free space to the section.\n * When the sidebar runs out of room, it scrolls on its own, with a fade at the bottom while there is\n * more below. The rule reaches `Body` even when it is wrapped, e.g. in an element that animates it,\n * but then the wrapper is what has to shrink: give it `flex=\"0 1 auto\"` and `minHeight={0}`, and make\n * it a flex column so `Body` can shrink inside it. Otherwise the wrapper keeps its content height,\n * `Body` never scrolls, and the sidebar overflows.\n */\nconst BitkitPageSidebarBody = forwardRef<HTMLDivElement, BitkitPageSidebarBodyProps>((props, ref) => {\n const { children, css, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n return (\n <Box ref={ref} {...pageSidebarPart('body')} css={[styles.body, css]} {...rest}>\n {children}\n </Box>\n );\n});\n\nBitkitPageSidebarBody.displayName = 'BitkitPageSidebarBody';\n\n// ----- BitkitPageSidebar.Section -----\n\nexport interface BitkitPageSidebarSectionProps extends Omit<BoxProps, 'title'> {\n children: ReactNode;\n /** Shown above the content and kept in view while the content scrolls. */\n title?: string;\n /**\n * The title's heading level. The look stays `heading/h4` at every level: the level comes from\n * where the section sits in the page's outline, so pick the one that follows the page's own\n * headings.\n */\n titleAs?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n /**\n * The full-width rule along the top, which separates the section from the navigation above it.\n * Turn it off when nothing is shown above the section, e.g. while the page hides its navigation.\n * That also drops the title's top padding, since the sidebar's own top padding then makes the gap.\n */\n withDivider?: boolean;\n}\n\n/**\n * A second area of the sidebar, between `Body` and `Footer`, for content that is not navigation: a\n * file tree, a list, filters. It takes the space left under the navigation and scrolls inside\n * itself on both axes, so wide content scrolls sideways instead of wrapping.\n *\n * ```tsx\n * <BitkitPageSidebar>\n * <BitkitPageSidebar.Body>…</BitkitPageSidebar.Body>\n * <BitkitPageSidebar.Section minHeight=\"128\" title=\"Configuration modules\">…</BitkitPageSidebar.Section>\n * <BitkitPageSidebar.Footer>…</BitkitPageSidebar.Footer>\n * </BitkitPageSidebar>\n * ```\n *\n * When space runs out, the section gives up its height first, down to its `minHeight`, and only then\n * does `Body` start to scroll. How small it may get depends on the content, so `minHeight` is a\n * plain style prop rather than a recipe value.\n */\nconst BitkitPageSidebarSection = forwardRef<HTMLDivElement, BitkitPageSidebarSectionProps>((props, ref) => {\n const { children, css, title, titleAs = 'h2', withDivider = true, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ withDivider });\n\n return (\n <Box ref={ref} {...pageSidebarPart('section')} css={[styles.section, css]} {...rest}>\n {title && (\n <Text as={titleAs} css={styles.sectionTitle}>\n {title}\n </Text>\n )}\n <Box css={styles.sectionContent}>{children}</Box>\n </Box>\n );\n});\n\nBitkitPageSidebarSection.displayName = 'BitkitPageSidebarSection';\n\n// ----- BitkitPageSidebar.Footer -----\n\nexport interface BitkitPageSidebarFooterProps extends BoxProps {\n children: ReactNode;\n}\n\nconst BitkitPageSidebarFooter = forwardRef<HTMLDivElement, BitkitPageSidebarFooterProps>((props, ref) => {\n const { children, css, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n return (\n <Box ref={ref} css={[styles.footer, css]} {...rest}>\n {children}\n </Box>\n );\n});\n\nBitkitPageSidebarFooter.displayName = 'BitkitPageSidebarFooter';\n\n// ----- BitkitPageSidebar.Project -----\n\nexport interface BitkitPageSidebarProjectProps extends BoxProps {\n label: string;\n value: string;\n}\n\nconst BitkitPageSidebarProject = forwardRef<HTMLDivElement, BitkitPageSidebarProjectProps>((props, ref) => {\n const { css, label, value, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n const { isTruncated, ref: valueRef } = useIsTruncated<HTMLSpanElement>(value);\n\n return (\n <Box ref={ref} css={[styles.project, css]} {...rest}>\n <Text as=\"span\" css={styles.projectLabel}>\n {label}\n </Text>\n {/* Wrapper for the same reason as in Item: the trigger cannot be the element being measured. */}\n <BitkitOverflowTooltip disabled={!isTruncated} text={value}>\n <Box css={styles.projectValueWrapper}>\n <Text as=\"span\" css={styles.projectValue} ref={valueRef}>\n {value}\n </Text>\n </Box>\n </BitkitOverflowTooltip>\n </Box>\n );\n});\n\nBitkitPageSidebarProject.displayName = 'BitkitPageSidebarProject';\n\n// ----- BitkitPageSidebar.GroupHeading -----\n\nexport type BitkitPageSidebarGroupHeadingProps = BitkitGroupHeadingProps;\n\nconst BitkitPageSidebarGroupHeading = forwardRef<HTMLDivElement, BitkitPageSidebarGroupHeadingProps>((props, ref) => {\n return <BitkitGroupHeading ref={ref} paddingBlockEnd=\"8\" paddingBlockStart=\"16\" paddingInline=\"24\" {...props} />;\n});\n\nBitkitPageSidebarGroupHeading.displayName = 'BitkitPageSidebarGroupHeading';\n\n// ----- BitkitPageSidebar.DrawerHeader -----\n\nexport interface BitkitPageSidebarDrawerHeaderProps extends Omit<BoxProps, 'title'> {\n /** App icon or user avatar before the title — a 32px `BitkitAvatar`. */\n avatar?: ReactNode;\n /** The entity's secondary line, an app's bundle id or a user's email. Its presence selects the entity layout. */\n secondaryText?: string;\n /** What the navigation belongs to: the page, app or user. */\n title: string;\n}\n\n/**\n * Header of the sidebar's mobile drawer (Figma `mobilePageSidebarHeader`). Pass it as the\n * sidebar's `drawerHeader`; it is what the panel opens with, above the navigation.\n */\nconst BitkitPageSidebarDrawerHeader = forwardRef<HTMLDivElement, BitkitPageSidebarDrawerHeaderProps>((props, ref) => {\n const { avatar, css, secondaryText, title, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe({ hasSecondaryText: secondaryText !== undefined });\n\n return (\n <Box ref={ref} css={[styles.drawerHeader, css]} {...rest}>\n {avatar !== undefined && <Box css={styles.drawerHeaderAvatar}>{avatar}</Box>}\n <Box css={styles.drawerHeaderTextBlock}>\n <Text css={styles.drawerHeaderTitle}>{title}</Text>\n {secondaryText !== undefined && <Text css={styles.drawerHeaderSecondaryText}>{secondaryText}</Text>}\n </Box>\n </Box>\n );\n});\n\nBitkitPageSidebarDrawerHeader.displayName = 'BitkitPageSidebarDrawerHeader';\n\n// ----- BitkitPageSidebar.Divider -----\n\nexport type BitkitPageSidebarDividerProps = SeparatorProps;\n\nconst BitkitPageSidebarDivider = forwardRef<HTMLDivElement, BitkitPageSidebarDividerProps>((props, ref) => {\n const { css, ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'pageSidebar' });\n const styles = recipe();\n\n return <Separator ref={ref} css={[styles.divider, css]} {...rest} />;\n});\n\nBitkitPageSidebarDivider.displayName = 'BitkitPageSidebarDivider';\n\nexport default withSubComponents(BitkitPageSidebar, {\n Body: BitkitPageSidebarBody,\n Divider: BitkitPageSidebarDivider,\n DrawerHeader: BitkitPageSidebarDrawerHeader,\n Footer: BitkitPageSidebarFooter,\n GroupHeading: BitkitPageSidebarGroupHeading,\n Item: BitkitPageSidebarItem,\n ProgressItem: BitkitPageSidebarProgressItem,\n Project: BitkitPageSidebarProject,\n Section: BitkitPageSidebarSection,\n Title: BitkitPageSidebarTitle,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,IAAM,gBAAgB,EAAE,SAAS;CAAE,MAAM;CAAQ,QAAQ;AAAQ,EAAE;AACnE,IAAM,eAAe,EAAE,SAAS;CAAE,MAAM;CAAS,QAAQ;AAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgElE,IAAM,oBAAoB,YAAiD,OAAO,QAAQ;CACxF,MAAM,EAAE,UAAU,KAAK,cAAc,cAAc,OAAO,OAAO,QAAQ,GAAG,SAAS;CAErF,MAAM,EAAE,aAAa,cAAc;CACnC,MAAM,EAAE,kBAAkB,iBAAiB;CAC3C,MAAM,YAAY,iBAAiB,KAAA;CACnC,MAAM,WAAW,YAAY;CAG7B,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO;EACpB,UAAU,UAAU,CAAC;EACrB,QAAQ,WAAW,WAAW,YAAY,WAAW;CACvD,CAAC;CAED,IAAI,CAAC,UACH,OACE,oBAAC,KAAD;EAAU;EAAK,cAAW;EAAkB,SAAA;EAAQ,KAAK,CAAC,OAAO,MAAM,GAAG;EAAG,GAAI;EAC/E,UAAA,oBAAC,OAAD,EAA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BAAkB,KAAA,KAAa,oBAAC,MAAD;IAAM,KAAK,OAAO;IAA4B,UAAA;GAAoB,CAAA,CAC/F;EACF,CAAA,CAAA;;AAET,CAAC;AAED,8BAA8B,cAAc;AAM5C,IAAM,2BAA2B,YAA2D,OAAO,QAAQ;CACzG,MAAM,EAAE,KAAK,GAAG,SAAS;CAGzB,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO;CAEtB,OAAO,oBAAC,WAAD;EAAgB;EAAK,KAAK,CAAC,OAAO,SAAS,GAAG;EAAG,GAAI;CAAO,CAAA;AACrE,CAAC;AAED,yBAAyB,cAAc;AAEvC,IAAA,4BAAe,kBAAkB,mBAAmB;CAClD,MAAM;CACN,SAAS;CACT,cAAc;CACd,QAAQ;CACR,cAAc;CACd,MAAM;CACN,cAAc;CACd,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import IconArrowDown from "../../icons/IconArrowDown.js";
2
+ import { ResetControlSize } from "../../utilities/ControlSizeContext.js";
2
3
  import BitkitCloseButton from "../BitkitCloseButton/BitkitCloseButton.js";
3
4
  import { chakra } from "@chakra-ui/react/styled-system";
4
5
  import { useCallback, useEffect, useId, useRef, useState } from "react";
@@ -89,7 +90,7 @@ var BitkitPopover = ({ children, title, footer, trigger, autoFocus, open, defaul
89
90
  children: trigger
90
91
  }) : null, /* @__PURE__ */ jsx(Portal, {
91
92
  disabled: disablePortal,
92
- children: /* @__PURE__ */ jsx(Popover.Positioner, { children: /* @__PURE__ */ jsxs(Popover.Content, {
93
+ children: /* @__PURE__ */ jsx(ResetControlSize, { children: /* @__PURE__ */ jsx(Popover.Positioner, { children: /* @__PURE__ */ jsxs(Popover.Content, {
93
94
  "aria-labelledby": titleId,
94
95
  children: [
95
96
  /* @__PURE__ */ jsxs(Popover.Header, { children: [/* @__PURE__ */ jsx(Popover.Title, { children: title }), /* @__PURE__ */ jsx(Popover.CloseTrigger, {
@@ -99,7 +100,7 @@ var BitkitPopover = ({ children, title, footer, trigger, autoFocus, open, defaul
99
100
  /* @__PURE__ */ jsx(ScrollablePopoverBody, { children }),
100
101
  footer ? /* @__PURE__ */ jsx(Popover.Footer, { children: footer }) : null
101
102
  ]
102
- }) })
103
+ }) }) })
103
104
  })]
104
105
  });
105
106
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitPopover.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitPopover/BitkitPopover.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Popover, type PopoverRootProps, usePopoverContext, usePopoverStyles } from '@chakra-ui/react/popover';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { chakra } from '@chakra-ui/react/styled-system';\nimport { type ReactNode, useCallback, useEffect, useId, useRef, useState } from 'react';\n\nimport { IconArrowDown } from '../../icons';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\n\nexport interface BitkitPopoverProps {\n /** Body content of the panel. Scrolls within the panel when it overflows. */\n children: ReactNode;\n /** Header title, shown next to the close button. */\n title: ReactNode;\n /** Optional footer content (e.g. actions). Laid out with space between for a secondary/primary pair. */\n footer?: ReactNode;\n /**\n * Element that toggles and anchors the popover. Omit when anchoring via\n * `positioning.getAnchorElement` (e.g. a trigger that can't be wrapped) and controlling `open`.\n */\n trigger?: ReactNode;\n /**\n * Move focus into the panel when it opens (default `true`). Turn it off for a panel that opens\n * while the user is typing elsewhere, such as hints beside a focused input.\n */\n autoFocus?: PopoverRootProps['autoFocus'];\n open?: PopoverRootProps['open'];\n defaultOpen?: PopoverRootProps['defaultOpen'];\n /**\n * Render the panel inline instead of in a portal. Only needed when it must stay inside its\n * parent's DOM subtree.\n */\n disablePortal?: boolean;\n onOpenChange?: (open: boolean) => void;\n positioning?: PopoverRootProps['positioning'];\n persistentElements?: PopoverRootProps['persistentElements'];\n}\n\n/**\n * Scrolls the body and shows a scroll-to-bottom button with a fade gradient while the content\n * isn't scrolled to the bottom — mirrors the BitkitDialog scrollable-body behaviour.\n */\nconst ScrollablePopoverBody = ({ children }: { children: ReactNode }) => {\n const styles = usePopoverStyles();\n const { open } = usePopoverContext();\n const contentRef = useRef<HTMLDivElement>(null);\n const [isScrollButtonVisible, setIsScrollButtonVisible] = useState(false);\n\n const updateScrollButtonVisibility = useCallback(() => {\n const content = contentRef.current;\n if (!content) {\n setIsScrollButtonVisible(false);\n return;\n }\n const didScrollToBottom = content.scrollTop >= content.scrollHeight - content.offsetHeight - 1;\n setIsScrollButtonVisible(!didScrollToBottom);\n }, []);\n\n useEffect(() => {\n const content = contentRef.current;\n if (!open || !content) return undefined;\n\n content.addEventListener('scroll', updateScrollButtonVisibility);\n const resizeObserver = new ResizeObserver(updateScrollButtonVisibility);\n resizeObserver.observe(content);\n\n return () => {\n content.removeEventListener('scroll', updateScrollButtonVisibility);\n resizeObserver.disconnect();\n };\n }, [open, updateScrollButtonVisibility]);\n\n return (\n <Box css={styles.scrollBody}>\n <Popover.Body ref={contentRef}>{children}</Popover.Body>\n {isScrollButtonVisible && (\n <>\n <Box css={styles.scrollGradient} />\n <chakra.button\n aria-label=\"Scroll to bottom\"\n css={styles.scrollButton}\n type=\"button\"\n onClick={() => {\n contentRef.current?.scrollTo({ top: contentRef.current.scrollHeight, behavior: 'smooth' });\n }}\n >\n <IconArrowDown color=\"icon/tertiary\" size=\"16\" />\n </chakra.button>\n </>\n )}\n </Box>\n );\n};\n\n/**\n * An anchored, non-modal floating panel built on Chakra Popover, styled as a compact dialog:\n * a header (title + close button), a scrollable body, and an optional footer. Anchor it with a\n * `trigger`, or — when the trigger can't be wrapped — control `open` and pass\n * `positioning.getAnchorElement`.\n *\n * The panel is mounted only while open, and renders in a portal so it escapes any ancestor that\n * traps stacking or clips overflow. Unlike the smaller floating components, it stays in the portal\n * inside a dialog too, like `BitkitCalendar`: a dialog's body would clip a panel this size.\n */\nconst BitkitPopover = ({\n children,\n title,\n footer,\n trigger,\n autoFocus,\n open,\n defaultOpen,\n disablePortal,\n onOpenChange,\n positioning,\n persistentElements,\n}: BitkitPopoverProps) => {\n const titleId = useId();\n\n return (\n <Popover.Root\n autoFocus={autoFocus}\n ids={{ title: titleId }}\n open={open}\n defaultOpen={defaultOpen}\n lazyMount\n onOpenChange={onOpenChange ? ({ open: isOpen }) => onOpenChange(isOpen) : undefined}\n positioning={{ placement: 'bottom-start', gutter: 4, ...positioning }}\n persistentElements={persistentElements}\n unmountOnExit\n >\n {trigger ? <Popover.Trigger asChild>{trigger}</Popover.Trigger> : null}\n <Portal disabled={disablePortal}>\n {/* z-index belongs on Content, not Positioner: Zag derives the positioner's inline z-index\n from Content's computed z-index, so a value set on Positioner is ignored. */}\n <Popover.Positioner>\n <Popover.Content aria-labelledby={titleId}>\n <Popover.Header>\n <Popover.Title>{title}</Popover.Title>\n <Popover.CloseTrigger asChild>\n <BitkitCloseButton aria-label=\"Close\" />\n </Popover.CloseTrigger>\n </Popover.Header>\n <ScrollablePopoverBody>{children}</ScrollablePopoverBody>\n {footer ? <Popover.Footer>{footer}</Popover.Footer> : null}\n </Popover.Content>\n </Popover.Positioner>\n </Portal>\n </Popover.Root>\n );\n};\n\nBitkitPopover.displayName = 'BitkitPopover';\n\nexport default BitkitPopover;\n"],"mappings":";;;;;;;;;;;;;AA0CA,IAAM,yBAAyB,EAAE,eAAwC;CACvE,MAAM,SAAS,iBAAiB;CAChC,MAAM,EAAE,SAAS,kBAAkB;CACnC,MAAM,aAAa,OAAuB,IAAI;CAC9C,MAAM,CAAC,uBAAuB,4BAA4B,SAAS,KAAK;CAExE,MAAM,+BAA+B,kBAAkB;EACrD,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,SAAS;GACZ,yBAAyB,KAAK;GAC9B;EACF;EACA,MAAM,oBAAoB,QAAQ,aAAa,QAAQ,eAAe,QAAQ,eAAe;EAC7F,yBAAyB,CAAC,iBAAiB;CAC7C,GAAG,CAAC,CAAC;CAEL,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,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T;IAAiB,mBAAiB;IAAlC,UAAA;KACE,qBAAC,QAAQ,QAAT,EAAA,UAAA,CACE,oBAAC,QAAQ,OAAT,EAAA,UAAgB,MAAqB,CAAA,GACrC,oBAAC,QAAQ,cAAT;MAAsB,SAAA;MACpB,UAAA,oBAAC,mBAAD,EAAmB,cAAW,QAAS,CAAA;KACnB,CAAA,CACR,EAAA,CAAA;KAChB,oBAAC,uBAAD,EAAwB,SAAgC,CAAA;KACvD,SAAS,oBAAC,QAAQ,QAAT,EAAA,UAAiB,OAAuB,CAAA,IAAI;IACvC;GACC,CAAA,EAAA,CAAA;EACd,CAAA,CACI;;AAElB;AAEA,cAAc,cAAc"}
1
+ {"version":3,"file":"BitkitPopover.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitPopover/BitkitPopover.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Popover, type PopoverRootProps, usePopoverContext, usePopoverStyles } from '@chakra-ui/react/popover';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { chakra } from '@chakra-ui/react/styled-system';\nimport { type ReactNode, useCallback, useEffect, useId, useRef, useState } from 'react';\n\nimport { IconArrowDown } from '../../icons';\nimport { ResetControlSize } from '../../utilities/ControlSizeContext';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\n\nexport interface BitkitPopoverProps {\n /** Body content of the panel. Scrolls within the panel when it overflows. */\n children: ReactNode;\n /** Header title, shown next to the close button. */\n title: ReactNode;\n /** Optional footer content (e.g. actions). Laid out with space between for a secondary/primary pair. */\n footer?: ReactNode;\n /**\n * Element that toggles and anchors the popover. Omit when anchoring via\n * `positioning.getAnchorElement` (e.g. a trigger that can't be wrapped) and controlling `open`.\n */\n trigger?: ReactNode;\n /**\n * Move focus into the panel when it opens (default `true`). Turn it off for a panel that opens\n * while the user is typing elsewhere, such as hints beside a focused input.\n */\n autoFocus?: PopoverRootProps['autoFocus'];\n open?: PopoverRootProps['open'];\n defaultOpen?: PopoverRootProps['defaultOpen'];\n /**\n * Render the panel inline instead of in a portal. Only needed when it must stay inside its\n * parent's DOM subtree.\n */\n disablePortal?: boolean;\n onOpenChange?: (open: boolean) => void;\n positioning?: PopoverRootProps['positioning'];\n persistentElements?: PopoverRootProps['persistentElements'];\n}\n\n/**\n * Scrolls the body and shows a scroll-to-bottom button with a fade gradient while the content\n * isn't scrolled to the bottom — mirrors the BitkitDialog scrollable-body behaviour.\n */\nconst ScrollablePopoverBody = ({ children }: { children: ReactNode }) => {\n const styles = usePopoverStyles();\n const { open } = usePopoverContext();\n const contentRef = useRef<HTMLDivElement>(null);\n const [isScrollButtonVisible, setIsScrollButtonVisible] = useState(false);\n\n const updateScrollButtonVisibility = useCallback(() => {\n const content = contentRef.current;\n if (!content) {\n setIsScrollButtonVisible(false);\n return;\n }\n const didScrollToBottom = content.scrollTop >= content.scrollHeight - content.offsetHeight - 1;\n setIsScrollButtonVisible(!didScrollToBottom);\n }, []);\n\n useEffect(() => {\n const content = contentRef.current;\n if (!open || !content) return undefined;\n\n content.addEventListener('scroll', updateScrollButtonVisibility);\n const resizeObserver = new ResizeObserver(updateScrollButtonVisibility);\n resizeObserver.observe(content);\n\n return () => {\n content.removeEventListener('scroll', updateScrollButtonVisibility);\n resizeObserver.disconnect();\n };\n }, [open, updateScrollButtonVisibility]);\n\n return (\n <Box css={styles.scrollBody}>\n <Popover.Body ref={contentRef}>{children}</Popover.Body>\n {isScrollButtonVisible && (\n <>\n <Box css={styles.scrollGradient} />\n <chakra.button\n aria-label=\"Scroll to bottom\"\n css={styles.scrollButton}\n type=\"button\"\n onClick={() => {\n contentRef.current?.scrollTo({ top: contentRef.current.scrollHeight, behavior: 'smooth' });\n }}\n >\n <IconArrowDown color=\"icon/tertiary\" size=\"16\" />\n </chakra.button>\n </>\n )}\n </Box>\n );\n};\n\n/**\n * An anchored, non-modal floating panel built on Chakra Popover, styled as a compact dialog:\n * a header (title + close button), a scrollable body, and an optional footer. Anchor it with a\n * `trigger`, or — when the trigger can't be wrapped — control `open` and pass\n * `positioning.getAnchorElement`.\n *\n * The panel is mounted only while open, and renders in a portal so it escapes any ancestor that\n * traps stacking or clips overflow. Unlike the smaller floating components, it stays in the portal\n * inside a dialog too, like `BitkitCalendar`: a dialog's body would clip a panel this size.\n */\nconst BitkitPopover = ({\n children,\n title,\n footer,\n trigger,\n autoFocus,\n open,\n defaultOpen,\n disablePortal,\n onOpenChange,\n positioning,\n persistentElements,\n}: BitkitPopoverProps) => {\n const titleId = useId();\n\n return (\n <Popover.Root\n autoFocus={autoFocus}\n ids={{ title: titleId }}\n open={open}\n defaultOpen={defaultOpen}\n lazyMount\n onOpenChange={onOpenChange ? ({ open: isOpen }) => onOpenChange(isOpen) : undefined}\n positioning={{ placement: 'bottom-start', gutter: 4, ...positioning }}\n persistentElements={persistentElements}\n unmountOnExit\n >\n {trigger ? <Popover.Trigger asChild>{trigger}</Popover.Trigger> : null}\n <Portal disabled={disablePortal}>\n {/* z-index belongs on Content, not Positioner: Zag derives the positioner's inline z-index\n from Content's computed z-index, so a value set on Positioner is ignored. */}\n <ResetControlSize>\n <Popover.Positioner>\n <Popover.Content aria-labelledby={titleId}>\n <Popover.Header>\n <Popover.Title>{title}</Popover.Title>\n <Popover.CloseTrigger asChild>\n <BitkitCloseButton aria-label=\"Close\" />\n </Popover.CloseTrigger>\n </Popover.Header>\n <ScrollablePopoverBody>{children}</ScrollablePopoverBody>\n {footer ? <Popover.Footer>{footer}</Popover.Footer> : null}\n </Popover.Content>\n </Popover.Positioner>\n </ResetControlSize>\n </Portal>\n </Popover.Root>\n );\n};\n\nBitkitPopover.displayName = 'BitkitPopover';\n\nexport default BitkitPopover;\n"],"mappings":";;;;;;;;;;;;;;AA2CA,IAAM,yBAAyB,EAAE,eAAwC;CACvE,MAAM,SAAS,iBAAiB;CAChC,MAAM,EAAE,SAAS,kBAAkB;CACnC,MAAM,aAAa,OAAuB,IAAI;CAC9C,MAAM,CAAC,uBAAuB,4BAA4B,SAAS,KAAK;CAExE,MAAM,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AAI,KAAA;EAC1E,aAAa;GAAE,WAAW;GAAgB,QAAQ;GAAG,GAAG;EAAY;EAChD;EACpB,eAAA;EATF,UAAA,CAWG,UAAU,oBAAC,QAAQ,SAAT;GAAiB,SAAA;GAAS,UAAA;EAAyB,CAAA,IAAI,MAClE,oBAAC,QAAD;GAAQ,UAAU;GAGhB,UAAA,oBAAC,kBAAD,EAAA,UACE,oBAAC,QAAQ,YAAT,EAAA,UACE,qBAAC,QAAQ,SAAT;IAAiB,mBAAiB;IAAlC,UAAA;KACE,qBAAC,QAAQ,QAAT,EAAA,UAAA,CACE,oBAAC,QAAQ,OAAT,EAAA,UAAgB,MAAqB,CAAA,GACrC,oBAAC,QAAQ,cAAT;MAAsB,SAAA;MACpB,UAAA,oBAAC,mBAAD,EAAmB,cAAW,QAAS,CAAA;KACnB,CAAA,CACR,EAAA,CAAA;KAChB,oBAAC,uBAAD,EAAwB,SAAgC,CAAA;KACvD,SAAS,oBAAC,QAAQ,QAAT,EAAA,UAAiB,OAAuB,CAAA,IAAI;IACvC;GACC,CAAA,EAAA,CAAA,EACJ,CAAA;EACZ,CAAA,CACI;;AAElB;AAEA,cAAc,cAAc"}
@@ -1,4 +1,5 @@
1
1
  import IconChevronDown from "../../icons/IconChevronDown.js";
2
+ import { useControlSizeFromContext } from "../../utilities/ControlSizeContext.js";
2
3
  import { flattenChildren } from "../../utilities/flattenChildren.js";
3
4
  import { withSubComponents } from "../../utilities/withSubComponents.js";
4
5
  import BitkitActionMenu_default from "../BitkitActionMenu/BitkitActionMenu.js";
@@ -43,7 +44,9 @@ var BitkitSplitButtonAction = forwardRef((props, ref) => {
43
44
  });
44
45
  BitkitSplitButtonAction.displayName = "BitkitSplitButtonAction";
45
46
  var BitkitSplitButton = forwardRef((props, ref) => {
46
- const { children, size = "lg", state, variant = "primary", ...rest } = props;
47
+ const { children, size: sizeProp, state, variant = "primary", ...rest } = props;
48
+ const contextSize = useControlSizeFromContext();
49
+ const size = sizeProp ?? contextSize ?? "lg";
47
50
  const childArray = flattenChildren(children);
48
51
  const actionChild = childArray.find(isValidActionItem);
49
52
  const menuItems = childArray.filter(isValidMenuItem);
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitSplitButton.js","names":["BitkitActionMenu","createContext"],"sources":["../../../lib/components/BitkitSplitButton/BitkitSplitButton.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { Group, type GroupProps } from '@chakra-ui/react/group';\nimport { Skeleton } from '@chakra-ui/react/skeleton';\nimport { type SystemStyleObject, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, isValidElement, type PropsWithChildren, type ReactElement, type ReactNode } from 'react';\n\nimport { IconChevronDown } from '../../icons';\nimport { flattenChildren } from '../../utilities/flattenChildren';\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitkitActionMenu from '../BitkitActionMenu/BitkitActionMenu';\nimport BitkitButton, {\n type BitkitButtonAsAnchorProps,\n type BitkitButtonAsButtonProps,\n} from '../BitkitButton/BitkitButton';\nimport BitkitIconButton from '../BitkitIconButton/BitkitIconButton';\n\ntype Size = 'lg' | 'md' | 'sm';\ntype Variant = 'primary' | 'secondary';\ntype State = 'disabled' | 'loading' | 'skeleton';\n\nconst isValidActionItem = (child: ReactNode): child is ReactElement => {\n return isValidElement(child) && child.type === BitkitSplitButtonAction;\n};\n\nconst isValidMenuItem = (child: ReactNode): child is ReactElement => {\n return (\n isValidElement(child) &&\n (child.type === BitkitActionMenu.Group ||\n child.type === BitkitActionMenu.Item ||\n child.type === BitkitActionMenu.Separator)\n );\n};\n\n// --- Context ---\ninterface SplitButtonContext {\n size: Size;\n variant: Variant;\n state: State | undefined;\n styles: Record<string, SystemStyleObject>;\n}\n\nconst [SplitButtonProvider, useSplitButtonContext] = createContext<SplitButtonContext>({\n name: 'SplitButtonContext',\n hookName: 'useSplitButtonContext',\n providerName: '<BitkitSplitButton />',\n});\n\n// --- Action ---\n// Split-button action can be a button (default) or anchor (when href is set). asChild is intentionally\n// not part of the API — routing-library elements don't fit cleanly into the Group attached layout.\n// The forwarded ref is HTMLElement so it covers both <button> and <a>.\ntype BitkitSplitButtonActionProps = Omit<\n BitkitButtonAsButtonProps | BitkitButtonAsAnchorProps,\n 'size' | 'variant' | 'state'\n>;\n\nconst BitkitSplitButtonAction = forwardRef<HTMLElement, BitkitSplitButtonActionProps>((props, ref) => {\n const { size, state, styles, variant } = useSplitButtonContext();\n\n if (props.href !== undefined) {\n // Anchor branch: BitkitButton's anchor variant doesn't allow state=\"loading\". Coerce to \"disabled\"\n // so a SplitButton-wide loading state still surfaces visually on a link-mode action.\n return (\n <BitkitButton\n {...(props as BitkitButtonAsAnchorProps)}\n css={styles.action}\n ref={ref}\n size={size}\n state={state === 'loading' ? 'disabled' : state}\n variant={variant}\n />\n );\n }\n\n return (\n <BitkitButton\n {...(props as BitkitButtonAsButtonProps)}\n css={styles.action}\n ref={ref}\n size={size}\n state={state}\n variant={variant}\n />\n );\n});\n\nBitkitSplitButtonAction.displayName = 'BitkitSplitButtonAction';\n\n// --- Root ---\nexport type BitkitSplitButtonProps = PropsWithChildren<\n Omit<GroupProps, 'attached' | 'children' | 'display'> & {\n size?: Size;\n variant?: Variant;\n state?: State;\n }\n>;\n\nconst BitkitSplitButton = forwardRef<HTMLDivElement, BitkitSplitButtonProps>((props, ref) => {\n const { children, size = 'lg', state, variant = 'primary', ...rest } = props;\n\n const childArray = flattenChildren(children);\n const actionChild = childArray.find(isValidActionItem);\n const menuItems = childArray.filter(isValidMenuItem);\n\n const menuSize = size === 'lg' ? 'lg' : 'md';\n const recipe = useSlotRecipe({ key: 'splitButton' });\n const styles = recipe({ variant });\n\n return (\n <SplitButtonProvider value={{ size, state, styles, variant }}>\n <Skeleton asChild loading={state === 'skeleton'}>\n <Group ref={ref} {...rest} attached display=\"inline-flex\">\n {actionChild}\n <BitkitActionMenu\n size={menuSize}\n trigger={\n <BitkitIconButton\n css={styles.trigger}\n icon={IconChevronDown}\n label=\"Toggle menu\"\n size={size}\n state={state === 'loading' ? 'disabled' : state}\n variant={variant}\n />\n }\n positioning={{ placement: 'bottom-end' }}\n >\n {menuItems}\n </BitkitActionMenu>\n </Group>\n </Skeleton>\n </SplitButtonProvider>\n );\n});\nBitkitSplitButton.displayName = 'BitkitSplitButton';\n\nexport default withSubComponents(BitkitSplitButton, {\n Action: BitkitSplitButtonAction,\n Group: BitkitActionMenu.Group,\n Item: BitkitActionMenu.Item,\n Separator: BitkitActionMenu.Separator,\n});\n"],"mappings":";;;;;;;;;;;;;AAqBA,IAAM,qBAAqB,UAA4C;CACrE,OAAO,eAAe,KAAK,KAAK,MAAM,SAAS;AACjD;AAEA,IAAM,mBAAmB,UAA4C;CACnE,OACE,eAAe,KAAK,MACnB,MAAM,SAASA,yBAAiB,SAC/B,MAAM,SAASA,yBAAiB,QAChC,MAAM,SAASA,yBAAiB;AAEtC;AAUA,IAAM,CAAC,qBAAqB,yBAAyBC,gBAAkC;CACrF,MAAM;CACN,UAAU;CACV,cAAc;AAChB,CAAC;AAWD,IAAM,0BAA0B,YAAuD,OAAO,QAAQ;CACpG,MAAM,EAAE,MAAM,OAAO,QAAQ,YAAY,sBAAsB;CAE/D,IAAI,MAAM,SAAS,KAAA,GAGjB,OACE,oBAAC,cAAD;EACE,GAAK;EACL,KAAK,OAAO;EACP;EACC;EACN,OAAO,UAAU,YAAY,aAAa;EACjC;CACV,CAAA;CAIL,OACE,oBAAC,cAAD;EACE,GAAK;EACL,KAAK,OAAO;EACP;EACC;EACC;EACE;CACV,CAAA;AAEL,CAAC;AAED,wBAAwB,cAAc;AAWtC,IAAM,oBAAoB,YAAoD,OAAO,QAAQ;CAC3F,MAAM,EAAE,UAAU,OAAO,MAAM,OAAO,UAAU,WAAW,GAAG,SAAS;CAEvE,MAAM,aAAa,gBAAgB,QAAQ;CAC3C,MAAM,cAAc,WAAW,KAAK,iBAAiB;CACrD,MAAM,YAAY,WAAW,OAAO,eAAe;CAEnD,MAAM,WAAW,SAAS,OAAO,OAAO;CAExC,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO,EAAE,QAAQ,CAAC;CAEjC,OACE,oBAAC,qBAAD;EAAqB,OAAO;GAAE;GAAM;GAAO;GAAQ;EAAQ;EACzD,UAAA,oBAAC,UAAD;GAAU,SAAA;GAAQ,SAAS,UAAU;GACnC,UAAA,qBAAC,OAAD;IAAY;IAAK,GAAI;IAAM,UAAA;IAAS,SAAQ;IAA5C,UAAA,CACG,aACD,oBAACD,0BAAD;KACE,MAAM;KACN,SACE,oBAAC,kBAAD;MACE,KAAK,OAAO;MACZ,MAAM;MACN,OAAM;MACA;MACN,OAAO,UAAU,YAAY,aAAa;MACjC;KACV,CAAA;KAEH,aAAa,EAAE,WAAW,aAAa;KAEtC,UAAA;IACe,CAAA,CACb;;EACC,CAAA;CACS,CAAA;AAEzB,CAAC;AACD,kBAAkB,cAAc;AAEhC,IAAA,4BAAe,kBAAkB,mBAAmB;CAClD,QAAQ;CACR,OAAOA,yBAAiB;CACxB,MAAMA,yBAAiB;CACvB,WAAWA,yBAAiB;AAC9B,CAAC"}
1
+ {"version":3,"file":"BitkitSplitButton.js","names":["BitkitActionMenu","createContext"],"sources":["../../../lib/components/BitkitSplitButton/BitkitSplitButton.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { Group, type GroupProps } from '@chakra-ui/react/group';\nimport { Skeleton } from '@chakra-ui/react/skeleton';\nimport { type SystemStyleObject, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, isValidElement, type PropsWithChildren, type ReactElement, type ReactNode } from 'react';\n\nimport { IconChevronDown } from '../../icons';\nimport { useControlSizeFromContext } from '../../utilities/ControlSizeContext';\nimport { flattenChildren } from '../../utilities/flattenChildren';\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitkitActionMenu from '../BitkitActionMenu/BitkitActionMenu';\nimport BitkitButton, {\n type BitkitButtonAsAnchorProps,\n type BitkitButtonAsButtonProps,\n} from '../BitkitButton/BitkitButton';\nimport BitkitIconButton from '../BitkitIconButton/BitkitIconButton';\n\ntype Size = 'lg' | 'md' | 'sm';\ntype Variant = 'primary' | 'secondary';\ntype State = 'disabled' | 'loading' | 'skeleton';\n\nconst isValidActionItem = (child: ReactNode): child is ReactElement => {\n return isValidElement(child) && child.type === BitkitSplitButtonAction;\n};\n\nconst isValidMenuItem = (child: ReactNode): child is ReactElement => {\n return (\n isValidElement(child) &&\n (child.type === BitkitActionMenu.Group ||\n child.type === BitkitActionMenu.Item ||\n child.type === BitkitActionMenu.Separator)\n );\n};\n\n// --- Context ---\ninterface SplitButtonContext {\n size: Size;\n variant: Variant;\n state: State | undefined;\n styles: Record<string, SystemStyleObject>;\n}\n\nconst [SplitButtonProvider, useSplitButtonContext] = createContext<SplitButtonContext>({\n name: 'SplitButtonContext',\n hookName: 'useSplitButtonContext',\n providerName: '<BitkitSplitButton />',\n});\n\n// --- Action ---\n// Split-button action can be a button (default) or anchor (when href is set). asChild is intentionally\n// not part of the API — routing-library elements don't fit cleanly into the Group attached layout.\n// The forwarded ref is HTMLElement so it covers both <button> and <a>.\ntype BitkitSplitButtonActionProps = Omit<\n BitkitButtonAsButtonProps | BitkitButtonAsAnchorProps,\n 'size' | 'variant' | 'state'\n>;\n\nconst BitkitSplitButtonAction = forwardRef<HTMLElement, BitkitSplitButtonActionProps>((props, ref) => {\n const { size, state, styles, variant } = useSplitButtonContext();\n\n if (props.href !== undefined) {\n // Anchor branch: BitkitButton's anchor variant doesn't allow state=\"loading\". Coerce to \"disabled\"\n // so a SplitButton-wide loading state still surfaces visually on a link-mode action.\n return (\n <BitkitButton\n {...(props as BitkitButtonAsAnchorProps)}\n css={styles.action}\n ref={ref}\n size={size}\n state={state === 'loading' ? 'disabled' : state}\n variant={variant}\n />\n );\n }\n\n return (\n <BitkitButton\n {...(props as BitkitButtonAsButtonProps)}\n css={styles.action}\n ref={ref}\n size={size}\n state={state}\n variant={variant}\n />\n );\n});\n\nBitkitSplitButtonAction.displayName = 'BitkitSplitButtonAction';\n\n// --- Root ---\nexport type BitkitSplitButtonProps = PropsWithChildren<\n Omit<GroupProps, 'attached' | 'children' | 'display'> & {\n size?: Size;\n variant?: Variant;\n state?: State;\n }\n>;\n\nconst BitkitSplitButton = forwardRef<HTMLDivElement, BitkitSplitButtonProps>((props, ref) => {\n const { children, size: sizeProp, state, variant = 'primary', ...rest } = props;\n const contextSize = useControlSizeFromContext();\n const size = sizeProp ?? contextSize ?? 'lg';\n\n const childArray = flattenChildren(children);\n const actionChild = childArray.find(isValidActionItem);\n const menuItems = childArray.filter(isValidMenuItem);\n\n const menuSize = size === 'lg' ? 'lg' : 'md';\n const recipe = useSlotRecipe({ key: 'splitButton' });\n const styles = recipe({ variant });\n\n return (\n <SplitButtonProvider value={{ size, state, styles, variant }}>\n <Skeleton asChild loading={state === 'skeleton'}>\n <Group ref={ref} {...rest} attached display=\"inline-flex\">\n {actionChild}\n <BitkitActionMenu\n size={menuSize}\n trigger={\n <BitkitIconButton\n css={styles.trigger}\n icon={IconChevronDown}\n label=\"Toggle menu\"\n size={size}\n state={state === 'loading' ? 'disabled' : state}\n variant={variant}\n />\n }\n positioning={{ placement: 'bottom-end' }}\n >\n {menuItems}\n </BitkitActionMenu>\n </Group>\n </Skeleton>\n </SplitButtonProvider>\n );\n});\nBitkitSplitButton.displayName = 'BitkitSplitButton';\n\nexport default withSubComponents(BitkitSplitButton, {\n Action: BitkitSplitButtonAction,\n Group: BitkitActionMenu.Group,\n Item: BitkitActionMenu.Item,\n Separator: BitkitActionMenu.Separator,\n});\n"],"mappings":";;;;;;;;;;;;;;AAsBA,IAAM,qBAAqB,UAA4C;CACrE,OAAO,eAAe,KAAK,KAAK,MAAM,SAAS;AACjD;AAEA,IAAM,mBAAmB,UAA4C;CACnE,OACE,eAAe,KAAK,MACnB,MAAM,SAASA,yBAAiB,SAC/B,MAAM,SAASA,yBAAiB,QAChC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AE,WAAW,aAAa;KAEtC,UAAA;IACe,CAAA,CACb;;EACC,CAAA;CACS,CAAA;AAEzB,CAAC;AACD,kBAAkB,cAAc;AAEhC,IAAA,4BAAe,kBAAkB,mBAAmB;CAClD,QAAQ;CACR,OAAOA,yBAAiB;CACxB,MAAMA,yBAAiB;CACvB,WAAWA,yBAAiB;AAC9B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { useControlSizeFromContext } from "../../utilities/ControlSizeContext.js";
1
2
  import opensPopup from "../../utilities/opensPopup.js";
2
3
  import BitkitLabelTooltip from "../BitkitLabelTooltip/BitkitLabelTooltip.js";
3
4
  import { chakra, useRecipe } from "@chakra-ui/react/styled-system";
@@ -7,7 +8,9 @@ import { Skeleton } from "@chakra-ui/react/skeleton";
7
8
  import { Toggle } from "@chakra-ui/react/toggle";
8
9
  // lib/components/BitkitToggleButton/BitkitToggleButton.tsx
9
10
  var BitkitToggleButton = forwardRef((props, ref) => {
10
- const { icon: Icon, label, size = "md", state, isSelected, tooltipProps, defaultSelected, onSelectedChange, css, ...rest } = props;
11
+ const { icon: Icon, label, state, isSelected, tooltipProps, defaultSelected, onSelectedChange, css, size: sizeProp, ...rest } = props;
12
+ const contextSize = useControlSizeFromContext();
13
+ const size = sizeProp ?? contextSize ?? "md";
11
14
  const recipe = useRecipe({ key: "toggleButton" });
12
15
  const iconSize = size === "lg" ? "24" : "16";
13
16
  const isPopupTrigger = opensPopup(props);
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitToggleButton.js","names":[],"sources":["../../../lib/components/BitkitToggleButton/BitkitToggleButton.tsx"],"sourcesContent":["import { Skeleton } from '@chakra-ui/react/skeleton';\nimport { chakra, type HTMLChakraProps, useRecipe } from '@chakra-ui/react/styled-system';\nimport { Toggle } from '@chakra-ui/react/toggle';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport opensPopup from '../../utilities/opensPopup';\nimport BitkitLabelTooltip, { type BitkitLabelTooltipProps } from '../BitkitLabelTooltip/BitkitLabelTooltip';\n\nexport interface BitkitToggleButtonProps extends Omit<HTMLChakraProps<'button'>, 'children' | 'disabled' | 'size'> {\n icon: BitkitIconComponent;\n label: string;\n size?: 'sm' | 'md' | 'lg';\n state?: 'disabled' | 'skeleton';\n isSelected?: boolean;\n /**\n * Overrides for the label tooltip. It is off by default when this control opens a popup — a menu,\n * select or popover trigger — where the panel is the affordance and a tooltip would hover over it.\n * Pass `{ disabled: false }` to bring it back. The accessible name comes from `label` either way.\n */\n tooltipProps?: Partial<Omit<BitkitLabelTooltipProps, 'children' | 'text'>>;\n defaultSelected?: boolean;\n onSelectedChange?: (selected: boolean) => void;\n}\n\nconst BitkitToggleButton = forwardRef<HTMLButtonElement, BitkitToggleButtonProps>((props, ref) => {\n const {\n icon: Icon,\n label,\n size = 'md',\n state,\n isSelected,\n tooltipProps,\n defaultSelected,\n onSelectedChange,\n css,\n ...rest\n } = props;\n\n const recipe = useRecipe({ key: 'toggleButton' });\n const iconSize = size === 'lg' ? '24' : '16';\n const isPopupTrigger = opensPopup(props);\n\n return (\n <BitkitLabelTooltip text={label} disabled={isPopupTrigger} {...tooltipProps}>\n <Skeleton loading={state === 'skeleton'} borderRadius=\"4\" display=\"flex\" width=\"fit-content\">\n <Toggle.Root\n asChild\n disabled={state === 'disabled'}\n defaultPressed={defaultSelected}\n onPressedChange={onSelectedChange}\n pressed={isSelected}\n >\n <chakra.button ref={ref} aria-label={label} {...rest} css={[recipe({ size }), css]}>\n <Icon size={iconSize} />\n </chakra.button>\n </Toggle.Root>\n </Skeleton>\n </BitkitLabelTooltip>\n );\n});\n\nBitkitToggleButton.displayName = 'BitkitToggleButton';\n\nexport default BitkitToggleButton;\n"],"mappings":";;;;;;;;AAyBA,IAAM,qBAAqB,YAAwD,OAAO,QAAQ;CAChG,MAAM,EACJ,MAAM,MACN,OACA,OAAO,MACP,OACA,YACA,cACA,iBACA,kBACA,KACA,GAAG,SACD;CAEJ,MAAM,SAAS,UAAU,EAAE,KAAK,eAAe,CAAC;CAChD,MAAM,WAAW,SAAS,OAAO,OAAO;CACxC,MAAM,iBAAiB,WAAW,KAAK;CAEvC,OACE,oBAAC,oBAAD;EAAoB,MAAM;EAAO,UAAU;EAAgB,GAAI;EAC7D,UAAA,oBAAC,UAAD;GAAU,SAAS,UAAU;GAAY,cAAa;GAAI,SAAQ;GAAO,OAAM;GAC7E,UAAA,oBAAC,OAAO,MAAR;IACE,SAAA;IACA,UAAU,UAAU;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,SAAS;IAET,UAAA,oBAAC,OAAO,QAAR;KAAoB;KAAK,cAAY;KAAO,GAAI;KAAM,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,GAAG;KAC/E,UAAA,oBAAC,MAAD,EAAM,MAAM,SAAW,CAAA;IACV,CAAA;GACJ,CAAA;EACL,CAAA;CACQ,CAAA;AAExB,CAAC;AAED,mBAAmB,cAAc"}
1
+ {"version":3,"file":"BitkitToggleButton.js","names":[],"sources":["../../../lib/components/BitkitToggleButton/BitkitToggleButton.tsx"],"sourcesContent":["import { Skeleton } from '@chakra-ui/react/skeleton';\nimport { chakra, type HTMLChakraProps, useRecipe } from '@chakra-ui/react/styled-system';\nimport { Toggle } from '@chakra-ui/react/toggle';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport { useControlSizeFromContext } from '../../utilities/ControlSizeContext';\nimport opensPopup from '../../utilities/opensPopup';\nimport BitkitLabelTooltip, { type BitkitLabelTooltipProps } from '../BitkitLabelTooltip/BitkitLabelTooltip';\n\nexport interface BitkitToggleButtonProps extends Omit<HTMLChakraProps<'button'>, 'children' | 'disabled' | 'size'> {\n icon: BitkitIconComponent;\n label: string;\n size?: 'sm' | 'md' | 'lg';\n state?: 'disabled' | 'skeleton';\n isSelected?: boolean;\n /**\n * Overrides for the label tooltip. It is off by default when this control opens a popup — a menu,\n * select or popover trigger — where the panel is the affordance and a tooltip would hover over it.\n * Pass `{ disabled: false }` to bring it back. The accessible name comes from `label` either way.\n */\n tooltipProps?: Partial<Omit<BitkitLabelTooltipProps, 'children' | 'text'>>;\n defaultSelected?: boolean;\n onSelectedChange?: (selected: boolean) => void;\n}\n\nconst BitkitToggleButton = forwardRef<HTMLButtonElement, BitkitToggleButtonProps>((props, ref) => {\n const {\n icon: Icon,\n label,\n state,\n isSelected,\n tooltipProps,\n defaultSelected,\n onSelectedChange,\n css,\n size: sizeProp,\n ...rest\n } = props;\n const contextSize = useControlSizeFromContext();\n const size = sizeProp ?? contextSize ?? 'md';\n\n const recipe = useRecipe({ key: 'toggleButton' });\n const iconSize = size === 'lg' ? '24' : '16';\n const isPopupTrigger = opensPopup(props);\n\n return (\n <BitkitLabelTooltip text={label} disabled={isPopupTrigger} {...tooltipProps}>\n <Skeleton loading={state === 'skeleton'} borderRadius=\"4\" display=\"flex\" width=\"fit-content\">\n <Toggle.Root\n asChild\n disabled={state === 'disabled'}\n defaultPressed={defaultSelected}\n onPressedChange={onSelectedChange}\n pressed={isSelected}\n >\n <chakra.button ref={ref} aria-label={label} {...rest} css={[recipe({ size }), css]}>\n <Icon size={iconSize} />\n </chakra.button>\n </Toggle.Root>\n </Skeleton>\n </BitkitLabelTooltip>\n );\n});\n\nBitkitToggleButton.displayName = 'BitkitToggleButton';\n\nexport default BitkitToggleButton;\n"],"mappings":";;;;;;;;;AA0BA,IAAM,qBAAqB,YAAwD,OAAO,QAAQ;CAChG,MAAM,EACJ,MAAM,MACN,OACA,OACA,YACA,cACA,iBACA,kBACA,KACA,MAAM,UACN,GAAG,SACD;CACJ,MAAM,cAAc,0BAA0B;CAC9C,MAAM,OAAO,YAAY,eAAe;CAExC,MAAM,SAAS,UAAU,EAAE,KAAK,eAAe,CAAC;CAChD,MAAM,WAAW,SAAS,OAAO,OAAO;CACxC,MAAM,iBAAiB,WAAW,KAAK;CAEvC,OACE,oBAAC,oBAAD;EAAoB,MAAM;EAAO,UAAU;EAAgB,GAAI;EAC7D,UAAA,oBAAC,UAAD;GAAU,SAAS,UAAU;GAAY,cAAa;GAAI,SAAQ;GAAO,OAAM;GAC7E,UAAA,oBAAC,OAAO,MAAR;IACE,SAAA;IACA,UAAU,UAAU;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,SAAS;IAET,UAAA,oBAAC,OAAO,QAAR;KAAoB;KAAK,cAAY;KAAO,GAAI;KAAM,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,GAAG;KAC/E,UAAA,oBAAC,MAAD,EAAM,MAAM,SAAW,CAAA;IACV,CAAA;GACJ,CAAA;EACL,CAAA;CACQ,CAAA;AAExB,CAAC;AAED,mBAAmB,cAAc"}
@@ -33,6 +33,7 @@ export { type BitkitUIHeaderMode, type BitkitUIHeaderModeSwitchProps } from './U
33
33
  export { type BitkitUIHeaderNavButtonProps } from './UIHeaderNavButton';
34
34
  export { type BitkitUIHeaderSearchProps } from './UIHeaderSearch';
35
35
  export { uiHeaderBottom } from './usePublishedBottom';
36
+ export { default as useUiHeaderBottom } from './useUiHeaderBottom';
36
37
  declare const _default: import('react').ForwardRefExoticComponent<BitkitUIHeaderProps & import('react').RefAttributes<HTMLElement>> & {
37
38
  Account: import('react').ForwardRefExoticComponent<import('./UIHeaderAccount').BitkitUIHeaderAccountProps & import('react').RefAttributes<HTMLButtonElement>>;
38
39
  Button: import('react').ForwardRefExoticComponent<import('./UIHeaderButton').BitkitUIHeaderButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,6 +1,7 @@
1
1
  import { withSubComponents } from "../../utilities/withSubComponents.js";
2
2
  import BitbotLogoWithText from "../BitbotLogoWithText/BitbotLogoWithText.js";
3
3
  import UIHeaderAccount from "./UIHeaderAccount.js";
4
+ import useUiHeaderBottom from "./useUiHeaderBottom.js";
4
5
  import UIHeaderButton from "./UIHeaderButton.js";
5
6
  import { UIHeaderContextProvider } from "./UIHeaderContext.js";
6
7
  import UIHeaderControl from "./UIHeaderControl.js";
@@ -119,6 +120,6 @@ var BitkitUIHeader_default = withSubComponents(BitkitUIHeader, {
119
120
  NavButton: UIHeaderNavButton,
120
121
  Search: UIHeaderSearch
121
122
  });
122
- export { BitkitUIHeader_default as default, uiHeaderBottom, uiHeaderHeight, uiHeaderHeightPx };
123
+ export { BitkitUIHeader_default as default, uiHeaderBottom, uiHeaderHeight, uiHeaderHeightPx, useUiHeaderBottom };
123
124
 
124
125
  //# sourceMappingURL=BitkitUIHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitUIHeader.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/BitkitUIHeader.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type ReactNode, useMemo, useRef } from 'react';\n\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitbotLogoWithText from '../BitbotLogoWithText/BitbotLogoWithText';\nimport UIHeaderAccount from './UIHeaderAccount';\nimport UIHeaderButton from './UIHeaderButton';\nimport { UIHeaderContextProvider } from './UIHeaderContext';\nimport UIHeaderControl from './UIHeaderControl';\nimport UIHeaderModeSwitch from './UIHeaderModeSwitch';\nimport UIHeaderNavButton from './UIHeaderNavButton';\nimport uiHeaderPart from './uiHeaderPart';\nimport UIHeaderSearch from './UIHeaderSearch';\nimport usePublishedBottom from './usePublishedBottom';\n\nexport interface BitkitUIHeaderProps extends Omit<BoxProps, 'children'> {\n /**\n * Content below the bar, inside the header itself — account-wide notices and the like. It is\n * part of the header rather than the page, so a pinned header keeps it pinned too, and a page\n * reserving room for the header has one element to measure rather than two to add up.\n *\n * Measure it is the word: the banner's height is your content, so a header carrying one is\n * taller than `uiHeaderHeight`. A pinned header needs the measurement, and a header that scrolls\n * with the page needs neither.\n */\n banner?: ReactNode;\n /** The trailing controls, in the order they should appear. */\n children?: ReactNode;\n /**\n * The slot before the logo, shown only below the `tablet` breakpoint. It takes a\n * `BitkitUIHeader.NavButton`, which opens the navigation drawer, or a `BitkitUIHeader.Control`\n * for an account with no workspace to navigate yet.\n *\n * It is a slot rather than a child because the design fixes where it goes: children all land in\n * the trailing cluster, on the far side of the logo.\n */\n leading?: ReactNode;\n /** Where the logo links to. */\n logoHref?: string;\n}\n\n/**\n * The platform's top bar: the Bitrise logo, and the controls for everything that is not navigation\n * — search, changelog, help, notifications, the account.\n *\n * ```tsx\n * <BitkitUIHeader leading={<BitkitUIHeader.NavButton name={workspace} onClick={openNav} />}>\n * <BitkitUIHeader.Button icon={IconSparkle} onClick={askAI} variant=\"secondary\">Ask AI</BitkitUIHeader.Button>\n * <BitkitUIHeader.Search onOpenChange={setSearchOpen} onValueChange={setQuery} open={searchOpen} value={query} />\n * <BitkitUIHeader.Control icon={IconBell} label=\"Notifications\" onClick={toggleNotifications} selected={isOpen} />\n * <BitkitUIHeader.Account name={user.name} onClick={toggleAccount} src={user.avatar} />\n * <BitkitUIHeader.ModeSwitch onValueChange={setMode} value={mode} />\n * </BitkitUIHeader>\n * ```\n *\n * It does not position itself. The consumer decides whether it scrolls with the page or is pinned\n * to the top of it, which is what lets a page put its own chrome above the header. Pin it with the\n * style props the root forwards, and reserve `uiHeaderHeight` for it in the page below, or\n * `uiHeaderHeightPx` where the layout needs a number rather than a token. Those are the bar's\n * height: a header with a `banner` is taller, and a pinned one is measured rather than assumed.\n *\n * It measures itself for you: `uiHeaderBottom` is where the content below a pinned\n * (`position: fixed`) header can start — its bottom edge, the banner and anything pushing it down\n * included, or `0` when it isn't pinned. Use it for whatever has to clear the header (`insetBlockStart={uiHeaderBottom}`).\n *\n * The panels the controls open are the consumer's: a control takes a `selected` flag and paints\n * itself as the open one, and nothing more. That keeps a drawer's content, placement and state\n * where the product can see them. `ModeSwitch` is the one exception — it owns the menu it opens,\n * because the three appearance options are the same everywhere; the consumer holds the chosen mode\n * and applies it.\n *\n * It carries its own responsive behaviour and needs no breakpoint hook. Below `tablet` the\n * `leading` slot appears, the logo centres, the account button becomes an icon, and search stops\n * opening a field in the bar.\n */\nconst BitkitUIHeader = forwardRef<HTMLElement, BitkitUIHeaderProps>((props, ref) => {\n const { banner, children, css, leading, logoHref = '/', ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'uiHeader' });\n const styles = recipe();\n\n const barRef = useRef<HTMLDivElement>(null);\n const rootRef = usePublishedBottom(ref);\n\n const context = useMemo(() => ({ barRef, styles }), [styles]);\n\n return (\n <UIHeaderContextProvider value={context}>\n <Box ref={rootRef} asChild {...rest} css={[styles.root, css]}>\n <header {...uiHeaderPart('root')}>\n <Box ref={barRef} css={styles.bar} {...uiHeaderPart('bar')}>\n <Box css={styles.leading} {...uiHeaderPart('leading')}>\n {leading}\n </Box>\n <Box css={styles.spacer} {...uiHeaderPart('spacer')} />\n <Box css={styles.logoBlock} {...uiHeaderPart('logo-block')}>\n <Box asChild css={styles.logoLink}>\n <a aria-label=\"Bitrise Dashboard\" href={logoHref} {...uiHeaderPart('logo-link')}>\n <BitbotLogoWithText />\n </a>\n </Box>\n </Box>\n <Box css={styles.actions} {...uiHeaderPart('actions')}>\n {children}\n </Box>\n </Box>\n {!!banner && (\n <Box css={styles.banner} {...uiHeaderPart('banner')}>\n {banner}\n </Box>\n )}\n </header>\n </Box>\n </UIHeaderContextProvider>\n );\n});\n\nexport { uiHeaderHeight, uiHeaderHeightPx } from '../../theme/slot-recipes/UIHeader.recipe';\nexport { type BitkitUIHeaderAccountProps } from './UIHeaderAccount';\nexport { type BitkitUIHeaderButtonProps } from './UIHeaderButton';\nexport {\n type BitkitUIHeaderBadge,\n type BitkitUIHeaderControlAsAnchorProps,\n type BitkitUIHeaderControlAsButtonProps,\n type BitkitUIHeaderControlProps,\n} from './UIHeaderControl';\nexport { type BitkitUIHeaderMode, type BitkitUIHeaderModeSwitchProps } from './UIHeaderModeSwitch';\nexport { type BitkitUIHeaderNavButtonProps } from './UIHeaderNavButton';\nexport { type BitkitUIHeaderSearchProps } from './UIHeaderSearch';\nexport { uiHeaderBottom } from './usePublishedBottom';\n\nBitkitUIHeader.displayName = 'BitkitUIHeader';\n\nexport default withSubComponents(BitkitUIHeader, {\n Account: UIHeaderAccount,\n Button: UIHeaderButton,\n Control: UIHeaderControl,\n ModeSwitch: UIHeaderModeSwitch,\n NavButton: UIHeaderNavButton,\n Search: UIHeaderSearch,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,IAAM,iBAAiB,YAA8C,OAAO,QAAQ;CAClF,MAAM,EAAE,QAAQ,UAAU,KAAK,SAAS,WAAW,KAAK,GAAG,SAAS;CAGpE,MAAM,SADS,cAAc,EAAE,KAAK,WAAW,CAChC,CAAA,CAAO;CAEtB,MAAM,SAAS,OAAuB,IAAI;CAC1C,MAAM,UAAU,mBAAmB,GAAG;CAEtC,MAAM,UAAU,eAAe;EAAE;EAAQ;CAAO,IAAI,CAAC,MAAM,CAAC;CAE5D,OACE,oBAAC,yBAAD;EAAyB,OAAO;EAC9B,UAAA,oBAAC,KAAD;GAAK,KAAK;GAAS,SAAA;GAAQ,GAAI;GAAM,KAAK,CAAC,OAAO,MAAM,GAAG;GACzD,UAAA,qBAAC,UAAD;IAAQ,GAAI,aAAa,MAAM;IAA/B,UAAA,CACE,qBAAC,KAAD;KAAK,KAAK;KAAQ,KAAK,OAAO;KAAK,GAAI,aAAa,KAAK;KAAzD,UAAA;MACE,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAS,GAAI,aAAa,SAAS;OACjD,UAAA;MACE,CAAA;MACL,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAQ,GAAI,aAAa,QAAQ;MAAI,CAAA;MACtD,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAW,GAAI,aAAa,YAAY;OACvD,UAAA,oBAAC,KAAD;QAAK,SAAA;QAAQ,KAAK,OAAO;QACvB,UAAA,oBAAC,KAAD;SAAG,cAAW;SAAoB,MAAM;SAAU,GAAI,aAAa,WAAW;SAC5E,UAAA,oBAAC,oBAAD,CAAqB,CAAA;QACpB,CAAA;OACA,CAAA;MACF,CAAA;MACL,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAS,GAAI,aAAa,SAAS;OACjD;MACE,CAAA;KACF;IACJ,CAAA,GAAA,CAAC,CAAC,UACD,oBAAC,KAAD;KAAK,KAAK,OAAO;KAAQ,GAAI,aAAa,QAAQ;KAC/C,UAAA;IACE,CAAA,CAED;;EACL,CAAA;CACkB,CAAA;AAE7B,CAAC;AAgBD,eAAe,cAAc;AAE7B,IAAA,yBAAe,kBAAkB,gBAAgB;CAC/C,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,WAAW;CACX,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"BitkitUIHeader.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/BitkitUIHeader.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type ReactNode, useMemo, useRef } from 'react';\n\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitbotLogoWithText from '../BitbotLogoWithText/BitbotLogoWithText';\nimport UIHeaderAccount from './UIHeaderAccount';\nimport UIHeaderButton from './UIHeaderButton';\nimport { UIHeaderContextProvider } from './UIHeaderContext';\nimport UIHeaderControl from './UIHeaderControl';\nimport UIHeaderModeSwitch from './UIHeaderModeSwitch';\nimport UIHeaderNavButton from './UIHeaderNavButton';\nimport uiHeaderPart from './uiHeaderPart';\nimport UIHeaderSearch from './UIHeaderSearch';\nimport usePublishedBottom from './usePublishedBottom';\n\nexport interface BitkitUIHeaderProps extends Omit<BoxProps, 'children'> {\n /**\n * Content below the bar, inside the header itself — account-wide notices and the like. It is\n * part of the header rather than the page, so a pinned header keeps it pinned too, and a page\n * reserving room for the header has one element to measure rather than two to add up.\n *\n * Measure it is the word: the banner's height is your content, so a header carrying one is\n * taller than `uiHeaderHeight`. A pinned header needs the measurement, and a header that scrolls\n * with the page needs neither.\n */\n banner?: ReactNode;\n /** The trailing controls, in the order they should appear. */\n children?: ReactNode;\n /**\n * The slot before the logo, shown only below the `tablet` breakpoint. It takes a\n * `BitkitUIHeader.NavButton`, which opens the navigation drawer, or a `BitkitUIHeader.Control`\n * for an account with no workspace to navigate yet.\n *\n * It is a slot rather than a child because the design fixes where it goes: children all land in\n * the trailing cluster, on the far side of the logo.\n */\n leading?: ReactNode;\n /** Where the logo links to. */\n logoHref?: string;\n}\n\n/**\n * The platform's top bar: the Bitrise logo, and the controls for everything that is not navigation\n * — search, changelog, help, notifications, the account.\n *\n * ```tsx\n * <BitkitUIHeader leading={<BitkitUIHeader.NavButton name={workspace} onClick={openNav} />}>\n * <BitkitUIHeader.Button icon={IconSparkle} onClick={askAI} variant=\"secondary\">Ask AI</BitkitUIHeader.Button>\n * <BitkitUIHeader.Search onOpenChange={setSearchOpen} onValueChange={setQuery} open={searchOpen} value={query} />\n * <BitkitUIHeader.Control icon={IconBell} label=\"Notifications\" onClick={toggleNotifications} selected={isOpen} />\n * <BitkitUIHeader.Account name={user.name} onClick={toggleAccount} src={user.avatar} />\n * <BitkitUIHeader.ModeSwitch onValueChange={setMode} value={mode} />\n * </BitkitUIHeader>\n * ```\n *\n * It does not position itself. The consumer decides whether it scrolls with the page or is pinned\n * to the top of it, which is what lets a page put its own chrome above the header. Pin it with the\n * style props the root forwards, and reserve `uiHeaderHeight` for it in the page below, or\n * `uiHeaderHeightPx` where the layout needs a number rather than a token. Those are the bar's\n * height: a header with a `banner` is taller, and a pinned one is measured rather than assumed.\n *\n * It measures itself for you: `uiHeaderBottom` is where the content below a pinned\n * (`position: fixed`) header can start — its bottom edge, the banner and anything pushing it down\n * included, or `0` when it isn't pinned. Use it for whatever has to clear the header (`insetBlockStart={uiHeaderBottom}`).\n *\n * The panels the controls open are the consumer's: a control takes a `selected` flag and paints\n * itself as the open one, and nothing more. That keeps a drawer's content, placement and state\n * where the product can see them. `ModeSwitch` is the one exception — it owns the menu it opens,\n * because the three appearance options are the same everywhere; the consumer holds the chosen mode\n * and applies it.\n *\n * It carries its own responsive behaviour and needs no breakpoint hook. Below `tablet` the\n * `leading` slot appears, the logo centres, the account button becomes an icon, and search stops\n * opening a field in the bar.\n */\nconst BitkitUIHeader = forwardRef<HTMLElement, BitkitUIHeaderProps>((props, ref) => {\n const { banner, children, css, leading, logoHref = '/', ...rest } = props;\n\n const recipe = useSlotRecipe({ key: 'uiHeader' });\n const styles = recipe();\n\n const barRef = useRef<HTMLDivElement>(null);\n const rootRef = usePublishedBottom(ref);\n\n const context = useMemo(() => ({ barRef, styles }), [styles]);\n\n return (\n <UIHeaderContextProvider value={context}>\n <Box ref={rootRef} asChild {...rest} css={[styles.root, css]}>\n <header {...uiHeaderPart('root')}>\n <Box ref={barRef} css={styles.bar} {...uiHeaderPart('bar')}>\n <Box css={styles.leading} {...uiHeaderPart('leading')}>\n {leading}\n </Box>\n <Box css={styles.spacer} {...uiHeaderPart('spacer')} />\n <Box css={styles.logoBlock} {...uiHeaderPart('logo-block')}>\n <Box asChild css={styles.logoLink}>\n <a aria-label=\"Bitrise Dashboard\" href={logoHref} {...uiHeaderPart('logo-link')}>\n <BitbotLogoWithText />\n </a>\n </Box>\n </Box>\n <Box css={styles.actions} {...uiHeaderPart('actions')}>\n {children}\n </Box>\n </Box>\n {!!banner && (\n <Box css={styles.banner} {...uiHeaderPart('banner')}>\n {banner}\n </Box>\n )}\n </header>\n </Box>\n </UIHeaderContextProvider>\n );\n});\n\nexport { uiHeaderHeight, uiHeaderHeightPx } from '../../theme/slot-recipes/UIHeader.recipe';\nexport { type BitkitUIHeaderAccountProps } from './UIHeaderAccount';\nexport { type BitkitUIHeaderButtonProps } from './UIHeaderButton';\nexport {\n type BitkitUIHeaderBadge,\n type BitkitUIHeaderControlAsAnchorProps,\n type BitkitUIHeaderControlAsButtonProps,\n type BitkitUIHeaderControlProps,\n} from './UIHeaderControl';\nexport { type BitkitUIHeaderMode, type BitkitUIHeaderModeSwitchProps } from './UIHeaderModeSwitch';\nexport { type BitkitUIHeaderNavButtonProps } from './UIHeaderNavButton';\nexport { type BitkitUIHeaderSearchProps } from './UIHeaderSearch';\nexport { uiHeaderBottom } from './usePublishedBottom';\nexport { default as useUiHeaderBottom } from './useUiHeaderBottom';\n\nBitkitUIHeader.displayName = 'BitkitUIHeader';\n\nexport default withSubComponents(BitkitUIHeader, {\n Account: UIHeaderAccount,\n Button: UIHeaderButton,\n Control: UIHeaderControl,\n ModeSwitch: UIHeaderModeSwitch,\n NavButton: UIHeaderNavButton,\n Search: UIHeaderSearch,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,IAAM,iBAAiB,YAA8C,OAAO,QAAQ;CAClF,MAAM,EAAE,QAAQ,UAAU,KAAK,SAAS,WAAW,KAAK,GAAG,SAAS;CAGpE,MAAM,SADS,cAAc,EAAE,KAAK,WAAW,CAChC,CAAA,CAAO;CAEtB,MAAM,SAAS,OAAuB,IAAI;CAC1C,MAAM,UAAU,mBAAmB,GAAG;CAEtC,MAAM,UAAU,eAAe;EAAE;EAAQ;CAAO,IAAI,CAAC,MAAM,CAAC;CAE5D,OACE,oBAAC,yBAAD;EAAyB,OAAO;EAC9B,UAAA,oBAAC,KAAD;GAAK,KAAK;GAAS,SAAA;GAAQ,GAAI;GAAM,KAAK,CAAC,OAAO,MAAM,GAAG;GACzD,UAAA,qBAAC,UAAD;IAAQ,GAAI,aAAa,MAAM;IAA/B,UAAA,CACE,qBAAC,KAAD;KAAK,KAAK;KAAQ,KAAK,OAAO;KAAK,GAAI,aAAa,KAAK;KAAzD,UAAA;MACE,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAS,GAAI,aAAa,SAAS;OACjD,UAAA;MACE,CAAA;MACL,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAQ,GAAI,aAAa,QAAQ;MAAI,CAAA;MACtD,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAW,GAAI,aAAa,YAAY;OACvD,UAAA,oBAAC,KAAD;QAAK,SAAA;QAAQ,KAAK,OAAO;QACvB,UAAA,oBAAC,KAAD;SAAG,cAAW;SAAoB,MAAM;SAAU,GAAI,aAAa,WAAW;SAC5E,UAAA,oBAAC,oBAAD,CAAqB,CAAA;QACpB,CAAA;OACA,CAAA;MACF,CAAA;MACL,oBAAC,KAAD;OAAK,KAAK,OAAO;OAAS,GAAI,aAAa,SAAS;OACjD;MACE,CAAA;KACF;IACJ,CAAA,GAAA,CAAC,CAAC,UACD,oBAAC,KAAD;KAAK,KAAK,OAAO;KAAQ,GAAI,aAAa,QAAQ;KAC/C,UAAA;IACE,CAAA,CAED;;EACL,CAAA;CACkB,CAAA;AAE7B,CAAC;AAiBD,eAAe,cAAc;AAE7B,IAAA,yBAAe,kBAAkB,gBAAgB;CAC/C,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,WAAW;CACX,QAAQ;AACV,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { ForwardedRef } from 'react';
2
+ export declare const bottomVarName = "--bitkit-ui-header-bottom";
2
3
  /**
3
4
  * Where the content below a pinned (`position: fixed`) `BitkitUIHeader` can start: its bottom edge,
4
5
  * banner and any offset pushing it down included, or `0` when it isn't pinned. Use it for whatever has
@@ -48,6 +48,6 @@ var usePublishedBottom = (forwardedRef) => {
48
48
  }, [publish, unpublish]);
49
49
  return nodeRef;
50
50
  };
51
- export { usePublishedBottom as default, uiHeaderBottom };
51
+ export { bottomVarName, usePublishedBottom as default, uiHeaderBottom };
52
52
 
53
53
  //# sourceMappingURL=usePublishedBottom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePublishedBottom.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/usePublishedBottom.ts"],"sourcesContent":["import { type ForwardedRef, useCallback, useImperativeHandle, useLayoutEffect, useRef } from 'react';\n\nconst bottomVarName = '--bitkit-ui-header-bottom';\n\n/**\n * Where the content below a pinned (`position: fixed`) `BitkitUIHeader` can start: its bottom edge,\n * banner and any offset pushing it down included, or `0` when it isn't pinned. Use it for whatever has\n * to clear the header, such as a sticky row's `insetBlockStart` or a `scrollMarginTop`.\n */\nexport const uiHeaderBottom = `var(${bottomVarName}, 0px)`;\n\n/**\n * Publishes a fixed header's bottom edge as `--bitkit-ui-header-bottom` on the document root. It is\n * re-measured when the header resizes (a banner appears) and on every render, since an offset that\n * moves it, such as a `marginBlockStart`, arrives as a prop and resizes nothing. Only `fixed` counts:\n * a `sticky` header's edge moves as the page scrolls, which this doesn't follow.\n *\n * A header that isn't pinned leaves the variable alone, and a header only removes the value it set.\n */\nconst usePublishedBottom = <T extends HTMLElement>(forwardedRef: ForwardedRef<T>) => {\n const nodeRef = useRef<T>(null);\n const isPublishingRef = useRef(false);\n\n useImperativeHandle(forwardedRef, () => nodeRef.current as T, []);\n\n const unpublish = useCallback(() => {\n if (isPublishingRef.current) {\n document.documentElement.style.removeProperty(bottomVarName);\n isPublishingRef.current = false;\n }\n }, []);\n\n const publish = useCallback(() => {\n const node = nodeRef.current;\n if (!node) {\n return;\n }\n if (window.getComputedStyle(node).position !== 'fixed') {\n unpublish();\n return;\n }\n const bottom = Math.max(node.getBoundingClientRect().bottom, 0);\n document.documentElement.style.setProperty(bottomVarName, `${bottom}px`);\n isPublishingRef.current = true;\n }, [unpublish]);\n\n useLayoutEffect(publish);\n\n useLayoutEffect(() => {\n const node = nodeRef.current;\n const observer = node && typeof ResizeObserver !== 'undefined' ? new ResizeObserver(publish) : undefined;\n if (node) {\n observer?.observe(node);\n }\n return () => {\n observer?.disconnect();\n unpublish();\n };\n }, [publish, unpublish]);\n\n return nodeRef;\n};\n\nexport default usePublishedBottom;\n"],"mappings":";;AAEA,IAAM,gBAAgB;;;;;;AAOtB,IAAa,iBAAiB,OAAO,cAAc;;;;;;;;;AAUnD,IAAM,sBAA6C,iBAAkC;CACnF,MAAM,UAAU,OAAU,IAAI;CAC9B,MAAM,kBAAkB,OAAO,KAAK;CAEpC,oBAAoB,oBAAoB,QAAQ,SAAc,CAAC,CAAC;CAEhE,MAAM,YAAY,kBAAkB;EAClC,IAAI,gBAAgB,SAAS;GAC3B,SAAS,gBAAgB,MAAM,eAAe,aAAa;GAC3D,gBAAgB,UAAU;EAC5B;CACF,GAAG,CAAC,CAAC;CAEL,MAAM,UAAU,kBAAkB;EAChC,MAAM,OAAO,QAAQ;EACrB,IAAI,CAAC,MACH;EAEF,IAAI,OAAO,iBAAiB,IAAI,CAAC,CAAC,aAAa,SAAS;GACtD,UAAU;GACV;EACF;EACA,MAAM,SAAS,KAAK,IAAI,KAAK,sBAAsB,CAAC,CAAC,QAAQ,CAAC;EAC9D,SAAS,gBAAgB,MAAM,YAAY,eAAe,GAAG,OAAO,GAAG;EACvE,gBAAgB,UAAU;CAC5B,GAAG,CAAC,SAAS,CAAC;CAEd,gBAAgB,OAAO;CAEvB,sBAAsB;EACpB,MAAM,OAAO,QAAQ;EACrB,MAAM,WAAW,QAAQ,OAAO,mBAAmB,cAAc,IAAI,eAAe,OAAO,IAAI,KAAA;EAC/F,IAAI,MACF,UAAU,QAAQ,IAAI;EAExB,aAAa;GACX,UAAU,WAAW;GACrB,UAAU;EACZ;CACF,GAAG,CAAC,SAAS,SAAS,CAAC;CAEvB,OAAO;AACT"}
1
+ {"version":3,"file":"usePublishedBottom.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/usePublishedBottom.ts"],"sourcesContent":["import { type ForwardedRef, useCallback, useImperativeHandle, useLayoutEffect, useRef } from 'react';\n\nexport const bottomVarName = '--bitkit-ui-header-bottom';\n\n/**\n * Where the content below a pinned (`position: fixed`) `BitkitUIHeader` can start: its bottom edge,\n * banner and any offset pushing it down included, or `0` when it isn't pinned. Use it for whatever has\n * to clear the header, such as a sticky row's `insetBlockStart` or a `scrollMarginTop`.\n */\nexport const uiHeaderBottom = `var(${bottomVarName}, 0px)`;\n\n/**\n * Publishes a fixed header's bottom edge as `--bitkit-ui-header-bottom` on the document root. It is\n * re-measured when the header resizes (a banner appears) and on every render, since an offset that\n * moves it, such as a `marginBlockStart`, arrives as a prop and resizes nothing. Only `fixed` counts:\n * a `sticky` header's edge moves as the page scrolls, which this doesn't follow.\n *\n * A header that isn't pinned leaves the variable alone, and a header only removes the value it set.\n */\nconst usePublishedBottom = <T extends HTMLElement>(forwardedRef: ForwardedRef<T>) => {\n const nodeRef = useRef<T>(null);\n const isPublishingRef = useRef(false);\n\n useImperativeHandle(forwardedRef, () => nodeRef.current as T, []);\n\n const unpublish = useCallback(() => {\n if (isPublishingRef.current) {\n document.documentElement.style.removeProperty(bottomVarName);\n isPublishingRef.current = false;\n }\n }, []);\n\n const publish = useCallback(() => {\n const node = nodeRef.current;\n if (!node) {\n return;\n }\n if (window.getComputedStyle(node).position !== 'fixed') {\n unpublish();\n return;\n }\n const bottom = Math.max(node.getBoundingClientRect().bottom, 0);\n document.documentElement.style.setProperty(bottomVarName, `${bottom}px`);\n isPublishingRef.current = true;\n }, [unpublish]);\n\n useLayoutEffect(publish);\n\n useLayoutEffect(() => {\n const node = nodeRef.current;\n const observer = node && typeof ResizeObserver !== 'undefined' ? new ResizeObserver(publish) : undefined;\n if (node) {\n observer?.observe(node);\n }\n return () => {\n observer?.disconnect();\n unpublish();\n };\n }, [publish, unpublish]);\n\n return nodeRef;\n};\n\nexport default usePublishedBottom;\n"],"mappings":";;AAEA,IAAa,gBAAgB;;;;;;AAO7B,IAAa,iBAAiB,OAAO,cAAc;;;;;;;;;AAUnD,IAAM,sBAA6C,iBAAkC;CACnF,MAAM,UAAU,OAAU,IAAI;CAC9B,MAAM,kBAAkB,OAAO,KAAK;CAEpC,oBAAoB,oBAAoB,QAAQ,SAAc,CAAC,CAAC;CAEhE,MAAM,YAAY,kBAAkB;EAClC,IAAI,gBAAgB,SAAS;GAC3B,SAAS,gBAAgB,MAAM,eAAe,aAAa;GAC3D,gBAAgB,UAAU;EAC5B;CACF,GAAG,CAAC,CAAC;CAEL,MAAM,UAAU,kBAAkB;EAChC,MAAM,OAAO,QAAQ;EACrB,IAAI,CAAC,MACH;EAEF,IAAI,OAAO,iBAAiB,IAAI,CAAC,CAAC,aAAa,SAAS;GACtD,UAAU;GACV;EACF;EACA,MAAM,SAAS,KAAK,IAAI,KAAK,sBAAsB,CAAC,CAAC,QAAQ,CAAC;EAC9D,SAAS,gBAAgB,MAAM,YAAY,eAAe,GAAG,OAAO,GAAG;EACvE,gBAAgB,UAAU;CAC5B,GAAG,CAAC,SAAS,CAAC;CAEd,gBAAgB,OAAO;CAEvB,sBAAsB;EACpB,MAAM,OAAO,QAAQ;EACrB,MAAM,WAAW,QAAQ,OAAO,mBAAmB,cAAc,IAAI,eAAe,OAAO,IAAI,KAAA;EAC/F,IAAI,MACF,UAAU,QAAQ,IAAI;EAExB,aAAa;GACX,UAAU,WAAW;GACrB,UAAU;EACZ;CACF,GAAG,CAAC,SAAS,SAAS,CAAC;CAEvB,OAAO;AACT"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `uiHeaderBottom` as a number of px, for JS that needs one, such as an `IntersectionObserver`
3
+ * margin. It updates when the value changes (a banner comes or goes). CSS takes `uiHeaderBottom`.
4
+ */
5
+ declare const useUiHeaderBottom: () => number;
6
+ export default useUiHeaderBottom;
@@ -0,0 +1,29 @@
1
+ import "./usePublishedBottom.js";
2
+ import { useSyncExternalStore } from "react";
3
+ // lib/components/BitkitUIHeader/useUiHeaderBottom.ts
4
+ var read = () => parseFloat(document.documentElement.style.getPropertyValue("--bitkit-ui-header-bottom")) || 0;
5
+ var readOnServer = () => 0;
6
+ var listeners = /* @__PURE__ */ new Set();
7
+ var observer;
8
+ var subscribe = (listener) => {
9
+ listeners.add(listener);
10
+ if (!observer) {
11
+ observer = new MutationObserver(() => listeners.forEach((notify) => notify()));
12
+ observer.observe(document.documentElement, { attributeFilter: ["style"] });
13
+ }
14
+ return () => {
15
+ listeners.delete(listener);
16
+ if (listeners.size === 0) {
17
+ observer?.disconnect();
18
+ observer = void 0;
19
+ }
20
+ };
21
+ };
22
+ /**
23
+ * `uiHeaderBottom` as a number of px, for JS that needs one, such as an `IntersectionObserver`
24
+ * margin. It updates when the value changes (a banner comes or goes). CSS takes `uiHeaderBottom`.
25
+ */
26
+ var useUiHeaderBottom = () => useSyncExternalStore(subscribe, read, readOnServer);
27
+ export { useUiHeaderBottom as default };
28
+
29
+ //# sourceMappingURL=useUiHeaderBottom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUiHeaderBottom.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/useUiHeaderBottom.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nimport { bottomVarName } from './usePublishedBottom';\n\n// Set as an inline style on <html>, so reading it needs no layout.\nconst read = () => parseFloat(document.documentElement.style.getPropertyValue(bottomVarName)) || 0;\nconst readOnServer = () => 0;\n\n// One observer for every caller, connected while anyone listens.\nconst listeners = new Set<() => void>();\nlet observer: MutationObserver | undefined;\n\nconst subscribe = (listener: () => void) => {\n listeners.add(listener);\n if (!observer) {\n observer = new MutationObserver(() => listeners.forEach((notify) => notify()));\n observer.observe(document.documentElement, { attributeFilter: ['style'] });\n }\n return () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n observer?.disconnect();\n observer = undefined;\n }\n };\n};\n\n/**\n * `uiHeaderBottom` as a number of px, for JS that needs one, such as an `IntersectionObserver`\n * margin. It updates when the value changes (a banner comes or goes). CSS takes `uiHeaderBottom`.\n */\nconst useUiHeaderBottom = () => useSyncExternalStore(subscribe, read, readOnServer);\n\nexport default useUiHeaderBottom;\n"],"mappings":";;;AAKA,IAAM,aAAa,WAAW,SAAS,gBAAgB,MAAM,iBAAA,2BAA8B,CAAC,KAAK;AACjG,IAAM,qBAAqB;AAG3B,IAAM,4BAAY,IAAI,IAAgB;AACtC,IAAI;AAEJ,IAAM,aAAa,aAAyB;CAC1C,UAAU,IAAI,QAAQ;CACtB,IAAI,CAAC,UAAU;EACb,WAAW,IAAI,uBAAuB,UAAU,SAAS,WAAW,OAAO,CAAC,CAAC;EAC7E,SAAS,QAAQ,SAAS,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC;CAC3E;CACA,aAAa;EACX,UAAU,OAAO,QAAQ;EACzB,IAAI,UAAU,SAAS,GAAG;GACxB,UAAU,WAAW;GACrB,WAAW,KAAA;EACb;CACF;AACF;;;;;AAMA,IAAM,0BAA0B,qBAAqB,WAAW,MAAM,YAAY"}
@@ -59,7 +59,7 @@ export { default as BitkitNumberInput, type BitkitNumberInputProps } from './Bit
59
59
  export { default as BitkitOverflowContent, type BitkitOverflowContentProps, } from './BitkitOverflowContent/BitkitOverflowContent';
60
60
  export { default as BitkitOverflowTooltip, type BitkitOverflowTooltipProps, } from './BitkitOverflowTooltip/BitkitOverflowTooltip';
61
61
  export { default as BitkitPageFooter, type BitkitPageFooterItemProps, type BitkitPageFooterProps, } from './BitkitPageFooter/BitkitPageFooter';
62
- export { default as BitkitPageHeader, type BitkitPageHeaderProps } from './BitkitPageHeader/BitkitPageHeader';
62
+ export { default as BitkitPageHeader, type BitkitPageHeaderProps, pageHeaderBottom, usePageHeaderBottom, } from './BitkitPageHeader/BitkitPageHeader';
63
63
  export { default as BitkitPageSidebar, type BitkitPageSidebarBodyProps, type BitkitPageSidebarDividerProps, type BitkitPageSidebarDrawerHeaderProps, type BitkitPageSidebarFooterProps, type BitkitPageSidebarGroupHeadingProps, type BitkitPageSidebarItemProps, type BitkitPageSidebarProgressItemProps, type BitkitPageSidebarProjectProps, type BitkitPageSidebarProps, type BitkitPageSidebarSectionProps, type BitkitPageSidebarTitleProps, } from './BitkitPageSidebar/BitkitPageSidebar';
64
64
  export { default as BitkitPageSubheader, type BitkitPageSubheaderProps, } from './BitkitPageSubheader/BitkitPageSubheader';
65
65
  export { default as BitkitPagination, type BitkitPaginationLabels, type BitkitPaginationProps, } from './BitkitPagination/BitkitPagination';
@@ -108,6 +108,6 @@ export { default as BitkitToggletip, type BitkitToggletipProps } from './BitkitT
108
108
  export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';
109
109
  export { default as BitkitTour, type BitkitTourInstance, type BitkitTourOptions, type BitkitTourProps, type BitkitTourSecondaryAction, type BitkitTourStep, useBitkitTour, } from './BitkitTour/BitkitTour';
110
110
  export { default as BitkitTreeView, type BitkitTreeViewBranchProps, type BitkitTreeViewExpandedChangeDetails, type BitkitTreeViewLeafProps, type BitkitTreeViewNodeRenderProps, type BitkitTreeViewRootProps, type BitkitTreeViewSelectionChangeDetails, createTreeCollection, } from './BitkitTreeView/BitkitTreeView';
111
- export { default as BitkitUIHeader, type BitkitUIHeaderAccountProps, type BitkitUIHeaderBadge, type BitkitUIHeaderButtonProps, type BitkitUIHeaderControlAsAnchorProps, type BitkitUIHeaderControlAsButtonProps, type BitkitUIHeaderControlProps, type BitkitUIHeaderMode, type BitkitUIHeaderModeSwitchProps, type BitkitUIHeaderNavButtonProps, type BitkitUIHeaderProps, type BitkitUIHeaderSearchProps, uiHeaderBottom, uiHeaderHeight, uiHeaderHeightPx, } from './BitkitUIHeader/BitkitUIHeader';
111
+ export { default as BitkitUIHeader, type BitkitUIHeaderAccountProps, type BitkitUIHeaderBadge, type BitkitUIHeaderButtonProps, type BitkitUIHeaderControlAsAnchorProps, type BitkitUIHeaderControlAsButtonProps, type BitkitUIHeaderControlProps, type BitkitUIHeaderMode, type BitkitUIHeaderModeSwitchProps, type BitkitUIHeaderNavButtonProps, type BitkitUIHeaderProps, type BitkitUIHeaderSearchProps, uiHeaderBottom, uiHeaderHeight, uiHeaderHeightPx, useUiHeaderBottom, } from './BitkitUIHeader/BitkitUIHeader';
112
112
  export { default as BitkitUISideNav, type BitkitUISideNavBodyProps, type BitkitUISideNavFooterHeadingProps, type BitkitUISideNavFooterProps, type BitkitUISideNavItemProps, type BitkitUISideNavLinkAsAnchorProps, type BitkitUISideNavLinkAsButtonProps, type BitkitUISideNavLinkProps, type BitkitUISideNavProps, type BitkitUISideNavWorkspaceProps, type BitkitUISideNavWorkspaceSelectorProps, uiSideNavRailWidth, } from './BitkitUISideNav/BitkitUISideNav';
113
113
  export { useUISideNav } from './BitkitUISideNav/UISideNavContext';
package/dist/main.js CHANGED
@@ -366,6 +366,10 @@ import BitkitNumberInput from "./components/BitkitNumberInput/BitkitNumberInput.
366
366
  import BitkitOverflowContent from "./components/BitkitOverflowContent/BitkitOverflowContent.js";
367
367
  import BitkitOverflowTooltip from "./components/BitkitOverflowTooltip/BitkitOverflowTooltip.js";
368
368
  import BitkitPageFooter_default from "./components/BitkitPageFooter/BitkitPageFooter.js";
369
+ import { uiHeaderBottom } from "./components/BitkitUIHeader/usePublishedBottom.js";
370
+ import useUiHeaderBottom from "./components/BitkitUIHeader/useUiHeaderBottom.js";
371
+ import { pageHeaderBottom } from "./components/BitkitPageHeader/pageHeaderBottom.js";
372
+ import usePageHeaderBottom from "./components/BitkitPageHeader/usePageHeaderBottom.js";
369
373
  import BitkitPageHeader from "./components/BitkitPageHeader/BitkitPageHeader.js";
370
374
  import BitkitPageSidebar_default from "./components/BitkitPageSidebar/BitkitPageSidebar.js";
371
375
  import BitkitPageSubheader from "./components/BitkitPageSubheader/BitkitPageSubheader.js";
@@ -398,7 +402,6 @@ import createBitkitToast, { dismissBitkitToast } from "./components/BitkitToast/
398
402
  import BitkitToggleButton from "./components/BitkitToggleButton/BitkitToggleButton.js";
399
403
  import BitkitTour, { useBitkitTour } from "./components/BitkitTour/BitkitTour.js";
400
404
  import BitkitTreeView, { createTreeCollection } from "./components/BitkitTreeView/BitkitTreeView.js";
401
- import { uiHeaderBottom } from "./components/BitkitUIHeader/usePublishedBottom.js";
402
405
  import { uiHeaderHeight, uiHeaderHeightPx } from "./theme/slot-recipes/UIHeader.recipe.js";
403
406
  import BitkitUIHeader_default from "./components/BitkitUIHeader/BitkitUIHeader.js";
404
407
  import { useUISideNav } from "./components/BitkitUISideNav/UISideNavContext.js";
@@ -406,4 +409,4 @@ import { uiSideNavRailWidth } from "./theme/slot-recipes/UISideNav.recipe.js";
406
409
  import BitkitUISideNav_default from "./components/BitkitUISideNav/BitkitUISideNav.js";
407
410
  import Provider from "./providers/BitkitProvider.js";
408
411
  import bitkitTheme from "./theme/index.js";
409
- export { BitbotLogoWithText, BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitContentWrapper_default as BitkitContentWrapper, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFilter_default as BitkitFilter, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitLinkCard, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPageHeader, BitkitPageSidebar_default as BitkitPageSidebar, BitkitPageSubheader, BitkitPagination, BitkitPaginationLoadMore, BitkitPinInput, BitkitPopover, BitkitProductThumbnail, BitkitProgressBar, BitkitPromoBanner, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSkeletonGroup, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitStepsDialog_default as BitkitStepsDialog, BitkitSwitch, BitkitTable, BitkitTableCard, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitToggletip, BitkitTooltip, BitkitTour, BitkitTreeView, BitkitUIHeader_default as BitkitUIHeader, BitkitUISideNav_default as BitkitUISideNav, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbotIntercomWhite, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconBuildHub, IconBuildHubFilled, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopilot, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCursor, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFile, IconFileDoc, IconFilePdf, IconFilePlist, IconFileYml, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGraph, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKiroColor, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMcp, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconModeDark, IconModeLight, IconModeSystem, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPin, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconRename, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTabPlus, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTerminalFilled, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTimeline, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUnpin, IconUpload, IconValidateShield, IconVideo, IconVsCode, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWindsurf, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, dismissBitkitToast, rem, uiHeaderBottom, uiHeaderHeight, uiHeaderHeightPx, uiSideNavRailWidth, useBitkitTour, useResponsive, useStepsDialog, useUISideNav };
412
+ export { BitbotLogoWithText, BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitContentWrapper_default as BitkitContentWrapper, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFilter_default as BitkitFilter, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitLinkCard, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPageHeader, BitkitPageSidebar_default as BitkitPageSidebar, BitkitPageSubheader, BitkitPagination, BitkitPaginationLoadMore, BitkitPinInput, BitkitPopover, BitkitProductThumbnail, BitkitProgressBar, BitkitPromoBanner, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSkeletonGroup, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitStepsDialog_default as BitkitStepsDialog, BitkitSwitch, BitkitTable, BitkitTableCard, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitToggletip, BitkitTooltip, BitkitTour, BitkitTreeView, BitkitUIHeader_default as BitkitUIHeader, BitkitUISideNav_default as BitkitUISideNav, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbotIntercomWhite, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconBuildHub, IconBuildHubFilled, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopilot, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCursor, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFile, IconFileDoc, IconFilePdf, IconFilePlist, IconFileYml, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGraph, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKiroColor, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMcp, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconModeDark, IconModeLight, IconModeSystem, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPin, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconRename, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTabPlus, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTerminalFilled, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTimeline, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUnpin, IconUpload, IconValidateShield, IconVideo, IconVsCode, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWindsurf, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, dismissBitkitToast, pageHeaderBottom, rem, uiHeaderBottom, uiHeaderHeight, uiHeaderHeightPx, uiSideNavRailWidth, useBitkitTour, usePageHeaderBottom, useResponsive, useStepsDialog, useUISideNav, useUiHeaderBottom };