{"version":3,"file":"Banner.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":";;;AAMA,gDAAuE;AA4BvE,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;;GAYG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { ButtonElement } from './form/Button';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\nimport type { SkeletonElement } from './Skeleton';\nimport type { TextElement } from './Text';\nimport { createSnapComponent, type SnapsChildren } from '../component';\n\n/**\n * Types of children components that can be used with Banner.\n */\nexport type BannerChildren = SnapsChildren<\n  | TextElement\n  | StandardFormattingElement\n  | LinkElement\n  | IconElement\n  | ButtonElement\n  | SkeletonElement\n>;\n\n/**\n * The props of the {@link Banner} component.\n *\n * @param children - The content to display in the banner.\n * @param title - Title of the banner.\n * @param severity - Severity level of the banner.\n * @category Component Props\n */\nexport type BannerProps = {\n  children: BannerChildren;\n  title: string;\n  severity: 'danger' | 'info' | 'success' | 'warning';\n};\n\nconst TYPE = 'Banner';\n\n/**\n * A Banner component, which is used to display custom banner alerts.\n *\n * @param props - The props of the component.\n * @param props.children - The content to display in the banner.\n * @param props.title - Title of the banner.\n * @param props.severity - Severity level of the banner.\n * @example\n * <Banner title=\"Success banner\" severity=\"success\">\n *   <Text>Here is the banner content!</Text>\n * </Banner>\n * @category Components\n */\nexport const Banner = createSnapComponent<BannerProps, typeof TYPE>(TYPE);\n\n/**\n * A Banner element.\n *\n * @see {@link Banner}\n * @category Elements\n */\nexport type BannerElement = ReturnType<typeof Banner>;\n"]}