/* eslint-disable */ /* tslint:disable */ /** * This is an autogenerated file created by the Stencil compiler. * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime"; import { AccordionChangeEventType } from "./components/accordion/types"; import { AccordionGroupChangeEventType } from "./components/accordion-group/types"; import { AlertKind, AlertSize, AlertStatus } from "./components/alert/types"; import { AttendanceItem } from "./components/attendance/attendance.component"; import { AvatarShape, AvatarSize, AvatarStatus } from "./components/avatar/types"; import { ButtonKind, ButtonPosition, ButtonSize, ButtonStatus, ButtonType, ButtonVariant, IconPosition } from "./components/button/types"; import { ChipKind, ChipSize, ChipStatus } from "./components/chip/types"; import { DrawerPosition, DrawerSize } from "./components/drawer/types"; import { BcmUploadErrorMessages, BcmUploadItem } from "./components/upload/file-upload.component"; import { InputSize, InputStatus, InputType } from "./components/input/types"; import { Event } from "./stencil-public-runtime"; import { TriggerType } from "./components/linked/linked.component"; import { Placement } from "@floating-ui/dom"; import { ModalPlacement, ModalSize } from "./components/modal/modal.component"; import { PopConfirmPlacement, PopConfirmSize, PopConfirmStatus } from "./components/pop-confirm/pop-confirm.component"; import { TextSize, TextVariant } from "./components/text/text.types"; import { InputSize as InputSize1, InputStatus as InputStatus1, TextareaResize } from "./components/textarea/types"; import { TooltipPlacement, TooltipSize, TooltipTrigger } from "./components/tooltip/tooltip.component"; export { AccordionChangeEventType } from "./components/accordion/types"; export { AccordionGroupChangeEventType } from "./components/accordion-group/types"; export { AlertKind, AlertSize, AlertStatus } from "./components/alert/types"; export { AttendanceItem } from "./components/attendance/attendance.component"; export { AvatarShape, AvatarSize, AvatarStatus } from "./components/avatar/types"; export { ButtonKind, ButtonPosition, ButtonSize, ButtonStatus, ButtonType, ButtonVariant, IconPosition } from "./components/button/types"; export { ChipKind, ChipSize, ChipStatus } from "./components/chip/types"; export { DrawerPosition, DrawerSize } from "./components/drawer/types"; export { BcmUploadErrorMessages, BcmUploadItem } from "./components/upload/file-upload.component"; export { InputSize, InputStatus, InputType } from "./components/input/types"; export { Event } from "./stencil-public-runtime"; export { TriggerType } from "./components/linked/linked.component"; export { Placement } from "@floating-ui/dom"; export { ModalPlacement, ModalSize } from "./components/modal/modal.component"; export { PopConfirmPlacement, PopConfirmSize, PopConfirmStatus } from "./components/pop-confirm/pop-confirm.component"; export { TextSize, TextVariant } from "./components/text/text.types"; export { InputSize as InputSize1, InputStatus as InputStatus1, TextareaResize } from "./components/textarea/types"; export { TooltipPlacement, TooltipSize, TooltipTrigger } from "./components/tooltip/tooltip.component"; export namespace Components { /** * @component BcmAccordion * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation * and accessibility features. Offers customizable header, content, and footer areas through slots. * @example Basic usage * *
Accordion Title
*
Content goes here
*
* @example With all slots and hint text * *
Title
*
* *
*
Main content
*
Footer content
*
* @example Event handling * // Listen to accordion state changes * const accordion = document.querySelector('bcm-accordion'); * accordion.addEventListener('bcmAccordionChange', (event) => { * const { expanded, source } = event.detail; * console.log('Accordion expanded:', expanded); * console.log('Changed accordion:', source); * }); * // Programmatically control accordion * await accordion.toggle(); // Toggle state * await accordion.expand(); // Expand accordion * await accordion.collapse(); // Collapse accordion * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false) * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false) * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided * @event {EventEmitter} bcmAccordionChange - Emitted when the accordion's expanded state changes * @eventProperty {boolean} expanded - Current expanded state * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed * @csspart container - The root container element * @csspart header - The header section with title and actions * @csspart content - The collapsible content section * @csspart footer - The footer section with hint text or footer slot * @csspart section - Container for header content sections * @csspart icon - The expand/collapse chevron icon * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px) * @css {string} --bcm-accordion-bg - Background color of the accordion header * @css {string} --bcm-accordion-text - Text color of the accordion * @css {string} --bcm-accordion-footer-bg - Background color of the footer section * @methods toggle() - Toggles the accordion's expanded state * expand() - Expands the accordion if collapsed * collapse() - Collapses the accordion if expanded */ interface BcmAccordion { /** * Collapses the accordion if it's currently expanded. * @method * @returns Promise */ "collapse": () => Promise; /** * Expands the accordion if it's not already expanded. * @method * @returns Promise */ "expand": () => Promise; /** * Controls whether the accordion is expanded or collapsed. * @prop * @defaultValue false */ "expanded": boolean; /** * Indicates if the accordion is part of a group. Used for group behavior coordination. * @prop * @defaultValue false */ "group": boolean; /** * Optional title text to display in the header. * @prop * @defaultValue undefined */ "headerTitle"?: string; /** * Optional text to display in the footer when no footer slot content is provided. * @prop */ "hintText"?: string; /** * Toggles the accordion's expanded state. * @method * @returns Promise */ "toggle": () => Promise; } /** * @component BcmAccordionGroup * @description A container component that manages a group of accordions. Provides single/multiple expansion * modes and methods for controlling all accordions simultaneously. Uses shadow DOM for style encapsulation. * @example Basic usage - Single expansion mode * * *
Section 1
*
Content 1
*
* *
Section 2
*
Content 2
*
*
* @example Multiple expansion mode * * ... * ... * * @example Event handling * // Listen to accordion group changes * const accordionGroup = document.querySelector('bcm-accordion-group'); * accordionGroup.addEventListener('bcmAccordionGroupChange', (event) => { * const { expanded, changed, expandedItems, expandedCount } = event.detail; * console.log('Accordion expanded state:', expanded); * console.log('Changed accordion:', changed); * console.log('Currently expanded accordions:', expandedItems); * console.log('Number of expanded accordions:', expandedCount); * }); * // Using methods * await accordionGroup.expandAll(); // Expands all accordions (only in multi mode) * await accordionGroup.collapseAll(); // Collapses all accordions * const expanded = await accordionGroup.getExpandedItems(); // Gets expanded accordions * @prop {boolean} multi - Controls whether multiple accordions can be expanded simultaneously (default: false) * @event {EventEmitter} bcmAccordionGroupChange - Emitted when any accordion's state changes * @eventProperty {boolean} expanded - Current expanded state of the changed accordion * @eventProperty {HTMLElement} changed - The accordion element that triggered the change * @eventProperty {HTMLElement[]} expandedItems - Array of currently expanded accordion elements * @eventProperty {number} expandedCount - Number of currently expanded accordions * @method expandAll() - Expands all accordions (only available in multi mode) * @method collapseAll() - Collapses all accordions * @method getExpandedItems() - Returns array of currently expanded accordions * @csspart container - The accordion group container element * @css {string} --bcm-accordion-border - Border color of the accordion group * @css {string} --bcm-accordion-radius - Border radius of the accordion group */ interface BcmAccordionGroup { /** * Collapses all accordions in the group */ "collapseAll": () => Promise; /** * Expands all accordions in the group Only available when multi=true */ "expandAll": () => Promise; /** * Returns an array of currently expanded accordion elements */ "getExpandedItems": () => Promise; /** * Controls whether multiple accordions can be expanded simultaneously * @default false */ "multi": boolean; } /** * Alert component that displays messages with different statuses and styles * @class BcmAlert */ interface BcmAlert { /** * Whether alert can be dismissed * @default true */ "dismissible"?: boolean; /** * Alert style variant * @default 'filled' */ "kind"?: AlertKind; /** * Whether to show status icon * @default true */ "showStatusIcon"?: boolean; /** * Alert size variant * @default 'medium' */ "size"?: AlertSize; /** * Alert status type * @default 'default' */ "status"?: AlertStatus; } /** * @component BcmAttendance * @description Visualizes attendance history (AM/PM status) for a series of days. * Supports different status types (present, late, absent, etc.) with color-coded indicators. * Can handle data via JSON string or direct object array. * @example Basic usage * * @example With specific statuses * */ interface BcmAttendance { /** * Data for attendance items to be displayed. Can be passed as a JSON string (HTML attribute) or a JavaScript Array (Property). Format: Array of objects with `weekday`, `am`, and `pm` properties. Status values: 'present', 'late', 'absent', 'other', 'default'. * @type {string | AttendanceItem[]} * @default [] */ "data": string | AttendanceItem[]; } interface BcmAvatar { /** * Alternative text for image */ "alt": string; /** * Status indicator animation * @default false */ "blink": boolean; /** * Custom background color */ "color": string; /** * Fallback icon class * @default 'fas fa-user' */ "icon": string; /** * Source URL for avatar image */ "image": string; /** * Display name (used for initials) */ "name": string; /** * Shape of the avatar (ellipse/square) * @default 'ellipse' */ "shape": AvatarShape; /** * Size of the avatar * @default 'medium' */ "size": AvatarSize; /** * Status indicator type */ "status": AvatarStatus; } /** * @component BcmBadge * @description A versatile badge component that can be positioned around its container. * Supports different sizes, variants (dot/text), colors, and positioning options. * Can display status indicators with optional blinking animation. * @example Basic usage * *
Container Content
* New *
* @example Status indicator with blink * *
User Profile
*
*/ interface BcmBadge { /** * Enables blinking animation for the badge. Useful for drawing attention or indicating active status. * @type {boolean} * @default false */ "blink": boolean; /** * Defines the color of the badge. Uses system color variables (e.g., 'primary', 'success', 'warning', etc.) * @type {string} * @optional */ "color"?: string; /** * Fine-tune the badge position with custom offset. Format: "x,y" in pixels (e.g., "10,-5") * @type {string} * @optional */ "offset": string; /** * Sets the position of the badge relative to its container. * @type {'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'} * @default 'top-right' */ "position": 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; /** * Determines the size of the badge. * @type {'small' | 'medium' | 'large'} * @default 'medium' */ "size": 'small' | 'medium' | 'large'; /** * Enables soft color mode for the badge. When true, uses lighter tones and pastel colors. * @type {boolean} * @default false */ "soft": boolean; /** * Status message for accessibility purposes. Will be read by screen readers. * @type {string} * @optional */ "status"?: string; /** * Text to be displayed inside the badge. Used when variant is set to 'text'. Can be overridden using the "badge" slot. * @type {string} * @optional */ "text"?: string; /** * Sets the visual variant of the badge. 'dot': Appears as a small dot indicator 'text': Displays content as text * @type {'dot' | 'text'} * @default 'text' */ "variant": 'dot' | 'text'; } /** * @component BcmBasicBadge * @description A basic badge component that can be used as a status indicator or to highlight content. * Supports dot and text variants with different sizes and color options. * @example Basic usage * * New * * @example Dot variant * */ interface BcmBasicBadge { /** * Defines the color of the badge. Uses system color variables (e.g., 'primary', 'success', 'warning', etc.) * @type {string} * @optional */ "color"?: string; /** * Determines the size of the badge. * @type {'small' | 'medium' | 'large'} * @default 'medium' */ "size": 'small' | 'medium' | 'large'; /** * Enables soft color mode for the badge. When true, uses lighter tones and pastel colors. * @type {boolean} * @default false */ "soft": boolean; /** * Text to be displayed inside the badge. Used when variant is set to 'text'. * @type {string} * @optional */ "text"?: string; /** * Sets the visual variant of the badge. 'dot': Appears as a small dot indicator 'text': Displays content as text * @type {'dot' | 'text'} * @default 'text' */ "variant": 'dot' | 'text'; } interface BcmButton { /** * Active state * @default false */ "active": boolean; /** * ID of controlled element */ "controls": string; /** * Disabled state * @default false */ "disabled": boolean; /** * Expanded state for expandable content */ "expanded"?: string; /** * Form association */ "form": string; /** * Full width button * @default false */ "fullWidth": boolean; /** * Icon class name */ "icon"?: string; /** * Icon-only button mode * @default false */ "iconOnly": boolean; /** * Icon placement (prefix/suffix) * @default 'prefix' */ "iconPosition": IconPosition; /** * Defines the main visual style of the button * @default 'primary' */ "kind": ButtonKind; /** * Screen reader label */ "label": string; /** * Loading state * @default false */ "loading": boolean; "name": string; /** * Button position in button group (first, middle, last) */ "position"?: ButtonPosition; /** * Controls the button size * @default 'medium' */ "size": ButtonSize; /** * Defines the button's status/state color * @default 'default' */ "status": ButtonStatus; /** * Button text content */ "text"?: string; /** * HTML button type * @default 'button' */ "type": ButtonType; "value": string; /** * Predefined button variants */ "variant"?: ButtonVariant; } interface BcmButtonGroup { /** * Disabled state */ "disabled"?: boolean; /** * Full width buttons */ "fullWidth"?: boolean; /** * Defines the main visual style of buttons */ "kind"?: ButtonKind; /** * Loading state */ "loading"?: boolean; /** * Button orientation * @default 'horizontal' */ "orientation": 'horizontal' | 'vertical'; /** * Controls the button size */ "size"?: ButtonSize; /** * Defines the button's status/state color */ "status"?: ButtonStatus; } /** * @component BcmCheckbox * @description A form-associated checkbox component representing a boolean choice. * Integrates with native HTML forms via ElementInternals while supporting * **three validation strategies** via `validation-mode`: * - **`native`** * - Participates in native browser constraint validation. * - Sets the underlying input's `required`. * - Browser may show native validation bubbles when submit/reportValidity happens. * - **`silent`** * - Does **not** set native `required` (prevents browser bubble). * - Computes "missing required" internally and exposes it via `error` + `caption`. * - UI errors are **gated**: shown only after `touched` or a form submit attempt. * - **`none`** * - Value-only mode: submits value but never becomes invalid. * ## UI error gating (silent mode) * - `touched` becomes true after first user interaction * - `submitAttempted` becomes true when the parent form emits `submit` * ## Value behavior * - When checked → submits `value` (default: `"on"`). * - When unchecked → submits no value (`null`). * - When disabled → no submission and no validity participation. * ## Shadow Parts * - `checkbox` → root container * - `control` → visual checkbox box * - `icon` → icon container (check or minus) * - `label` → label text * - `caption` → helper/error text (silent mode UI) * - `input` → hidden native input * @example Basic usage * * I agree to the terms and conditions * * @example Silent validation (no native bubble) *
* * Subscribe to newsletter * * *
* @example Value-only mode * * Allow analytics * */ interface BcmCheckbox { /** * Unique ID for the component. Automatically generated if not specified. Used to bind the visible label to the internal input. * @default generateId('bcm-checkbox') */ "_id"?: string; /** * Helper / error caption (silent mode UI) */ "caption"?: string; /** * Checked state * @default false */ "checked": boolean; /** * Disabled state * @default false */ "disabled": boolean; /** * Visual error state. - In `silent` mode this can be managed internally. - In other modes you can set it externally as well. * @default false */ "error": boolean; /** * Makes checkbox occupy full width (if your styles support it). * @default false */ "fullWidth": boolean; /** * Indeterminate (mixed) state. Useful when a group selection is partially selected. * @default false */ "indeterminate": boolean; /** * Visible label text (optional). You can also use the default slot. */ "label"?: string; /** * Label position relative to the checkbox control. * @default 'right' */ "labelPosition": 'left' | 'right'; /** * Form field name */ "name"?: string; /** * Optional readonly support * @default false */ "readonly": boolean; /** * Required state * @default false */ "required": boolean; /** * Size variant (affects control + typography). * @default 'medium' */ "size": 'small' | 'medium' | 'large'; /** * @default 'native' */ "validationMode": 'native' | 'silent' | 'none'; /** * Value submitted when checked * @default 'on' */ "value": string; } /** * @component BcmChip * @description A versatile chip component that can be used to display compact pieces of information, filters, or actions. * Supports different sizes, styles (filled, outlined, text), statuses, and can be dismissible. * @example * Success Chip * * @example Dismissible chip * handleDismiss()}> * Dismissible Chip * * @prop {ChipSize} size - Defines the size of the chip: 'small' | 'medium' | 'large' * @prop {ChipKind} kind - Defines the visual style: 'filled' | 'outlined' | 'text' * @prop {ChipStatus} status - Defines the status color: 'info' | 'error' | 'warning' | 'success' | 'default' | 'primary' * @prop {boolean} dismissible - Whether the chip can be dismissed * @prop {boolean} disabled - Whether the chip is disabled * @prop {string} color - Custom color override for the chip * @event {EventEmitter} dismiss - Emitted when the dismiss button is clicked * @csspart chip - The root chip element * @csspart dismiss-icon - The dismiss button icon */ interface BcmChip { /** * Chip color variant */ "color"?: string; /** * Whether chip is disabled * @default false */ "disabled"?: boolean; /** * Whether chip can be dismissed * @default false */ "dismissible"?: boolean; /** * Chip style variant * @default 'filled' */ "kind"?: ChipKind; /** * Chip size variant * @default 'medium' */ "size"?: ChipSize; /** * Chip status * @default 'default' */ "status"?: ChipStatus; } /** * @component BCM Divider * @description A versatile divider component that creates a visual separation between content. * It supports horizontal or vertical orientation with customizable styles and sizes. * The component uses CSS variables for theming and Tailwind for styling. */ interface BcmDivider { /** * @prop {('horizontal'|'vertical')} direction * @description Determines the orientation of the divider * @default 'horizontal' * @example */ "direction": 'horizontal' | 'vertical'; /** * @prop {('small'|'medium'|'large')} size * @description Controls the thickness of the divider * @default 'medium' * @values - small: 1px border - medium: 2px border - large: 4px border * @example */ "size": 'small' | 'medium' | 'large'; /** * @prop {('solid'|'dashed'|'dotted')} variant * @description Sets the border style of the divider * @default 'solid' * @example */ "variant": 'solid' | 'dashed' | 'dotted'; } /** * @component BcmDrawer * @description A slide-in panel component built on the native HTML Dialog API. * Ideal for navigation menus, forms, and contextual information that slides in from any edge of the screen. * @example ```html * * * * * * *
Settings
*
...
*
* * *
*
* * *

Custom height drawer

*
* * Content * * ``` */ interface BcmDrawer { /** * Controls backdrop behavior - true: Shows backdrop, drawer can be closed by clicking outside - false: No backdrop - 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation) * @default true */ "backdrop": boolean | 'static'; /** * Allows closing the drawer by clicking on the backdrop * @default true */ "closeOnBackdrop": boolean; /** * Allows closing the drawer by pressing the Escape key * @default true */ "closeOnEscape": boolean; /** * Makes the drawer take the full screen (100vw x 100vh) * @default false */ "fullScreen": boolean; /** * Makes the drawer take full width (for left/right) or full height (for top/bottom) * @default false */ "fullWidth": boolean; /** * Text to display in the drawer header */ "headerText"?: string; /** * Helper text to display below the header title */ "helperText"?: string; /** * Programmatically closes the drawer */ "hide": () => Promise; /** * Hides the footer section completely * @default false */ "noFooter": boolean; /** * Hides the header section completely * @default false */ "noHeader": boolean; /** * Controls whether the drawer is open or closed * @default false */ "open": boolean; /** * The position where the drawer slides in from - 'left': Slides from the left edge - 'right': Slides from the right edge - 'top': Slides from the top edge - 'bottom': Slides from the bottom edge * @default 'right' */ "position": DrawerPosition; /** * Programmatically opens the drawer */ "show": () => Promise; /** * The size of the drawer. Can be a preset value or a custom CSS size - For left/right drawers: - 'small': 320px - 'medium': 480px - 'large': 1064px - For top/bottom drawers: - 'small': 40vh - 'medium': 60vh - 'large': 90vh - Custom values: Any valid CSS size (e.g., '600px', '50%', '30rem', '80vw') * @default 'medium' */ "size": DrawerSize; /** * Toggles the drawer open/closed state */ "toggle": () => Promise; } interface BcmDropdown { "text"?: string; } interface BcmDropdownItem { /** * @default false */ "disabled": boolean; /** * @default false */ "error": boolean; "icon": string; "rightIcons": string[]; /** * @default false */ "selected": boolean; "text": string; } interface BcmFileUpload { /** * @default '.xls,.pdf' */ "accept": string; /** * @default '' */ "caption"?: string; /** * Allows consumers to override default error messages. */ "customErrorMessages"?: BcmUploadErrorMessages; /** * @default false */ "disabled": boolean; /** * @default '' */ "label": string; /** * Maximum number of files allowed in total. Only applied when `multiple` is true. */ "maxFileCount"?: number; /** * @default 2 */ "maxSize": number; /** * @default false */ "multiple": boolean; /** * @default 'file' */ "name": string; /** * @default false */ "required": boolean; /** * @default 'medium' */ "size": 'medium' | 'small'; /** * Reserved for future backend upload integration. Currently does not affect component behavior. */ "uploadUrl"?: string; } interface BcmInput { /** * Input id * @default generateId('input') */ "_id"?: string; /** * Input autocomplete attribute */ "autocomplete"?: string; /** * Caption text to display below input */ "captionText"?: string; /** * ID of associated caption/error text element */ "describedby"?: string; /** * Whether the input is disabled * @default false */ "disabled": boolean; /** * Error message to display */ "errorMessage"?: string; /** * Full width input * @default false */ "fullWidth": boolean; /** * Input label for accessibility */ "label"?: string; /** * ID of associated label element */ "labelledby"?: string; /** * Max value for number input */ "max"?: number; /** * Max length for text input */ "maxLength"?: number; /** * Min value for number input */ "min"?: number; /** * Min length for text input */ "minLength"?: number; /** * Input name */ "name"?: string; /** * Pattern for validation */ "pattern"?: string; /** * Input placeholder text */ "placeholder"?: string; /** * Prefix icon class name */ "prefixIcon"?: string; /** * Whether the input is readonly * @default false */ "readonly": boolean; /** * Whether the input is required * @default false */ "required": boolean; "select": () => Promise; "setBlur": () => Promise; "setFocus": () => Promise; /** * Sets locale and messages for all inputs */ "setLocale": (locale: string, messages: Record) => Promise; /** * Controls the input size * @default 'medium' */ "size": InputSize; /** * Defines the input's status/state * @default 'default' */ "status": InputStatus; /** * Step value for number input */ "step"?: number; /** * Suffix icon class name */ "suffixIcon"?: string; /** * HTML input type * @default 'text' */ "type": InputType; /** * Whether to use native form validation If false, component will handle validation internally * @default true */ "useNativeValidation": boolean; /** * Custom validation function */ "validator"?: (value: string) => string | undefined; /** * Input value * @default '' */ "value": string; } /** * @component BcmLinked * @description A flexible linked floating element component that displays contextual content relative to a trigger element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different trigger types (click, hover, focus, manual) and comprehensive event system. * @example Basic Click Trigger * * *
Floating content here
*
* @example Hover Trigger with Delays * * Hover Me *
This appears on hover
*
* @example Manual Control * * *
Controlled content
*
* * @csspart floating - The floating container element * @csspart arrow - The arrow element pointing to the trigger * @csspart content - The content wrapper element */ interface BcmLinked { /** * @prop {boolean} closeOnEscape - Whether to close when pressing Escape key. Default: true * @default true */ "closeOnEscape": boolean; /** * @prop {boolean} closeOnOutsideClick - Whether to close when clicking outside. Default: true * @default true */ "closeOnOutsideClick": boolean; /** * @prop {boolean} disabled - Disables the floating element, preventing it from showing. Default: false * @default false */ "disabled": boolean; /** * Programmatically hides the floating element. Respects the hideDelay prop. */ "hide": () => Promise; /** * @prop {number} hideDelay - Delay in milliseconds before hiding the floating element. Default: 0 * @default 0 */ "hideDelay": number; /** * @prop {number} offsetDistance - Distance in pixels between the floating element and the trigger. Default: 8 * @default 8 */ "offsetDistance": number; /** * @prop {Placement} placement - Defines the position of the floating element relative to the trigger. Default: 'bottom-start' * @default 'bottom-start' */ "placement": Placement; /** * Programmatically shows the floating element. Respects the showDelay prop. */ "show": () => Promise; /** * @prop {boolean} showArrow - Whether to show an arrow pointing to the trigger element. Default: true * @default true */ "showArrow": boolean; /** * @prop {number} showDelay - Delay in milliseconds before showing the floating element. Default: 0 * @default 0 */ "showDelay": number; /** * Toggles the floating element visibility. */ "toggle": () => Promise; /** * @prop {TriggerType} trigger - Defines the interaction type to show/hide the floating element. 'click' toggles on click, 'hover' shows on mouse enter and hides on mouse leave, 'focus' shows on focus and hides on blur, 'manual' requires programmatic control. Default: 'click' * @default 'click' */ "trigger": TriggerType; /** * Updates the position of the floating element. Useful when the trigger element moves or resizes. */ "updatePosition": () => Promise; /** * @prop {boolean} visible - Controls the visibility state of the floating element. Can be set programmatically or toggled by user interaction. Default: false * @default false */ "visible": boolean; } /** * @component BcmModal * @description A flexible modal dialog component built on the native HTML Dialog API. * Provides a powerful way to display content in a layer above the page with full keyboard and focus management. * @example ```html * * *

Modal content goes here

*
* *
*
* * *
Custom Header
*

Content here

*
* * *
*
* * *

Full screen content

*
* * Content * * ``` */ interface BcmModal { /** * Controls backdrop behavior - true: Shows backdrop, modal can be closed by clicking outside - false: No backdrop - 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation) * @default true */ "backdrop": boolean | 'static'; /** * Allows closing the modal by clicking on the backdrop * @default true */ "closeOnBackdrop": boolean; /** * Allows closing the modal by pressing the Escape key * @default true */ "closeOnEscape": boolean; /** * Makes the modal take the full screen (100vw x 100vh, no border radius) * @default false */ "fullScreen": boolean; /** * Makes the modal take full width of the viewport (max-width: 100%) * @default false */ "fullWidth": boolean; /** * Text to display in the modal header */ "headerText"?: string; /** * Helper text to display below the header title */ "helperText"?: string; /** * Programmatically closes the modal */ "hide": () => Promise; /** * Hides the footer section completely * @default false */ "noFooter": boolean; /** * Hides the header section completely * @default false */ "noHeader": boolean; /** * Controls whether the modal is open or closed * @default false */ "open": boolean; /** * The placement of the modal on the screen - 'center': Centered vertically and horizontally - 'top': Aligned to the top with 80px padding * @default 'center' */ "placement": ModalPlacement; /** * Programmatically opens the modal */ "show": () => Promise; /** * The size of the modal - 'small': 400px - 'medium': 600px - 'large': 800px - 'xlarge': 1024px - 'xxlarge': 1200px - 'full': 100% width * @default 'medium' */ "size": ModalSize; /** * Toggles the modal open/closed state */ "toggle": () => Promise; } /** * @component BcmPopConfirm * @description A confirmation popover component that displays a confirmation dialog with customizable actions. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Ideal for confirming destructive actions or important decisions inline. * @csspart container - The main popover container element * @csspart arrow - The arrow pointer element * @csspart body - The body/description section * @csspart footer - The footer section with action buttons * @example Basic Usage * ```html * * Delete * * ``` * @example With Event Handlers * ```html * * Delete Item * * * ``` * @example Different Status Types * ```html * * * Info * * * * Proceed * * * * Continue * * * * Delete * * ``` * @example Custom Content with Slots * ```html * * Custom Confirm *
* Custom Header *
*
*

This is custom body content with HTML formatting.

*
    *
  • Point 1
  • *
  • Point 2
  • *
*
*
* Maybe Later * Confirm *
*
* ``` * @example Different Sizes * ```html * * * Small * * * * Medium * * * * Large * * ``` * @example Programmatic Control * ```html * * Trigger * * Show Programmatically * Hide Programmatically * * ``` * @example Without Status Icon * ```html * * Click Me * * ``` * @example Different Placements * ```html * * Top * * * Right * * * Bottom * * * Left * * ``` */ interface BcmPopConfirm { /** * @prop {string} cancelText - Text for the cancel button. Default: 'Cancel' * @default 'Cancel' */ "cancelText": string; /** * @prop {boolean} closeOnEscape - Whether to close when pressing the Escape key. Default: true * @default true */ "closeOnEscape": boolean; /** * @prop {boolean} closeOnOutsideClick - Whether to close when clicking outside the popover. Default: true * @default true */ "closeOnOutsideClick": boolean; /** * @prop {string} confirmText - Text for the confirm button. Default: 'Yes' * @default 'Yes' */ "confirmText": string; /** * @prop {string} description - Description text displayed in the body section. Can be overridden by using the 'body' slot. Default: '' * @default '' */ "description": string; /** * @prop {string} headerText - Text displayed in the header section. Can be overridden by using the 'header' slot. Default: '' * @default '' */ "headerText": string; /** * Programmatically hides the popconfirm. * @returns Promise that resolves when the hide operation begins */ "hide": () => Promise; /** * @prop {number} offsetDistance - Distance in pixels between the popover and trigger element. Default: 12 * @default 12 */ "offsetDistance": number; /** * @prop {PopConfirmPlacement} placement - Position of the popover relative to the trigger element. Automatically flips if there's not enough space. Default: 'top' * @default 'top' */ "placement": PopConfirmPlacement; /** * Programmatically shows the popconfirm. * @returns Promise that resolves when the show operation begins */ "show": () => Promise; /** * @prop {boolean} showArrow - Whether to show the arrow pointing to the trigger. Default: true * @default true */ "showArrow": boolean; /** * @prop {PopConfirmSize} size - Size variant that controls padding and text size. - 'small': Compact size with minimal padding - 'medium': Standard size - 'large': Spacious size with more padding Default: 'medium' * @default 'medium' */ "size": PopConfirmSize; /** * @prop {PopConfirmStatus} status - Status type that determines the color scheme and icon. - 'info': Informational (blue) - 'success': Success/positive action (green) - 'warning': Warning/caution (yellow) - 'error': Error/destructive action (red) Default: 'info' * @default 'info' */ "status": PopConfirmStatus; /** * @prop {boolean} statusIcon - Whether to show the status icon in the header. Icon only shows if headerText is also provided. Default: true * @default true */ "statusIcon": boolean; /** * Toggles the popconfirm visibility. If open, it will close. If closed, it will open. * @returns Promise that resolves when the toggle operation completes */ "toggle": () => Promise; } /** * @component BcmPopover * @description A flexible popover component that displays contextual information or content relative to a target element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different sizes, trigger types (click, hover, focus), placements, and comprehensive event system. * @example Basic Click Popover * * Click Me * Header * This is a simple popover content. * * @example Hover Popover with Delays * * Hover Me * * @example Programmatic Control * * Toggle Me * Controlled popover * * * @csspart popover - The root popover container element, stylable for the entire popover * @csspart header - The header section of the popover, stylable for the title area * @csspart content - The content section of the popover, stylable for the main content area * @csspart arrow - The arrow element of the popover, stylable for the positioning arrow */ interface BcmPopover { /** * @prop {boolean} arrow - Whether to show an arrow pointing to the trigger element. Default: true * @default true */ "arrow": boolean; /** * @prop {boolean} closeOnEscape - Whether to close the popover when pressing Escape key. Default: true * @default true */ "closeOnEscape": boolean; /** * @prop {boolean} closeOnOutsideClick - Whether to close the popover when clicking outside. Default: true * @default true */ "closeOnOutsideClick": boolean; /** * @prop {string} headerText - Custom text for the popover header. Used as fallback content if the 'header' slot is not provided. */ "headerText"?: string; /** * Programmatically hides the popover. Respects the hideDelay prop. */ "hide": () => Promise; /** * @prop {number} hideDelay - Delay in milliseconds before hiding the popover. Provides a grace period for mouse movements. Default: 0 * @default 0 */ "hideDelay": number; /** * @prop {string} message - Custom text for the popover content. Used as fallback content if the 'content' slot is not provided. */ "message"?: string; /** * @prop {boolean} open - Controls the open state of the popover. Can be set programmatically or toggled by user interaction. Default: false * @default false */ "open": boolean; /** * @prop {('top' | 'right' | 'bottom' | 'left')} placement - Defines the position of the popover relative to the target element. Determines where the popover appears around the trigger element. Default: 'top' * @default 'top' */ "placement": 'top' | 'right' | 'bottom' | 'left'; /** * Programmatically shows the popover. Respects the showDelay prop. */ "show": () => Promise; /** * @prop {number} showDelay - Delay in milliseconds before showing the popover. Useful to prevent popovers from appearing on quick mouse movements. Default: 0 * @default 0 */ "showDelay": number; /** * @prop {('small' | 'medium' | 'large')} size - Defines the size of the popover. Controls the text size and padding of the popover content. Default: 'medium' * @default 'medium' */ "size": 'small' | 'medium' | 'large'; /** * Toggles the popover visibility. */ "toggle": () => Promise; /** * @prop {('click' | 'hover' | 'hover focus')} trigger - Defines the interaction type to show/hide the popover. 'click' toggles on click, 'hover' shows on mouse enter and hides on mouse leave, 'hover focus' combines both. Default: 'click' * @default 'click' */ "trigger": 'click' | 'hover' | 'hover focus'; } interface BcmRadio { /** * @default generateId('bcm-radio') */ "_id"?: string; /** * Whether the radio button is selected. * @prop * @defaultValue false */ "checked": boolean; /** * Whether the radio button is disabled. * @prop * @defaultValue false */ "disabled": boolean; /** * Whether the radio button is in an error state. * @prop * @defaultValue false */ "error": boolean; /** * The text label to display next to the radio button. * @prop * @defaultValue undefined */ "label": string; /** * Position of the label relative to the radio button: 'right' | 'left'. * @prop * @defaultValue 'right' */ "labelPosition": 'right' | 'left'; /** * The name attribute for the radio input, used to group radio buttons. * @prop * @defaultValue undefined */ "name": string; /** * Whether the radio button is readonly. * @prop * @defaultValue false */ "readonly": boolean; /** * Whether at least one radio in this group is required. (HTML) * @default false */ "required": boolean; /** * Defines the size of the radio button: 'small' | 'medium' | 'large'. * @prop * @defaultValue 'medium' */ "size": 'small' | 'medium' | 'large'; /** * The value of the radio button, submitted with the form. * @prop * @defaultValue undefined */ "value": string; } interface BcmRadioGroup { /** * Optional caption text to display below the radio group, often used for error messages or hints. * @prop * @defaultValue undefined */ "captionText"?: string; /** * The layout direction of the radio buttons: 'horizontal' | 'vertical'. * @prop * @defaultValue 'vertical' */ "direction": 'horizontal' | 'vertical'; /** * Whether the radio group and its radio buttons are disabled. * @prop * @defaultValue false */ "disabled": boolean; /** * Whether the radio group is in an error state. * @prop * @defaultValue false */ "error": boolean; /** * The label text to display above the radio group. * @prop * @defaultValue undefined */ "label": string; /** * The name attribute for the radio group, used to group radio buttons. * @prop * @defaultValue undefined */ "name": string; /** * Whether the radio group is required in a form. * @prop * @defaultValue false */ "required": boolean; /** * Resets the error state and caption. * @method */ "resetCaption": () => Promise; /** * Clears the selected value (sets it to an empty string) and unchecks all radio buttons. * @method */ "setClear": () => Promise; /** * Defines the size of the radio group and its radio buttons: 'small' | 'medium' | 'large'. * @prop * @defaultValue 'medium' */ "size": 'small' | 'medium' | 'large'; /** * The currently selected value of the radio group. * @prop * @defaultValue undefined */ "value": string; } /** * Individual segment option component */ interface BcmSegment { /** * Index of currently active segment (inherited from parent) * @default 0 */ "activeIndex": number; /** * Disabled state * @default false */ "disabled": boolean; /** * Index of this segment (inherited from parent) * @default 0 */ "index": number; /** * Selected state (controlled by parent) * @default false */ "selected": boolean; /** * Size variant (inherited from parent) * @default 'medium' */ "size": 'small' | 'medium' | 'large'; /** * Unique identifier for this segment */ "value": string; } /** * Modern Segmented Picker component with CSS Grid-based indicator */ interface BcmSegmentedPicker { /** * Disabled state * @default false */ "disabled": boolean; /** * Full width flag * @default false */ "fullWidth": boolean; /** * Public method to get active segment value */ "getValue": () => Promise; /** * Name attribute for form association */ "name": string; /** * Whether this field is required in a form * @default false */ "required": boolean; /** * Public method to programmatically set active segment */ "setValue": (value: string) => Promise; /** * Enable shadow on container * @default false */ "shadow": boolean; /** * Size variant * @default 'medium' */ "size": 'small' | 'medium' | 'large'; /** * Selected segment value */ "value": string; } interface BcmShortcut { "hotkey": string; /** * @default 'small' */ "size": 'small' | 'medium' | 'large'; } /** * @component BcmSwitch * @description A form-associated toggle switch component representing a boolean choice. * It behaves like a checkbox and integrates with native HTML forms via ElementInternals. * This component supports **three validation strategies** via `validation-mode`: * - **`native`**: * - Uses native browser constraint validation. * - Sets the underlying input's `required` attribute. * - Browser may show the native validation bubble when the form calls `reportValidity()` / submit validation runs. * - **`silent`**: * - Does **not** rely on native `required` (prevents the browser bubble). * - Computes the "missing required" state internally and exposes it via `error` + `caption`. * - UI errors are **gated**: they appear only after the control is touched or after a submit attempt. * - **`none`**: * - Value-only mode (headless): participates in form value submission but never becomes invalid. * ## UI error gating (silent mode) * To avoid showing errors on initial render, the component tracks: * - `touched`: set after the first user interaction * - `submitAttempted`: set when the parent form emits `submit` * Only when `touched || submitAttempted` the component will show `error/caption` in `silent` mode. * ## Value behavior * - When checked, the component submits its `value` (default: `"on"`). * - When unchecked, no value is submitted. * - When disabled, the component does not participate in submission or validity. * @example Basic usage * * @example Required with silent validation (no native bubble) *
* * * *
* @example Native validation mode (may show native bubble) * * @example Value-only mode (no validation) * * @csspart base - Root container * @csspart switch-wrapper - Wrapper containing label + track * @csspart input - Hidden native input * @csspart label - Text label * @csspart dot-container - Switch track * @csspart dot - Switch knob * @csspart caption - Helper/error text */ interface BcmSwitch { /** * Unique id (optional). Generated by default. * @default generateId('bcm-switch') */ "_id"?: string; /** * Helper / error text shown under the switch */ "caption"?: string; /** * Checked state * @default false */ "checked": boolean; /** * Disabled state * @default false */ "disabled": boolean; /** * Visual error state (manual/external). In silent mode this can be auto-managed. * @default false */ "error": boolean; /** * Visible label text */ "label": string; /** * Position of the label relative to the switch * @default 'right' */ "labelPosition": 'left' | 'right'; /** * Form field name */ "name"?: string; /** * Optional readonly support * @default false */ "readonly": boolean; /** * Required state * @default false */ "required": boolean; /** * Size variant * @default 'medium' */ "size": 'small' | 'medium' | 'large'; /** * @default 'native' */ "validationMode": 'native' | 'silent' | 'none'; /** * Value submitted when checked * @default 'on' */ "value": string; } /** * Individual tab component - self-contained with label and content panel */ interface BcmTab { /** * Active state (controlled by parent) * @default false */ "active": boolean; /** * Disabled state * @default false */ "disabled": boolean; /** * Label text to display in tab button */ "label": string; /** * Size variant (inherited from parent) * @default 'md' */ "size": 'sm' | 'md' | 'lg'; /** * Unique identifier for this tab */ "value": string; } /** * Modern Tabs component with CSS-first approach */ interface BcmTabs { /** * Public method to get active tab value */ "getActiveTab": () => Promise; /** * Public method to programmatically set active tab */ "setActiveTab": (value: string) => Promise; /** * Enable shadow on main container * @default false */ "shadow": boolean; /** * Tab size variant * @default 'md' */ "size": 'sm' | 'md' | 'lg'; /** * Active tab value */ "value": string; /** * Visual variant * @default 'line' */ "variant": 'line' | 'enclosed'; } interface BcmText { /** * Text overflow behavior * @default false */ "overflow": boolean; /** * Text size * @default 'medium' */ "size": TextSize; /** * Text content */ "text": string; /** * Text variant * @default 'body' */ "variant": TextVariant; } interface BcmTextarea { /** * Input id * @default generateId('textarea') */ "_id"?: string; /** * Auto grow height based on content * @default false */ "autoGrow": boolean; /** * Caption text to display below textarea */ "captionText"?: string; /** * Textarea cols */ "cols"?: number; /** * ID of associated caption/error text element */ "describedby"?: string; /** * Whether the textarea is disabled * @default false */ "disabled": boolean; /** * Error message to display */ "errorMessage"?: string; /** * Full width textarea * @default false */ "fullWidth": boolean; /** * Textarea label for accessibility */ "label"?: string; /** * ID of associated label element */ "labelledby"?: string; /** * Max length for text input */ "maxLength"?: number; /** * Maximum height in rows */ "maxRows"?: number; /** * Min length for text input */ "minLength"?: number; /** * Minimum height in rows */ "minRows"?: number; /** * Input name */ "name"?: string; /** * Input placeholder text */ "placeholder"?: string; /** * Whether the textarea is readonly * @default false */ "readonly": boolean; /** * Whether the textarea is required * @default false */ "required": boolean; /** * Resize behavior * @default 'none' */ "resize": TextareaResize; /** * Textarea rows * @default 3 */ "rows"?: number; "select": () => Promise; "setBlur": () => Promise; "setFocus": () => Promise; /** * Show character counter * @default true */ "showCounter": boolean; /** * Controls the textarea size * @default 'medium' */ "size": InputSize1; /** * Defines the textarea's status/state * @default 'default' */ "status": InputStatus1; /** * Custom validation function */ "validator"?: (value: string) => string | undefined; /** * Textarea value * @default '' */ "value": string; } /** * @component BcmTooltip * @description A flexible tooltip component that provides contextual information on hover or click. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Automatically handles overflow, flipping, and complex shadow DOM scenarios. * @example ```html * * * * * * * *
* Rich content *

You can add any HTML here

*
*
* * * Click me * * * *
Move your mouse here
*
* * * Trigger * * * * * ``` */ interface BcmTooltip { /** * Whether to show an arrow pointing to the trigger element Note: Arrow is automatically hidden in 'follow' mode * @default true */ "arrow": boolean; /** * Disables the tooltip, preventing it from showing Useful for conditional tooltips based on application state * @default false */ "disabled": boolean; /** * Makes the tooltip follow the mouse cursor When enabled: - Arrow is hidden - Tooltip position updates smoothly with cursor movement - Pointer events are disabled on tooltip to prevent interference * @default false */ "follow": boolean; /** * Programmatically hides the tooltip Respects the hideDelay prop */ "hide": () => Promise; /** * Delay in milliseconds before hiding the tooltip Provides a grace period for mouse movements * @default 100 */ "hideDelay": number; /** * Simple text message to display in the tooltip Can be overridden by slotting content into the 'content' slot */ "message"?: string; /** * Distance in pixels between the tooltip and the trigger element Also used as the offset in 'follow' mode * @default 12 */ "offset": number; /** * Preferred placement of the tooltip relative to the trigger Note: Tooltip will automatically flip if there's not enough space - 'top': Above the trigger element - 'right': To the right of the trigger element - 'bottom': Below the trigger element - 'left': To the left of the trigger element * @default 'top' */ "placement": TooltipPlacement; /** * Programmatically shows the tooltip Respects the showDelay prop and disabled state */ "show": () => Promise; /** * Delay in milliseconds before showing the tooltip Useful to prevent tooltips from appearing on quick mouse movements * @default 150 */ "showDelay": number; /** * Size variant of the tooltip - 'small': Compact tooltip with minimal padding (text-size-3, py-1 px-2) - 'medium': Standard tooltip size (text-size-4, py-1.5 px-3) - 'large': Larger tooltip for more content (text-size-5, py-2 px-4) * @default 'medium' */ "size": TooltipSize; /** * Toggles the tooltip visibility If open, hides it; if closed, shows it */ "toggle": () => Promise; /** * How the tooltip is triggered - 'hover': Shows on mouse enter, hides on mouse leave - 'click': Toggles on click, closes on outside click or Escape key * @default 'hover' */ "trigger": TooltipTrigger; } } export interface BcmAccordionCustomEvent extends CustomEvent { detail: T; target: HTMLBcmAccordionElement; } export interface BcmAccordionGroupCustomEvent extends CustomEvent { detail: T; target: HTMLBcmAccordionGroupElement; } export interface BcmAlertCustomEvent extends CustomEvent { detail: T; target: HTMLBcmAlertElement; } export interface BcmButtonCustomEvent extends CustomEvent { detail: T; target: HTMLBcmButtonElement; } export interface BcmCheckboxCustomEvent extends CustomEvent { detail: T; target: HTMLBcmCheckboxElement; } export interface BcmChipCustomEvent extends CustomEvent { detail: T; target: HTMLBcmChipElement; } export interface BcmDrawerCustomEvent extends CustomEvent { detail: T; target: HTMLBcmDrawerElement; } export interface BcmDropdownCustomEvent extends CustomEvent { detail: T; target: HTMLBcmDropdownElement; } export interface BcmDropdownItemCustomEvent extends CustomEvent { detail: T; target: HTMLBcmDropdownItemElement; } export interface BcmFileUploadCustomEvent extends CustomEvent { detail: T; target: HTMLBcmFileUploadElement; } export interface BcmInputCustomEvent extends CustomEvent { detail: T; target: HTMLBcmInputElement; } export interface BcmLinkedCustomEvent extends CustomEvent { detail: T; target: HTMLBcmLinkedElement; } export interface BcmModalCustomEvent extends CustomEvent { detail: T; target: HTMLBcmModalElement; } export interface BcmPopConfirmCustomEvent extends CustomEvent { detail: T; target: HTMLBcmPopConfirmElement; } export interface BcmPopoverCustomEvent extends CustomEvent { detail: T; target: HTMLBcmPopoverElement; } export interface BcmRadioCustomEvent extends CustomEvent { detail: T; target: HTMLBcmRadioElement; } export interface BcmRadioGroupCustomEvent extends CustomEvent { detail: T; target: HTMLBcmRadioGroupElement; } export interface BcmSegmentCustomEvent extends CustomEvent { detail: T; target: HTMLBcmSegmentElement; } export interface BcmSegmentedPickerCustomEvent extends CustomEvent { detail: T; target: HTMLBcmSegmentedPickerElement; } export interface BcmSwitchCustomEvent extends CustomEvent { detail: T; target: HTMLBcmSwitchElement; } export interface BcmTabCustomEvent extends CustomEvent { detail: T; target: HTMLBcmTabElement; } export interface BcmTabsCustomEvent extends CustomEvent { detail: T; target: HTMLBcmTabsElement; } export interface BcmTextareaCustomEvent extends CustomEvent { detail: T; target: HTMLBcmTextareaElement; } declare global { interface HTMLBcmAccordionElementEventMap { "bcmAccordionChange": AccordionChangeEventType; } /** * @component BcmAccordion * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation * and accessibility features. Offers customizable header, content, and footer areas through slots. * @example Basic usage * *
Accordion Title
*
Content goes here
*
* @example With all slots and hint text * *
Title
*
* *
*
Main content
*
Footer content
*
* @example Event handling * // Listen to accordion state changes * const accordion = document.querySelector('bcm-accordion'); * accordion.addEventListener('bcmAccordionChange', (event) => { * const { expanded, source } = event.detail; * console.log('Accordion expanded:', expanded); * console.log('Changed accordion:', source); * }); * // Programmatically control accordion * await accordion.toggle(); // Toggle state * await accordion.expand(); // Expand accordion * await accordion.collapse(); // Collapse accordion * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false) * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false) * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided * @event {EventEmitter} bcmAccordionChange - Emitted when the accordion's expanded state changes * @eventProperty {boolean} expanded - Current expanded state * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed * @csspart container - The root container element * @csspart header - The header section with title and actions * @csspart content - The collapsible content section * @csspart footer - The footer section with hint text or footer slot * @csspart section - Container for header content sections * @csspart icon - The expand/collapse chevron icon * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px) * @css {string} --bcm-accordion-bg - Background color of the accordion header * @css {string} --bcm-accordion-text - Text color of the accordion * @css {string} --bcm-accordion-footer-bg - Background color of the footer section * @methods toggle() - Toggles the accordion's expanded state * expand() - Expands the accordion if collapsed * collapse() - Collapses the accordion if expanded */ interface HTMLBcmAccordionElement extends Components.BcmAccordion, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmAccordionElement, ev: BcmAccordionCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmAccordionElement, ev: BcmAccordionCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmAccordionElement: { prototype: HTMLBcmAccordionElement; new (): HTMLBcmAccordionElement; }; interface HTMLBcmAccordionGroupElementEventMap { "bcmAccordionGroupChange": AccordionGroupChangeEventType; } /** * @component BcmAccordionGroup * @description A container component that manages a group of accordions. Provides single/multiple expansion * modes and methods for controlling all accordions simultaneously. Uses shadow DOM for style encapsulation. * @example Basic usage - Single expansion mode * * *
Section 1
*
Content 1
*
* *
Section 2
*
Content 2
*
*
* @example Multiple expansion mode * * ... * ... * * @example Event handling * // Listen to accordion group changes * const accordionGroup = document.querySelector('bcm-accordion-group'); * accordionGroup.addEventListener('bcmAccordionGroupChange', (event) => { * const { expanded, changed, expandedItems, expandedCount } = event.detail; * console.log('Accordion expanded state:', expanded); * console.log('Changed accordion:', changed); * console.log('Currently expanded accordions:', expandedItems); * console.log('Number of expanded accordions:', expandedCount); * }); * // Using methods * await accordionGroup.expandAll(); // Expands all accordions (only in multi mode) * await accordionGroup.collapseAll(); // Collapses all accordions * const expanded = await accordionGroup.getExpandedItems(); // Gets expanded accordions * @prop {boolean} multi - Controls whether multiple accordions can be expanded simultaneously (default: false) * @event {EventEmitter} bcmAccordionGroupChange - Emitted when any accordion's state changes * @eventProperty {boolean} expanded - Current expanded state of the changed accordion * @eventProperty {HTMLElement} changed - The accordion element that triggered the change * @eventProperty {HTMLElement[]} expandedItems - Array of currently expanded accordion elements * @eventProperty {number} expandedCount - Number of currently expanded accordions * @method expandAll() - Expands all accordions (only available in multi mode) * @method collapseAll() - Collapses all accordions * @method getExpandedItems() - Returns array of currently expanded accordions * @csspart container - The accordion group container element * @css {string} --bcm-accordion-border - Border color of the accordion group * @css {string} --bcm-accordion-radius - Border radius of the accordion group */ interface HTMLBcmAccordionGroupElement extends Components.BcmAccordionGroup, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmAccordionGroupElement, ev: BcmAccordionGroupCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmAccordionGroupElement, ev: BcmAccordionGroupCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmAccordionGroupElement: { prototype: HTMLBcmAccordionGroupElement; new (): HTMLBcmAccordionGroupElement; }; interface HTMLBcmAlertElementEventMap { "bcmDismiss": void; } /** * Alert component that displays messages with different statuses and styles * @class BcmAlert */ interface HTMLBcmAlertElement extends Components.BcmAlert, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmAlertElement, ev: BcmAlertCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmAlertElement, ev: BcmAlertCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmAlertElement: { prototype: HTMLBcmAlertElement; new (): HTMLBcmAlertElement; }; /** * @component BcmAttendance * @description Visualizes attendance history (AM/PM status) for a series of days. * Supports different status types (present, late, absent, etc.) with color-coded indicators. * Can handle data via JSON string or direct object array. * @example Basic usage * * @example With specific statuses * */ interface HTMLBcmAttendanceElement extends Components.BcmAttendance, HTMLStencilElement { } var HTMLBcmAttendanceElement: { prototype: HTMLBcmAttendanceElement; new (): HTMLBcmAttendanceElement; }; interface HTMLBcmAvatarElement extends Components.BcmAvatar, HTMLStencilElement { } var HTMLBcmAvatarElement: { prototype: HTMLBcmAvatarElement; new (): HTMLBcmAvatarElement; }; /** * @component BcmBadge * @description A versatile badge component that can be positioned around its container. * Supports different sizes, variants (dot/text), colors, and positioning options. * Can display status indicators with optional blinking animation. * @example Basic usage * *
Container Content
* New *
* @example Status indicator with blink * *
User Profile
*
*/ interface HTMLBcmBadgeElement extends Components.BcmBadge, HTMLStencilElement { } var HTMLBcmBadgeElement: { prototype: HTMLBcmBadgeElement; new (): HTMLBcmBadgeElement; }; /** * @component BcmBasicBadge * @description A basic badge component that can be used as a status indicator or to highlight content. * Supports dot and text variants with different sizes and color options. * @example Basic usage * * New * * @example Dot variant * */ interface HTMLBcmBasicBadgeElement extends Components.BcmBasicBadge, HTMLStencilElement { } var HTMLBcmBasicBadgeElement: { prototype: HTMLBcmBasicBadgeElement; new (): HTMLBcmBasicBadgeElement; }; interface HTMLBcmButtonElementEventMap { "bcmClick": MouseEvent; "bcmFocus": FocusEvent; "bcmBlur": FocusEvent; } interface HTMLBcmButtonElement extends Components.BcmButton, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmButtonElement, ev: BcmButtonCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmButtonElement, ev: BcmButtonCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmButtonElement: { prototype: HTMLBcmButtonElement; new (): HTMLBcmButtonElement; }; interface HTMLBcmButtonGroupElement extends Components.BcmButtonGroup, HTMLStencilElement { } var HTMLBcmButtonGroupElement: { prototype: HTMLBcmButtonGroupElement; new (): HTMLBcmButtonGroupElement; }; interface HTMLBcmCheckboxElementEventMap { "bcmCheckboxChange": { element: HTMLInputElement; checked: boolean }; } /** * @component BcmCheckbox * @description A form-associated checkbox component representing a boolean choice. * Integrates with native HTML forms via ElementInternals while supporting * **three validation strategies** via `validation-mode`: * - **`native`** * - Participates in native browser constraint validation. * - Sets the underlying input's `required`. * - Browser may show native validation bubbles when submit/reportValidity happens. * - **`silent`** * - Does **not** set native `required` (prevents browser bubble). * - Computes "missing required" internally and exposes it via `error` + `caption`. * - UI errors are **gated**: shown only after `touched` or a form submit attempt. * - **`none`** * - Value-only mode: submits value but never becomes invalid. * ## UI error gating (silent mode) * - `touched` becomes true after first user interaction * - `submitAttempted` becomes true when the parent form emits `submit` * ## Value behavior * - When checked → submits `value` (default: `"on"`). * - When unchecked → submits no value (`null`). * - When disabled → no submission and no validity participation. * ## Shadow Parts * - `checkbox` → root container * - `control` → visual checkbox box * - `icon` → icon container (check or minus) * - `label` → label text * - `caption` → helper/error text (silent mode UI) * - `input` → hidden native input * @example Basic usage * * I agree to the terms and conditions * * @example Silent validation (no native bubble) *
* * Subscribe to newsletter * * *
* @example Value-only mode * * Allow analytics * */ interface HTMLBcmCheckboxElement extends Components.BcmCheckbox, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmCheckboxElement, ev: BcmCheckboxCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmCheckboxElement, ev: BcmCheckboxCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmCheckboxElement: { prototype: HTMLBcmCheckboxElement; new (): HTMLBcmCheckboxElement; }; interface HTMLBcmChipElementEventMap { "bcmDismiss": void; } /** * @component BcmChip * @description A versatile chip component that can be used to display compact pieces of information, filters, or actions. * Supports different sizes, styles (filled, outlined, text), statuses, and can be dismissible. * @example * Success Chip * * @example Dismissible chip * handleDismiss()}> * Dismissible Chip * * @prop {ChipSize} size - Defines the size of the chip: 'small' | 'medium' | 'large' * @prop {ChipKind} kind - Defines the visual style: 'filled' | 'outlined' | 'text' * @prop {ChipStatus} status - Defines the status color: 'info' | 'error' | 'warning' | 'success' | 'default' | 'primary' * @prop {boolean} dismissible - Whether the chip can be dismissed * @prop {boolean} disabled - Whether the chip is disabled * @prop {string} color - Custom color override for the chip * @event {EventEmitter} dismiss - Emitted when the dismiss button is clicked * @csspart chip - The root chip element * @csspart dismiss-icon - The dismiss button icon */ interface HTMLBcmChipElement extends Components.BcmChip, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmChipElement, ev: BcmChipCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmChipElement, ev: BcmChipCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmChipElement: { prototype: HTMLBcmChipElement; new (): HTMLBcmChipElement; }; /** * @component BCM Divider * @description A versatile divider component that creates a visual separation between content. * It supports horizontal or vertical orientation with customizable styles and sizes. * The component uses CSS variables for theming and Tailwind for styling. */ interface HTMLBcmDividerElement extends Components.BcmDivider, HTMLStencilElement { } var HTMLBcmDividerElement: { prototype: HTMLBcmDividerElement; new (): HTMLBcmDividerElement; }; interface HTMLBcmDrawerElementEventMap { "bcmOpen": void; "bcmClose": void; "bcmBeforeOpen": void; "bcmBeforeClose": void; } /** * @component BcmDrawer * @description A slide-in panel component built on the native HTML Dialog API. * Ideal for navigation menus, forms, and contextual information that slides in from any edge of the screen. * @example ```html * * * * * * *
Settings
*
...
*
* * *
*
* * *

Custom height drawer

*
* * Content * * ``` */ interface HTMLBcmDrawerElement extends Components.BcmDrawer, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmDrawerElement, ev: BcmDrawerCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmDrawerElement, ev: BcmDrawerCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmDrawerElement: { prototype: HTMLBcmDrawerElement; new (): HTMLBcmDrawerElement; }; interface HTMLBcmDropdownElementEventMap { "bcmDropdownChange": any; } interface HTMLBcmDropdownElement extends Components.BcmDropdown, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmDropdownElement, ev: BcmDropdownCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmDropdownElement, ev: BcmDropdownCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmDropdownElement: { prototype: HTMLBcmDropdownElement; new (): HTMLBcmDropdownElement; }; interface HTMLBcmDropdownItemElementEventMap { "bcmDropDownItemChange": any; } interface HTMLBcmDropdownItemElement extends Components.BcmDropdownItem, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmDropdownItemElement, ev: BcmDropdownItemCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmDropdownItemElement, ev: BcmDropdownItemCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmDropdownItemElement: { prototype: HTMLBcmDropdownItemElement; new (): HTMLBcmDropdownItemElement; }; interface HTMLBcmFileUploadElementEventMap { "bcmFileChange": File[]; "bcmFileRemoved": BcmUploadItem; "bcmUploadCanceled": BcmUploadItem; "bcmFocus": FocusEvent; "bcmBlur": FocusEvent; } interface HTMLBcmFileUploadElement extends Components.BcmFileUpload, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmFileUploadElement, ev: BcmFileUploadCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmFileUploadElement, ev: BcmFileUploadCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmFileUploadElement: { prototype: HTMLBcmFileUploadElement; new (): HTMLBcmFileUploadElement; }; interface HTMLBcmInputElementEventMap { "bcmInput": InputEvent; "bcmChange": Event; "bcmFocus": FocusEvent; "bcmBlur": FocusEvent; "bcmKeyDown": KeyboardEvent; "bcmKeyUp": KeyboardEvent; } interface HTMLBcmInputElement extends Components.BcmInput, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmInputElement, ev: BcmInputCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmInputElement, ev: BcmInputCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmInputElement: { prototype: HTMLBcmInputElement; new (): HTMLBcmInputElement; }; interface HTMLBcmLinkedElementEventMap { "bcmBeforeShow": void; "bcmShow": void; "bcmBeforeHide": void; "bcmHide": void; "bcmShown": void; "bcmHidden": void; } /** * @component BcmLinked * @description A flexible linked floating element component that displays contextual content relative to a trigger element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different trigger types (click, hover, focus, manual) and comprehensive event system. * @example Basic Click Trigger * * *
Floating content here
*
* @example Hover Trigger with Delays * * Hover Me *
This appears on hover
*
* @example Manual Control * * *
Controlled content
*
* * @csspart floating - The floating container element * @csspart arrow - The arrow element pointing to the trigger * @csspart content - The content wrapper element */ interface HTMLBcmLinkedElement extends Components.BcmLinked, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmLinkedElement, ev: BcmLinkedCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmLinkedElement, ev: BcmLinkedCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmLinkedElement: { prototype: HTMLBcmLinkedElement; new (): HTMLBcmLinkedElement; }; interface HTMLBcmModalElementEventMap { "bcmOpen": void; "bcmClose": void; "bcmBeforeOpen": void; "bcmBeforeClose": void; } /** * @component BcmModal * @description A flexible modal dialog component built on the native HTML Dialog API. * Provides a powerful way to display content in a layer above the page with full keyboard and focus management. * @example ```html * * *

Modal content goes here

*
* *
*
* * *
Custom Header
*

Content here

*
* * *
*
* * *

Full screen content

*
* * Content * * ``` */ interface HTMLBcmModalElement extends Components.BcmModal, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmModalElement, ev: BcmModalCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmModalElement, ev: BcmModalCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmModalElement: { prototype: HTMLBcmModalElement; new (): HTMLBcmModalElement; }; interface HTMLBcmPopConfirmElementEventMap { "bcmBeforeOpen": void; "bcmOpen": void; "bcmBeforeClose": void; "bcmClose": void; "bcmConfirm": void; "bcmCancel": void; } /** * @component BcmPopConfirm * @description A confirmation popover component that displays a confirmation dialog with customizable actions. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Ideal for confirming destructive actions or important decisions inline. * @csspart container - The main popover container element * @csspart arrow - The arrow pointer element * @csspart body - The body/description section * @csspart footer - The footer section with action buttons * @example Basic Usage * ```html * * Delete * * ``` * @example With Event Handlers * ```html * * Delete Item * * * ``` * @example Different Status Types * ```html * * * Info * * * * Proceed * * * * Continue * * * * Delete * * ``` * @example Custom Content with Slots * ```html * * Custom Confirm *
* Custom Header *
*
*

This is custom body content with HTML formatting.

*
    *
  • Point 1
  • *
  • Point 2
  • *
*
*
* Maybe Later * Confirm *
*
* ``` * @example Different Sizes * ```html * * * Small * * * * Medium * * * * Large * * ``` * @example Programmatic Control * ```html * * Trigger * * Show Programmatically * Hide Programmatically * * ``` * @example Without Status Icon * ```html * * Click Me * * ``` * @example Different Placements * ```html * * Top * * * Right * * * Bottom * * * Left * * ``` */ interface HTMLBcmPopConfirmElement extends Components.BcmPopConfirm, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmPopConfirmElement, ev: BcmPopConfirmCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmPopConfirmElement, ev: BcmPopConfirmCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmPopConfirmElement: { prototype: HTMLBcmPopConfirmElement; new (): HTMLBcmPopConfirmElement; }; interface HTMLBcmPopoverElementEventMap { "bcmBeforeOpen": void; "bcmOpen": void; "bcmBeforeClose": void; "bcmClose": void; } /** * @component BcmPopover * @description A flexible popover component that displays contextual information or content relative to a target element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different sizes, trigger types (click, hover, focus), placements, and comprehensive event system. * @example Basic Click Popover * * Click Me * Header * This is a simple popover content. * * @example Hover Popover with Delays * * Hover Me * * @example Programmatic Control * * Toggle Me * Controlled popover * * * @csspart popover - The root popover container element, stylable for the entire popover * @csspart header - The header section of the popover, stylable for the title area * @csspart content - The content section of the popover, stylable for the main content area * @csspart arrow - The arrow element of the popover, stylable for the positioning arrow */ interface HTMLBcmPopoverElement extends Components.BcmPopover, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmPopoverElement, ev: BcmPopoverCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmPopoverElement, ev: BcmPopoverCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmPopoverElement: { prototype: HTMLBcmPopoverElement; new (): HTMLBcmPopoverElement; }; interface HTMLBcmRadioElementEventMap { "bcmRadioChange": void; "bcmBlur": FocusEvent; "bcmFocus": FocusEvent; } interface HTMLBcmRadioElement extends Components.BcmRadio, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmRadioElement, ev: BcmRadioCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmRadioElement, ev: BcmRadioCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmRadioElement: { prototype: HTMLBcmRadioElement; new (): HTMLBcmRadioElement; }; interface HTMLBcmRadioGroupElementEventMap { "bcmRadioGroupChange": any; } interface HTMLBcmRadioGroupElement extends Components.BcmRadioGroup, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmRadioGroupElement, ev: BcmRadioGroupCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmRadioGroupElement, ev: BcmRadioGroupCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmRadioGroupElement: { prototype: HTMLBcmRadioGroupElement; new (): HTMLBcmRadioGroupElement; }; interface HTMLBcmSegmentElementEventMap { "bcmSegmentClick": string; } /** * Individual segment option component */ interface HTMLBcmSegmentElement extends Components.BcmSegment, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmSegmentElement, ev: BcmSegmentCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmSegmentElement, ev: BcmSegmentCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmSegmentElement: { prototype: HTMLBcmSegmentElement; new (): HTMLBcmSegmentElement; }; interface HTMLBcmSegmentedPickerElementEventMap { "bcmSegmentChange": { value: string; previousValue: string }; } /** * Modern Segmented Picker component with CSS Grid-based indicator */ interface HTMLBcmSegmentedPickerElement extends Components.BcmSegmentedPicker, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmSegmentedPickerElement, ev: BcmSegmentedPickerCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmSegmentedPickerElement, ev: BcmSegmentedPickerCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmSegmentedPickerElement: { prototype: HTMLBcmSegmentedPickerElement; new (): HTMLBcmSegmentedPickerElement; }; interface HTMLBcmShortcutElement extends Components.BcmShortcut, HTMLStencilElement { } var HTMLBcmShortcutElement: { prototype: HTMLBcmShortcutElement; new (): HTMLBcmShortcutElement; }; interface HTMLBcmSwitchElementEventMap { "bcmSwitchChange": boolean; } /** * @component BcmSwitch * @description A form-associated toggle switch component representing a boolean choice. * It behaves like a checkbox and integrates with native HTML forms via ElementInternals. * This component supports **three validation strategies** via `validation-mode`: * - **`native`**: * - Uses native browser constraint validation. * - Sets the underlying input's `required` attribute. * - Browser may show the native validation bubble when the form calls `reportValidity()` / submit validation runs. * - **`silent`**: * - Does **not** rely on native `required` (prevents the browser bubble). * - Computes the "missing required" state internally and exposes it via `error` + `caption`. * - UI errors are **gated**: they appear only after the control is touched or after a submit attempt. * - **`none`**: * - Value-only mode (headless): participates in form value submission but never becomes invalid. * ## UI error gating (silent mode) * To avoid showing errors on initial render, the component tracks: * - `touched`: set after the first user interaction * - `submitAttempted`: set when the parent form emits `submit` * Only when `touched || submitAttempted` the component will show `error/caption` in `silent` mode. * ## Value behavior * - When checked, the component submits its `value` (default: `"on"`). * - When unchecked, no value is submitted. * - When disabled, the component does not participate in submission or validity. * @example Basic usage * * @example Required with silent validation (no native bubble) *
* * * *
* @example Native validation mode (may show native bubble) * * @example Value-only mode (no validation) * * @csspart base - Root container * @csspart switch-wrapper - Wrapper containing label + track * @csspart input - Hidden native input * @csspart label - Text label * @csspart dot-container - Switch track * @csspart dot - Switch knob * @csspart caption - Helper/error text */ interface HTMLBcmSwitchElement extends Components.BcmSwitch, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmSwitchElement, ev: BcmSwitchCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmSwitchElement, ev: BcmSwitchCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmSwitchElement: { prototype: HTMLBcmSwitchElement; new (): HTMLBcmSwitchElement; }; interface HTMLBcmTabElementEventMap { "bcmTabClick": string; } /** * Individual tab component - self-contained with label and content panel */ interface HTMLBcmTabElement extends Components.BcmTab, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmTabElement, ev: BcmTabCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmTabElement, ev: BcmTabCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmTabElement: { prototype: HTMLBcmTabElement; new (): HTMLBcmTabElement; }; interface HTMLBcmTabsElementEventMap { "bcmTabChange": { value: string; previousValue: string; }; } /** * Modern Tabs component with CSS-first approach */ interface HTMLBcmTabsElement extends Components.BcmTabs, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmTabsElement, ev: BcmTabsCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmTabsElement, ev: BcmTabsCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmTabsElement: { prototype: HTMLBcmTabsElement; new (): HTMLBcmTabsElement; }; interface HTMLBcmTextElement extends Components.BcmText, HTMLStencilElement { } var HTMLBcmTextElement: { prototype: HTMLBcmTextElement; new (): HTMLBcmTextElement; }; interface HTMLBcmTextareaElementEventMap { "bcmInput": InputEvent; "bcmChange": Event; "bcmFocus": FocusEvent; "bcmBlur": FocusEvent; "bcmKeyDown": KeyboardEvent; "bcmKeyUp": KeyboardEvent; } interface HTMLBcmTextareaElement extends Components.BcmTextarea, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLBcmTextareaElement, ev: BcmTextareaCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLBcmTextareaElement, ev: BcmTextareaCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLBcmTextareaElement: { prototype: HTMLBcmTextareaElement; new (): HTMLBcmTextareaElement; }; /** * @component BcmTooltip * @description A flexible tooltip component that provides contextual information on hover or click. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Automatically handles overflow, flipping, and complex shadow DOM scenarios. * @example ```html * * * * * * * *
* Rich content *

You can add any HTML here

*
*
* * * Click me * * * *
Move your mouse here
*
* * * Trigger * * * * * ``` */ interface HTMLBcmTooltipElement extends Components.BcmTooltip, HTMLStencilElement { } var HTMLBcmTooltipElement: { prototype: HTMLBcmTooltipElement; new (): HTMLBcmTooltipElement; }; interface HTMLElementTagNameMap { "bcm-accordion": HTMLBcmAccordionElement; "bcm-accordion-group": HTMLBcmAccordionGroupElement; "bcm-alert": HTMLBcmAlertElement; "bcm-attendance": HTMLBcmAttendanceElement; "bcm-avatar": HTMLBcmAvatarElement; "bcm-badge": HTMLBcmBadgeElement; "bcm-basic-badge": HTMLBcmBasicBadgeElement; "bcm-button": HTMLBcmButtonElement; "bcm-button-group": HTMLBcmButtonGroupElement; "bcm-checkbox": HTMLBcmCheckboxElement; "bcm-chip": HTMLBcmChipElement; "bcm-divider": HTMLBcmDividerElement; "bcm-drawer": HTMLBcmDrawerElement; "bcm-dropdown": HTMLBcmDropdownElement; "bcm-dropdown-item": HTMLBcmDropdownItemElement; "bcm-file-upload": HTMLBcmFileUploadElement; "bcm-input": HTMLBcmInputElement; "bcm-linked": HTMLBcmLinkedElement; "bcm-modal": HTMLBcmModalElement; "bcm-pop-confirm": HTMLBcmPopConfirmElement; "bcm-popover": HTMLBcmPopoverElement; "bcm-radio": HTMLBcmRadioElement; "bcm-radio-group": HTMLBcmRadioGroupElement; "bcm-segment": HTMLBcmSegmentElement; "bcm-segmented-picker": HTMLBcmSegmentedPickerElement; "bcm-shortcut": HTMLBcmShortcutElement; "bcm-switch": HTMLBcmSwitchElement; "bcm-tab": HTMLBcmTabElement; "bcm-tabs": HTMLBcmTabsElement; "bcm-text": HTMLBcmTextElement; "bcm-textarea": HTMLBcmTextareaElement; "bcm-tooltip": HTMLBcmTooltipElement; } } declare namespace LocalJSX { /** * @component BcmAccordion * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation * and accessibility features. Offers customizable header, content, and footer areas through slots. * @example Basic usage * *
Accordion Title
*
Content goes here
*
* @example With all slots and hint text * *
Title
*
* *
*
Main content
*
Footer content
*
* @example Event handling * // Listen to accordion state changes * const accordion = document.querySelector('bcm-accordion'); * accordion.addEventListener('bcmAccordionChange', (event) => { * const { expanded, source } = event.detail; * console.log('Accordion expanded:', expanded); * console.log('Changed accordion:', source); * }); * // Programmatically control accordion * await accordion.toggle(); // Toggle state * await accordion.expand(); // Expand accordion * await accordion.collapse(); // Collapse accordion * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false) * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false) * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided * @event {EventEmitter} bcmAccordionChange - Emitted when the accordion's expanded state changes * @eventProperty {boolean} expanded - Current expanded state * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed * @csspart container - The root container element * @csspart header - The header section with title and actions * @csspart content - The collapsible content section * @csspart footer - The footer section with hint text or footer slot * @csspart section - Container for header content sections * @csspart icon - The expand/collapse chevron icon * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px) * @css {string} --bcm-accordion-bg - Background color of the accordion header * @css {string} --bcm-accordion-text - Text color of the accordion * @css {string} --bcm-accordion-footer-bg - Background color of the footer section * @methods toggle() - Toggles the accordion's expanded state * expand() - Expands the accordion if collapsed * collapse() - Collapses the accordion if expanded */ interface BcmAccordion { /** * Controls whether the accordion is expanded or collapsed. * @prop * @defaultValue false */ "expanded"?: boolean; /** * Indicates if the accordion is part of a group. Used for group behavior coordination. * @prop * @defaultValue false */ "group"?: boolean; /** * Optional title text to display in the header. * @prop * @defaultValue undefined */ "headerTitle"?: string; /** * Optional text to display in the footer when no footer slot content is provided. * @prop */ "hintText"?: string; /** * Emitted when the accordion's expanded state changes. * @event */ "onBcmAccordionChange"?: (event: BcmAccordionCustomEvent) => void; } /** * @component BcmAccordionGroup * @description A container component that manages a group of accordions. Provides single/multiple expansion * modes and methods for controlling all accordions simultaneously. Uses shadow DOM for style encapsulation. * @example Basic usage - Single expansion mode * * *
Section 1
*
Content 1
*
* *
Section 2
*
Content 2
*
*
* @example Multiple expansion mode * * ... * ... * * @example Event handling * // Listen to accordion group changes * const accordionGroup = document.querySelector('bcm-accordion-group'); * accordionGroup.addEventListener('bcmAccordionGroupChange', (event) => { * const { expanded, changed, expandedItems, expandedCount } = event.detail; * console.log('Accordion expanded state:', expanded); * console.log('Changed accordion:', changed); * console.log('Currently expanded accordions:', expandedItems); * console.log('Number of expanded accordions:', expandedCount); * }); * // Using methods * await accordionGroup.expandAll(); // Expands all accordions (only in multi mode) * await accordionGroup.collapseAll(); // Collapses all accordions * const expanded = await accordionGroup.getExpandedItems(); // Gets expanded accordions * @prop {boolean} multi - Controls whether multiple accordions can be expanded simultaneously (default: false) * @event {EventEmitter} bcmAccordionGroupChange - Emitted when any accordion's state changes * @eventProperty {boolean} expanded - Current expanded state of the changed accordion * @eventProperty {HTMLElement} changed - The accordion element that triggered the change * @eventProperty {HTMLElement[]} expandedItems - Array of currently expanded accordion elements * @eventProperty {number} expandedCount - Number of currently expanded accordions * @method expandAll() - Expands all accordions (only available in multi mode) * @method collapseAll() - Collapses all accordions * @method getExpandedItems() - Returns array of currently expanded accordions * @csspart container - The accordion group container element * @css {string} --bcm-accordion-border - Border color of the accordion group * @css {string} --bcm-accordion-radius - Border radius of the accordion group */ interface BcmAccordionGroup { /** * Controls whether multiple accordions can be expanded simultaneously * @default false */ "multi"?: boolean; /** * Event emitted when any accordion's expanded state changes */ "onBcmAccordionGroupChange"?: (event: BcmAccordionGroupCustomEvent) => void; } /** * Alert component that displays messages with different statuses and styles * @class BcmAlert */ interface BcmAlert { /** * Whether alert can be dismissed * @default true */ "dismissible"?: boolean; /** * Alert style variant * @default 'filled' */ "kind"?: AlertKind; "onBcmDismiss"?: (event: BcmAlertCustomEvent) => void; /** * Whether to show status icon * @default true */ "showStatusIcon"?: boolean; /** * Alert size variant * @default 'medium' */ "size"?: AlertSize; /** * Alert status type * @default 'default' */ "status"?: AlertStatus; } /** * @component BcmAttendance * @description Visualizes attendance history (AM/PM status) for a series of days. * Supports different status types (present, late, absent, etc.) with color-coded indicators. * Can handle data via JSON string or direct object array. * @example Basic usage * * @example With specific statuses * */ interface BcmAttendance { /** * Data for attendance items to be displayed. Can be passed as a JSON string (HTML attribute) or a JavaScript Array (Property). Format: Array of objects with `weekday`, `am`, and `pm` properties. Status values: 'present', 'late', 'absent', 'other', 'default'. * @type {string | AttendanceItem[]} * @default [] */ "data"?: string | AttendanceItem[]; } interface BcmAvatar { /** * Alternative text for image */ "alt"?: string; /** * Status indicator animation * @default false */ "blink"?: boolean; /** * Custom background color */ "color"?: string; /** * Fallback icon class * @default 'fas fa-user' */ "icon"?: string; /** * Source URL for avatar image */ "image"?: string; /** * Display name (used for initials) */ "name"?: string; /** * Shape of the avatar (ellipse/square) * @default 'ellipse' */ "shape"?: AvatarShape; /** * Size of the avatar * @default 'medium' */ "size"?: AvatarSize; /** * Status indicator type */ "status"?: AvatarStatus; } /** * @component BcmBadge * @description A versatile badge component that can be positioned around its container. * Supports different sizes, variants (dot/text), colors, and positioning options. * Can display status indicators with optional blinking animation. * @example Basic usage * *
Container Content
* New *
* @example Status indicator with blink * *
User Profile
*
*/ interface BcmBadge { /** * Enables blinking animation for the badge. Useful for drawing attention or indicating active status. * @type {boolean} * @default false */ "blink"?: boolean; /** * Defines the color of the badge. Uses system color variables (e.g., 'primary', 'success', 'warning', etc.) * @type {string} * @optional */ "color"?: string; /** * Fine-tune the badge position with custom offset. Format: "x,y" in pixels (e.g., "10,-5") * @type {string} * @optional */ "offset"?: string; /** * Sets the position of the badge relative to its container. * @type {'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'} * @default 'top-right' */ "position"?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; /** * Determines the size of the badge. * @type {'small' | 'medium' | 'large'} * @default 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * Enables soft color mode for the badge. When true, uses lighter tones and pastel colors. * @type {boolean} * @default false */ "soft"?: boolean; /** * Status message for accessibility purposes. Will be read by screen readers. * @type {string} * @optional */ "status"?: string; /** * Text to be displayed inside the badge. Used when variant is set to 'text'. Can be overridden using the "badge" slot. * @type {string} * @optional */ "text"?: string; /** * Sets the visual variant of the badge. 'dot': Appears as a small dot indicator 'text': Displays content as text * @type {'dot' | 'text'} * @default 'text' */ "variant"?: 'dot' | 'text'; } /** * @component BcmBasicBadge * @description A basic badge component that can be used as a status indicator or to highlight content. * Supports dot and text variants with different sizes and color options. * @example Basic usage * * New * * @example Dot variant * */ interface BcmBasicBadge { /** * Defines the color of the badge. Uses system color variables (e.g., 'primary', 'success', 'warning', etc.) * @type {string} * @optional */ "color"?: string; /** * Determines the size of the badge. * @type {'small' | 'medium' | 'large'} * @default 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * Enables soft color mode for the badge. When true, uses lighter tones and pastel colors. * @type {boolean} * @default false */ "soft"?: boolean; /** * Text to be displayed inside the badge. Used when variant is set to 'text'. * @type {string} * @optional */ "text"?: string; /** * Sets the visual variant of the badge. 'dot': Appears as a small dot indicator 'text': Displays content as text * @type {'dot' | 'text'} * @default 'text' */ "variant"?: 'dot' | 'text'; } interface BcmButton { /** * Active state * @default false */ "active"?: boolean; /** * ID of controlled element */ "controls"?: string; /** * Disabled state * @default false */ "disabled"?: boolean; /** * Expanded state for expandable content */ "expanded"?: string; /** * Form association */ "form"?: string; /** * Full width button * @default false */ "fullWidth"?: boolean; /** * Icon class name */ "icon"?: string; /** * Icon-only button mode * @default false */ "iconOnly"?: boolean; /** * Icon placement (prefix/suffix) * @default 'prefix' */ "iconPosition"?: IconPosition; /** * Defines the main visual style of the button * @default 'primary' */ "kind"?: ButtonKind; /** * Screen reader label */ "label"?: string; /** * Loading state * @default false */ "loading"?: boolean; "name"?: string; "onBcmBlur"?: (event: BcmButtonCustomEvent) => void; "onBcmClick"?: (event: BcmButtonCustomEvent) => void; "onBcmFocus"?: (event: BcmButtonCustomEvent) => void; /** * Button position in button group (first, middle, last) */ "position"?: ButtonPosition; /** * Controls the button size * @default 'medium' */ "size"?: ButtonSize; /** * Defines the button's status/state color * @default 'default' */ "status"?: ButtonStatus; /** * Button text content */ "text"?: string; /** * HTML button type * @default 'button' */ "type"?: ButtonType; "value"?: string; /** * Predefined button variants */ "variant"?: ButtonVariant; } interface BcmButtonGroup { /** * Disabled state */ "disabled"?: boolean; /** * Full width buttons */ "fullWidth"?: boolean; /** * Defines the main visual style of buttons */ "kind"?: ButtonKind; /** * Loading state */ "loading"?: boolean; /** * Button orientation * @default 'horizontal' */ "orientation"?: 'horizontal' | 'vertical'; /** * Controls the button size */ "size"?: ButtonSize; /** * Defines the button's status/state color */ "status"?: ButtonStatus; } /** * @component BcmCheckbox * @description A form-associated checkbox component representing a boolean choice. * Integrates with native HTML forms via ElementInternals while supporting * **three validation strategies** via `validation-mode`: * - **`native`** * - Participates in native browser constraint validation. * - Sets the underlying input's `required`. * - Browser may show native validation bubbles when submit/reportValidity happens. * - **`silent`** * - Does **not** set native `required` (prevents browser bubble). * - Computes "missing required" internally and exposes it via `error` + `caption`. * - UI errors are **gated**: shown only after `touched` or a form submit attempt. * - **`none`** * - Value-only mode: submits value but never becomes invalid. * ## UI error gating (silent mode) * - `touched` becomes true after first user interaction * - `submitAttempted` becomes true when the parent form emits `submit` * ## Value behavior * - When checked → submits `value` (default: `"on"`). * - When unchecked → submits no value (`null`). * - When disabled → no submission and no validity participation. * ## Shadow Parts * - `checkbox` → root container * - `control` → visual checkbox box * - `icon` → icon container (check or minus) * - `label` → label text * - `caption` → helper/error text (silent mode UI) * - `input` → hidden native input * @example Basic usage * * I agree to the terms and conditions * * @example Silent validation (no native bubble) *
* * Subscribe to newsletter * * *
* @example Value-only mode * * Allow analytics * */ interface BcmCheckbox { /** * Unique ID for the component. Automatically generated if not specified. Used to bind the visible label to the internal input. * @default generateId('bcm-checkbox') */ "_id"?: string; /** * Helper / error caption (silent mode UI) */ "caption"?: string; /** * Checked state * @default false */ "checked"?: boolean; /** * Disabled state * @default false */ "disabled"?: boolean; /** * Visual error state. - In `silent` mode this can be managed internally. - In other modes you can set it externally as well. * @default false */ "error"?: boolean; /** * Makes checkbox occupy full width (if your styles support it). * @default false */ "fullWidth"?: boolean; /** * Indeterminate (mixed) state. Useful when a group selection is partially selected. * @default false */ "indeterminate"?: boolean; /** * Visible label text (optional). You can also use the default slot. */ "label"?: string; /** * Label position relative to the checkbox control. * @default 'right' */ "labelPosition"?: 'left' | 'right'; /** * Form field name */ "name"?: string; /** * Fired whenever the checked state changes. */ "onBcmCheckboxChange"?: (event: BcmCheckboxCustomEvent<{ element: HTMLInputElement; checked: boolean }>) => void; /** * Optional readonly support * @default false */ "readonly"?: boolean; /** * Required state * @default false */ "required"?: boolean; /** * Size variant (affects control + typography). * @default 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * @default 'native' */ "validationMode"?: 'native' | 'silent' | 'none'; /** * Value submitted when checked * @default 'on' */ "value"?: string; } /** * @component BcmChip * @description A versatile chip component that can be used to display compact pieces of information, filters, or actions. * Supports different sizes, styles (filled, outlined, text), statuses, and can be dismissible. * @example * Success Chip * * @example Dismissible chip * handleDismiss()}> * Dismissible Chip * * @prop {ChipSize} size - Defines the size of the chip: 'small' | 'medium' | 'large' * @prop {ChipKind} kind - Defines the visual style: 'filled' | 'outlined' | 'text' * @prop {ChipStatus} status - Defines the status color: 'info' | 'error' | 'warning' | 'success' | 'default' | 'primary' * @prop {boolean} dismissible - Whether the chip can be dismissed * @prop {boolean} disabled - Whether the chip is disabled * @prop {string} color - Custom color override for the chip * @event {EventEmitter} dismiss - Emitted when the dismiss button is clicked * @csspart chip - The root chip element * @csspart dismiss-icon - The dismiss button icon */ interface BcmChip { /** * Chip color variant */ "color"?: string; /** * Whether chip is disabled * @default false */ "disabled"?: boolean; /** * Whether chip can be dismissed * @default false */ "dismissible"?: boolean; /** * Chip style variant * @default 'filled' */ "kind"?: ChipKind; "onBcmDismiss"?: (event: BcmChipCustomEvent) => void; /** * Chip size variant * @default 'medium' */ "size"?: ChipSize; /** * Chip status * @default 'default' */ "status"?: ChipStatus; } /** * @component BCM Divider * @description A versatile divider component that creates a visual separation between content. * It supports horizontal or vertical orientation with customizable styles and sizes. * The component uses CSS variables for theming and Tailwind for styling. */ interface BcmDivider { /** * @prop {('horizontal'|'vertical')} direction * @description Determines the orientation of the divider * @default 'horizontal' * @example */ "direction"?: 'horizontal' | 'vertical'; /** * @prop {('small'|'medium'|'large')} size * @description Controls the thickness of the divider * @default 'medium' * @values - small: 1px border - medium: 2px border - large: 4px border * @example */ "size"?: 'small' | 'medium' | 'large'; /** * @prop {('solid'|'dashed'|'dotted')} variant * @description Sets the border style of the divider * @default 'solid' * @example */ "variant"?: 'solid' | 'dashed' | 'dotted'; } /** * @component BcmDrawer * @description A slide-in panel component built on the native HTML Dialog API. * Ideal for navigation menus, forms, and contextual information that slides in from any edge of the screen. * @example ```html * * * * * * *
Settings
*
...
*
* * *
*
* * *

Custom height drawer

*
* * Content * * ``` */ interface BcmDrawer { /** * Controls backdrop behavior - true: Shows backdrop, drawer can be closed by clicking outside - false: No backdrop - 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation) * @default true */ "backdrop"?: boolean | 'static'; /** * Allows closing the drawer by clicking on the backdrop * @default true */ "closeOnBackdrop"?: boolean; /** * Allows closing the drawer by pressing the Escape key * @default true */ "closeOnEscape"?: boolean; /** * Makes the drawer take the full screen (100vw x 100vh) * @default false */ "fullScreen"?: boolean; /** * Makes the drawer take full width (for left/right) or full height (for top/bottom) * @default false */ "fullWidth"?: boolean; /** * Text to display in the drawer header */ "headerText"?: string; /** * Helper text to display below the header title */ "helperText"?: string; /** * Hides the footer section completely * @default false */ "noFooter"?: boolean; /** * Hides the header section completely * @default false */ "noHeader"?: boolean; /** * Emitted before the drawer closes. Can be cancelled by calling event.preventDefault() */ "onBcmBeforeClose"?: (event: BcmDrawerCustomEvent) => void; /** * Emitted before the drawer opens. Can be cancelled by calling event.preventDefault() */ "onBcmBeforeOpen"?: (event: BcmDrawerCustomEvent) => void; /** * Emitted after the drawer has closed */ "onBcmClose"?: (event: BcmDrawerCustomEvent) => void; /** * Emitted after the drawer has opened */ "onBcmOpen"?: (event: BcmDrawerCustomEvent) => void; /** * Controls whether the drawer is open or closed * @default false */ "open"?: boolean; /** * The position where the drawer slides in from - 'left': Slides from the left edge - 'right': Slides from the right edge - 'top': Slides from the top edge - 'bottom': Slides from the bottom edge * @default 'right' */ "position"?: DrawerPosition; /** * The size of the drawer. Can be a preset value or a custom CSS size - For left/right drawers: - 'small': 320px - 'medium': 480px - 'large': 1064px - For top/bottom drawers: - 'small': 40vh - 'medium': 60vh - 'large': 90vh - Custom values: Any valid CSS size (e.g., '600px', '50%', '30rem', '80vw') * @default 'medium' */ "size"?: DrawerSize; } interface BcmDropdown { "onBcmDropdownChange"?: (event: BcmDropdownCustomEvent) => void; "text"?: string; } interface BcmDropdownItem { /** * @default false */ "disabled"?: boolean; /** * @default false */ "error"?: boolean; "icon"?: string; "onBcmDropDownItemChange"?: (event: BcmDropdownItemCustomEvent) => void; "rightIcons"?: string[]; /** * @default false */ "selected"?: boolean; "text"?: string; } interface BcmFileUpload { /** * @default '.xls,.pdf' */ "accept"?: string; /** * @default '' */ "caption"?: string; /** * Allows consumers to override default error messages. */ "customErrorMessages"?: BcmUploadErrorMessages; /** * @default false */ "disabled"?: boolean; /** * @default '' */ "label"?: string; /** * Maximum number of files allowed in total. Only applied when `multiple` is true. */ "maxFileCount"?: number; /** * @default 2 */ "maxSize"?: number; /** * @default false */ "multiple"?: boolean; /** * @default 'file' */ "name"?: string; "onBcmBlur"?: (event: BcmFileUploadCustomEvent) => void; "onBcmFileChange"?: (event: BcmFileUploadCustomEvent) => void; "onBcmFileRemoved"?: (event: BcmFileUploadCustomEvent) => void; "onBcmFocus"?: (event: BcmFileUploadCustomEvent) => void; "onBcmUploadCanceled"?: (event: BcmFileUploadCustomEvent) => void; /** * @default false */ "required"?: boolean; /** * @default 'medium' */ "size"?: 'medium' | 'small'; /** * Reserved for future backend upload integration. Currently does not affect component behavior. */ "uploadUrl"?: string; } interface BcmInput { /** * Input id * @default generateId('input') */ "_id"?: string; /** * Input autocomplete attribute */ "autocomplete"?: string; /** * Caption text to display below input */ "captionText"?: string; /** * ID of associated caption/error text element */ "describedby"?: string; /** * Whether the input is disabled * @default false */ "disabled"?: boolean; /** * Error message to display */ "errorMessage"?: string; /** * Full width input * @default false */ "fullWidth"?: boolean; /** * Input label for accessibility */ "label"?: string; /** * ID of associated label element */ "labelledby"?: string; /** * Max value for number input */ "max"?: number; /** * Max length for text input */ "maxLength"?: number; /** * Min value for number input */ "min"?: number; /** * Min length for text input */ "minLength"?: number; /** * Input name */ "name"?: string; "onBcmBlur"?: (event: BcmInputCustomEvent) => void; "onBcmChange"?: (event: BcmInputCustomEvent) => void; "onBcmFocus"?: (event: BcmInputCustomEvent) => void; "onBcmInput"?: (event: BcmInputCustomEvent) => void; "onBcmKeyDown"?: (event: BcmInputCustomEvent) => void; "onBcmKeyUp"?: (event: BcmInputCustomEvent) => void; /** * Pattern for validation */ "pattern"?: string; /** * Input placeholder text */ "placeholder"?: string; /** * Prefix icon class name */ "prefixIcon"?: string; /** * Whether the input is readonly * @default false */ "readonly"?: boolean; /** * Whether the input is required * @default false */ "required"?: boolean; /** * Controls the input size * @default 'medium' */ "size"?: InputSize; /** * Defines the input's status/state * @default 'default' */ "status"?: InputStatus; /** * Step value for number input */ "step"?: number; /** * Suffix icon class name */ "suffixIcon"?: string; /** * HTML input type * @default 'text' */ "type"?: InputType; /** * Whether to use native form validation If false, component will handle validation internally * @default true */ "useNativeValidation"?: boolean; /** * Custom validation function */ "validator"?: (value: string) => string | undefined; /** * Input value * @default '' */ "value"?: string; } /** * @component BcmLinked * @description A flexible linked floating element component that displays contextual content relative to a trigger element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different trigger types (click, hover, focus, manual) and comprehensive event system. * @example Basic Click Trigger * * *
Floating content here
*
* @example Hover Trigger with Delays * * Hover Me *
This appears on hover
*
* @example Manual Control * * *
Controlled content
*
* * @csspart floating - The floating container element * @csspart arrow - The arrow element pointing to the trigger * @csspart content - The content wrapper element */ interface BcmLinked { /** * @prop {boolean} closeOnEscape - Whether to close when pressing Escape key. Default: true * @default true */ "closeOnEscape"?: boolean; /** * @prop {boolean} closeOnOutsideClick - Whether to close when clicking outside. Default: true * @default true */ "closeOnOutsideClick"?: boolean; /** * @prop {boolean} disabled - Disables the floating element, preventing it from showing. Default: false * @default false */ "disabled"?: boolean; /** * @prop {number} hideDelay - Delay in milliseconds before hiding the floating element. Default: 0 * @default 0 */ "hideDelay"?: number; /** * @prop {number} offsetDistance - Distance in pixels between the floating element and the trigger. Default: 8 * @default 8 */ "offsetDistance"?: number; /** * @event bcmBeforeHide - Emitted before the floating element hides. */ "onBcmBeforeHide"?: (event: BcmLinkedCustomEvent) => void; /** * @event bcmBeforeShow - Emitted before the floating element shows. */ "onBcmBeforeShow"?: (event: BcmLinkedCustomEvent) => void; /** * @event bcmHidden - Emitted after the floating element is fully hidden (after animation). */ "onBcmHidden"?: (event: BcmLinkedCustomEvent) => void; /** * @event bcmHide - Emitted when the floating element is hidden. */ "onBcmHide"?: (event: BcmLinkedCustomEvent) => void; /** * @event bcmShow - Emitted when the floating element is shown. */ "onBcmShow"?: (event: BcmLinkedCustomEvent) => void; /** * @event bcmShown - Emitted after the floating element is fully shown (after animation). */ "onBcmShown"?: (event: BcmLinkedCustomEvent) => void; /** * @prop {Placement} placement - Defines the position of the floating element relative to the trigger. Default: 'bottom-start' * @default 'bottom-start' */ "placement"?: Placement; /** * @prop {boolean} showArrow - Whether to show an arrow pointing to the trigger element. Default: true * @default true */ "showArrow"?: boolean; /** * @prop {number} showDelay - Delay in milliseconds before showing the floating element. Default: 0 * @default 0 */ "showDelay"?: number; /** * @prop {TriggerType} trigger - Defines the interaction type to show/hide the floating element. 'click' toggles on click, 'hover' shows on mouse enter and hides on mouse leave, 'focus' shows on focus and hides on blur, 'manual' requires programmatic control. Default: 'click' * @default 'click' */ "trigger"?: TriggerType; /** * @prop {boolean} visible - Controls the visibility state of the floating element. Can be set programmatically or toggled by user interaction. Default: false * @default false */ "visible"?: boolean; } /** * @component BcmModal * @description A flexible modal dialog component built on the native HTML Dialog API. * Provides a powerful way to display content in a layer above the page with full keyboard and focus management. * @example ```html * * *

Modal content goes here

*
* *
*
* * *
Custom Header
*

Content here

*
* * *
*
* * *

Full screen content

*
* * Content * * ``` */ interface BcmModal { /** * Controls backdrop behavior - true: Shows backdrop, modal can be closed by clicking outside - false: No backdrop - 'static': Shows backdrop but prevents closing by clicking outside (triggers shake animation) * @default true */ "backdrop"?: boolean | 'static'; /** * Allows closing the modal by clicking on the backdrop * @default true */ "closeOnBackdrop"?: boolean; /** * Allows closing the modal by pressing the Escape key * @default true */ "closeOnEscape"?: boolean; /** * Makes the modal take the full screen (100vw x 100vh, no border radius) * @default false */ "fullScreen"?: boolean; /** * Makes the modal take full width of the viewport (max-width: 100%) * @default false */ "fullWidth"?: boolean; /** * Text to display in the modal header */ "headerText"?: string; /** * Helper text to display below the header title */ "helperText"?: string; /** * Hides the footer section completely * @default false */ "noFooter"?: boolean; /** * Hides the header section completely * @default false */ "noHeader"?: boolean; /** * Emitted before the modal closes. Can be cancelled by calling event.preventDefault() */ "onBcmBeforeClose"?: (event: BcmModalCustomEvent) => void; /** * Emitted before the modal opens. Can be cancelled by calling event.preventDefault() */ "onBcmBeforeOpen"?: (event: BcmModalCustomEvent) => void; /** * Emitted after the modal has closed */ "onBcmClose"?: (event: BcmModalCustomEvent) => void; /** * Emitted after the modal has opened */ "onBcmOpen"?: (event: BcmModalCustomEvent) => void; /** * Controls whether the modal is open or closed * @default false */ "open"?: boolean; /** * The placement of the modal on the screen - 'center': Centered vertically and horizontally - 'top': Aligned to the top with 80px padding * @default 'center' */ "placement"?: ModalPlacement; /** * The size of the modal - 'small': 400px - 'medium': 600px - 'large': 800px - 'xlarge': 1024px - 'xxlarge': 1200px - 'full': 100% width * @default 'medium' */ "size"?: ModalSize; } /** * @component BcmPopConfirm * @description A confirmation popover component that displays a confirmation dialog with customizable actions. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Ideal for confirming destructive actions or important decisions inline. * @csspart container - The main popover container element * @csspart arrow - The arrow pointer element * @csspart body - The body/description section * @csspart footer - The footer section with action buttons * @example Basic Usage * ```html * * Delete * * ``` * @example With Event Handlers * ```html * * Delete Item * * * ``` * @example Different Status Types * ```html * * * Info * * * * Proceed * * * * Continue * * * * Delete * * ``` * @example Custom Content with Slots * ```html * * Custom Confirm *
* Custom Header *
*
*

This is custom body content with HTML formatting.

*
    *
  • Point 1
  • *
  • Point 2
  • *
*
*
* Maybe Later * Confirm *
*
* ``` * @example Different Sizes * ```html * * * Small * * * * Medium * * * * Large * * ``` * @example Programmatic Control * ```html * * Trigger * * Show Programmatically * Hide Programmatically * * ``` * @example Without Status Icon * ```html * * Click Me * * ``` * @example Different Placements * ```html * * Top * * * Right * * * Bottom * * * Left * * ``` */ interface BcmPopConfirm { /** * @prop {string} cancelText - Text for the cancel button. Default: 'Cancel' * @default 'Cancel' */ "cancelText"?: string; /** * @prop {boolean} closeOnEscape - Whether to close when pressing the Escape key. Default: true * @default true */ "closeOnEscape"?: boolean; /** * @prop {boolean} closeOnOutsideClick - Whether to close when clicking outside the popover. Default: true * @default true */ "closeOnOutsideClick"?: boolean; /** * @prop {string} confirmText - Text for the confirm button. Default: 'Yes' * @default 'Yes' */ "confirmText"?: string; /** * @prop {string} description - Description text displayed in the body section. Can be overridden by using the 'body' slot. Default: '' * @default '' */ "description"?: string; /** * @prop {string} headerText - Text displayed in the header section. Can be overridden by using the 'header' slot. Default: '' * @default '' */ "headerText"?: string; /** * @prop {number} offsetDistance - Distance in pixels between the popover and trigger element. Default: 12 * @default 12 */ "offsetDistance"?: number; /** * @event bcmBeforeClose - Emitted before the popover closes. Useful for performing cleanup actions before hiding. */ "onBcmBeforeClose"?: (event: BcmPopConfirmCustomEvent) => void; /** * @event bcmBeforeOpen - Emitted before the popover opens. Useful for performing actions before the popover becomes visible. */ "onBcmBeforeOpen"?: (event: BcmPopConfirmCustomEvent) => void; /** * @event bcmCancel - Emitted when the user clicks cancel, presses Escape, or clicks outside. Useful for tracking when the user dismisses the confirmation. */ "onBcmCancel"?: (event: BcmPopConfirmCustomEvent) => void; /** * @event bcmClose - Emitted when the popover is closed. Useful for tracking when the popover is hidden. */ "onBcmClose"?: (event: BcmPopConfirmCustomEvent) => void; /** * @event bcmConfirm - Emitted when the user clicks the confirm button. This is where you should handle the confirmed action. */ "onBcmConfirm"?: (event: BcmPopConfirmCustomEvent) => void; /** * @event bcmOpen - Emitted when the popover is opened. Useful for tracking when the popover becomes visible. */ "onBcmOpen"?: (event: BcmPopConfirmCustomEvent) => void; /** * @prop {PopConfirmPlacement} placement - Position of the popover relative to the trigger element. Automatically flips if there's not enough space. Default: 'top' * @default 'top' */ "placement"?: PopConfirmPlacement; /** * @prop {boolean} showArrow - Whether to show the arrow pointing to the trigger. Default: true * @default true */ "showArrow"?: boolean; /** * @prop {PopConfirmSize} size - Size variant that controls padding and text size. - 'small': Compact size with minimal padding - 'medium': Standard size - 'large': Spacious size with more padding Default: 'medium' * @default 'medium' */ "size"?: PopConfirmSize; /** * @prop {PopConfirmStatus} status - Status type that determines the color scheme and icon. - 'info': Informational (blue) - 'success': Success/positive action (green) - 'warning': Warning/caution (yellow) - 'error': Error/destructive action (red) Default: 'info' * @default 'info' */ "status"?: PopConfirmStatus; /** * @prop {boolean} statusIcon - Whether to show the status icon in the header. Icon only shows if headerText is also provided. Default: true * @default true */ "statusIcon"?: boolean; } /** * @component BcmPopover * @description A flexible popover component that displays contextual information or content relative to a target element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different sizes, trigger types (click, hover, focus), placements, and comprehensive event system. * @example Basic Click Popover * * Click Me * Header * This is a simple popover content. * * @example Hover Popover with Delays * * Hover Me * * @example Programmatic Control * * Toggle Me * Controlled popover * * * @csspart popover - The root popover container element, stylable for the entire popover * @csspart header - The header section of the popover, stylable for the title area * @csspart content - The content section of the popover, stylable for the main content area * @csspart arrow - The arrow element of the popover, stylable for the positioning arrow */ interface BcmPopover { /** * @prop {boolean} arrow - Whether to show an arrow pointing to the trigger element. Default: true * @default true */ "arrow"?: boolean; /** * @prop {boolean} closeOnEscape - Whether to close the popover when pressing Escape key. Default: true * @default true */ "closeOnEscape"?: boolean; /** * @prop {boolean} closeOnOutsideClick - Whether to close the popover when clicking outside. Default: true * @default true */ "closeOnOutsideClick"?: boolean; /** * @prop {string} headerText - Custom text for the popover header. Used as fallback content if the 'header' slot is not provided. */ "headerText"?: string; /** * @prop {number} hideDelay - Delay in milliseconds before hiding the popover. Provides a grace period for mouse movements. Default: 0 * @default 0 */ "hideDelay"?: number; /** * @prop {string} message - Custom text for the popover content. Used as fallback content if the 'content' slot is not provided. */ "message"?: string; /** * @event bcmBeforeClose - Emitted before the popover closes. Useful for performing actions before the popover is hidden. */ "onBcmBeforeClose"?: (event: BcmPopoverCustomEvent) => void; /** * @event bcmBeforeOpen - Emitted before the popover opens. Useful for performing actions before the popover becomes visible. */ "onBcmBeforeOpen"?: (event: BcmPopoverCustomEvent) => void; /** * @event bcmClose - Emitted when the popover is closed. Useful for tracking when the popover is hidden. */ "onBcmClose"?: (event: BcmPopoverCustomEvent) => void; /** * @event bcmOpen - Emitted when the popover is opened. Useful for tracking when the popover becomes visible. */ "onBcmOpen"?: (event: BcmPopoverCustomEvent) => void; /** * @prop {boolean} open - Controls the open state of the popover. Can be set programmatically or toggled by user interaction. Default: false * @default false */ "open"?: boolean; /** * @prop {('top' | 'right' | 'bottom' | 'left')} placement - Defines the position of the popover relative to the target element. Determines where the popover appears around the trigger element. Default: 'top' * @default 'top' */ "placement"?: 'top' | 'right' | 'bottom' | 'left'; /** * @prop {number} showDelay - Delay in milliseconds before showing the popover. Useful to prevent popovers from appearing on quick mouse movements. Default: 0 * @default 0 */ "showDelay"?: number; /** * @prop {('small' | 'medium' | 'large')} size - Defines the size of the popover. Controls the text size and padding of the popover content. Default: 'medium' * @default 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * @prop {('click' | 'hover' | 'hover focus')} trigger - Defines the interaction type to show/hide the popover. 'click' toggles on click, 'hover' shows on mouse enter and hides on mouse leave, 'hover focus' combines both. Default: 'click' * @default 'click' */ "trigger"?: 'click' | 'hover' | 'hover focus'; } interface BcmRadio { /** * @default generateId('bcm-radio') */ "_id"?: string; /** * Whether the radio button is selected. * @prop * @defaultValue false */ "checked"?: boolean; /** * Whether the radio button is disabled. * @prop * @defaultValue false */ "disabled"?: boolean; /** * Whether the radio button is in an error state. * @prop * @defaultValue false */ "error"?: boolean; /** * The text label to display next to the radio button. * @prop * @defaultValue undefined */ "label"?: string; /** * Position of the label relative to the radio button: 'right' | 'left'. * @prop * @defaultValue 'right' */ "labelPosition"?: 'right' | 'left'; /** * The name attribute for the radio input, used to group radio buttons. * @prop * @defaultValue undefined */ "name"?: string; "onBcmBlur"?: (event: BcmRadioCustomEvent) => void; "onBcmFocus"?: (event: BcmRadioCustomEvent) => void; "onBcmRadioChange"?: (event: BcmRadioCustomEvent) => void; /** * Whether the radio button is readonly. * @prop * @defaultValue false */ "readonly"?: boolean; /** * Whether at least one radio in this group is required. (HTML) * @default false */ "required"?: boolean; /** * Defines the size of the radio button: 'small' | 'medium' | 'large'. * @prop * @defaultValue 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * The value of the radio button, submitted with the form. * @prop * @defaultValue undefined */ "value"?: string; } interface BcmRadioGroup { /** * Optional caption text to display below the radio group, often used for error messages or hints. * @prop * @defaultValue undefined */ "captionText"?: string; /** * The layout direction of the radio buttons: 'horizontal' | 'vertical'. * @prop * @defaultValue 'vertical' */ "direction"?: 'horizontal' | 'vertical'; /** * Whether the radio group and its radio buttons are disabled. * @prop * @defaultValue false */ "disabled"?: boolean; /** * Whether the radio group is in an error state. * @prop * @defaultValue false */ "error"?: boolean; /** * The label text to display above the radio group. * @prop * @defaultValue undefined */ "label"?: string; /** * The name attribute for the radio group, used to group radio buttons. * @prop * @defaultValue undefined */ "name"?: string; "onBcmRadioGroupChange"?: (event: BcmRadioGroupCustomEvent) => void; /** * Whether the radio group is required in a form. * @prop * @defaultValue false */ "required"?: boolean; /** * Defines the size of the radio group and its radio buttons: 'small' | 'medium' | 'large'. * @prop * @defaultValue 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * The currently selected value of the radio group. * @prop * @defaultValue undefined */ "value"?: string; } /** * Individual segment option component */ interface BcmSegment { /** * Index of currently active segment (inherited from parent) * @default 0 */ "activeIndex"?: number; /** * Disabled state * @default false */ "disabled"?: boolean; /** * Index of this segment (inherited from parent) * @default 0 */ "index"?: number; /** * Internal event emitted when segment is clicked */ "onBcmSegmentClick"?: (event: BcmSegmentCustomEvent) => void; /** * Selected state (controlled by parent) * @default false */ "selected"?: boolean; /** * Size variant (inherited from parent) * @default 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * Unique identifier for this segment */ "value": string; } /** * Modern Segmented Picker component with CSS Grid-based indicator */ interface BcmSegmentedPicker { /** * Disabled state * @default false */ "disabled"?: boolean; /** * Full width flag * @default false */ "fullWidth"?: boolean; /** * Name attribute for form association */ "name"?: string; /** * Emits when selected segment changes */ "onBcmSegmentChange"?: (event: BcmSegmentedPickerCustomEvent<{ value: string; previousValue: string }>) => void; /** * Whether this field is required in a form * @default false */ "required"?: boolean; /** * Enable shadow on container * @default false */ "shadow"?: boolean; /** * Size variant * @default 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * Selected segment value */ "value"?: string; } interface BcmShortcut { "hotkey"?: string; /** * @default 'small' */ "size"?: 'small' | 'medium' | 'large'; } /** * @component BcmSwitch * @description A form-associated toggle switch component representing a boolean choice. * It behaves like a checkbox and integrates with native HTML forms via ElementInternals. * This component supports **three validation strategies** via `validation-mode`: * - **`native`**: * - Uses native browser constraint validation. * - Sets the underlying input's `required` attribute. * - Browser may show the native validation bubble when the form calls `reportValidity()` / submit validation runs. * - **`silent`**: * - Does **not** rely on native `required` (prevents the browser bubble). * - Computes the "missing required" state internally and exposes it via `error` + `caption`. * - UI errors are **gated**: they appear only after the control is touched or after a submit attempt. * - **`none`**: * - Value-only mode (headless): participates in form value submission but never becomes invalid. * ## UI error gating (silent mode) * To avoid showing errors on initial render, the component tracks: * - `touched`: set after the first user interaction * - `submitAttempted`: set when the parent form emits `submit` * Only when `touched || submitAttempted` the component will show `error/caption` in `silent` mode. * ## Value behavior * - When checked, the component submits its `value` (default: `"on"`). * - When unchecked, no value is submitted. * - When disabled, the component does not participate in submission or validity. * @example Basic usage * * @example Required with silent validation (no native bubble) *
* * * *
* @example Native validation mode (may show native bubble) * * @example Value-only mode (no validation) * * @csspart base - Root container * @csspart switch-wrapper - Wrapper containing label + track * @csspart input - Hidden native input * @csspart label - Text label * @csspart dot-container - Switch track * @csspart dot - Switch knob * @csspart caption - Helper/error text */ interface BcmSwitch { /** * Unique id (optional). Generated by default. * @default generateId('bcm-switch') */ "_id"?: string; /** * Helper / error text shown under the switch */ "caption"?: string; /** * Checked state * @default false */ "checked"?: boolean; /** * Disabled state * @default false */ "disabled"?: boolean; /** * Visual error state (manual/external). In silent mode this can be auto-managed. * @default false */ "error"?: boolean; /** * Visible label text */ "label": string; /** * Position of the label relative to the switch * @default 'right' */ "labelPosition"?: 'left' | 'right'; /** * Form field name */ "name"?: string; /** * Emitted when the switch toggles */ "onBcmSwitchChange"?: (event: BcmSwitchCustomEvent) => void; /** * Optional readonly support * @default false */ "readonly"?: boolean; /** * Required state * @default false */ "required"?: boolean; /** * Size variant * @default 'medium' */ "size"?: 'small' | 'medium' | 'large'; /** * @default 'native' */ "validationMode"?: 'native' | 'silent' | 'none'; /** * Value submitted when checked * @default 'on' */ "value"?: string; } /** * Individual tab component - self-contained with label and content panel */ interface BcmTab { /** * Active state (controlled by parent) * @default false */ "active"?: boolean; /** * Disabled state * @default false */ "disabled"?: boolean; /** * Label text to display in tab button */ "label": string; /** * Internal event emitted when tab button is clicked */ "onBcmTabClick"?: (event: BcmTabCustomEvent) => void; /** * Size variant (inherited from parent) * @default 'md' */ "size"?: 'sm' | 'md' | 'lg'; /** * Unique identifier for this tab */ "value": string; } /** * Modern Tabs component with CSS-first approach */ interface BcmTabs { /** * Emits when active tab changes */ "onBcmTabChange"?: (event: BcmTabsCustomEvent<{ value: string; previousValue: string; }>) => void; /** * Enable shadow on main container * @default false */ "shadow"?: boolean; /** * Tab size variant * @default 'md' */ "size"?: 'sm' | 'md' | 'lg'; /** * Active tab value */ "value"?: string; /** * Visual variant * @default 'line' */ "variant"?: 'line' | 'enclosed'; } interface BcmText { /** * Text overflow behavior * @default false */ "overflow"?: boolean; /** * Text size * @default 'medium' */ "size"?: TextSize; /** * Text content */ "text"?: string; /** * Text variant * @default 'body' */ "variant"?: TextVariant; } interface BcmTextarea { /** * Input id * @default generateId('textarea') */ "_id"?: string; /** * Auto grow height based on content * @default false */ "autoGrow"?: boolean; /** * Caption text to display below textarea */ "captionText"?: string; /** * Textarea cols */ "cols"?: number; /** * ID of associated caption/error text element */ "describedby"?: string; /** * Whether the textarea is disabled * @default false */ "disabled"?: boolean; /** * Error message to display */ "errorMessage"?: string; /** * Full width textarea * @default false */ "fullWidth"?: boolean; /** * Textarea label for accessibility */ "label"?: string; /** * ID of associated label element */ "labelledby"?: string; /** * Max length for text input */ "maxLength"?: number; /** * Maximum height in rows */ "maxRows"?: number; /** * Min length for text input */ "minLength"?: number; /** * Minimum height in rows */ "minRows"?: number; /** * Input name */ "name"?: string; "onBcmBlur"?: (event: BcmTextareaCustomEvent) => void; "onBcmChange"?: (event: BcmTextareaCustomEvent) => void; "onBcmFocus"?: (event: BcmTextareaCustomEvent) => void; "onBcmInput"?: (event: BcmTextareaCustomEvent) => void; "onBcmKeyDown"?: (event: BcmTextareaCustomEvent) => void; "onBcmKeyUp"?: (event: BcmTextareaCustomEvent) => void; /** * Input placeholder text */ "placeholder"?: string; /** * Whether the textarea is readonly * @default false */ "readonly"?: boolean; /** * Whether the textarea is required * @default false */ "required"?: boolean; /** * Resize behavior * @default 'none' */ "resize"?: TextareaResize; /** * Textarea rows * @default 3 */ "rows"?: number; /** * Show character counter * @default true */ "showCounter"?: boolean; /** * Controls the textarea size * @default 'medium' */ "size"?: InputSize1; /** * Defines the textarea's status/state * @default 'default' */ "status"?: InputStatus1; /** * Custom validation function */ "validator"?: (value: string) => string | undefined; /** * Textarea value * @default '' */ "value"?: string; } /** * @component BcmTooltip * @description A flexible tooltip component that provides contextual information on hover or click. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Automatically handles overflow, flipping, and complex shadow DOM scenarios. * @example ```html * * * * * * * *
* Rich content *

You can add any HTML here

*
*
* * * Click me * * * *
Move your mouse here
*
* * * Trigger * * * * * ``` */ interface BcmTooltip { /** * Whether to show an arrow pointing to the trigger element Note: Arrow is automatically hidden in 'follow' mode * @default true */ "arrow"?: boolean; /** * Disables the tooltip, preventing it from showing Useful for conditional tooltips based on application state * @default false */ "disabled"?: boolean; /** * Makes the tooltip follow the mouse cursor When enabled: - Arrow is hidden - Tooltip position updates smoothly with cursor movement - Pointer events are disabled on tooltip to prevent interference * @default false */ "follow"?: boolean; /** * Delay in milliseconds before hiding the tooltip Provides a grace period for mouse movements * @default 100 */ "hideDelay"?: number; /** * Simple text message to display in the tooltip Can be overridden by slotting content into the 'content' slot */ "message"?: string; /** * Distance in pixels between the tooltip and the trigger element Also used as the offset in 'follow' mode * @default 12 */ "offset"?: number; /** * Preferred placement of the tooltip relative to the trigger Note: Tooltip will automatically flip if there's not enough space - 'top': Above the trigger element - 'right': To the right of the trigger element - 'bottom': Below the trigger element - 'left': To the left of the trigger element * @default 'top' */ "placement"?: TooltipPlacement; /** * Delay in milliseconds before showing the tooltip Useful to prevent tooltips from appearing on quick mouse movements * @default 150 */ "showDelay"?: number; /** * Size variant of the tooltip - 'small': Compact tooltip with minimal padding (text-size-3, py-1 px-2) - 'medium': Standard tooltip size (text-size-4, py-1.5 px-3) - 'large': Larger tooltip for more content (text-size-5, py-2 px-4) * @default 'medium' */ "size"?: TooltipSize; /** * How the tooltip is triggered - 'hover': Shows on mouse enter, hides on mouse leave - 'click': Toggles on click, closes on outside click or Escape key * @default 'hover' */ "trigger"?: TooltipTrigger; } interface IntrinsicElements { "bcm-accordion": BcmAccordion; "bcm-accordion-group": BcmAccordionGroup; "bcm-alert": BcmAlert; "bcm-attendance": BcmAttendance; "bcm-avatar": BcmAvatar; "bcm-badge": BcmBadge; "bcm-basic-badge": BcmBasicBadge; "bcm-button": BcmButton; "bcm-button-group": BcmButtonGroup; "bcm-checkbox": BcmCheckbox; "bcm-chip": BcmChip; "bcm-divider": BcmDivider; "bcm-drawer": BcmDrawer; "bcm-dropdown": BcmDropdown; "bcm-dropdown-item": BcmDropdownItem; "bcm-file-upload": BcmFileUpload; "bcm-input": BcmInput; "bcm-linked": BcmLinked; "bcm-modal": BcmModal; "bcm-pop-confirm": BcmPopConfirm; "bcm-popover": BcmPopover; "bcm-radio": BcmRadio; "bcm-radio-group": BcmRadioGroup; "bcm-segment": BcmSegment; "bcm-segmented-picker": BcmSegmentedPicker; "bcm-shortcut": BcmShortcut; "bcm-switch": BcmSwitch; "bcm-tab": BcmTab; "bcm-tabs": BcmTabs; "bcm-text": BcmText; "bcm-textarea": BcmTextarea; "bcm-tooltip": BcmTooltip; } } export { LocalJSX as JSX }; declare module "@stencil/core" { export namespace JSX { interface IntrinsicElements { /** * @component BcmAccordion * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation * and accessibility features. Offers customizable header, content, and footer areas through slots. * @example Basic usage * *
Accordion Title
*
Content goes here
*
* @example With all slots and hint text * *
Title
*
* *
*
Main content
*
Footer content
*
* @example Event handling * // Listen to accordion state changes * const accordion = document.querySelector('bcm-accordion'); * accordion.addEventListener('bcmAccordionChange', (event) => { * const { expanded, source } = event.detail; * console.log('Accordion expanded:', expanded); * console.log('Changed accordion:', source); * }); * // Programmatically control accordion * await accordion.toggle(); // Toggle state * await accordion.expand(); // Expand accordion * await accordion.collapse(); // Collapse accordion * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false) * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false) * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided * @event {EventEmitter} bcmAccordionChange - Emitted when the accordion's expanded state changes * @eventProperty {boolean} expanded - Current expanded state * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed * @csspart container - The root container element * @csspart header - The header section with title and actions * @csspart content - The collapsible content section * @csspart footer - The footer section with hint text or footer slot * @csspart section - Container for header content sections * @csspart icon - The expand/collapse chevron icon * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px) * @css {string} --bcm-accordion-bg - Background color of the accordion header * @css {string} --bcm-accordion-text - Text color of the accordion * @css {string} --bcm-accordion-footer-bg - Background color of the footer section * @methods toggle() - Toggles the accordion's expanded state * expand() - Expands the accordion if collapsed * collapse() - Collapses the accordion if expanded */ "bcm-accordion": LocalJSX.BcmAccordion & JSXBase.HTMLAttributes; /** * @component BcmAccordionGroup * @description A container component that manages a group of accordions. Provides single/multiple expansion * modes and methods for controlling all accordions simultaneously. Uses shadow DOM for style encapsulation. * @example Basic usage - Single expansion mode * * *
Section 1
*
Content 1
*
* *
Section 2
*
Content 2
*
*
* @example Multiple expansion mode * * ... * ... * * @example Event handling * // Listen to accordion group changes * const accordionGroup = document.querySelector('bcm-accordion-group'); * accordionGroup.addEventListener('bcmAccordionGroupChange', (event) => { * const { expanded, changed, expandedItems, expandedCount } = event.detail; * console.log('Accordion expanded state:', expanded); * console.log('Changed accordion:', changed); * console.log('Currently expanded accordions:', expandedItems); * console.log('Number of expanded accordions:', expandedCount); * }); * // Using methods * await accordionGroup.expandAll(); // Expands all accordions (only in multi mode) * await accordionGroup.collapseAll(); // Collapses all accordions * const expanded = await accordionGroup.getExpandedItems(); // Gets expanded accordions * @prop {boolean} multi - Controls whether multiple accordions can be expanded simultaneously (default: false) * @event {EventEmitter} bcmAccordionGroupChange - Emitted when any accordion's state changes * @eventProperty {boolean} expanded - Current expanded state of the changed accordion * @eventProperty {HTMLElement} changed - The accordion element that triggered the change * @eventProperty {HTMLElement[]} expandedItems - Array of currently expanded accordion elements * @eventProperty {number} expandedCount - Number of currently expanded accordions * @method expandAll() - Expands all accordions (only available in multi mode) * @method collapseAll() - Collapses all accordions * @method getExpandedItems() - Returns array of currently expanded accordions * @csspart container - The accordion group container element * @css {string} --bcm-accordion-border - Border color of the accordion group * @css {string} --bcm-accordion-radius - Border radius of the accordion group */ "bcm-accordion-group": LocalJSX.BcmAccordionGroup & JSXBase.HTMLAttributes; /** * Alert component that displays messages with different statuses and styles * @class BcmAlert */ "bcm-alert": LocalJSX.BcmAlert & JSXBase.HTMLAttributes; /** * @component BcmAttendance * @description Visualizes attendance history (AM/PM status) for a series of days. * Supports different status types (present, late, absent, etc.) with color-coded indicators. * Can handle data via JSON string or direct object array. * @example Basic usage * * @example With specific statuses * */ "bcm-attendance": LocalJSX.BcmAttendance & JSXBase.HTMLAttributes; "bcm-avatar": LocalJSX.BcmAvatar & JSXBase.HTMLAttributes; /** * @component BcmBadge * @description A versatile badge component that can be positioned around its container. * Supports different sizes, variants (dot/text), colors, and positioning options. * Can display status indicators with optional blinking animation. * @example Basic usage * *
Container Content
* New *
* @example Status indicator with blink * *
User Profile
*
*/ "bcm-badge": LocalJSX.BcmBadge & JSXBase.HTMLAttributes; /** * @component BcmBasicBadge * @description A basic badge component that can be used as a status indicator or to highlight content. * Supports dot and text variants with different sizes and color options. * @example Basic usage * * New * * @example Dot variant * */ "bcm-basic-badge": LocalJSX.BcmBasicBadge & JSXBase.HTMLAttributes; "bcm-button": LocalJSX.BcmButton & JSXBase.HTMLAttributes; "bcm-button-group": LocalJSX.BcmButtonGroup & JSXBase.HTMLAttributes; /** * @component BcmCheckbox * @description A form-associated checkbox component representing a boolean choice. * Integrates with native HTML forms via ElementInternals while supporting * **three validation strategies** via `validation-mode`: * - **`native`** * - Participates in native browser constraint validation. * - Sets the underlying input's `required`. * - Browser may show native validation bubbles when submit/reportValidity happens. * - **`silent`** * - Does **not** set native `required` (prevents browser bubble). * - Computes "missing required" internally and exposes it via `error` + `caption`. * - UI errors are **gated**: shown only after `touched` or a form submit attempt. * - **`none`** * - Value-only mode: submits value but never becomes invalid. * ## UI error gating (silent mode) * - `touched` becomes true after first user interaction * - `submitAttempted` becomes true when the parent form emits `submit` * ## Value behavior * - When checked → submits `value` (default: `"on"`). * - When unchecked → submits no value (`null`). * - When disabled → no submission and no validity participation. * ## Shadow Parts * - `checkbox` → root container * - `control` → visual checkbox box * - `icon` → icon container (check or minus) * - `label` → label text * - `caption` → helper/error text (silent mode UI) * - `input` → hidden native input * @example Basic usage * * I agree to the terms and conditions * * @example Silent validation (no native bubble) *
* * Subscribe to newsletter * * *
* @example Value-only mode * * Allow analytics * */ "bcm-checkbox": LocalJSX.BcmCheckbox & JSXBase.HTMLAttributes; /** * @component BcmChip * @description A versatile chip component that can be used to display compact pieces of information, filters, or actions. * Supports different sizes, styles (filled, outlined, text), statuses, and can be dismissible. * @example * Success Chip * * @example Dismissible chip * handleDismiss()}> * Dismissible Chip * * @prop {ChipSize} size - Defines the size of the chip: 'small' | 'medium' | 'large' * @prop {ChipKind} kind - Defines the visual style: 'filled' | 'outlined' | 'text' * @prop {ChipStatus} status - Defines the status color: 'info' | 'error' | 'warning' | 'success' | 'default' | 'primary' * @prop {boolean} dismissible - Whether the chip can be dismissed * @prop {boolean} disabled - Whether the chip is disabled * @prop {string} color - Custom color override for the chip * @event {EventEmitter} dismiss - Emitted when the dismiss button is clicked * @csspart chip - The root chip element * @csspart dismiss-icon - The dismiss button icon */ "bcm-chip": LocalJSX.BcmChip & JSXBase.HTMLAttributes; /** * @component BCM Divider * @description A versatile divider component that creates a visual separation between content. * It supports horizontal or vertical orientation with customizable styles and sizes. * The component uses CSS variables for theming and Tailwind for styling. */ "bcm-divider": LocalJSX.BcmDivider & JSXBase.HTMLAttributes; /** * @component BcmDrawer * @description A slide-in panel component built on the native HTML Dialog API. * Ideal for navigation menus, forms, and contextual information that slides in from any edge of the screen. * @example ```html * * * * * * *
Settings
*
...
*
* * *
*
* * *

Custom height drawer

*
* * Content * * ``` */ "bcm-drawer": LocalJSX.BcmDrawer & JSXBase.HTMLAttributes; "bcm-dropdown": LocalJSX.BcmDropdown & JSXBase.HTMLAttributes; "bcm-dropdown-item": LocalJSX.BcmDropdownItem & JSXBase.HTMLAttributes; "bcm-file-upload": LocalJSX.BcmFileUpload & JSXBase.HTMLAttributes; "bcm-input": LocalJSX.BcmInput & JSXBase.HTMLAttributes; /** * @component BcmLinked * @description A flexible linked floating element component that displays contextual content relative to a trigger element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different trigger types (click, hover, focus, manual) and comprehensive event system. * @example Basic Click Trigger * * *
Floating content here
*
* @example Hover Trigger with Delays * * Hover Me *
This appears on hover
*
* @example Manual Control * * *
Controlled content
*
* * @csspart floating - The floating container element * @csspart arrow - The arrow element pointing to the trigger * @csspart content - The content wrapper element */ "bcm-linked": LocalJSX.BcmLinked & JSXBase.HTMLAttributes; /** * @component BcmModal * @description A flexible modal dialog component built on the native HTML Dialog API. * Provides a powerful way to display content in a layer above the page with full keyboard and focus management. * @example ```html * * *

Modal content goes here

*
* *
*
* * *
Custom Header
*

Content here

*
* * *
*
* * *

Full screen content

*
* * Content * * ``` */ "bcm-modal": LocalJSX.BcmModal & JSXBase.HTMLAttributes; /** * @component BcmPopConfirm * @description A confirmation popover component that displays a confirmation dialog with customizable actions. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Ideal for confirming destructive actions or important decisions inline. * @csspart container - The main popover container element * @csspart arrow - The arrow pointer element * @csspart body - The body/description section * @csspart footer - The footer section with action buttons * @example Basic Usage * ```html * * Delete * * ``` * @example With Event Handlers * ```html * * Delete Item * * * ``` * @example Different Status Types * ```html * * * Info * * * * Proceed * * * * Continue * * * * Delete * * ``` * @example Custom Content with Slots * ```html * * Custom Confirm *
* Custom Header *
*
*

This is custom body content with HTML formatting.

*
    *
  • Point 1
  • *
  • Point 2
  • *
*
*
* Maybe Later * Confirm *
*
* ``` * @example Different Sizes * ```html * * * Small * * * * Medium * * * * Large * * ``` * @example Programmatic Control * ```html * * Trigger * * Show Programmatically * Hide Programmatically * * ``` * @example Without Status Icon * ```html * * Click Me * * ``` * @example Different Placements * ```html * * Top * * * Right * * * Bottom * * * Left * * ``` */ "bcm-pop-confirm": LocalJSX.BcmPopConfirm & JSXBase.HTMLAttributes; /** * @component BcmPopover * @description A flexible popover component that displays contextual information or content relative to a target element. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Supports different sizes, trigger types (click, hover, focus), placements, and comprehensive event system. * @example Basic Click Popover * * Click Me * Header * This is a simple popover content. * * @example Hover Popover with Delays * * Hover Me * * @example Programmatic Control * * Toggle Me * Controlled popover * * * @csspart popover - The root popover container element, stylable for the entire popover * @csspart header - The header section of the popover, stylable for the title area * @csspart content - The content section of the popover, stylable for the main content area * @csspart arrow - The arrow element of the popover, stylable for the positioning arrow */ "bcm-popover": LocalJSX.BcmPopover & JSXBase.HTMLAttributes; "bcm-radio": LocalJSX.BcmRadio & JSXBase.HTMLAttributes; "bcm-radio-group": LocalJSX.BcmRadioGroup & JSXBase.HTMLAttributes; /** * Individual segment option component */ "bcm-segment": LocalJSX.BcmSegment & JSXBase.HTMLAttributes; /** * Modern Segmented Picker component with CSS Grid-based indicator */ "bcm-segmented-picker": LocalJSX.BcmSegmentedPicker & JSXBase.HTMLAttributes; "bcm-shortcut": LocalJSX.BcmShortcut & JSXBase.HTMLAttributes; /** * @component BcmSwitch * @description A form-associated toggle switch component representing a boolean choice. * It behaves like a checkbox and integrates with native HTML forms via ElementInternals. * This component supports **three validation strategies** via `validation-mode`: * - **`native`**: * - Uses native browser constraint validation. * - Sets the underlying input's `required` attribute. * - Browser may show the native validation bubble when the form calls `reportValidity()` / submit validation runs. * - **`silent`**: * - Does **not** rely on native `required` (prevents the browser bubble). * - Computes the "missing required" state internally and exposes it via `error` + `caption`. * - UI errors are **gated**: they appear only after the control is touched or after a submit attempt. * - **`none`**: * - Value-only mode (headless): participates in form value submission but never becomes invalid. * ## UI error gating (silent mode) * To avoid showing errors on initial render, the component tracks: * - `touched`: set after the first user interaction * - `submitAttempted`: set when the parent form emits `submit` * Only when `touched || submitAttempted` the component will show `error/caption` in `silent` mode. * ## Value behavior * - When checked, the component submits its `value` (default: `"on"`). * - When unchecked, no value is submitted. * - When disabled, the component does not participate in submission or validity. * @example Basic usage * * @example Required with silent validation (no native bubble) *
* * * *
* @example Native validation mode (may show native bubble) * * @example Value-only mode (no validation) * * @csspart base - Root container * @csspart switch-wrapper - Wrapper containing label + track * @csspart input - Hidden native input * @csspart label - Text label * @csspart dot-container - Switch track * @csspart dot - Switch knob * @csspart caption - Helper/error text */ "bcm-switch": LocalJSX.BcmSwitch & JSXBase.HTMLAttributes; /** * Individual tab component - self-contained with label and content panel */ "bcm-tab": LocalJSX.BcmTab & JSXBase.HTMLAttributes; /** * Modern Tabs component with CSS-first approach */ "bcm-tabs": LocalJSX.BcmTabs & JSXBase.HTMLAttributes; "bcm-text": LocalJSX.BcmText & JSXBase.HTMLAttributes; "bcm-textarea": LocalJSX.BcmTextarea & JSXBase.HTMLAttributes; /** * @component BcmTooltip * @description A flexible tooltip component that provides contextual information on hover or click. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Automatically handles overflow, flipping, and complex shadow DOM scenarios. * @example ```html * * * * * * * *
* Rich content *

You can add any HTML here

*
*
* * * Click me * * * *
Move your mouse here
*
* * * Trigger * * * * * ``` */ "bcm-tooltip": LocalJSX.BcmTooltip & JSXBase.HTMLAttributes; } } }