bromcom-ui-next 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-119e1c27.entry.js +2 -0
- package/dist/bromcom-ui/{p-1d44a091.entry.js.map → p-119e1c27.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-77457de7.entry.js +2 -0
- package/dist/bromcom-ui/p-77457de7.entry.js.map +1 -0
- package/dist/bromcom-ui/p-8bcc3d1a.entry.js +2 -0
- package/dist/bromcom-ui/{p-79082ca0.entry.js.map → p-8bcc3d1a.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-ab3d15d5.entry.js +2 -0
- package/dist/bromcom-ui/{p-c78b12c3.entry.js.map → p-ab3d15d5.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-bd0354ff.entry.js +2 -0
- package/dist/bromcom-ui/{p-86704b91.entry.js.map → p-bd0354ff.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-d33db2da.entry.js +2 -0
- package/dist/bromcom-ui/{p-3f153277.entry.js.map → p-d33db2da.entry.js.map} +1 -1
- package/dist/cjs/bcm-basic-badge.cjs.entry.js +1 -1
- package/dist/cjs/bcm-basic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-button_5.cjs.entry.js +34 -9
- package/dist/cjs/bcm-button_5.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-pop-confirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-pop-confirm.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-tabs-list.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tabs-list.cjs.entry.js.map +1 -1
- package/dist/collection/components/basic-badge/basic-badge.css +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/chip/chip.css +1 -1
- package/dist/collection/components/linked/linked.component.js +40 -7
- package/dist/collection/components/linked/linked.component.js.map +1 -1
- package/dist/collection/components/linked/linked.css +1 -1
- package/dist/collection/components/pop-confirm/pop-confirm.css +1 -1
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/tabs/tabs-list.css +1 -1
- package/dist/components/bcm-basic-badge.js +1 -1
- package/dist/components/bcm-basic-badge.js.map +1 -1
- package/dist/components/bcm-button.js +1 -1
- package/dist/components/bcm-chip.js +1 -1
- package/dist/components/bcm-chip.js.map +1 -1
- package/dist/components/bcm-dropdown.js +2 -2
- package/dist/components/bcm-linked.js +1 -1
- package/dist/components/bcm-pop-confirm.js +2 -2
- package/dist/components/bcm-pop-confirm.js.map +1 -1
- package/dist/components/bcm-switch.js +1 -1
- package/dist/components/bcm-switch.js.map +1 -1
- package/dist/components/bcm-tabs-list.js +1 -1
- package/dist/components/bcm-tabs-list.js.map +1 -1
- package/dist/components/{p-9bf969b2.js → p-65ffc29a.js} +34 -9
- package/dist/components/p-65ffc29a.js.map +1 -0
- package/dist/components/{p-c978f1a7.js → p-f6176f29.js} +2 -2
- package/dist/components/{p-c978f1a7.js.map → p-f6176f29.js.map} +1 -1
- package/dist/esm/bcm-basic-badge.entry.js +1 -1
- package/dist/esm/bcm-basic-badge.entry.js.map +1 -1
- package/dist/esm/bcm-button_5.entry.js +34 -9
- package/dist/esm/bcm-button_5.entry.js.map +1 -1
- package/dist/esm/bcm-chip.entry.js +1 -1
- package/dist/esm/bcm-chip.entry.js.map +1 -1
- package/dist/esm/bcm-pop-confirm.entry.js +1 -1
- package/dist/esm/bcm-pop-confirm.entry.js.map +1 -1
- package/dist/esm/bcm-switch.entry.js +1 -1
- package/dist/esm/bcm-switch.entry.js.map +1 -1
- package/dist/esm/bcm-tabs-list.entry.js +1 -1
- package/dist/esm/bcm-tabs-list.entry.js.map +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-1d44a091.entry.js +0 -2
- package/dist/bromcom-ui/p-3f153277.entry.js +0 -2
- package/dist/bromcom-ui/p-651a6761.entry.js +0 -2
- package/dist/bromcom-ui/p-651a6761.entry.js.map +0 -1
- package/dist/bromcom-ui/p-79082ca0.entry.js +0 -2
- package/dist/bromcom-ui/p-86704b91.entry.js +0 -2
- package/dist/bromcom-ui/p-c78b12c3.entry.js +0 -2
- package/dist/components/p-9bf969b2.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["popConfirmCss","BcmPopConfirmStyle0","statusIcons","info","success","warning","error","PopConfirm","constructor","hostRef","this","arrowColor","cancelText","confirmText","description","headerText","placement","size","status","statusIcon","isOpen","handleTriggerClick","event","preventDefault","stopPropagation","requestAnimationFrame","updatePosition","handleConfirm","bcmConfirm","emit","handleCancel","bcmCancel","async","triggerElement","popoverElement","arrowElement","x","y","middlewareData","computePosition","middleware","offset","flip","fallbackPlacements","shift","padding","arrow","element","currentPlacement","Object","assign","style","left","top","arrowX","arrowY","basePlacement","split","staticSide","right","bottom","includes","classes","tv","slots","container","header","headerLeftContent","closeIconArea","titleContainer","footer","variants","small","medium","large","defaultVariants","componentDidLoad","document","getElementById","targetId","console","warn","addEventListener","show","hide","popoverStyle","disconnectedCallback","removeEventListener","render","h","Fragment","key","role","class","ref","el","_a","name","onClick","kind"],"sources":["src/components/pop-confirm/pop-confirm.css?tag=bcm-pop-confirm&encapsulation=shadow","src/components/pop-confirm/pop-confirm.component.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --popover-bg: var(--bcm-ui-color-background-basic-panel);\n --popover-radius: 6px;\n --popover-text-color: var(--bcm-ui-color-text-basic);\n}\n\n.arrow {\n position: absolute;\n background: var(--arrow-color);\n clip-path: polygon(50% 0%, 100% 100%, 0% 100%);\n z-index: 1;\n}\n\n.arrow.top {\n transform: rotate(180deg);\n}\n\n.arrow.bottom {\n transform: rotate(0deg);\n}\n\n.arrow.right {\n transform: rotate(-90deg);\n}\n\n.arrow.left {\n transform: rotate(90deg);\n}\n\n::slotted([slot='body']) {\n font-family: 'Inter', sans-serif;\n text-wrap: pretty;\n}\n","import { Component, Prop, State, h, Event, EventEmitter, Element, ComponentInterface, Fragment, Method } from '@stencil/core';\nimport { computePosition, flip, shift, offset, arrow, type Placement } from '@floating-ui/dom';\nimport { tv } from 'tailwind-variants';\n\n// Status icons for different states\nconst statusIcons = {\n info: 'fa-solid fa-circle-info',\n success: 'fa-solid fa-circle-check',\n warning: 'fa-solid fa-triangle-exclamation',\n error: 'fa-solid fa-circle-x',\n};\n\n/**\n * @component BcmPopConfirm\n * @description A floating confirmation pop-up component that prompts users for action confirmation, triggered by click or hover events.\n * Offers customizable header, body content, and footer areas through slots, with accessibility and positioning features.\n *\n * @example Basic usage\n * <bcm-pop-confirm target-id=\"trigger-btn\" placement=\"right\" header-text=\"Confirm Action\" description=\"Are you sure?\" confirm-text=\"Yes\" cancel-text=\"No\" status=\"warning\"></bcm-pop-confirm>\n *\n * @example With all slots and custom styling\n * <bcm-pop-confirm target-id=\"trigger-btn\" placement=\"left\" header-text=\"Delete Item\" description=\"Are you sure you want to delete this item?\" confirm-text=\"Delete\" cancel-text=\"Cancel\" status=\"error\" arrow-color=\"#ffffff\">\n * <span slot=\"header\">Custom Header Text</span>\n * <span slot=\"body\">Additional details here</span>\n * <span slot=\"footer\">Custom Footer Action</span>\n * </bcm-pop-confirm>\n *\n * @example Event handling\n * // Listen to confirmation events\n * const popConfirm = document.querySelector('bcm-pop-confirm');\n * popConfirm.addEventListener('bcmConfirm', () => {\n * console.log('User confirmed the action!');\n * });\n * popConfirm.addEventListener('bcmCancel', () => {\n * console.log('User canceled the action!');\n * });\n *\n * // Programmatically control pop-up\n * await popConfirm.show(); // Show the pop-up\n * await popConfirm.hide(); // Hide the pop-up\n *\n * @prop {string} arrowColor - The color of the arrow pointing to the trigger element (default: 'var(--bcm-ui-color-background-basic-panel)')\n * @prop {string} cancelText - Text displayed on the cancel button (default: 'Cancel')\n * @prop {string} confirmText - Text displayed on the confirm button (default: 'Yes')\n * @prop {string} description - The description or body content of the pop-up (default: '')\n * @prop {string} headerText - The header text displayed at the top of the pop-up (default: '')\n * @prop {Placement} placement - The placement position of the pop-up relative to the trigger (default: 'right')\n * @prop {('small' | 'medium' | 'large')} size - The size of the pop-up, determining its dimensions (default: 'medium')\n * @prop {('info' | 'error' | 'warning' | 'success' | 'default')} status - The status of the pop-up, affecting its icon and color (default: 'info')\n * @prop {boolean} statusIcon - Whether to display a status icon based on the `status` prop (default: true)\n * @prop {string} targetId - The ID of the trigger element (e.g., a button) that opens the pop-up\n *\n * @slot header - Custom content for the header area (optional)\n * @slot body - Custom content for the main body area (optional, falls back to `description`)\n * @slot footer - Custom content for the footer area (optional)\n *\n * @event {EventEmitter<void>} bcmConfirm - Emitted when the user confirms the action in the pop-up\n * @event {EventEmitter<void>} bcmCancel - Emitted when the user cancels the action in the pop-up\n *\n * @csspart container - The root container element of the pop-up\n * @csspart header - The header section with title and close icon\n * @csspart content - The main content section of the pop-up\n * @csspart footer - The footer section with confirm/cancel buttons\n * @csspart arrow - The positioning arrow pointing to the trigger\n *\n * @css {string} --popover-radius - Border radius of the pop-up (default: defined in CSS)\n * @css {string} --popover-bg - Background color of the pop-up\n * @css {string} --text-color - Text color of the pop-up based on status\n *\n * @methods\n * show() - Programmatically shows the pop-up\n * hide() - Programmatically hides the pop-up\n */\n@Component({\n tag: 'bcm-pop-confirm',\n styleUrl: 'pop-confirm.css',\n shadow: true,\n})\nexport class PopConfirm implements ComponentInterface {\n // DOM element reference\n @Element() el: HTMLElement;\n\n /**\n * The color of the arrow pointing to the trigger element.\n * Can be a CSS custom property or a specific color value.\n * @default 'var(--bcm-ui-color-background-basic-panel)'\n */\n @Prop()\n arrowColor: string = 'var(--bcm-ui-color-background-basic-panel)'; // Default color\n\n /**\n * The text displayed on the cancel button.\n * @default 'Cancel'\n */\n @Prop()\n cancelText: string = 'Cancel';\n\n /**\n * The text displayed on the confirm button.\n * @default 'Yes'\n */\n @Prop()\n confirmText: string = 'Yes';\n\n /**\n * The description or body content of the pop-up.\n * @default ''\n */\n @Prop()\n description: string = '';\n\n /**\n * The header text displayed at the top of the pop-up.\n * @default ''\n */\n @Prop()\n headerText: string = '';\n\n /**\n * The placement position of the pop-up relative to the trigger element.\n * @default 'bottom'\n */\n @Prop()\n placement: Placement = 'bottom';\n\n /**\n * The size of the pop-up, determining its dimensions and padding.\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * The status of the pop-up, affecting its icon and color scheme.\n * @default 'info'\n */\n @Prop()\n status: 'info' | 'error' | 'warning' | 'success' = 'info';\n\n /**\n * Whether to display a status icon based on the `status` prop.\n * @default true\n */\n @Prop()\n statusIcon: boolean = true;\n\n /**\n * The ID of the trigger element (e.g., a button) that opens the pop-up.\n */\n @Prop()\n targetId: string;\n\n // State variables\n /**\n * Indicates whether the pop-up is currently open or closed.\n * @default false\n */\n @State()\n isOpen: boolean = false;\n\n /**\n * The current placement position of the pop-up after computation.\n */\n @State()\n currentPlacement: 'top' | 'bottom' | 'left' | 'right';\n\n // Event Emitters\n /**\n * Emits an event when the user confirms the action in the pop-up.\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmConfirm: EventEmitter<void>;\n\n /**\n * Emits an event when the user cancels the action in the pop-up.\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmCancel: EventEmitter<void>;\n\n // Element references\n private triggerElement: HTMLElement;\n private popoverElement: HTMLElement;\n private arrowElement: HTMLElement;\n\n /**\n * Lifecycle method called when the component is loaded.\n * Initializes the trigger element and attaches a click event listener.\n */\n componentDidLoad() {\n this.triggerElement = document.getElementById(this.targetId);\n if (!this.triggerElement) {\n console.warn(`Target element with ID '${this.targetId}' not found.`);\n return;\n }\n this.triggerElement.addEventListener('click', this.handleTriggerClick);\n }\n\n\n /**\n * Handles the click event on the trigger element to open the pop-up.\n * Prevents default behavior and propagation, then opens the pop-up if it's closed.\n * @param event The mouse event triggering the action.\n */\n private handleTriggerClick = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n\n if (!this.isOpen) {\n this.isOpen = true;\n requestAnimationFrame(() => {\n this.updatePosition();\n });\n }\n };\n\n /**\n * Handles the confirm button click, closing the pop-up and emitting the confirm event.\n * Prevents default behavior and propagation.\n * @param event The mouse event triggering the action.\n */\n private handleConfirm = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n this.isOpen = false;\n this.bcmConfirm.emit();\n };\n\n /**\n * Handles the cancel button click, closing the pop-up and emitting the cancel event.\n * Prevents default behavior and propagation.\n * @param event The mouse event triggering the action.\n */\n private handleCancel = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n this.isOpen = false;\n this.bcmCancel.emit();\n };\n\n /**\n * Programmatically shows the pop-up by setting `isOpen` to true and updating its position.\n * @returns A promise that resolves when the pop-up is shown.\n */\n @Method()\n async show() {\n this.isOpen = true;\n requestAnimationFrame(() => {\n this.updatePosition();\n });\n }\n\n /**\n * Programmatically hides the pop-up by setting `isOpen` to false.\n * @returns A promise that resolves when the pop-up is hidden.\n */\n @Method()\n async hide() {\n this.isOpen = false;\n }\n\n /**\n * Updates the position of the pop-up relative to the trigger element using Floating UI.\n * Ensures the pop-up stays within viewport bounds and positions the arrow correctly.\n */\n private updatePosition = async () => {\n if (!this.triggerElement || !this.popoverElement || !this.arrowElement) return;\n\n const { x, y, placement, middlewareData } = await computePosition(this.triggerElement, this.popoverElement, {\n placement: this.placement,\n middleware: [offset(12), flip({ fallbackPlacements: ['top', 'left', 'bottom', 'right'] }), shift({ padding: 8 }), arrow({ element: this.arrowElement })],\n });\n\n this.currentPlacement = placement as any;\n\n Object.assign(this.popoverElement.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow || { x: 0, y: 0 };\n const basePlacement = placement.split('-')[0] as 'top' | 'right' | 'bottom' | 'left';\n\n const staticSide = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[basePlacement];\n\n Object.assign(this.arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n [staticSide]: ['top', 'bottom'].includes(basePlacement) ? '-8px' : '-12px',\n });\n };\n\n /**\n * Returns the dynamic styles for the pop-up, including text and arrow colors.\n * @returns An object containing CSS custom properties.\n */\n private get popoverStyle() {\n return {\n '--text-color': `var(--bcm-ui-color-text-${this.status})`,\n '--arrow-color': this.arrowColor,\n };\n }\n\n /**\n * Lifecycle method called when the component is removed from the DOM.\n * Cleans up the event listener to prevent memory leaks.\n */\n disconnectedCallback() {\n if (this.triggerElement) {\n this.triggerElement.removeEventListener('click', this.handleTriggerClick);\n }\n }\n\n /**\n * Defines Tailwind Variants classes for the pop-up's structure and styling.\n * Supports different sizes and generates dynamic class names.\n */\n private classes = tv({\n slots: {\n container: 'absolute bcm-ui-element flex flex-col shadow-2 rounded-[--popover-radius] bg-[--popover-bg] z-[9999] w-full',\n header: 'flex justify-between items-center',\n headerLeftContent: 'flex items-center gap-2 text-size-inherit text-[--text-color]',\n closeIconArea: 'flex flex-row gap-2 size-6 items-center justify-center hover:bg-gray-100 rounded-full cursor-pointer text-size-inherit',\n titleContainer: '!text-color-header font-semibold',\n footer: 'flex flex-row justify-end gap-2',\n },\n variants: {\n size: {\n small: {\n container: 'text-size-4 max-w-64 p-4 gap-4',\n header: 'text-size-4',\n footer: 'text-size-4',\n titleContainer: 'text-size-5',\n headerLeftContent: 'gap-2',\n },\n medium: {\n container: 'text-size-5 max-w-80 gap-6 p-6',\n header: 'text-size-5',\n footer: 'text-size-5',\n titleContainer: 'text-size-6',\n headerLeftContent: 'gap-2.5',\n },\n large: {\n container: 'text-size-6 max-w-96 p-8 gap-8',\n header: 'text-size-6',\n footer: 'text-size-6',\n titleContainer: 'text-size-7',\n headerLeftContent: 'gap-3',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n });\n\n /**\n * Renders the pop-up component, showing it only when `isOpen` is true.\n * Includes header, main content, and footer sections with dynamic styling and slots for customization.\n * @returns JSX.Element representing the pop-up or an empty fragment if closed.\n */\n render() {\n const { container, header, footer, headerLeftContent, closeIconArea, titleContainer } = this.classes({\n size: this.size,\n });\n return (\n <Fragment>\n {this.isOpen && (\n <div role=\"dialog\" aria-labelledby=\"pop-confirm-title\" style={this.popoverStyle} class={container()} ref={el => (this.popoverElement = el)}>\n {/* Arrow */}\n <div ref={el => (this.arrowElement = el)} class={`arrow w-4 h-2 ${this.currentPlacement ?? 'top'}`}></div>\n\n {/* Header Content */}\n <header class={header()}>\n <div class={headerLeftContent()}>\n {this.statusIcon && <bcm-icon icon-name={statusIcons[this.status]}></bcm-icon>}\n <span class={titleContainer()}>{this.headerText}</span>\n <slot name=\"header\"></slot>\n </div>\n <div class={closeIconArea()} onClick={this.handleCancel}>\n <bcm-icon icon-name=\"far fa-times\"></bcm-icon>\n </div>\n </header>\n\n {/* Main Content */}\n <main class=\"flex-1 mx-auto font-sans text-pretty\">\n <slot name=\"body\">{this.description}</slot>\n </main>\n\n {/* Footer Content */}\n <footer class={footer()}>\n <bcm-button kind=\"outline\" size={this.size} onClick={this.handleCancel}>\n {this.cancelText}\n </bcm-button>\n <bcm-button size={this.size} status={this.status} kind=\"primary\" onClick={this.handleConfirm}>\n {this.confirmText}\n </bcm-button>\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n )}\n </Fragment>\n );\n }\n}\n"],"mappings":"oKAAA,MAAMA,EAAgB,snGACtB,MAAAC,EAAeD,ECIf,MAAME,EAAc,CAChBC,KAAM,0BACNC,QAAS,2BACTC,QAAS,mCACTC,MAAO,wB,MAqEEC,EAAU,MALvB,WAAAC,CAAAC,G,sFAeIC,KAAAC,WAAqB,6CAOrBD,KAAAE,WAAqB,SAOrBF,KAAAG,YAAsB,MAOtBH,KAAAI,YAAs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","constructor","hostRef","this","arrowColor","cancelText","confirmText","description","headerText","placement","size","status","statusIcon","isOpen","handleTriggerClick","event","preventDefault","stopPropagation","requestAnimationFrame","updatePosition","handleConfirm","bcmConfirm","emit","handleCancel","bcmCancel","async","triggerElement","popoverElement","arrowElement","x","y","middlewareData","computePosition","middleware","offset","flip","fallbackPlacements","shift","padding","arrow","element","currentPlacement","Object","assign","style","left","top","arrowX","arrowY","basePlacement","split","staticSide","right","bottom","includes","classes","tv","slots","container","header","headerLeftContent","closeIconArea","titleContainer","footer","variants","small","medium","large","defaultVariants","componentDidLoad","document","getElementById","targetId","console","warn","addEventListener","show","hide","popoverStyle","disconnectedCallback","removeEventListener","render","h","Fragment","key","role","class","ref","el","_a","name","onClick","kind"],"sources":["src/components/pop-confirm/pop-confirm.css?tag=bcm-pop-confirm&encapsulation=shadow","src/components/pop-confirm/pop-confirm.component.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --popover-bg: var(--bcm-ui-color-background-basic-panel);\n --popover-radius: 6px;\n --popover-text-color: var(--bcm-ui-color-text-basic);\n}\n\n.arrow {\n position: absolute;\n background: var(--arrow-color);\n clip-path: polygon(50% 0%, 100% 100%, 0% 100%);\n z-index: 1;\n}\n\n.arrow.top {\n transform: rotate(180deg);\n}\n\n.arrow.bottom {\n transform: rotate(0deg);\n}\n\n.arrow.right {\n transform: rotate(-90deg);\n}\n\n.arrow.left {\n transform: rotate(90deg);\n}\n\n::slotted([slot='body']) {\n font-family: 'Inter', sans-serif;\n text-wrap: pretty;\n}\n","import { Component, Prop, State, h, Event, EventEmitter, Element, ComponentInterface, Fragment, Method } from '@stencil/core';\nimport { computePosition, flip, shift, offset, arrow, type Placement } from '@floating-ui/dom';\nimport { tv } from 'tailwind-variants';\n\n// Status icons for different states\nconst statusIcons = {\n info: 'fa-solid fa-circle-info',\n success: 'fa-solid fa-circle-check',\n warning: 'fa-solid fa-triangle-exclamation',\n error: 'fa-solid fa-circle-x',\n};\n\n/**\n * @component BcmPopConfirm\n * @description A floating confirmation pop-up component that prompts users for action confirmation, triggered by click or hover events.\n * Offers customizable header, body content, and footer areas through slots, with accessibility and positioning features.\n *\n * @example Basic usage\n * <bcm-pop-confirm target-id=\"trigger-btn\" placement=\"right\" header-text=\"Confirm Action\" description=\"Are you sure?\" confirm-text=\"Yes\" cancel-text=\"No\" status=\"warning\"></bcm-pop-confirm>\n *\n * @example With all slots and custom styling\n * <bcm-pop-confirm target-id=\"trigger-btn\" placement=\"left\" header-text=\"Delete Item\" description=\"Are you sure you want to delete this item?\" confirm-text=\"Delete\" cancel-text=\"Cancel\" status=\"error\" arrow-color=\"#ffffff\">\n * <span slot=\"header\">Custom Header Text</span>\n * <span slot=\"body\">Additional details here</span>\n * <span slot=\"footer\">Custom Footer Action</span>\n * </bcm-pop-confirm>\n *\n * @example Event handling\n * // Listen to confirmation events\n * const popConfirm = document.querySelector('bcm-pop-confirm');\n * popConfirm.addEventListener('bcmConfirm', () => {\n * console.log('User confirmed the action!');\n * });\n * popConfirm.addEventListener('bcmCancel', () => {\n * console.log('User canceled the action!');\n * });\n *\n * // Programmatically control pop-up\n * await popConfirm.show(); // Show the pop-up\n * await popConfirm.hide(); // Hide the pop-up\n *\n * @prop {string} arrowColor - The color of the arrow pointing to the trigger element (default: 'var(--bcm-ui-color-background-basic-panel)')\n * @prop {string} cancelText - Text displayed on the cancel button (default: 'Cancel')\n * @prop {string} confirmText - Text displayed on the confirm button (default: 'Yes')\n * @prop {string} description - The description or body content of the pop-up (default: '')\n * @prop {string} headerText - The header text displayed at the top of the pop-up (default: '')\n * @prop {Placement} placement - The placement position of the pop-up relative to the trigger (default: 'right')\n * @prop {('small' | 'medium' | 'large')} size - The size of the pop-up, determining its dimensions (default: 'medium')\n * @prop {('info' | 'error' | 'warning' | 'success' | 'default')} status - The status of the pop-up, affecting its icon and color (default: 'info')\n * @prop {boolean} statusIcon - Whether to display a status icon based on the `status` prop (default: true)\n * @prop {string} targetId - The ID of the trigger element (e.g., a button) that opens the pop-up\n *\n * @slot header - Custom content for the header area (optional)\n * @slot body - Custom content for the main body area (optional, falls back to `description`)\n * @slot footer - Custom content for the footer area (optional)\n *\n * @event {EventEmitter<void>} bcmConfirm - Emitted when the user confirms the action in the pop-up\n * @event {EventEmitter<void>} bcmCancel - Emitted when the user cancels the action in the pop-up\n *\n * @csspart container - The root container element of the pop-up\n * @csspart header - The header section with title and close icon\n * @csspart content - The main content section of the pop-up\n * @csspart footer - The footer section with confirm/cancel buttons\n * @csspart arrow - The positioning arrow pointing to the trigger\n *\n * @css {string} --popover-radius - Border radius of the pop-up (default: defined in CSS)\n * @css {string} --popover-bg - Background color of the pop-up\n * @css {string} --text-color - Text color of the pop-up based on status\n *\n * @methods\n * show() - Programmatically shows the pop-up\n * hide() - Programmatically hides the pop-up\n */\n@Component({\n tag: 'bcm-pop-confirm',\n styleUrl: 'pop-confirm.css',\n shadow: true,\n})\nexport class PopConfirm implements ComponentInterface {\n // DOM element reference\n @Element() el: HTMLElement;\n\n /**\n * The color of the arrow pointing to the trigger element.\n * Can be a CSS custom property or a specific color value.\n * @default 'var(--bcm-ui-color-background-basic-panel)'\n */\n @Prop()\n arrowColor: string = 'var(--bcm-ui-color-background-basic-panel)'; // Default color\n\n /**\n * The text displayed on the cancel button.\n * @default 'Cancel'\n */\n @Prop()\n cancelText: string = 'Cancel';\n\n /**\n * The text displayed on the confirm button.\n * @default 'Yes'\n */\n @Prop()\n confirmText: string = 'Yes';\n\n /**\n * The description or body content of the pop-up.\n * @default ''\n */\n @Prop()\n description: string = '';\n\n /**\n * The header text displayed at the top of the pop-up.\n * @default ''\n */\n @Prop()\n headerText: string = '';\n\n /**\n * The placement position of the pop-up relative to the trigger element.\n * @default 'bottom'\n */\n @Prop()\n placement: Placement = 'bottom';\n\n /**\n * The size of the pop-up, determining its dimensions and padding.\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * The status of the pop-up, affecting its icon and color scheme.\n * @default 'info'\n */\n @Prop()\n status: 'info' | 'error' | 'warning' | 'success' = 'info';\n\n /**\n * Whether to display a status icon based on the `status` prop.\n * @default true\n */\n @Prop()\n statusIcon: boolean = true;\n\n /**\n * The ID of the trigger element (e.g., a button) that opens the pop-up.\n */\n @Prop()\n targetId: string;\n\n // State variables\n /**\n * Indicates whether the pop-up is currently open or closed.\n * @default false\n */\n @State()\n isOpen: boolean = false;\n\n /**\n * The current placement position of the pop-up after computation.\n */\n @State()\n currentPlacement: 'top' | 'bottom' | 'left' | 'right';\n\n // Event Emitters\n /**\n * Emits an event when the user confirms the action in the pop-up.\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmConfirm: EventEmitter<void>;\n\n /**\n * Emits an event when the user cancels the action in the pop-up.\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmCancel: EventEmitter<void>;\n\n // Element references\n private triggerElement: HTMLElement;\n private popoverElement: HTMLElement;\n private arrowElement: HTMLElement;\n\n /**\n * Lifecycle method called when the component is loaded.\n * Initializes the trigger element and attaches a click event listener.\n */\n componentDidLoad() {\n this.triggerElement = document.getElementById(this.targetId);\n if (!this.triggerElement) {\n console.warn(`Target element with ID '${this.targetId}' not found.`);\n return;\n }\n this.triggerElement.addEventListener('click', this.handleTriggerClick);\n }\n\n\n /**\n * Handles the click event on the trigger element to open the pop-up.\n * Prevents default behavior and propagation, then opens the pop-up if it's closed.\n * @param event The mouse event triggering the action.\n */\n private handleTriggerClick = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n\n if (!this.isOpen) {\n this.isOpen = true;\n requestAnimationFrame(() => {\n this.updatePosition();\n });\n }\n };\n\n /**\n * Handles the confirm button click, closing the pop-up and emitting the confirm event.\n * Prevents default behavior and propagation.\n * @param event The mouse event triggering the action.\n */\n private handleConfirm = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n this.isOpen = false;\n this.bcmConfirm.emit();\n };\n\n /**\n * Handles the cancel button click, closing the pop-up and emitting the cancel event.\n * Prevents default behavior and propagation.\n * @param event The mouse event triggering the action.\n */\n private handleCancel = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n this.isOpen = false;\n this.bcmCancel.emit();\n };\n\n /**\n * Programmatically shows the pop-up by setting `isOpen` to true and updating its position.\n * @returns A promise that resolves when the pop-up is shown.\n */\n @Method()\n async show() {\n this.isOpen = true;\n requestAnimationFrame(() => {\n this.updatePosition();\n });\n }\n\n /**\n * Programmatically hides the pop-up by setting `isOpen` to false.\n * @returns A promise that resolves when the pop-up is hidden.\n */\n @Method()\n async hide() {\n this.isOpen = false;\n }\n\n /**\n * Updates the position of the pop-up relative to the trigger element using Floating UI.\n * Ensures the pop-up stays within viewport bounds and positions the arrow correctly.\n */\n private updatePosition = async () => {\n if (!this.triggerElement || !this.popoverElement || !this.arrowElement) return;\n\n const { x, y, placement, middlewareData } = await computePosition(this.triggerElement, this.popoverElement, {\n placement: this.placement,\n middleware: [offset(12), flip({ fallbackPlacements: ['top', 'left', 'bottom', 'right'] }), shift({ padding: 8 }), arrow({ element: this.arrowElement })],\n });\n\n this.currentPlacement = placement as any;\n\n Object.assign(this.popoverElement.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow || { x: 0, y: 0 };\n const basePlacement = placement.split('-')[0] as 'top' | 'right' | 'bottom' | 'left';\n\n const staticSide = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[basePlacement];\n\n Object.assign(this.arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n [staticSide]: ['top', 'bottom'].includes(basePlacement) ? '-8px' : '-12px',\n });\n };\n\n /**\n * Returns the dynamic styles for the pop-up, including text and arrow colors.\n * @returns An object containing CSS custom properties.\n */\n private get popoverStyle() {\n return {\n '--text-color': `var(--bcm-ui-color-text-${this.status})`,\n '--arrow-color': this.arrowColor,\n };\n }\n\n /**\n * Lifecycle method called when the component is removed from the DOM.\n * Cleans up the event listener to prevent memory leaks.\n */\n disconnectedCallback() {\n if (this.triggerElement) {\n this.triggerElement.removeEventListener('click', this.handleTriggerClick);\n }\n }\n\n /**\n * Defines Tailwind Variants classes for the pop-up's structure and styling.\n * Supports different sizes and generates dynamic class names.\n */\n private classes = tv({\n slots: {\n container: 'absolute bcm-ui-element flex flex-col shadow-2 rounded-[--popover-radius] bg-[--popover-bg] z-[9999] w-full',\n header: 'flex justify-between items-center',\n headerLeftContent: 'flex items-center gap-2 text-size-inherit text-[--text-color]',\n closeIconArea: 'flex flex-row gap-2 size-6 items-center justify-center hover:bg-gray-100 rounded-full cursor-pointer text-size-inherit',\n titleContainer: '!text-color-header font-semibold',\n footer: 'flex flex-row justify-end gap-2',\n },\n variants: {\n size: {\n small: {\n container: 'text-size-4 max-w-64 p-4 gap-4',\n header: 'text-size-4',\n footer: 'text-size-4',\n titleContainer: 'text-size-5',\n headerLeftContent: 'gap-2',\n },\n medium: {\n container: 'text-size-5 max-w-80 gap-6 p-6',\n header: 'text-size-5',\n footer: 'text-size-5',\n titleContainer: 'text-size-6',\n headerLeftContent: 'gap-2.5',\n },\n large: {\n container: 'text-size-6 max-w-96 p-8 gap-8',\n header: 'text-size-6',\n footer: 'text-size-6',\n titleContainer: 'text-size-7',\n headerLeftContent: 'gap-3',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n });\n\n /**\n * Renders the pop-up component, showing it only when `isOpen` is true.\n * Includes header, main content, and footer sections with dynamic styling and slots for customization.\n * @returns JSX.Element representing the pop-up or an empty fragment if closed.\n */\n render() {\n const { container, header, footer, headerLeftContent, closeIconArea, titleContainer } = this.classes({\n size: this.size,\n });\n return (\n <Fragment>\n {this.isOpen && (\n <div role=\"dialog\" aria-labelledby=\"pop-confirm-title\" style={this.popoverStyle} class={container()} ref={el => (this.popoverElement = el)}>\n {/* Arrow */}\n <div ref={el => (this.arrowElement = el)} class={`arrow w-4 h-2 ${this.currentPlacement ?? 'top'}`}></div>\n\n {/* Header Content */}\n <header class={header()}>\n <div class={headerLeftContent()}>\n {this.statusIcon && <bcm-icon icon-name={statusIcons[this.status]}></bcm-icon>}\n <span class={titleContainer()}>{this.headerText}</span>\n <slot name=\"header\"></slot>\n </div>\n <div class={closeIconArea()} onClick={this.handleCancel}>\n <bcm-icon icon-name=\"far fa-times\"></bcm-icon>\n </div>\n </header>\n\n {/* Main Content */}\n <main class=\"flex-1 mx-auto font-sans text-pretty\">\n <slot name=\"body\">{this.description}</slot>\n </main>\n\n {/* Footer Content */}\n <footer class={footer()}>\n <bcm-button kind=\"outline\" size={this.size} onClick={this.handleCancel}>\n {this.cancelText}\n </bcm-button>\n <bcm-button size={this.size} status={this.status} kind=\"primary\" onClick={this.handleConfirm}>\n {this.confirmText}\n </bcm-button>\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n )}\n </Fragment>\n );\n }\n}\n"],"mappings":"oKAAA,MAAMA,EAAgB,8lGACtB,MAAAC,EAAeD,ECIf,MAAME,EAAc,CAChBC,KAAM,0BACNC,QAAS,2BACTC,QAAS,mCACTC,MAAO,wB,MAqEEC,EAAU,MALvB,WAAAC,CAAAC,G,sFAeIC,KAAAC,WAAqB,6CAOrBD,KAAAE,WAAqB,SAOrBF,KAAAG,YAAsB,MAOtBH,KAAAI,YAAsB,GAOtBJ,KAAAK,WAAqB,GAOrBL,KAAAM,UAAuB,SAOvBN,KAAAO,KAAqC,SAOrCP,KAAAQ,OAAmD,OAOnDR,KAAAS,WAAsB,KActBT,KAAAU,OAAkB,MAqDVV,KAAAW,mBAAsBC,IAC1BA,EAAMC,iBACND,EAAME,kBAEN,IAAKd,KAAKU,OAAQ,CACdV,KAAKU,OAAS,KACdK,uBAAsB,KAClBf,KAAKgB,gBAAgB,G,GAUzBhB,KAAAiB,cAAiBL,IACrBA,EAAMC,iBACND,EAAME,kBACNd,KAAKU,OAAS,MACdV,KAAKkB,WAAWC,MAAM,EAQlBnB,KAAAoB,aAAgBR,IACpBA,EAAMC,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A,2CAAKE,MAAO1B,KACPzD,KAAKS,YAAcsE,EAAA,YAAAE,IAAA,uDAAqBzF,EAAYQ,KAAKQ,UAC1DuE,EAAA,QAAAE,IAAA,2CAAME,MAAOxB,KAAmB3D,KAAKK,YACrC0E,EAAA,QAAAE,IAAA,2CAAMM,KAAK,YAEfR,EAAA,OAAAE,IAAA,2CAAKE,MAAOzB,IAAiB8B,QAASxF,KAAKoB,cACvC2D,EAAA,YAAAE,IAAA,uDAAoB,mBAK5BF,EAAA,QAAAE,IAAA,2CAAME,MAAM,wCACRJ,EAAA,QAAAE,IAAA,2CAAMM,KAAK,QAAQvF,KAAKI,cAI5B2E,EAAA,UAAAE,IAAA,2CAAQE,MAAOvB,KACXmB,EAAA,cAAAE,IAAA,2CAAYQ,KAAK,UAAUlF,KAAMP,KAAKO,KAAMiF,QAASxF,KAAKoB,cACrDpB,KAAKE,YAEV6E,EAAA,cAAAE,IAAA,2CAAY1E,KAAMP,KAAKO,KAAMC,OAAQR,KAAKQ,OAAQiF,KAAK,UAAUD,QAASxF,KAAKiB,eAC1EjB,KAAKG,aAEV4E,EAAA,QAAAE,IAAA,2CAAMM,KAAK,a","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-9a2c5938.js');
|
|
6
6
|
const index$1 = require('./index-310db2a6.js');
|
|
7
7
|
|
|
8
|
-
const basicBadgeCss = ":host{--bcm-badge-bg:var(--bcm-ui-color-background-default-default);--bcm-badge-text:var(--bcm-ui-color-text-default);--bcm-badge-radius:9999px;display:inline-flex;height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content}.badge-content{color:var(--bcm-badge-text);font-weight:500}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.inline-flex{display:inline-flex}.size-1{height:.25rem;width:.25rem}.size-1\\.5{height:.375rem;width:.375rem}.size-2{height:.5rem;width:.5rem}.select-none{user-select:none}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0{gap:0}.whitespace-nowrap{white-space:nowrap}.rounded-\\[--bcm-badge-radius\\]{border-radius:var(--bcm-badge-radius)}.bg-\\[--bcm-badge-bg\\]{background-color:var(--bcm-badge-bg)}.p-0{padding:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-\\[0px\\]{font-size:0}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-medium{font-weight:500}.leading-none{line-height:1}.text-\\[--bcm-badge-text\\]{color:var(--bcm-badge-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
|
|
8
|
+
const basicBadgeCss = ":host{--bcm-badge-bg:var(--bcm-ui-color-background-default-default);--bcm-badge-text:var(--bcm-ui-color-text-default);--bcm-badge-radius:9999px;display:inline-flex;height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content}.badge-content{color:var(--bcm-badge-text);font-weight:500}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.inline-flex{display:inline-flex}.size-1{height:.25rem;width:.25rem}.size-1\\.5{height:.375rem;width:.375rem}.size-2{height:.5rem;width:.5rem}.select-none{user-select:none}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0{gap:0}.whitespace-nowrap{white-space:nowrap}.rounded-\\[--bcm-badge-radius\\]{border-radius:var(--bcm-badge-radius)}.bg-\\[--bcm-badge-bg\\]{background-color:var(--bcm-badge-bg)}.p-0{padding:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-\\[0px\\]{font-size:0}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-medium{font-weight:500}.leading-none{line-height:1}.text-\\[--bcm-badge-text\\]{color:var(--bcm-badge-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
|
|
9
9
|
const BcmBasicBadgeStyle0 = basicBadgeCss;
|
|
10
10
|
|
|
11
11
|
const BasicBadge = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"bcm-basic-badge.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,
|
|
1
|
+
{"file":"bcm-basic-badge.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,ovDAAovD,CAAC;AAC3wD,4BAAe,aAAa;;MCqBf,UAAU;IALvB;;;;;;;QAYE,SAAI,GAAiC,QAAQ,CAAC;;;;;;;;QAU9C,YAAO,GAAmB,MAAM,CAAC;;;;;;;QAkBjC,SAAI,GAAY,KAAK,CAAC;QAWd,YAAO,GAAGA,UAAE,CAAC;YACnB,IAAI,EAAE,iLAAiL;YACvL,QAAQ,EAAE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AAK,EAAC,eAAe,IACzBA,oEAAa,CACR,CACR,CACI,EACP;KACH;;;;;;","names":["tv","h"],"sources":["src/components/basic-badge/basic-badge.css?tag=bcm-basic-badge&encapsulation=shadow","src/components/basic-badge/basic-badge.component.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n height: fit-content;\n width: fit-content;\n --bcm-badge-bg: var(--bcm-ui-color-background-default-default);\n --bcm-badge-text: var(--bcm-ui-color-text-default);\n --bcm-badge-radius: 9999px;\n}\n\n.badge-content {\n color: var(--bcm-badge-text);\n font-weight: 500;\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n/**\n * @component BcmBasicBadge\n * @description A basic badge component that can be used as a status indicator or to highlight content.\n * Supports dot and text variants with different sizes and color options.\n *\n * @example Basic usage\n * <bcm-basic-badge size=\"medium\" color=\"primary\">\n * New\n * </bcm-basic-badge>\n *\n * @example Dot variant\n * <bcm-basic-badge variant=\"dot\" color=\"success\" />\n */\n\n@Component({\n tag: 'bcm-basic-badge',\n styleUrl: 'basic-badge.css',\n shadow: true,\n})\nexport class BasicBadge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element inline-flex items-center justify-center whitespace-nowrap select-none font-medium bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius]',\n variants: {\n size: {\n small: 'px-1 text-size-3',\n medium: 'py-0.5 px-1.5 text-size-4',\n large: 'py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n blink: false,\n },\n });\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'palette' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <span\n part=\"base\"\n role=\"status\"\n aria-live=\"polite\"\n style={this.badgeStyle}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n })}\n >\n {this.variant === 'text' && (\n <span class=\"badge-content\">\n <slot></slot>\n </span>\n )}\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -149,7 +149,7 @@ const variantOptions = {
|
|
|
149
149
|
},
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
-
const buttonCss = ".relative{position:relative}:host{display:inline-block;position:relative}:host([full-width]){width:100%}:host([position=first]) .bcm-button{border-bottom-right-radius:0;border-top-right-radius:0}:host([position=middle]) .bcm-button{border-radius:0}:host([position=last]) .bcm-button{border-bottom-left-radius:0;border-top-left-radius:0}:host([position=first].orientation-vertical) .bcm-button{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--bcm-ui-border-radius,4px);border-top-right-radius:var(--bcm-ui-border-radius,4px)}:host([position=middle].orientation-vertical) .bcm-button{border-radius:0}:host([position=last].orientation-vertical) .bcm-button{border-bottom-left-radius:var(--bcm-ui-border-radius,4px);border-bottom-right-radius:var(--bcm-ui-border-radius,4px);border-top-left-radius:0;border-top-right-radius:0}.static{position:static}.flex{display:flex}.
|
|
152
|
+
const buttonCss = ".relative{position:relative}:host{display:inline-block;position:relative}:host([full-width]){width:100%}:host([position=first]) .bcm-button{border-bottom-right-radius:0;border-top-right-radius:0}:host([position=middle]) .bcm-button{border-radius:0}:host([position=last]) .bcm-button{border-bottom-left-radius:0;border-top-left-radius:0}:host([position=first].orientation-vertical) .bcm-button{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--bcm-ui-border-radius,4px);border-top-right-radius:var(--bcm-ui-border-radius,4px)}:host([position=middle].orientation-vertical) .bcm-button{border-radius:0}:host([position=last].orientation-vertical) .bcm-button{border-bottom-left-radius:var(--bcm-ui-border-radius,4px);border-bottom-right-radius:var(--bcm-ui-border-radius,4px);border-top-left-radius:0;border-top-right-radius:0}.static{position:static}.inline-flex{display:inline-flex}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-8{min-height:2rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border{border-width:1px}.border-solid{border-style:solid}.border-\\[--bcm-final-border-color\\]{border-color:var(--bcm-final-border-color)}.border-color-disabled{border-color:var(--bcm-ui-color-border-disabled)}.bg-\\[--bcm-final-bg-color\\]{background-color:var(--bcm-final-bg-color)}.bg-\\[--bcm-ui-color-background-disabled-default\\]{background-color:var(--bcm-ui-color-background-disabled-default)}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.leading-none{line-height:1}.text-\\[--bcm-final-text-color\\]{color:var(--bcm-final-text-color)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.outline-0{outline-width:0}.hover\\:bg-\\[--bcm-final-hover-bg-color\\]:hover{background-color:var(--bcm-final-hover-bg-color)}.focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.active\\:bg-\\[--bcm-final-active-bg-color\\]:active{background-color:var(--bcm-final-active-bg-color)}.flex{display:flex}.max-h-64{max-height:16rem}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.absolute{position:absolute}.z-\\[9999\\]{z-index:9999}.mx-auto{margin-left:auto;margin-right:auto}.hidden{display:none}.size-6{height:1.5rem;width:1.5rem}.h-2{height:.5rem}.w-4{width:1rem}.max-w-80{max-width:20rem}.max-w-96{max-width:24rem}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.text-pretty{text-wrap:pretty}.rounded-\\[--popover-radius\\]{border-radius:var(--popover-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--popover-bg\\]{background-color:var(--popover-bg)}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.font-sans{font-family:Inter,sans-serif}.text-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.text-size-inherit{font-size:inherit;line-height:inherit}.font-semibold{font-weight:600}.\\!text-color-header{color:var(--bcm-ui-color-text-header)!important}.text-\\[--text-color\\]{color:var(--text-color)}.shadow,.shadow-2{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2{--tw-shadow:var(--bcm-ui-box-shadow-2);--tw-shadow-colored:var(--bcm-ui-box-shadow-2)}.hover\\:bg-gray-100:hover{background-color:oklch(.967 .003 264.542)}";
|
|
153
153
|
const BcmButtonStyle0 = buttonCss;
|
|
154
154
|
|
|
155
155
|
const BcmButton = class {
|
|
@@ -414,7 +414,7 @@ const DropdownItem = class {
|
|
|
414
414
|
};
|
|
415
415
|
DropdownItem.style = BcmDropdownItemStyle0;
|
|
416
416
|
|
|
417
|
-
const linkedCss = ".absolute{position:absolute}.relative{position:relative}.block{display:block}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host{display:block;position:relative}.floating-content{min-width:-moz-max-content;min-width:max-content;transition:opacity .2s ease,visibility .2s ease,transform .2s ease;will-change:transform,opacity}.floating-visible{animation:fadeInScale .2s ease-out}.floating-hidden{pointer-events:none}.floating-wrapper{position:relative;z-index:1}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.floating-arrow{z-index:-1}.floating-arrow,.floating-arrow:before{height:10px;position:absolute;width:10px}.floating-arrow:before{background:#fff;border:1px solid #e2e8f0;content:\"\";transform:rotate(45deg)}.arrow-top{bottom:-5px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%)}.arrow-bottom{top:-5px}.arrow-left{right:-5px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%)}.arrow-right{left:-5px}.arrow-top:before{border-bottom:0;border-right:0}.arrow-bottom:before{border-left:0;border-top:0}.arrow-left:before{border-right:0;border-top:0}.arrow-right:before{border-bottom:0;border-left:0}@media (max-width:768px){.floating-content{max-height:calc(100vh - 32px);max-width:calc(100vw - 32px)}}.static{position:static}.flex{display:flex}.max-h-64{max-height:16rem}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.items-center{align-items:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow
|
|
417
|
+
const linkedCss = ".absolute{position:absolute}.relative{position:relative}.block{display:block}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host{display:block;position:relative}.floating-content{min-width:-moz-max-content;min-width:max-content;transition:opacity .2s ease,visibility .2s ease,transform .2s ease;will-change:transform,opacity}.floating-visible{animation:fadeInScale .2s ease-out}.floating-hidden{pointer-events:none}.floating-wrapper{position:relative;z-index:1}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.floating-arrow{z-index:-1}.floating-arrow,.floating-arrow:before{height:10px;position:absolute;width:10px}.floating-arrow:before{background:#fff;border:1px solid #e2e8f0;content:\"\";transform:rotate(45deg)}.arrow-top{bottom:-5px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%)}.arrow-bottom{top:-5px}.arrow-left{right:-5px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%)}.arrow-right{left:-5px}.arrow-top:before{border-bottom:0;border-right:0}.arrow-bottom:before{border-left:0;border-top:0}.arrow-left:before{border-right:0;border-top:0}.arrow-right:before{border-bottom:0;border-left:0}@media (max-width:768px){.floating-content{max-height:calc(100vh - 32px);max-width:calc(100vw - 32px)}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.hidden{display:none}.resize{resize:both}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.flex{display:flex}.max-h-64{max-height:16rem}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.items-center{align-items:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}.outline{outline-style:solid}";
|
|
418
418
|
const BcmLinkedStyle0 = linkedCss;
|
|
419
419
|
|
|
420
420
|
const BcmLinked = class {
|
|
@@ -509,6 +509,15 @@ const BcmLinked = class {
|
|
|
509
509
|
this.clearTimeouts();
|
|
510
510
|
(_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
511
511
|
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
512
|
+
// Clean up any portal elements from body
|
|
513
|
+
if (this.appendToBody) {
|
|
514
|
+
const portalElements = document.querySelectorAll('[data-floating-portal="true"]');
|
|
515
|
+
portalElements.forEach(el => {
|
|
516
|
+
if (el.parentNode) {
|
|
517
|
+
el.parentNode.removeChild(el);
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
}
|
|
512
521
|
}
|
|
513
522
|
connectTarget() {
|
|
514
523
|
if (!this.isReady)
|
|
@@ -647,17 +656,33 @@ const BcmLinked = class {
|
|
|
647
656
|
return;
|
|
648
657
|
this.bcmShow.emit();
|
|
649
658
|
this.isVisible = true;
|
|
650
|
-
//
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
659
|
+
// Move to body if appendToBody is enabled
|
|
660
|
+
if (this.appendToBody && this.floatingEl && !document.body.contains(this.floatingEl)) {
|
|
661
|
+
// Clone the element to body for positioning outside overflow containers
|
|
662
|
+
const clonedElement = this.floatingEl.cloneNode(true);
|
|
663
|
+
clonedElement.setAttribute('data-floating-portal', 'true');
|
|
664
|
+
document.body.appendChild(clonedElement);
|
|
665
|
+
// Hide original and use cloned version for positioning
|
|
666
|
+
this.floatingEl.style.display = 'none';
|
|
667
|
+
this.floatingEl = clonedElement;
|
|
668
|
+
}
|
|
654
669
|
await this.updatePosition();
|
|
655
670
|
}
|
|
656
671
|
async hide() {
|
|
672
|
+
var _a, _b;
|
|
657
673
|
if (!this.isVisible)
|
|
658
674
|
return;
|
|
659
675
|
this.bcmHide.emit();
|
|
660
676
|
this.isVisible = false;
|
|
677
|
+
// Clean up appended element from body
|
|
678
|
+
if (this.appendToBody && this.floatingEl && this.floatingEl.hasAttribute('data-floating-portal')) {
|
|
679
|
+
(_a = this.floatingEl.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.floatingEl);
|
|
680
|
+
// Restore original floating element
|
|
681
|
+
this.floatingEl = (_b = this.host.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.floating-content');
|
|
682
|
+
if (this.floatingEl) {
|
|
683
|
+
this.floatingEl.style.display = '';
|
|
684
|
+
}
|
|
685
|
+
}
|
|
661
686
|
if (this.destroyOnHide && this.floatingEl && this.floatingEl.parentNode) {
|
|
662
687
|
this.floatingEl.parentNode.removeChild(this.floatingEl);
|
|
663
688
|
}
|
|
@@ -683,7 +708,7 @@ const BcmLinked = class {
|
|
|
683
708
|
};
|
|
684
709
|
return [
|
|
685
710
|
// Portal div to body for positioning, but keep slot in shadow DOM
|
|
686
|
-
index.h("div", { key: '
|
|
711
|
+
index.h("div", { key: '3a6a855fd4c0ae0d215612645c7fa08c6b16b66d', class: floatingClasses, style: {
|
|
687
712
|
position: 'fixed',
|
|
688
713
|
top: '0px',
|
|
689
714
|
left: '0px',
|
|
@@ -691,9 +716,9 @@ const BcmLinked = class {
|
|
|
691
716
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
692
717
|
opacity: this.isVisible ? '1' : '0',
|
|
693
718
|
pointerEvents: this.isVisible ? 'auto' : 'none',
|
|
694
|
-
} }, this.arrow && index.h("div", { key: '
|
|
719
|
+
} }, this.arrow && index.h("div", { key: '2396f1ed4b45ab9378809be7030d8f174b5116e0', class: "floating-arrow" }), index.h("div", { key: 'da14fa64c2e2148970cda8a6db3b0b9bf9a32a01', class: "floating-wrapper" }, index.h("slot", { key: '9c945f751b80fbaa9737e81328695f7241165421' }))),
|
|
695
720
|
// Hidden content holder for slot fallback
|
|
696
|
-
index.h("div", { key: '
|
|
721
|
+
index.h("div", { key: '8bd18f8282c1ddb9d54aaa78363fda44735284ee', style: { display: 'none' } }, index.h("slot", { key: '2da6f4e6203123d5d3e4f8414446bdebf3710061', name: "fallback" })),
|
|
697
722
|
];
|
|
698
723
|
}
|
|
699
724
|
get host() { return index.getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"bcm-button.bcm-dropdown.bcm-dropdown-item.bcm-linked.bcm-text.entry.cjs.js","mappings":";;;;;;;;;AAiBO,MAAM,cAAc,GAAkC;IAC3D,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,aAAa;QACnB,YAAY,EAAE,QAAQ;QACtB,IAAI,EAAE,SAAS;KAChB;IACD,EAAE,EAAE;QACF,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,cAAc;QACpB,YAAY,EAAE,QAAQ;KACvB;IACD,GAAG,EAAE;QAC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1FP,qEAAO,IAAI,CAAC,IAAI,CAAQ,CACpB,EACN;KACH;;;;;;;;;;","names":["tv","h","Host","autoUpdate","offset","flip","shift","computePosition","cs"],"sources":["src/components/button/types.ts","src/components/button/button.css?tag=bcm-button&encapsulation=shadow","src/components/button/button.component.tsx","src/components/dropdown/dropdown.css?tag=bcm-dropdown&encapsulation=shadow","src/components/dropdown/dropdown.component.tsx","src/components/dropdown-item/dropdown-item.css?tag=bcm-dropdown-item&encapsulation=shadow","src/components/dropdown-item/dropdown-item.component.tsx","src/components/linked/linked.css?tag=bcm-linked&encapsulation=shadow","src/components/linked/linked.component.tsx","src/components/text/text.utils.ts","src/components/text/text.scss?tag=bcm-text&encapsulation=shadow","src/components/text/text.component.tsx"],"sourcesContent":["export type ButtonKind = 'primary' | 'ghost' | 'text' | 'outline';\nexport type ButtonSize = 'small' | 'medium' | 'large';\nexport type ButtonType = 'button' | 'reset' | 'submit';\nexport type ButtonStatus = 'default' | 'success' | 'error' | 'warning' | 'info';\nexport type IconPosition = 'prefix' | 'suffix';\n\n// Button group position\nexport type ButtonPosition = 'first' | 'middle' | 'last' | null;\n\nexport interface VariantOption {\n text: string;\n icon?: string;\n iconPosition?: IconPosition;\n status?: ButtonStatus;\n kind?: ButtonKind;\n}\n\nexport const variantOptions: Record<string, VariantOption> = {\n save: {\n text: 'Save',\n status: 'success',\n icon: 'far fa-save',\n iconPosition: 'prefix',\n kind: 'primary',\n },\n ok: {\n text: 'Ok',\n status: 'success',\n icon: 'far fa-check',\n iconPosition: 'prefix',\n },\n new: {\n text: 'New',\n status: 'success',\n icon: 'far fa-plus',\n iconPosition: 'prefix',\n },\n add: {\n text: 'Add',\n status: 'success',\n icon: 'far fa-plus',\n iconPosition: 'prefix',\n },\n create: {\n text: 'Create',\n status: 'success',\n icon: 'far fa-plus',\n iconPosition: 'prefix',\n },\n prev: {\n text: 'Prev',\n status: 'default',\n icon: 'far fa-arrow-left',\n iconPosition: 'prefix',\n },\n next: {\n text: 'Next',\n status: 'default',\n icon: 'far fa-arrow-right',\n iconPosition: 'suffix',\n },\n apply: {\n text: 'Apply',\n status: 'default',\n icon: 'far fa-check-circle',\n iconPosition: 'prefix',\n },\n submit: {\n text: 'Submit',\n status: 'default',\n icon: 'far fa-save',\n iconPosition: 'prefix',\n },\n send: {\n text: 'Send',\n status: 'success',\n icon: 'far fa-paper-plane',\n iconPosition: 'prefix',\n },\n delete: {\n text: 'Delete',\n status: 'error',\n icon: 'far fa-trash',\n iconPosition: 'prefix',\n },\n cancel: {\n text: 'Cancel',\n status: 'error',\n icon: 'far fa-times',\n iconPosition: 'prefix',\n },\n decline: {\n text: 'Decline',\n status: 'error',\n icon: 'far fa-ban',\n iconPosition: 'prefix',\n },\n close: {\n text: 'Close',\n status: 'error',\n icon: 'far fa-times-circle',\n iconPosition: 'prefix',\n },\n archive: {\n text: 'Archive',\n status: 'error',\n icon: 'far fa-folder-open',\n iconPosition: 'prefix',\n },\n remove: {\n text: 'Remove',\n status: 'error',\n icon: 'far fa-minus-circle',\n iconPosition: 'prefix',\n },\n edit: {\n text: 'Edit',\n status: 'default',\n icon: 'far fa-edit',\n iconPosition: 'prefix',\n },\n export: {\n text: 'Export',\n status: 'default',\n icon: 'far fa-sign-out',\n iconPosition: 'prefix',\n },\n import: {\n text: 'Import',\n status: 'default',\n icon: 'far fa-sign-in',\n iconPosition: 'prefix',\n },\n filter: {\n text: 'Filter',\n status: 'default',\n icon: 'far fa-filter',\n iconPosition: 'prefix',\n },\n update: {\n text: 'Update',\n status: 'default',\n icon: 'far fa-sync',\n iconPosition: 'prefix',\n },\n reset: {\n text: 'Reset',\n status: 'default',\n icon: 'far fa-sync',\n iconPosition: 'prefix',\n },\n download: {\n text: 'Download',\n status: 'default',\n icon: 'far fa-download',\n iconPosition: 'prefix',\n },\n};\n\nexport type ButtonVariant = keyof typeof variantOptions;\n",":host {\n display: inline-block;\n position: relative;\n}\n\n:host([full-width]) {\n width: 100%;\n}\n\n:host([position='first']) .bcm-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n:host([position='middle']) .bcm-button {\n border-radius: 0;\n}\n\n:host([position='last']) .bcm-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n:host([position='first'].orientation-vertical) .bcm-button {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-right-radius: var(--bcm-ui-border-radius, 4px);\n border-top-left-radius: var(--bcm-ui-border-radius, 4px);\n}\n\n:host([position='middle'].orientation-vertical) .bcm-button {\n border-radius: 0;\n}\n\n:host([position='last'].orientation-vertical) .bcm-button {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: var(--bcm-ui-border-radius, 4px);\n border-bottom-left-radius: var(--bcm-ui-border-radius, 4px);\n}\n","import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition, ButtonPosition, variantOptions } from './types';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-button',\n styleUrl: 'button.css',\n shadow: true,\n})\nexport class BcmButton {\n /** Defines the main visual style of the button */\n @Prop()\n kind: ButtonKind = 'primary';\n\n /** Controls the button size */\n @Prop()\n size: ButtonSize = 'medium';\n\n /** Defines the button's status/state color */\n @Prop()\n status: ButtonStatus = 'default';\n\n /** Predefined button variants */\n @Prop()\n variant?: ButtonVariant;\n\n /** Button position in button group (first, middle, last) */\n @Prop({ reflect: true })\n position?: ButtonPosition;\n\n /** Icon class name */\n @Prop()\n icon?: string;\n\n /** Icon placement (prefix/suffix) */\n @Prop()\n iconPosition: IconPosition = 'prefix';\n\n /** Icon-only button mode */\n @Prop()\n iconOnly = false;\n\n /** Full width button */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML button type */\n @Prop()\n type: ButtonType = 'button';\n\n /** Loading state */\n @Prop()\n loading = false;\n\n /** Disabled state */\n @Prop()\n disabled = false;\n\n /** Button text content */\n @Prop()\n text?: string;\n\n /** Active state */\n @Prop()\n active = false;\n\n /** Form association */\n @Prop()\n form: string;\n\n @Prop()\n value: string;\n\n @Prop()\n name: string;\n\n /** Screen reader label */\n @Prop()\n label: string;\n\n /** Expanded state for expandable content */\n @Prop()\n expanded?: string;\n\n /** ID of controlled element */\n @Prop()\n controls: string;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmClick: EventEmitter<MouseEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n private handleClick = (event: MouseEvent) => {\n if (!this.disabled && !this.loading) {\n this.bcmClick.emit(event);\n }\n };\n\n private handleFocus = (event: FocusEvent) => {\n this.bcmFocus.emit(event);\n };\n\n private handleBlur = (event: FocusEvent) => {\n this.bcmBlur.emit(event);\n };\n\n private get buttonText(): string {\n return this.text || (this.variant ? variantOptions[this.variant].text : '');\n }\n\n private get buttonIcon(): { icon?: string; position: IconPosition } {\n if (this.variant && variantOptions[this.variant].icon) {\n return {\n icon: variantOptions[this.variant].icon,\n position: variantOptions[this.variant].iconPosition || 'prefix',\n };\n }\n\n return {\n icon: this.icon,\n position: this.iconPosition,\n };\n }\n\n private get buttonStatus(): ButtonStatus {\n return this.variant ? variantOptions[this.variant].status : this.status;\n }\n\n private get buttonStyles() {\n const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;\n\n // These are the internal default styles based on component props (kind, status)\n const kindStyleMap = {\n primary: {\n '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,\n '--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,\n '--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': 'var(--bcm-ui-color-text-base)',\n },\n outline: {\n '--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n ghost: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n text: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,\n },\n };\n const internalDefaultStyles = kindStyleMap[this.kind];\n\n // These are the \"final\" CSS custom properties used by the component's styling.\n // They use the \"--bcm-button-custom-...\" token if provided by the user,\n // otherwise, they fall back to the internal \"--bcm-button-...\" style defined above.\n const finalEffectiveStyles = {\n '--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,\n '--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,\n '--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,\n '--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,\n '--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,\n };\n\n // return kindStyleMap[this.kind];\n\n return {\n ...internalDefaultStyles, // Provides the fallback values like --bcm-button-text\n ...finalEffectiveStyles, // Defines the --bcm-final-xxx tokens that handle the override logic\n };\n }\n\n private buttonClass = tv(\n {\n base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',\n variants: {\n size: {\n small: 'text-size-4 py-px px-2 min-h-6',\n medium: 'text-size-5 py-0.5 px-3 min-h-8',\n large: 'text-size-6 py-1 px-3 min-h-10',\n },\n kind: {\n primary: 'kind-primary',\n ghost: 'kind-ghost',\n text: 'kind-text',\n outline: 'kind-outline',\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',\n false: [\n 'cursor-pointer',\n 'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',\n 'hover:bg-[--bcm-final-hover-bg-color]',\n 'active:bg-[--bcm-final-active-bg-color]',\n 'focus-visible:ring',\n ],\n },\n loading: {\n true: '',\n },\n position: {\n first: 'position-first',\n middle: 'position-middle',\n last: 'position-last',\n },\n },\n defaultVariants: {\n size: 'medium',\n kind: 'primary',\n fullWidth: false,\n disabled: false,\n loading: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { icon, position } = this.buttonIcon;\n\n return (\n <Host>\n <button\n type={this.type}\n disabled={this.disabled || this.loading}\n aria-label={this.label}\n aria-expanded={this.expanded}\n aria-controls={this.controls}\n aria-disabled={this.disabled}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n style={this.buttonStyles}\n class={this.buttonClass({\n size: this.size,\n kind: this.kind,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n loading: this.loading,\n position: this.position,\n })}\n >\n {this.loading && <slot name=\"loading\"></slot>}\n <span>\n <slot name=\"prefix\">{position === 'prefix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n <slot>{this.buttonText}</slot>\n <span>\n <slot name=\"suffix\">{position === 'suffix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n </button>\n </Host>\n );\n }\n}\n","/* :host {\n --dropdown-box-min-weight: 32px;\n --dropdown-box-max-width: 384px;\n --dropdown-box-max-height: 384px;\n --dropdown-box-background-color: var(--bcm-ui-color-background-basic-panel);\n} */\n/* \n.scroll {\n height: 140px;\n width: 140px;\n overflow-y: auto;\n}\n\n.scroll:active::-webkit-scrollbar-thumb,\n.scroll:focus::-webkit-scrollbar-thumb,\n.scroll:hover::-webkit-scrollbar-thumb {\n visibility: visible;\n}\n.scroll::-webkit-scrollbar-thumb {\n background-color: darkgrey;\n visibility: hidden;\n}\n\n.scroll::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n} */\n","import { Component, ComponentInterface, h, Prop, State, Element, Host, Event, EventEmitter, Listen } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-dropdown',\n styleUrl: 'dropdown.css',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface {\n @Element() host: HTMLElement;\n\n @Prop() text?: string;\n\n @State() isReady: boolean = false;\n\n @State() dropdownItems: HTMLBcmDropdownItemElement[] = [];\n\n protected buttonRef?: HTMLBcmButtonElement;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmDropdownChange',\n })\n bcmDropdownChange: EventEmitter<any>;\n\n componentDidLoad() {\n const button = this.host.shadowRoot.querySelector('bcm-button') as HTMLBcmButtonElement;\n if (button) {\n this.buttonRef = button;\n this.isReady = true;\n }\n }\n\n @Listen('bcmDropDownItemChange', { capture: true })\n handleDropdownItemChange(event: CustomEvent) {\n const { element, selected } = event?.detail;\n\n this.dropdownItems?.forEach(item => {\n if (item != element) {\n item.selected = false;\n }\n });\n\n this.bcmDropdownChange.emit({\n element: element,\n selected,\n });\n }\n\n private dropdownClass = tv({\n base: 'dropdown flex flex-col items-center min-w-10 shadow-3 max-w-64 max-h-64 w-full bg-color-basic-panel rounded-lg py-1.5 overflow-y-auto',\n });\n\n private handleSlotChange = () => {\n this.dropdownItems = Array.from(this.host.querySelectorAll('bcm-dropdown-item'));\n\n if (this.dropdownItems.length === 0) {\n console.warn('No dropdown items found in dropdown component');\n }\n };\n\n render() {\n return (\n <Host>\n <bcm-button kind=\"outline\">\n <span part=\"text\">{this.text}</span>\n </bcm-button>\n {this.isReady && (\n <bcm-linked targetElement={this.buttonRef}>\n <div part=\"dropdown-container\" class={this.dropdownClass()}>\n <slot onSlotchange={this.handleSlotChange}></slot>\n </div>\n </bcm-linked>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n::slotted([slot='left-content']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n\n::slotted([slot='right-content']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n","import { Component, ComponentInterface, h, Prop, Event, EventEmitter, Element } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-dropdown-item',\n styleUrl: 'dropdown-item.css',\n shadow: true,\n})\nexport class DropdownItem implements ComponentInterface {\n @Element() host: HTMLElement;\n @Prop() text: string;\n @Prop() icon: string;\n @Prop() rightIcons: string[];\n @Prop({ reflect: true }) selected: boolean = false;\n @Prop({ reflect: true }) error: boolean = false;\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmDropDownItemChange',\n })\n bcmDropDownItemChange: EventEmitter<any>;\n\n\n private handleClick() {\n this.selected = true;\n this.bcmDropDownItemChange.emit({\n element: this.host,\n selected: this.selected,\n });\n }\n\n private dropdownItemClass = tv(\n {\n base: 'dropdown-item bcm-ui-element bcm-ui-content-display flex flex-row gap-2 py-2 px-4 cursor-pointer text-color',\n variants: {\n selected: {\n true: 'bg-[var(--bcm-ui-color-background-base-active)] hover:bg-[var(--bcm-ui-color-background-base-active)]',\n false: 'hover:bg-[var(--bcm-ui-color-background-base-hover)]',\n },\n error: {\n true: 'bg-[var(--bcm-ui-color-background-palette-red-default)] hover:bg-[var(--bcm-ui-color-background-palette-red-default)]',\n false: '',\n },\n disabled: {\n true: '', // should be discuss with ux team\n false: '',\n },\n },\n defaultVariants: {\n selected: false,\n error: false,\n disabled: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n return (\n <div\n aria-checked={this.selected}\n class={this.dropdownItemClass({\n selected: this.selected,\n error: this.error,\n })}\n onClick={() => this.handleClick()}\n >\n <slot name=\"left-content\">{this.icon && <bcm-icon icon-name={this.icon}></bcm-icon>}</slot>\n <div class=\"flex flex-row text-pretty w-full\">\n <slot>{this.text}</slot>\n </div>\n <slot name=\"right-content\">\n {this.rightIcons?.map(icon => (\n <bcm-icon icon-name={icon}></bcm-icon>\n ))}\n </slot>\n </div>\n );\n }\n}\n",":host {\n display: block;\n position: relative;\n}\n\n.floating-content {\n min-width: max-content;\n transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;\n will-change: transform, opacity;\n}\n\n.floating-visible {\n animation: fadeInScale 0.2s ease-out;\n}\n\n.floating-hidden {\n pointer-events: none;\n}\n\n.floating-wrapper {\n position: relative;\n z-index: 1;\n}\n\n/* Animations */\n@keyframes fadeInScale {\n from {\n opacity: 0;\n transform: scale(0.95) translateY(-5px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n\n/* Arrow Styles */\n.floating-arrow {\n position: absolute;\n width: 10px;\n height: 10px;\n z-index: -1;\n}\n\n.floating-arrow::before {\n content: '';\n position: absolute;\n width: 10px;\n height: 10px;\n background: white;\n border: 1px solid #e2e8f0;\n transform: rotate(45deg);\n}\n\n/* Arrow positioning based on placement */\n.arrow-top {\n bottom: -5px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.arrow-bottom {\n top: -5px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.arrow-left {\n right: -5px;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.arrow-right {\n left: -5px;\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* Arrow border fix for bordered popups */\n.arrow-top::before {\n border-bottom: 0;\n border-right: 0;\n}\n\n.arrow-bottom::before {\n border-top: 0;\n border-left: 0;\n}\n\n.arrow-left::before {\n border-top: 0;\n border-right: 0;\n}\n\n.arrow-right::before {\n border-bottom: 0;\n border-left: 0;\n}\n\n/* Responsive adjustments */\n@media (max-width: 768px) {\n .floating-content {\n max-width: calc(100vw - 32px);\n max-height: calc(100vh - 32px);\n }\n}\n","import { Component, ComponentInterface, Prop, Element, State, h, Event, EventEmitter, Watch, Method } from '@stencil/core';\nimport { computePosition, flip, shift, offset, autoUpdate, type Placement } from '@floating-ui/dom';\n\nexport type TriggerType = 'hover' | 'click' | 'focus' | 'manual';\n\n@Component({\n tag: 'bcm-linked',\n styleUrl: 'linked.css',\n shadow: true,\n})\nexport class BcmLinked implements ComponentInterface {\n @Element() host: HTMLElement;\n\n // Target configuration\n @Prop({ reflect: true, attribute: 'target-id' }) targetId?: string;\n @Prop() targetElement?: HTMLElement;\n\n // Trigger configuration\n @Prop() trigger: TriggerType = 'click';\n @Prop() placement: Placement = 'bottom-start';\n\n // Timing configuration\n @Prop() showDelay: number = 0;\n @Prop() hideDelay: number = 0;\n\n // Positioning configuration\n @Prop() offset: number = 8;\n @Prop() arrow: boolean = false;\n @Prop() disabled: boolean = false;\n\n // Style configuration\n @Prop() zIndex: number = 1000;\n @Prop() appendToBody: boolean = false;\n @Prop() destroyOnHide: boolean = false;\n\n // State\n @State() isVisible: boolean = false;\n @State() isReady: boolean = false;\n\n // Events\n @Event() bcmShow: EventEmitter<void>;\n @Event() bcmHide: EventEmitter<void>;\n @Event() bcmShown: EventEmitter<void>;\n @Event() bcmHidden: EventEmitter<void>;\n\n // Private properties\n private floatingEl?: HTMLElement;\n private targetEl?: HTMLElement;\n private showTimeout?: NodeJS.Timeout;\n private hideTimeout?: NodeJS.Timeout;\n private cleanup?: () => void;\n private clickOutsideHandler?: (e: MouseEvent) => void;\n private resizeObserver?: ResizeObserver;\n\n // Watch for changes\n @Watch('targetId')\n @Watch('targetElement')\n setupTarget() {\n this.disconnectTarget();\n this.connectTarget();\n }\n\n @Watch('isVisible')\n onVisibilityChange(newValue: boolean) {\n if (newValue) {\n this.updatePosition();\n this.bcmShown.emit();\n } else {\n this.bcmHidden.emit();\n }\n }\n\n componentDidLoad() {\n requestAnimationFrame(() => {\n this.floatingEl = this.host.shadowRoot.querySelector('.floating-content') as HTMLElement;\n this.isReady = true;\n this.connectTarget();\n });\n }\n\n disconnectedCallback() {\n this.disconnectTarget();\n this.clearTimeouts();\n this.cleanup?.();\n this.resizeObserver?.disconnect();\n }\n\n private connectTarget() {\n if (!this.isReady) return;\n\n // Find target element\n this.targetEl =\n this.targetElement || (this.targetId ? document.getElementById(this.targetId) : null) || (this.host.previousElementSibling as HTMLElement) || this.host.parentElement;\n\n if (!this.targetEl) {\n console.warn('bcm-linked: No target element found');\n return;\n }\n\n // Setup event listeners based on trigger type\n this.setupEventListeners();\n\n // Setup auto-update for position\n if (this.targetEl && this.floatingEl) {\n this.cleanup = autoUpdate(this.targetEl, this.floatingEl, () => {\n if (this.isVisible) {\n this.updatePosition();\n }\n });\n }\n\n // Setup resize observer for responsive positioning\n this.resizeObserver = new ResizeObserver(() => {\n if (this.isVisible) {\n this.updatePosition();\n }\n });\n this.resizeObserver.observe(this.floatingEl);\n }\n\n private disconnectTarget() {\n if (this.targetEl) {\n this.removeEventListeners();\n }\n this.cleanup?.();\n this.resizeObserver?.disconnect();\n }\n\n private setupEventListeners() {\n if (!this.targetEl || this.disabled) return;\n\n switch (this.trigger) {\n case 'hover':\n this.targetEl.addEventListener('mouseenter', this.handleMouseEnter);\n this.targetEl.addEventListener('mouseleave', this.handleMouseLeave);\n this.floatingEl?.addEventListener('mouseenter', this.handleFloatingMouseEnter);\n this.floatingEl?.addEventListener('mouseleave', this.handleFloatingMouseLeave);\n break;\n\n case 'click':\n this.targetEl.addEventListener('click', this.handleClick);\n this.setupClickOutside();\n break;\n\n case 'focus':\n this.targetEl.addEventListener('focus', this.handleFocus);\n this.targetEl.addEventListener('blur', this.handleBlur);\n break;\n }\n }\n\n private removeEventListeners() {\n if (!this.targetEl) return;\n\n this.targetEl.removeEventListener('mouseenter', this.handleMouseEnter);\n this.targetEl.removeEventListener('mouseleave', this.handleMouseLeave);\n this.targetEl.removeEventListener('click', this.handleClick);\n this.targetEl.removeEventListener('focus', this.handleFocus);\n this.targetEl.removeEventListener('blur', this.handleBlur);\n\n this.floatingEl?.removeEventListener('mouseenter', this.handleFloatingMouseEnter);\n this.floatingEl?.removeEventListener('mouseleave', this.handleFloatingMouseLeave);\n\n this.removeClickOutside();\n }\n\n private setupClickOutside() {\n this.clickOutsideHandler = (e: MouseEvent) => {\n const target = e.target as Node;\n if (!this.floatingEl?.contains(target) && !this.targetEl?.contains(target) && !this.host.contains(target)) {\n this.hide();\n }\n };\n document.addEventListener('click', this.clickOutsideHandler, true);\n }\n\n private removeClickOutside() {\n if (this.clickOutsideHandler) {\n document.removeEventListener('click', this.clickOutsideHandler, true);\n this.clickOutsideHandler = undefined;\n }\n }\n\n private handleMouseEnter = () => {\n this.clearTimeouts();\n if (this.showDelay > 0) {\n this.showTimeout = setTimeout(() => this.show(), this.showDelay);\n } else {\n this.show();\n }\n };\n\n private handleMouseLeave = () => {\n this.clearTimeouts();\n if (this.hideDelay > 0) {\n this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);\n } else {\n this.hide();\n }\n };\n\n private handleFloatingMouseEnter = () => {\n this.clearTimeouts();\n };\n\n private handleFloatingMouseLeave = () => {\n this.clearTimeouts();\n if (this.hideDelay > 0) {\n this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);\n } else {\n this.hide();\n }\n };\n\n private handleClick = (e: Event) => {\n e.stopPropagation();\n this.toggle();\n };\n\n private handleFocus = () => {\n this.show();\n };\n\n private handleBlur = () => {\n this.hide();\n };\n\n private clearTimeouts() {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n private async updatePosition() {\n if (!this.targetEl || !this.floatingEl || !this.isVisible) return;\n\n const middleware = [\n offset(this.offset),\n flip({\n fallbackPlacements: ['top-start', 'bottom-start', 'right-start', 'left-start'],\n }),\n shift({ padding: 8 }),\n ];\n\n const { x, y, placement } = await computePosition(this.targetEl, this.floatingEl, {\n placement: this.placement,\n middleware,\n strategy: 'fixed',\n });\n\n Object.assign(this.floatingEl.style, {\n left: `${x}px`,\n top: `${y}px`,\n zIndex: this.zIndex.toString(),\n });\n\n // Update arrow if enabled\n if (this.arrow) {\n this.updateArrow(placement);\n }\n }\n\n private updateArrow(placement: Placement) {\n const arrow = this.floatingEl?.querySelector('.floating-arrow') as HTMLElement;\n if (!arrow) return;\n\n // Remove all arrow classes\n arrow.className = 'floating-arrow';\n\n // Add placement-specific class\n const side = placement.split('-')[0];\n arrow.classList.add(`arrow-${side}`);\n }\n\n @Method()\n async show(): Promise<void> {\n if (this.disabled || this.isVisible) return;\n\n this.bcmShow.emit();\n this.isVisible = true;\n\n // Don't move to body in StencilJS, keep in shadow DOM\n // if (this.appendToBody && this.floatingEl) {\n // document.body.appendChild(this.floatingEl);\n // }\n\n await this.updatePosition();\n }\n\n @Method()\n async hide(): Promise<void> {\n if (!this.isVisible) return;\n\n this.bcmHide.emit();\n this.isVisible = false;\n\n if (this.destroyOnHide && this.floatingEl && this.floatingEl.parentNode) {\n this.floatingEl.parentNode.removeChild(this.floatingEl);\n }\n }\n\n @Method()\n async toggle(): Promise<void> {\n if (this.isVisible) {\n await this.hide();\n } else {\n await this.show();\n }\n }\n\n @Method()\n async updatePositioning(): Promise<void> {\n await this.updatePosition();\n }\n\n render() {\n const floatingClasses = {\n 'floating-content': true,\n 'floating-visible': this.isVisible,\n 'floating-hidden': !this.isVisible,\n 'floating-with-arrow': this.arrow,\n 'floating-destroy-on-hide': this.destroyOnHide,\n };\n\n return [\n // Portal div to body for positioning, but keep slot in shadow DOM\n <div\n class={floatingClasses}\n style={{\n position: 'fixed',\n top: '0px',\n left: '0px',\n zIndex: this.zIndex.toString(),\n visibility: this.isVisible ? 'visible' : 'hidden',\n opacity: this.isVisible ? '1' : '0',\n pointerEvents: this.isVisible ? 'auto' : 'none',\n }}\n >\n {this.arrow && <div class=\"floating-arrow\" />}\n <div class=\"floating-wrapper\">\n <slot />\n </div>\n </div>,\n // Hidden content holder for slot fallback\n <div style={{ display: 'none' }}>\n <slot name=\"fallback\" />\n </div>,\n ];\n }\n}\n","import { TextVariant, TextTag } from './text.types';\n\nexport const variantTagMap: Record<TextVariant, TextTag> = {\n display: 'h1',\n heading1: 'h2',\n heading2: 'h3',\n title1: 'h4',\n title2: 'h5',\n title3: 'h6',\n body: 'p',\n bodyAccent: 'p',\n helper: 'p',\n caption: 'p',\n label: 'label',\n placeholder: 'p',\n link: 'a',\n info: 'p',\n infoAccent: 'p',\n};\n","","import { Component, h, Prop } from '@stencil/core';\nimport cs from 'classnames';\nimport { TextVariant, TextSize } from './text.types';\nimport { variantTagMap } from './text.utils';\n\n@Component({\n tag: 'bcm-text',\n styleUrl: 'text.scss',\n shadow: true,\n})\nexport class BcmText {\n /** Text content */\n @Prop()\n text: string;\n\n /** Text variant */\n @Prop()\n variant: TextVariant = 'body';\n\n /** Text size */\n @Prop()\n size: TextSize = 'medium';\n\n /** Text overflow behavior */\n @Prop()\n overflow: boolean = false;\n\n private readonly variantClassMap = {\n display: 'font-semibold text-size-12 text-color-header',\n heading1: 'font-semibold text-size-7 text-color-header',\n heading2: 'font-semibold text-size-6 text-color-header',\n title1: {\n small: 'font-semibold text-size-5 text-color-header',\n medium: 'font-semibold text-size-6 text-color-header',\n large: 'font-semibold text-size-7 text-color-header',\n },\n title2: {\n small: 'font-semibold text-size-4 text-color-default',\n medium: 'font-semibold text-size-5 text-color-default',\n large: 'font-semibold text-size-6 text-color-default',\n },\n title3: {\n small: 'font-semibold text-size-3 text-color-disabled',\n medium: 'font-semibold text-size-4 text-color-disabled',\n large: 'font-semibold text-size-5 text-color-disabled',\n },\n body: {\n small: 'font-regular text-size-4 text-color-default',\n medium: 'font-regular text-size-5 text-color-default',\n large: 'font-regular text-size-6 text-color-default',\n },\n bodyAccent: {\n small: 'font-medium text-size-4 text-color-default',\n medium: 'font-medium text-size-5 text-color-default',\n large: 'font-medium text-size-6 text-color-default',\n },\n helper: {\n small: 'font-regular text-size-4 text-color-helper',\n medium: 'font-regular text-size-5 text-color-helper',\n large: 'font-regular text-size-6 text-color-helper',\n },\n caption: {\n small: 'font-regular text-size-3 text-color-caption',\n medium: 'font-regular text-size-4 text-color-caption',\n large: 'font-regular text-size-5 text-color-caption',\n },\n link: {\n small: 'font-medium text-size-4 underline text-color-primary',\n medium: 'font-medium text-size-5 underline text-color-primary',\n large: 'font-medium text-size-6 underline text-color-primary',\n },\n label: {\n small: 'font-medium text-size-3 text-color-label',\n medium: 'font-medium text-size-4 text-color-label',\n large: 'font-medium text-size-5 text-color-label',\n },\n placeholder: {\n small: 'font-regular text-size-4 text-color-placeholder',\n medium: 'font-regular text-size-5 text-color-placeholder',\n large: 'font-regular text-size-6 text-color-placeholder',\n },\n info: {\n small: 'font-regular text-size-3 text-color-default',\n medium: 'font-regular text-size-4 text-color-default',\n large: 'font-regular text-size-5 text-color-default',\n },\n infoAccent: {\n small: 'font-medium text-size-3 text-color-header',\n medium: 'font-medium text-size-4 text-color-header',\n large: 'font-medium text-size-5 text-color-header',\n },\n } as const;\n\n private getTextClass = (variant: TextVariant, size: TextSize): string => {\n const variantClasses = this.variantClassMap[variant];\n\n if (typeof variantClasses === 'string') {\n return variantClasses;\n }\n\n return variantClasses[size];\n };\n\n private getOverflowClass = (overflow: boolean): string => {\n return overflow ? 'truncate' : '';\n };\n\n render() {\n const Tag = variantTagMap[this.variant];\n const variantClass = this.getTextClass(this.variant, this.size);\n const overflowClass = this.getOverflowClass(this.overflow ?? false);\n\n return (\n <Tag class={cs('bcm-text appearance-none m-0 p-0', variantClass, overflowClass)} part=\"text\">\n <slot>{this.text}</slot>\n </T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AAI,CAAC,OAAO,CAAC,CAAC;QACxC,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAChE,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAA,IAAI,CAAC,QAAQ,mCAAI,KAAK,CAAC,CAAC;QAEpE,QACEA,QAAC,GAAG,qDAAC,KAAK,EAAEO,kBAAE,CAAC,kCAAkC,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,IAAI,EAAC,MAAM,IAC1FP,qEAAO,IAAI,CAAC,IAAI,CAAQ,CACpB,EACN;KACH;;;;;;;;;;","names":["tv","h","Host","autoUpdate","offset","flip","shift","computePosition","cs"],"sources":["src/components/button/types.ts","src/components/button/button.css?tag=bcm-button&encapsulation=shadow","src/components/button/button.component.tsx","src/components/dropdown/dropdown.css?tag=bcm-dropdown&encapsulation=shadow","src/components/dropdown/dropdown.component.tsx","src/components/dropdown-item/dropdown-item.css?tag=bcm-dropdown-item&encapsulation=shadow","src/components/dropdown-item/dropdown-item.component.tsx","src/components/linked/linked.css?tag=bcm-linked&encapsulation=shadow","src/components/linked/linked.component.tsx","src/components/text/text.utils.ts","src/components/text/text.scss?tag=bcm-text&encapsulation=shadow","src/components/text/text.component.tsx"],"sourcesContent":["export type ButtonKind = 'primary' | 'ghost' | 'text' | 'outline';\nexport type ButtonSize = 'small' | 'medium' | 'large';\nexport type ButtonType = 'button' | 'reset' | 'submit';\nexport type ButtonStatus = 'default' | 'success' | 'error' | 'warning' | 'info';\nexport type IconPosition = 'prefix' | 'suffix';\n\n// Button group position\nexport type ButtonPosition = 'first' | 'middle' | 'last' | null;\n\nexport interface VariantOption {\n text: string;\n icon?: string;\n iconPosition?: IconPosition;\n status?: ButtonStatus;\n kind?: ButtonKind;\n}\n\nexport const variantOptions: Record<string, VariantOption> = {\n save: {\n text: 'Save',\n status: 'success',\n icon: 'far fa-save',\n iconPosition: 'prefix',\n kind: 'primary',\n },\n ok: {\n text: 'Ok',\n status: 'success',\n icon: 'far fa-check',\n iconPosition: 'prefix',\n },\n new: {\n text: 'New',\n status: 'success',\n icon: 'far fa-plus',\n iconPosition: 'prefix',\n },\n add: {\n text: 'Add',\n status: 'success',\n icon: 'far fa-plus',\n iconPosition: 'prefix',\n },\n create: {\n text: 'Create',\n status: 'success',\n icon: 'far fa-plus',\n iconPosition: 'prefix',\n },\n prev: {\n text: 'Prev',\n status: 'default',\n icon: 'far fa-arrow-left',\n iconPosition: 'prefix',\n },\n next: {\n text: 'Next',\n status: 'default',\n icon: 'far fa-arrow-right',\n iconPosition: 'suffix',\n },\n apply: {\n text: 'Apply',\n status: 'default',\n icon: 'far fa-check-circle',\n iconPosition: 'prefix',\n },\n submit: {\n text: 'Submit',\n status: 'default',\n icon: 'far fa-save',\n iconPosition: 'prefix',\n },\n send: {\n text: 'Send',\n status: 'success',\n icon: 'far fa-paper-plane',\n iconPosition: 'prefix',\n },\n delete: {\n text: 'Delete',\n status: 'error',\n icon: 'far fa-trash',\n iconPosition: 'prefix',\n },\n cancel: {\n text: 'Cancel',\n status: 'error',\n icon: 'far fa-times',\n iconPosition: 'prefix',\n },\n decline: {\n text: 'Decline',\n status: 'error',\n icon: 'far fa-ban',\n iconPosition: 'prefix',\n },\n close: {\n text: 'Close',\n status: 'error',\n icon: 'far fa-times-circle',\n iconPosition: 'prefix',\n },\n archive: {\n text: 'Archive',\n status: 'error',\n icon: 'far fa-folder-open',\n iconPosition: 'prefix',\n },\n remove: {\n text: 'Remove',\n status: 'error',\n icon: 'far fa-minus-circle',\n iconPosition: 'prefix',\n },\n edit: {\n text: 'Edit',\n status: 'default',\n icon: 'far fa-edit',\n iconPosition: 'prefix',\n },\n export: {\n text: 'Export',\n status: 'default',\n icon: 'far fa-sign-out',\n iconPosition: 'prefix',\n },\n import: {\n text: 'Import',\n status: 'default',\n icon: 'far fa-sign-in',\n iconPosition: 'prefix',\n },\n filter: {\n text: 'Filter',\n status: 'default',\n icon: 'far fa-filter',\n iconPosition: 'prefix',\n },\n update: {\n text: 'Update',\n status: 'default',\n icon: 'far fa-sync',\n iconPosition: 'prefix',\n },\n reset: {\n text: 'Reset',\n status: 'default',\n icon: 'far fa-sync',\n iconPosition: 'prefix',\n },\n download: {\n text: 'Download',\n status: 'default',\n icon: 'far fa-download',\n iconPosition: 'prefix',\n },\n};\n\nexport type ButtonVariant = keyof typeof variantOptions;\n",":host {\n display: inline-block;\n position: relative;\n}\n\n:host([full-width]) {\n width: 100%;\n}\n\n:host([position='first']) .bcm-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n:host([position='middle']) .bcm-button {\n border-radius: 0;\n}\n\n:host([position='last']) .bcm-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n:host([position='first'].orientation-vertical) .bcm-button {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-right-radius: var(--bcm-ui-border-radius, 4px);\n border-top-left-radius: var(--bcm-ui-border-radius, 4px);\n}\n\n:host([position='middle'].orientation-vertical) .bcm-button {\n border-radius: 0;\n}\n\n:host([position='last'].orientation-vertical) .bcm-button {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: var(--bcm-ui-border-radius, 4px);\n border-bottom-left-radius: var(--bcm-ui-border-radius, 4px);\n}\n","import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition, ButtonPosition, variantOptions } from './types';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-button',\n styleUrl: 'button.css',\n shadow: true,\n})\nexport class BcmButton {\n /** Defines the main visual style of the button */\n @Prop()\n kind: ButtonKind = 'primary';\n\n /** Controls the button size */\n @Prop()\n size: ButtonSize = 'medium';\n\n /** Defines the button's status/state color */\n @Prop()\n status: ButtonStatus = 'default';\n\n /** Predefined button variants */\n @Prop()\n variant?: ButtonVariant;\n\n /** Button position in button group (first, middle, last) */\n @Prop({ reflect: true })\n position?: ButtonPosition;\n\n /** Icon class name */\n @Prop()\n icon?: string;\n\n /** Icon placement (prefix/suffix) */\n @Prop()\n iconPosition: IconPosition = 'prefix';\n\n /** Icon-only button mode */\n @Prop()\n iconOnly = false;\n\n /** Full width button */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML button type */\n @Prop()\n type: ButtonType = 'button';\n\n /** Loading state */\n @Prop()\n loading = false;\n\n /** Disabled state */\n @Prop()\n disabled = false;\n\n /** Button text content */\n @Prop()\n text?: string;\n\n /** Active state */\n @Prop()\n active = false;\n\n /** Form association */\n @Prop()\n form: string;\n\n @Prop()\n value: string;\n\n @Prop()\n name: string;\n\n /** Screen reader label */\n @Prop()\n label: string;\n\n /** Expanded state for expandable content */\n @Prop()\n expanded?: string;\n\n /** ID of controlled element */\n @Prop()\n controls: string;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmClick: EventEmitter<MouseEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n private handleClick = (event: MouseEvent) => {\n if (!this.disabled && !this.loading) {\n this.bcmClick.emit(event);\n }\n };\n\n private handleFocus = (event: FocusEvent) => {\n this.bcmFocus.emit(event);\n };\n\n private handleBlur = (event: FocusEvent) => {\n this.bcmBlur.emit(event);\n };\n\n private get buttonText(): string {\n return this.text || (this.variant ? variantOptions[this.variant].text : '');\n }\n\n private get buttonIcon(): { icon?: string; position: IconPosition } {\n if (this.variant && variantOptions[this.variant].icon) {\n return {\n icon: variantOptions[this.variant].icon,\n position: variantOptions[this.variant].iconPosition || 'prefix',\n };\n }\n\n return {\n icon: this.icon,\n position: this.iconPosition,\n };\n }\n\n private get buttonStatus(): ButtonStatus {\n return this.variant ? variantOptions[this.variant].status : this.status;\n }\n\n private get buttonStyles() {\n const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;\n\n // These are the internal default styles based on component props (kind, status)\n const kindStyleMap = {\n primary: {\n '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,\n '--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,\n '--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': 'var(--bcm-ui-color-text-base)',\n },\n outline: {\n '--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n ghost: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n text: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,\n },\n };\n const internalDefaultStyles = kindStyleMap[this.kind];\n\n // These are the \"final\" CSS custom properties used by the component's styling.\n // They use the \"--bcm-button-custom-...\" token if provided by the user,\n // otherwise, they fall back to the internal \"--bcm-button-...\" style defined above.\n const finalEffectiveStyles = {\n '--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,\n '--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,\n '--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,\n '--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,\n '--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,\n };\n\n // return kindStyleMap[this.kind];\n\n return {\n ...internalDefaultStyles, // Provides the fallback values like --bcm-button-text\n ...finalEffectiveStyles, // Defines the --bcm-final-xxx tokens that handle the override logic\n };\n }\n\n private buttonClass = tv(\n {\n base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',\n variants: {\n size: {\n small: 'text-size-4 py-px px-2 min-h-6',\n medium: 'text-size-5 py-0.5 px-3 min-h-8',\n large: 'text-size-6 py-1 px-3 min-h-10',\n },\n kind: {\n primary: 'kind-primary',\n ghost: 'kind-ghost',\n text: 'kind-text',\n outline: 'kind-outline',\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',\n false: [\n 'cursor-pointer',\n 'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',\n 'hover:bg-[--bcm-final-hover-bg-color]',\n 'active:bg-[--bcm-final-active-bg-color]',\n 'focus-visible:ring',\n ],\n },\n loading: {\n true: '',\n },\n position: {\n first: 'position-first',\n middle: 'position-middle',\n last: 'position-last',\n },\n },\n defaultVariants: {\n size: 'medium',\n kind: 'primary',\n fullWidth: false,\n disabled: false,\n loading: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { icon, position } = this.buttonIcon;\n\n return (\n <Host>\n <button\n type={this.type}\n disabled={this.disabled || this.loading}\n aria-label={this.label}\n aria-expanded={this.expanded}\n aria-controls={this.controls}\n aria-disabled={this.disabled}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n style={this.buttonStyles}\n class={this.buttonClass({\n size: this.size,\n kind: this.kind,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n loading: this.loading,\n position: this.position,\n })}\n >\n {this.loading && <slot name=\"loading\"></slot>}\n <span>\n <slot name=\"prefix\">{position === 'prefix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n <slot>{this.buttonText}</slot>\n <span>\n <slot name=\"suffix\">{position === 'suffix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n </button>\n </Host>\n );\n }\n}\n","/* :host {\n --dropdown-box-min-weight: 32px;\n --dropdown-box-max-width: 384px;\n --dropdown-box-max-height: 384px;\n --dropdown-box-background-color: var(--bcm-ui-color-background-basic-panel);\n} */\n/* \n.scroll {\n height: 140px;\n width: 140px;\n overflow-y: auto;\n}\n\n.scroll:active::-webkit-scrollbar-thumb,\n.scroll:focus::-webkit-scrollbar-thumb,\n.scroll:hover::-webkit-scrollbar-thumb {\n visibility: visible;\n}\n.scroll::-webkit-scrollbar-thumb {\n background-color: darkgrey;\n visibility: hidden;\n}\n\n.scroll::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n} */\n","import { Component, ComponentInterface, h, Prop, State, Element, Host, Event, EventEmitter, Listen } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-dropdown',\n styleUrl: 'dropdown.css',\n shadow: true,\n})\nexport class Dropdown implements ComponentInterface {\n @Element() host: HTMLElement;\n\n @Prop() text?: string;\n\n @State() isReady: boolean = false;\n\n @State() dropdownItems: HTMLBcmDropdownItemElement[] = [];\n\n protected buttonRef?: HTMLBcmButtonElement;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmDropdownChange',\n })\n bcmDropdownChange: EventEmitter<any>;\n\n componentDidLoad() {\n const button = this.host.shadowRoot.querySelector('bcm-button') as HTMLBcmButtonElement;\n if (button) {\n this.buttonRef = button;\n this.isReady = true;\n }\n }\n\n @Listen('bcmDropDownItemChange', { capture: true })\n handleDropdownItemChange(event: CustomEvent) {\n const { element, selected } = event?.detail;\n\n this.dropdownItems?.forEach(item => {\n if (item != element) {\n item.selected = false;\n }\n });\n\n this.bcmDropdownChange.emit({\n element: element,\n selected,\n });\n }\n\n private dropdownClass = tv({\n base: 'dropdown flex flex-col items-center min-w-10 shadow-3 max-w-64 max-h-64 w-full bg-color-basic-panel rounded-lg py-1.5 overflow-y-auto',\n });\n\n private handleSlotChange = () => {\n this.dropdownItems = Array.from(this.host.querySelectorAll('bcm-dropdown-item'));\n\n if (this.dropdownItems.length === 0) {\n console.warn('No dropdown items found in dropdown component');\n }\n };\n\n render() {\n return (\n <Host>\n <bcm-button kind=\"outline\">\n <span part=\"text\">{this.text}</span>\n </bcm-button>\n {this.isReady && (\n <bcm-linked targetElement={this.buttonRef}>\n <div part=\"dropdown-container\" class={this.dropdownClass()}>\n <slot onSlotchange={this.handleSlotChange}></slot>\n </div>\n </bcm-linked>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n::slotted([slot='left-content']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n\n::slotted([slot='right-content']) {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n","import { Component, ComponentInterface, h, Prop, Event, EventEmitter, Element } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-dropdown-item',\n styleUrl: 'dropdown-item.css',\n shadow: true,\n})\nexport class DropdownItem implements ComponentInterface {\n @Element() host: HTMLElement;\n @Prop() text: string;\n @Prop() icon: string;\n @Prop() rightIcons: string[];\n @Prop({ reflect: true }) selected: boolean = false;\n @Prop({ reflect: true }) error: boolean = false;\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmDropDownItemChange',\n })\n bcmDropDownItemChange: EventEmitter<any>;\n\n\n private handleClick() {\n this.selected = true;\n this.bcmDropDownItemChange.emit({\n element: this.host,\n selected: this.selected,\n });\n }\n\n private dropdownItemClass = tv(\n {\n base: 'dropdown-item bcm-ui-element bcm-ui-content-display flex flex-row gap-2 py-2 px-4 cursor-pointer text-color',\n variants: {\n selected: {\n true: 'bg-[var(--bcm-ui-color-background-base-active)] hover:bg-[var(--bcm-ui-color-background-base-active)]',\n false: 'hover:bg-[var(--bcm-ui-color-background-base-hover)]',\n },\n error: {\n true: 'bg-[var(--bcm-ui-color-background-palette-red-default)] hover:bg-[var(--bcm-ui-color-background-palette-red-default)]',\n false: '',\n },\n disabled: {\n true: '', // should be discuss with ux team\n false: '',\n },\n },\n defaultVariants: {\n selected: false,\n error: false,\n disabled: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n return (\n <div\n aria-checked={this.selected}\n class={this.dropdownItemClass({\n selected: this.selected,\n error: this.error,\n })}\n onClick={() => this.handleClick()}\n >\n <slot name=\"left-content\">{this.icon && <bcm-icon icon-name={this.icon}></bcm-icon>}</slot>\n <div class=\"flex flex-row text-pretty w-full\">\n <slot>{this.text}</slot>\n </div>\n <slot name=\"right-content\">\n {this.rightIcons?.map(icon => (\n <bcm-icon icon-name={icon}></bcm-icon>\n ))}\n </slot>\n </div>\n );\n }\n}\n",":host {\n display: block;\n position: relative;\n}\n\n.floating-content {\n min-width: max-content;\n transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;\n will-change: transform, opacity;\n}\n\n.floating-visible {\n animation: fadeInScale 0.2s ease-out;\n}\n\n.floating-hidden {\n pointer-events: none;\n}\n\n.floating-wrapper {\n position: relative;\n z-index: 1;\n}\n\n/* Animations */\n@keyframes fadeInScale {\n from {\n opacity: 0;\n transform: scale(0.95) translateY(-5px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n\n/* Arrow Styles */\n.floating-arrow {\n position: absolute;\n width: 10px;\n height: 10px;\n z-index: -1;\n}\n\n.floating-arrow::before {\n content: '';\n position: absolute;\n width: 10px;\n height: 10px;\n background: white;\n border: 1px solid #e2e8f0;\n transform: rotate(45deg);\n}\n\n/* Arrow positioning based on placement */\n.arrow-top {\n bottom: -5px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.arrow-bottom {\n top: -5px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.arrow-left {\n right: -5px;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.arrow-right {\n left: -5px;\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* Arrow border fix for bordered popups */\n.arrow-top::before {\n border-bottom: 0;\n border-right: 0;\n}\n\n.arrow-bottom::before {\n border-top: 0;\n border-left: 0;\n}\n\n.arrow-left::before {\n border-top: 0;\n border-right: 0;\n}\n\n.arrow-right::before {\n border-bottom: 0;\n border-left: 0;\n}\n\n/* Responsive adjustments */\n@media (max-width: 768px) {\n .floating-content {\n max-width: calc(100vw - 32px);\n max-height: calc(100vh - 32px);\n }\n}\n","import { Component, ComponentInterface, Prop, Element, State, h, Event, EventEmitter, Watch, Method } from '@stencil/core';\nimport { computePosition, flip, shift, offset, autoUpdate, type Placement } from '@floating-ui/dom';\n\nexport type TriggerType = 'hover' | 'click' | 'focus' | 'manual';\n\n@Component({\n tag: 'bcm-linked',\n styleUrl: 'linked.css',\n shadow: true,\n})\nexport class BcmLinked implements ComponentInterface {\n @Element() host: HTMLElement;\n\n // Target configuration\n @Prop({ reflect: true, attribute: 'target-id' }) targetId?: string;\n @Prop() targetElement?: HTMLElement;\n\n // Trigger configuration\n @Prop() trigger: TriggerType = 'click';\n @Prop() placement: Placement = 'bottom-start';\n\n // Timing configuration\n @Prop() showDelay: number = 0;\n @Prop() hideDelay: number = 0;\n\n // Positioning configuration\n @Prop() offset: number = 8;\n @Prop() arrow: boolean = false;\n @Prop() disabled: boolean = false;\n\n // Style configuration\n @Prop() zIndex: number = 1000;\n @Prop() appendToBody: boolean = false;\n @Prop() destroyOnHide: boolean = false;\n\n // State\n @State() isVisible: boolean = false;\n @State() isReady: boolean = false;\n\n // Events\n @Event() bcmShow: EventEmitter<void>;\n @Event() bcmHide: EventEmitter<void>;\n @Event() bcmShown: EventEmitter<void>;\n @Event() bcmHidden: EventEmitter<void>;\n\n // Private properties\n private floatingEl?: HTMLElement;\n private targetEl?: HTMLElement;\n private showTimeout?: NodeJS.Timeout;\n private hideTimeout?: NodeJS.Timeout;\n private cleanup?: () => void;\n private clickOutsideHandler?: (e: MouseEvent) => void;\n private resizeObserver?: ResizeObserver;\n\n // Watch for changes\n @Watch('targetId')\n @Watch('targetElement')\n setupTarget() {\n this.disconnectTarget();\n this.connectTarget();\n }\n\n @Watch('isVisible')\n onVisibilityChange(newValue: boolean) {\n if (newValue) {\n this.updatePosition();\n this.bcmShown.emit();\n } else {\n this.bcmHidden.emit();\n }\n }\n\n componentDidLoad() {\n requestAnimationFrame(() => {\n this.floatingEl = this.host.shadowRoot.querySelector('.floating-content') as HTMLElement;\n this.isReady = true;\n this.connectTarget();\n });\n }\n\n disconnectedCallback() {\n this.disconnectTarget();\n this.clearTimeouts();\n this.cleanup?.();\n this.resizeObserver?.disconnect();\n\n // Clean up any portal elements from body\n if (this.appendToBody) {\n const portalElements = document.querySelectorAll('[data-floating-portal=\"true\"]');\n portalElements.forEach(el => {\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n });\n }\n }\n\n private connectTarget() {\n if (!this.isReady) return;\n\n // Find target element\n this.targetEl =\n this.targetElement || (this.targetId ? document.getElementById(this.targetId) : null) || (this.host.previousElementSibling as HTMLElement) || this.host.parentElement;\n\n if (!this.targetEl) {\n console.warn('bcm-linked: No target element found');\n return;\n }\n\n // Setup event listeners based on trigger type\n this.setupEventListeners();\n\n // Setup auto-update for position\n if (this.targetEl && this.floatingEl) {\n this.cleanup = autoUpdate(this.targetEl, this.floatingEl, () => {\n if (this.isVisible) {\n this.updatePosition();\n }\n });\n }\n\n // Setup resize observer for responsive positioning\n this.resizeObserver = new ResizeObserver(() => {\n if (this.isVisible) {\n this.updatePosition();\n }\n });\n this.resizeObserver.observe(this.floatingEl);\n }\n\n private disconnectTarget() {\n if (this.targetEl) {\n this.removeEventListeners();\n }\n this.cleanup?.();\n this.resizeObserver?.disconnect();\n }\n\n private setupEventListeners() {\n if (!this.targetEl || this.disabled) return;\n\n switch (this.trigger) {\n case 'hover':\n this.targetEl.addEventListener('mouseenter', this.handleMouseEnter);\n this.targetEl.addEventListener('mouseleave', this.handleMouseLeave);\n this.floatingEl?.addEventListener('mouseenter', this.handleFloatingMouseEnter);\n this.floatingEl?.addEventListener('mouseleave', this.handleFloatingMouseLeave);\n break;\n\n case 'click':\n this.targetEl.addEventListener('click', this.handleClick);\n this.setupClickOutside();\n break;\n\n case 'focus':\n this.targetEl.addEventListener('focus', this.handleFocus);\n this.targetEl.addEventListener('blur', this.handleBlur);\n break;\n }\n }\n\n private removeEventListeners() {\n if (!this.targetEl) return;\n\n this.targetEl.removeEventListener('mouseenter', this.handleMouseEnter);\n this.targetEl.removeEventListener('mouseleave', this.handleMouseLeave);\n this.targetEl.removeEventListener('click', this.handleClick);\n this.targetEl.removeEventListener('focus', this.handleFocus);\n this.targetEl.removeEventListener('blur', this.handleBlur);\n\n this.floatingEl?.removeEventListener('mouseenter', this.handleFloatingMouseEnter);\n this.floatingEl?.removeEventListener('mouseleave', this.handleFloatingMouseLeave);\n\n this.removeClickOutside();\n }\n\n private setupClickOutside() {\n this.clickOutsideHandler = (e: MouseEvent) => {\n const target = e.target as Node;\n if (!this.floatingEl?.contains(target) && !this.targetEl?.contains(target) && !this.host.contains(target)) {\n this.hide();\n }\n };\n document.addEventListener('click', this.clickOutsideHandler, true);\n }\n\n private removeClickOutside() {\n if (this.clickOutsideHandler) {\n document.removeEventListener('click', this.clickOutsideHandler, true);\n this.clickOutsideHandler = undefined;\n }\n }\n\n private handleMouseEnter = () => {\n this.clearTimeouts();\n if (this.showDelay > 0) {\n this.showTimeout = setTimeout(() => this.show(), this.showDelay);\n } else {\n this.show();\n }\n };\n\n private handleMouseLeave = () => {\n this.clearTimeouts();\n if (this.hideDelay > 0) {\n this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);\n } else {\n this.hide();\n }\n };\n\n private handleFloatingMouseEnter = () => {\n this.clearTimeouts();\n };\n\n private handleFloatingMouseLeave = () => {\n this.clearTimeouts();\n if (this.hideDelay > 0) {\n this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);\n } else {\n this.hide();\n }\n };\n\n private handleClick = (e: Event) => {\n e.stopPropagation();\n this.toggle();\n };\n\n private handleFocus = () => {\n this.show();\n };\n\n private handleBlur = () => {\n this.hide();\n };\n\n private clearTimeouts() {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n private async updatePosition() {\n if (!this.targetEl || !this.floatingEl || !this.isVisible) return;\n\n const middleware = [\n offset(this.offset),\n flip({\n fallbackPlacements: ['top-start', 'bottom-start', 'right-start', 'left-start'],\n }),\n shift({ padding: 8 }),\n ];\n\n const { x, y, placement } = await computePosition(this.targetEl, this.floatingEl, {\n placement: this.placement,\n middleware,\n strategy: 'fixed',\n });\n\n Object.assign(this.floatingEl.style, {\n left: `${x}px`,\n top: `${y}px`,\n zIndex: this.zIndex.toString(),\n });\n\n // Update arrow if enabled\n if (this.arrow) {\n this.updateArrow(placement);\n }\n }\n\n private updateArrow(placement: Placement) {\n const arrow = this.floatingEl?.querySelector('.floating-arrow') as HTMLElement;\n if (!arrow) return;\n\n // Remove all arrow classes\n arrow.className = 'floating-arrow';\n\n // Add placement-specific class\n const side = placement.split('-')[0];\n arrow.classList.add(`arrow-${side}`);\n }\n\n @Method()\n async show(): Promise<void> {\n if (this.disabled || this.isVisible) return;\n\n this.bcmShow.emit();\n this.isVisible = true;\n\n // Move to body if appendToBody is enabled\n if (this.appendToBody && this.floatingEl && !document.body.contains(this.floatingEl)) {\n // Clone the element to body for positioning outside overflow containers\n const clonedElement = this.floatingEl.cloneNode(true) as HTMLElement;\n clonedElement.setAttribute('data-floating-portal', 'true');\n document.body.appendChild(clonedElement);\n\n // Hide original and use cloned version for positioning\n this.floatingEl.style.display = 'none';\n this.floatingEl = clonedElement;\n }\n\n await this.updatePosition();\n }\n\n @Method()\n async hide(): Promise<void> {\n if (!this.isVisible) return;\n\n this.bcmHide.emit();\n this.isVisible = false;\n\n // Clean up appended element from body\n if (this.appendToBody && this.floatingEl && this.floatingEl.hasAttribute('data-floating-portal')) {\n this.floatingEl.parentNode?.removeChild(this.floatingEl);\n // Restore original floating element\n this.floatingEl = this.host.shadowRoot?.querySelector('.floating-content') as HTMLElement;\n if (this.floatingEl) {\n this.floatingEl.style.display = '';\n }\n }\n\n if (this.destroyOnHide && this.floatingEl && this.floatingEl.parentNode) {\n this.floatingEl.parentNode.removeChild(this.floatingEl);\n }\n }\n\n @Method()\n async toggle(): Promise<void> {\n if (this.isVisible) {\n await this.hide();\n } else {\n await this.show();\n }\n }\n\n @Method()\n async updatePositioning(): Promise<void> {\n await this.updatePosition();\n }\n\n render() {\n const floatingClasses = {\n 'floating-content': true,\n 'floating-visible': this.isVisible,\n 'floating-hidden': !this.isVisible,\n 'floating-with-arrow': this.arrow,\n 'floating-destroy-on-hide': this.destroyOnHide,\n };\n\n return [\n // Portal div to body for positioning, but keep slot in shadow DOM\n <div\n class={floatingClasses}\n style={{\n position: 'fixed',\n top: '0px',\n left: '0px',\n zIndex: this.zIndex.toString(),\n visibility: this.isVisible ? 'visible' : 'hidden',\n opacity: this.isVisible ? '1' : '0',\n pointerEvents: this.isVisible ? 'auto' : 'none',\n }}\n >\n {this.arrow && <div class=\"floating-arrow\" />}\n <div class=\"floating-wrapper\">\n <slot />\n </div>\n </div>,\n // Hidden content holder for slot fallback\n <div style={{ display: 'none' }}>\n <slot name=\"fallback\" />\n </div>,\n ];\n }\n}\n","import { TextVariant, TextTag } from './text.types';\n\nexport const variantTagMap: Record<TextVariant, TextTag> = {\n display: 'h1',\n heading1: 'h2',\n heading2: 'h3',\n title1: 'h4',\n title2: 'h5',\n title3: 'h6',\n body: 'p',\n bodyAccent: 'p',\n helper: 'p',\n caption: 'p',\n label: 'label',\n placeholder: 'p',\n link: 'a',\n info: 'p',\n infoAccent: 'p',\n};\n","","import { Component, h, Prop } from '@stencil/core';\nimport cs from 'classnames';\nimport { TextVariant, TextSize } from './text.types';\nimport { variantTagMap } from './text.utils';\n\n@Component({\n tag: 'bcm-text',\n styleUrl: 'text.scss',\n shadow: true,\n})\nexport class BcmText {\n /** Text content */\n @Prop()\n text: string;\n\n /** Text variant */\n @Prop()\n variant: TextVariant = 'body';\n\n /** Text size */\n @Prop()\n size: TextSize = 'medium';\n\n /** Text overflow behavior */\n @Prop()\n overflow: boolean = false;\n\n private readonly variantClassMap = {\n display: 'font-semibold text-size-12 text-color-header',\n heading1: 'font-semibold text-size-7 text-color-header',\n heading2: 'font-semibold text-size-6 text-color-header',\n title1: {\n small: 'font-semibold text-size-5 text-color-header',\n medium: 'font-semibold text-size-6 text-color-header',\n large: 'font-semibold text-size-7 text-color-header',\n },\n title2: {\n small: 'font-semibold text-size-4 text-color-default',\n medium: 'font-semibold text-size-5 text-color-default',\n large: 'font-semibold text-size-6 text-color-default',\n },\n title3: {\n small: 'font-semibold text-size-3 text-color-disabled',\n medium: 'font-semibold text-size-4 text-color-disabled',\n large: 'font-semibold text-size-5 text-color-disabled',\n },\n body: {\n small: 'font-regular text-size-4 text-color-default',\n medium: 'font-regular text-size-5 text-color-default',\n large: 'font-regular text-size-6 text-color-default',\n },\n bodyAccent: {\n small: 'font-medium text-size-4 text-color-default',\n medium: 'font-medium text-size-5 text-color-default',\n large: 'font-medium text-size-6 text-color-default',\n },\n helper: {\n small: 'font-regular text-size-4 text-color-helper',\n medium: 'font-regular text-size-5 text-color-helper',\n large: 'font-regular text-size-6 text-color-helper',\n },\n caption: {\n small: 'font-regular text-size-3 text-color-caption',\n medium: 'font-regular text-size-4 text-color-caption',\n large: 'font-regular text-size-5 text-color-caption',\n },\n link: {\n small: 'font-medium text-size-4 underline text-color-primary',\n medium: 'font-medium text-size-5 underline text-color-primary',\n large: 'font-medium text-size-6 underline text-color-primary',\n },\n label: {\n small: 'font-medium text-size-3 text-color-label',\n medium: 'font-medium text-size-4 text-color-label',\n large: 'font-medium text-size-5 text-color-label',\n },\n placeholder: {\n small: 'font-regular text-size-4 text-color-placeholder',\n medium: 'font-regular text-size-5 text-color-placeholder',\n large: 'font-regular text-size-6 text-color-placeholder',\n },\n info: {\n small: 'font-regular text-size-3 text-color-default',\n medium: 'font-regular text-size-4 text-color-default',\n large: 'font-regular text-size-5 text-color-default',\n },\n infoAccent: {\n small: 'font-medium text-size-3 text-color-header',\n medium: 'font-medium text-size-4 text-color-header',\n large: 'font-medium text-size-5 text-color-header',\n },\n } as const;\n\n private getTextClass = (variant: TextVariant, size: TextSize): string => {\n const variantClasses = this.variantClassMap[variant];\n\n if (typeof variantClasses === 'string') {\n return variantClasses;\n }\n\n return variantClasses[size];\n };\n\n private getOverflowClass = (overflow: boolean): string => {\n return overflow ? 'truncate' : '';\n };\n\n render() {\n const Tag = variantTagMap[this.variant];\n const variantClass = this.getTextClass(this.variant, this.size);\n const overflowClass = this.getOverflowClass(this.overflow ?? false);\n\n return (\n <Tag class={cs('bcm-text appearance-none m-0 p-0', variantClass, overflowClass)} part=\"text\">\n <slot>{this.text}</slot>\n </Tag>\n );\n }\n}\n"],"version":3}
|