{"version":3,"file":"Fab.cjs","sources":["../../../../src/components/actions/fab/Fab.tsx"],"sourcesContent":["import { Button } from '@components/actions/button'\r\nimport { IconButton } from '@components/actions/icon-button'\r\nimport { FAB_STYLES } from '@components/actions/fab/styles/Fab.css.ts'\r\nimport { FAB_POSITIONS } from '@components/actions/fab/constants'\r\nimport { BUTTON_SIZES, BUTTON_VARIANTS } from '@components/actions/_shared/buttons/constants'\r\nimport type { FabProps } from '@components/actions/fab/types/Fab.props.ts'\r\nimport { cn } from '@utils/cn.ts'\r\nimport type { FC } from 'react'\r\n\r\n/**\r\n * Floating action button pinned to the viewport for the screen's primary action.\r\n * Renders a round icon-only button (requires `aria-label`) or, when a `label`\r\n * is provided, an extended button with the icon before the text. Supports\r\n * semantic `color`, `size` (sm|md|lg) and `position` (bottom-end|bottom-start|bottom-center).\r\n */\r\nconst Fab: FC<FabProps> = ({\r\n    color,\r\n    size = BUTTON_SIZES.md,\r\n    position = FAB_POSITIONS.bottomEnd,\r\n    icon,\r\n    className,\r\n    ...props\r\n}) => {\r\n    const extended = props.label !== undefined\r\n    const fabClassName = cn(FAB_STYLES.recipe({ position, size, extended }), className)\r\n\r\n    if (props.label !== undefined) {\r\n        return (\r\n            <Button\r\n                {...props}\r\n                label={props.label}\r\n                variant={BUTTON_VARIANTS.contained}\r\n                color={color}\r\n                size={size}\r\n                startIcon={icon}\r\n                className={fabClassName}\r\n            />\r\n        )\r\n    }\r\n\r\n    return (\r\n        <IconButton\r\n            {...props}\r\n            variant={BUTTON_VARIANTS.contained}\r\n            color={color}\r\n            size={size}\r\n            icon={icon}\r\n            className={fabClassName}\r\n        />\r\n    )\r\n}\r\n\r\nFab.displayName = 'Fab'\r\n\r\nexport default Fab\r\n"],"names":["Fab","color","size","BUTTON_SIZES","position","FAB_POSITIONS","icon","className","props","extended","fabClassName","cn","FAB_STYLES","jsx","Button","BUTTON_VARIANTS","IconButton"],"mappings":"keAeMA,EAAoB,CAAC,CACvB,MAAAC,EACA,KAAAC,EAAOC,EAAAA,aAAa,GACpB,SAAAC,EAAWC,EAAAA,cAAc,UACzB,KAAAC,EACA,UAAAC,EACA,GAAGC,CACP,IAAM,CACF,MAAMC,EAAWD,EAAM,QAAU,OAC3BE,EAAeC,KAAGC,EAAAA,WAAW,OAAO,CAAE,SAAAR,EAAU,KAAAF,EAAM,SAAAO,EAAU,EAAGF,CAAS,EAElF,OAAIC,EAAM,QAAU,OAEZK,EAAAA,IAACC,EAAA,CACI,GAAGN,EACJ,MAAOA,EAAM,MACb,QAASO,EAAAA,gBAAgB,UACzB,MAAAd,EACA,KAAAC,EACA,UAAWI,EACX,UAAWI,CAAA,CAAA,EAMnBG,EAAAA,IAACG,EAAA,CACI,GAAGR,EACJ,QAASO,EAAAA,gBAAgB,UACzB,MAAAd,EACA,KAAAC,EACA,KAAAI,EACA,UAAWI,CAAA,CAAA,CAGvB,EAEAV,EAAI,YAAc"}