bromcom-ui-next 0.1.0 → 0.1.3
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.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js.map +1 -1
- package/dist/bromcom-ui/p-047e562f.entry.js +2 -0
- package/dist/bromcom-ui/p-047e562f.entry.js.map +1 -0
- package/dist/bromcom-ui/p-3805363a.entry.js +2 -0
- package/dist/bromcom-ui/{p-341d46a8.entry.js.map → p-3805363a.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-61c030c5.js +3 -0
- package/dist/bromcom-ui/p-61c030c5.js.map +1 -0
- package/dist/bromcom-ui/p-6430a887.entry.js +2 -0
- package/dist/bromcom-ui/p-6430a887.entry.js.map +1 -0
- package/dist/bromcom-ui/p-9e94d920.entry.js +2 -0
- package/dist/bromcom-ui/p-9e94d920.entry.js.map +1 -0
- package/dist/bromcom-ui/p-bde58312.entry.js +2 -0
- package/dist/bromcom-ui/p-bde58312.entry.js.map +1 -0
- package/dist/bromcom-ui/p-dcc13a55.entry.js +2 -0
- package/dist/bromcom-ui/{p-997f314c.entry.js.map → p-dcc13a55.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-e7732b0c.entry.js +2 -0
- package/dist/bromcom-ui/{p-f0c61f8c.entry.js.map → p-e7732b0c.entry.js.map} +1 -1
- package/dist/cjs/bcm-accordion-group.cjs.entry.js +92 -0
- package/dist/cjs/bcm-accordion-group.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js +128 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
- package/dist/cjs/bcm-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js +2 -2
- package/dist/cjs/bcm-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-button_2.cjs.entry.js +549 -0
- package/dist/cjs/bcm-button_2.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-chip.cjs.entry.js +130 -0
- package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-text.cjs.entry.js +3 -3
- package/dist/cjs/bcm-text.cjs.entry.js.map +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +2 -2
- package/dist/cjs/{index-638f2d15.js → index-c36002ae.js} +32 -3
- package/dist/cjs/index-c36002ae.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/accordion.component.js +4 -4
- package/dist/collection/components/accordion/accordion.component.js.map +1 -1
- package/dist/collection/components/accordion/accordion.css +1 -1
- package/dist/collection/components/accordion-group/accordion-group.component.js +1 -1
- package/dist/collection/components/accordion-group/accordion-group.css +1 -1
- package/dist/collection/components/alert/alert.component.js +1 -1
- package/dist/collection/components/alert/alert.css +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/button/button.component.js +3 -3
- package/dist/collection/components/button/button.component.js.map +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/chip/chip.component.js +1 -1
- package/dist/collection/components/chip/chip.css +1 -1
- package/dist/collection/components/input/input.component.js +865 -0
- package/dist/collection/components/input/input.component.js.map +1 -0
- package/dist/collection/components/input/input.css +2 -0
- package/dist/collection/components/input/types.js +2 -0
- package/dist/collection/components/input/types.js.map +1 -0
- package/dist/collection/components/text/text.component.js +1 -1
- package/dist/collection/components/text/text.css +1 -1
- package/dist/collection/utils/id/generate-id.js +16 -0
- package/dist/collection/utils/id/generate-id.js.map +1 -0
- package/dist/components/bcm-accordion-group.js +3 -3
- package/dist/components/bcm-accordion-group.js.map +1 -1
- package/dist/components/bcm-accordion.js +6 -6
- package/dist/components/bcm-accordion.js.map +1 -1
- package/dist/components/bcm-alert.js +3 -3
- package/dist/components/bcm-alert.js.map +1 -1
- package/dist/components/bcm-avatar.js +2 -2
- package/dist/components/bcm-avatar.js.map +1 -1
- package/dist/components/bcm-button.js +5 -5
- package/dist/components/bcm-button.js.map +1 -1
- package/dist/components/bcm-chip.js +3 -3
- package/dist/components/bcm-chip.js.map +1 -1
- package/dist/components/bcm-input.d.ts +11 -0
- package/dist/components/bcm-input.js +306 -0
- package/dist/components/bcm-input.js.map +1 -0
- package/dist/components/bcm-text.js +3 -3
- package/dist/components/bcm-text.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-0adcc84f.js → p-8ded2c73.js} +26 -3
- package/dist/{cjs/index-638f2d15.js.map → components/p-8ded2c73.js.map} +1 -1
- package/dist/esm/bcm-accordion-group.entry.js +88 -0
- package/dist/esm/bcm-accordion-group.entry.js.map +1 -0
- package/dist/esm/bcm-accordion.entry.js +124 -0
- package/dist/esm/bcm-accordion.entry.js.map +1 -0
- package/dist/esm/bcm-alert.entry.js +3 -3
- package/dist/esm/bcm-alert.entry.js.map +1 -1
- package/dist/esm/bcm-avatar.entry.js +2 -2
- package/dist/esm/bcm-avatar.entry.js.map +1 -1
- package/dist/esm/bcm-button_2.entry.js +544 -0
- package/dist/esm/bcm-button_2.entry.js.map +1 -0
- package/dist/esm/bcm-chip.entry.js +126 -0
- package/dist/esm/bcm-chip.entry.js.map +1 -0
- package/dist/esm/bcm-text.entry.js +3 -3
- package/dist/esm/bcm-text.entry.js.map +1 -1
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{index-ce2fac11.js → index-e23ee9b0.js} +32 -3
- package/dist/esm/index-e23ee9b0.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/input/input.component.d.ts +74 -0
- package/dist/types/components/input/types.d.ts +3 -0
- package/dist/types/components.d.ts +246 -0
- package/dist/types/utils/id/generate-id.d.ts +9 -0
- package/package.json +3 -2
- package/dist/bromcom-ui/p-27c997d8.js +0 -3
- package/dist/bromcom-ui/p-27c997d8.js.map +0 -1
- package/dist/bromcom-ui/p-341d46a8.entry.js +0 -2
- package/dist/bromcom-ui/p-997f314c.entry.js +0 -2
- package/dist/bromcom-ui/p-dcb9df00.entry.js +0 -2
- package/dist/bromcom-ui/p-dcb9df00.entry.js.map +0 -1
- package/dist/bromcom-ui/p-f0c61f8c.entry.js +0 -2
- package/dist/cjs/bcm-accordion_4.cjs.entry.js +0 -623
- package/dist/cjs/bcm-accordion_4.cjs.entry.js.map +0 -1
- package/dist/components/p-0adcc84f.js.map +0 -1
- package/dist/esm/bcm-accordion_4.entry.js +0 -616
- package/dist/esm/bcm-accordion_4.entry.js.map +0 -1
- package/dist/esm/index-ce2fac11.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.component.js","sourceRoot":"","sources":["../../../src/components/accordion/accordion.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAMH,MAAM,OAAO,YAAY;IALzB;QASE;;;;WAIG;QAEH,aAAQ,GAAY,KAAK,CAAC;QAU1B;;;;;WAKG;QAGH,UAAK,GAAY,KAAK,CAAC;QASvB;;;WAGG;QAEH,qBAAgB,GAAY,KAAK,CAAC;QAgElC;;;;WAIG;QACK,2BAAsB,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC5C,MAAM,IAAI,GAAG,CAAC,CAAC,MAAyB,CAAC;YACzC,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YAC3C,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;QACnD,CAAC,CAAC;QAEM,mB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;YAET,4DAAK,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAiB,CAAC;gBAC1H,4DAAK,KAAK,EAAC,WAAW;oBACpB,8DAAa,CACT;gBACN,+DAAQ,KAAK,EAAE,MAAM,EAAE;oBACrB,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,sBAAsB,IAC1D,IAAI,CAAC,QAAQ,CACT,CACA,CACL,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, EventEmitter, h, Method, Prop, Event, State, Element } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\nimport { AccordionChangeEventType } from './types';\n\n/**\n * @component BcmAccordion\n * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation\n * and accessibility features. Offers customizable header, content, and footer areas through slots.\n *\n * @example Basic usage\n * <bcm-accordion>\n * <div slot=\"title\">Accordion Title</div>\n * <div>Content goes here</div>\n * </bcm-accordion>\n *\n * @example With all slots and hint text\n * <bcm-accordion hint-text=\"Additional information\">\n * <div slot=\"title\">Title</div>\n * <div slot=\"actions\">\n * <button>Action</button>\n * </div>\n * <div>Main content</div>\n * <div slot=\"footer\">Footer content</div>\n * </bcm-accordion>\n *\n * @example Event handling\n * // Listen to accordion state changes\n * const accordion = document.querySelector('bcm-accordion');\n * accordion.addEventListener('bcmAccordionChange', (event) => {\n * const { expanded, source } = event.detail;\n * console.log('Accordion expanded:', expanded);\n * console.log('Changed accordion:', source);\n * });\n *\n * // Programmatically control accordion\n * await accordion.toggle(); // Toggle state\n * await accordion.expand(); // Expand accordion\n * await accordion.collapse(); // Collapse accordion\n *\n * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false)\n * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false)\n * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided\n *\n * @slot title - Primary title content for the accordion header (required)\n * @slot actions - Additional actions to be displayed in the header (optional)\n * @slot default - Main content area of the accordion\n * @slot footer - Optional footer content (overrides hint-text if provided)\n *\n * @event {EventEmitter<AccordionChangeEventType>} bcmAccordionChange - Emitted when the accordion's expanded state changes\n * @eventProperty {boolean} expanded - Current expanded state\n * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed\n *\n * @csspart container - The root container element\n * @csspart header - The header section with title and actions\n * @csspart content - The collapsible content section\n * @csspart footer - The footer section with hint text or footer slot\n * @csspart section - Container for header content sections\n * @csspart icon - The expand/collapse chevron icon\n *\n * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px)\n * @css {string} --bcm-accordion-bg - Background color of the accordion header\n * @css {string} --bcm-accordion-text - Text color of the accordion\n * @css {string} --bcm-accordion-footer-bg - Background color of the footer section\n *\n * @methods\n * toggle() - Toggles the accordion's expanded state\n * expand() - Expands the accordion if collapsed\n * collapse() - Collapses the accordion if expanded\n */\n@Component({\n tag: 'bcm-accordion',\n styleUrl: 'accordion.css',\n shadow: true,\n})\nexport class BcmAccordion implements ComponentInterface {\n /** Reference to the host element */\n @Element() host: HTMLElement;\n\n /**\n * Controls whether the accordion is expanded or collapsed.\n * @prop\n * @defaultValue false\n */\n @Prop({ reflect: true, mutable: true })\n expanded: boolean = false;\n\n /**\n * Optional title text to display in the header.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n headerTitle?: string;\n\n /**\n * Indicates if the accordion is part of a group.\n * Used for group behavior coordination.\n * @prop\n * @defaultValue false\n */\n\n @Prop({ reflect: true })\n group: boolean = false;\n\n /**\n * Optional text to display in the footer when no footer slot content is provided.\n * @prop\n */\n @Prop({ attribute: 'hint-text' })\n hintText?: string;\n\n /**\n * Tracks whether footer content is present.\n * @state\n */\n @State()\n hasFooterContent: boolean = false;\n\n /**\n * Emitted when the accordion's expanded state changes.\n * @event\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmAccordionChange',\n })\n bcmAccordionChange: EventEmitter<AccordionChangeEventType>;\n\n private contentEl?: HTMLElement;\n\n /**\n * Toggles the accordion's expanded state.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async toggle(): Promise<void> {\n this.expanded = !this.expanded;\n this.updateAccordion();\n }\n\n /**\n * Expands the accordion if it's not already expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async expand(): Promise<void> {\n if (!this.expanded) {\n this.expanded = true;\n this.updateAccordion();\n }\n }\n\n /**\n * Collapses the accordion if it's currently expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async collapse(): Promise<void> {\n if (this.expanded) {\n this.expanded = false;\n this.updateAccordion();\n }\n }\n\n /**\n * Updates the accordion's content height and emits change event.\n * @private\n */\n private updateAccordion(): void {\n if (this.contentEl) {\n this.contentEl.style.maxHeight = this.expanded ? `${this.contentEl.scrollHeight}px` : '0px';\n }\n this.bcmAccordionChange.emit({ expanded: this.expanded, source: this.host as HTMLBcmAccordionElement });\n }\n\n /**\n * Handles changes to the footer slot content.\n * @private\n * @param e - Slot change event\n */\n private handleFooterSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement;\n const assignedNodes = slot.assignedNodes();\n this.hasFooterContent = assignedNodes.length > 0;\n };\n\n private accordionClass = tv(\n {\n slots: {\n container: 'accordion-container flex flex-col bcm-ui-element w-full cursor-pointer',\n header:\n 'accordion-header flex flex-row justify-between gap-2 p-4 w-full flex-nowrap rounded-[--bcm-accordion-radius] bg-[--bcm-accordion-bg] text-[--bcm-accordion-text] font-semibold text-size-6',\n content: 'accordion-content overflow-hidden transition-all duration-300 ease-in-out bg-color-basic-base',\n footer: 'accordion-footer flex flex-row w-full flex-nowrap bg-[--bcm-accordion-footer-bg] text-[--bcm-accordion-text] px-4 py-2 gap-2 text-size-4 font-normal',\n icon: 'accordion-icon cursor-pointer transform transition-transform duration-300',\n rightSection: 'accordion-right-section flex flex-row gap-2.5 items-center',\n },\n variants: {\n hasFooterContent: {\n false: { footer: 'hidden' },\n true: { footer: 'flex' },\n },\n expanded: {\n true: { icon: 'rotate-180' },\n false: {\n icon: 'rotate-0',\n content: '',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { container, header, content, footer, icon, rightSection } = this.accordionClass({\n hasFooterContent: this.hasFooterContent || !!this.hintText,\n expanded: this.expanded,\n });\n\n return (\n <div class={container()}>\n {/* Header */}\n <header\n class={header()}\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.expanded.toString()}\n aria-controls=\"accordion-content\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.toggle();\n }\n }}\n onClick={() => this.toggle()}\n >\n <slot name=\"title\">{this.headerTitle}</slot>\n {/* Actions */}\n <div class={rightSection()}>\n <slot name=\"actions\"></slot>\n <bcm-icon name=\"fa-regular fa-chevron-down\" class={icon()}></bcm-icon>\n </div>\n </header>\n {/* Content */}\n <div class={content()} style={{ maxHeight: this.expanded ? 'auto' : '0px' }} ref={el => (this.contentEl = el as HTMLElement)}>\n <div class=\"px-4 py-2\">\n <slot></slot>\n </div>\n <footer class={footer()}>\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange}>\n {this.hintText}\n </slot>\n </footer>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"accordion.component.js","sourceRoot":"","sources":["../../../src/components/accordion/accordion.component.tsx"],"names":[],"mapp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ACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, EventEmitter, h, Method, Prop, Event, State, Element } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\nimport { AccordionChangeEventType } from './types';\n\n/**\n * @component BcmAccordion\n * @description A collapsible accordion component that provides expandable/collapsible content sections with keyboard navigation\n * and accessibility features. Offers customizable header, content, and footer areas through slots.\n *\n * @example Basic usage\n * <bcm-accordion>\n * <div slot=\"title\">Accordion Title</div>\n * <div>Content goes here</div>\n * </bcm-accordion>\n *\n * @example With all slots and hint text\n * <bcm-accordion hint-text=\"Additional information\">\n * <div slot=\"title\">Title</div>\n * <div slot=\"actions\">\n * <button>Action</button>\n * </div>\n * <div>Main content</div>\n * <div slot=\"footer\">Footer content</div>\n * </bcm-accordion>\n *\n * @example Event handling\n * // Listen to accordion state changes\n * const accordion = document.querySelector('bcm-accordion');\n * accordion.addEventListener('bcmAccordionChange', (event) => {\n * const { expanded, source } = event.detail;\n * console.log('Accordion expanded:', expanded);\n * console.log('Changed accordion:', source);\n * });\n *\n * // Programmatically control accordion\n * await accordion.toggle(); // Toggle state\n * await accordion.expand(); // Expand accordion\n * await accordion.collapse(); // Collapse accordion\n *\n * @prop {boolean} expanded - Controls the expanded state of the accordion (default: false)\n * @prop {boolean} group - Indicates if the accordion is part of an accordion group (default: false)\n * @prop {string} hintText - Optional hint text to display in the footer when no footer content is provided\n *\n * @slot title - Primary title content for the accordion header (required)\n * @slot actions - Additional actions to be displayed in the header (optional)\n * @slot default - Main content area of the accordion\n * @slot footer - Optional footer content (overrides hint-text if provided)\n *\n * @event {EventEmitter<AccordionChangeEventType>} bcmAccordionChange - Emitted when the accordion's expanded state changes\n * @eventProperty {boolean} expanded - Current expanded state\n * @eventProperty {HTMLBcmAccordionElement} source - Reference to the accordion element that changed\n *\n * @csspart container - The root container element\n * @csspart header - The header section with title and actions\n * @csspart content - The collapsible content section\n * @csspart footer - The footer section with hint text or footer slot\n * @csspart section - Container for header content sections\n * @csspart icon - The expand/collapse chevron icon\n *\n * @css {string} --bcm-accordion-radius - Border radius of the accordion header (default: 4px)\n * @css {string} --bcm-accordion-bg - Background color of the accordion header\n * @css {string} --bcm-accordion-text - Text color of the accordion\n * @css {string} --bcm-accordion-footer-bg - Background color of the footer section\n *\n * @methods\n * toggle() - Toggles the accordion's expanded state\n * expand() - Expands the accordion if collapsed\n * collapse() - Collapses the accordion if expanded\n */\n@Component({\n tag: 'bcm-accordion',\n styleUrl: 'accordion.css',\n shadow: true,\n})\nexport class BcmAccordion implements ComponentInterface {\n /** Reference to the host element */\n @Element() host: HTMLElement;\n\n /**\n * Controls whether the accordion is expanded or collapsed.\n * @prop\n * @defaultValue false\n */\n @Prop({ reflect: true, mutable: true })\n expanded: boolean = false;\n\n /**\n * Optional title text to display in the header.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n headerTitle?: string;\n\n /**\n * Indicates if the accordion is part of a group.\n * Used for group behavior coordination.\n * @prop\n * @defaultValue false\n */\n\n @Prop({ reflect: true })\n group: boolean = false;\n\n /**\n * Optional text to display in the footer when no footer slot content is provided.\n * @prop\n */\n @Prop({ attribute: 'hint-text' })\n hintText?: string;\n\n /**\n * Tracks whether footer content is present.\n * @state\n */\n @State()\n hasFooterContent: boolean = false;\n\n /**\n * Emitted when the accordion's expanded state changes.\n * @event\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmAccordionChange',\n })\n bcmAccordionChange: EventEmitter<AccordionChangeEventType>;\n\n private contentEl?: HTMLElement;\n\n /**\n * Toggles the accordion's expanded state.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async toggle(): Promise<void> {\n this.expanded = !this.expanded;\n this.updateAccordion();\n }\n\n /**\n * Expands the accordion if it's not already expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async expand(): Promise<void> {\n if (!this.expanded) {\n this.expanded = true;\n this.updateAccordion();\n }\n }\n\n /**\n * Collapses the accordion if it's currently expanded.\n * @method\n * @returns Promise<void>\n */\n @Method()\n async collapse(): Promise<void> {\n if (this.expanded) {\n this.expanded = false;\n this.updateAccordion();\n }\n }\n\n /**\n * Updates the accordion's content height and emits change event.\n * @private\n */\n private updateAccordion(): void {\n if (this.contentEl) {\n this.contentEl.style.maxHeight = this.expanded ? `${this.contentEl.scrollHeight}px` : '0px';\n }\n this.bcmAccordionChange.emit({ expanded: this.expanded, source: this.host as HTMLBcmAccordionElement });\n }\n\n /**\n * Handles changes to the footer slot content.\n * @private\n * @param e - Slot change event\n */\n private handleFooterSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement;\n const assignedNodes = slot.assignedNodes();\n this.hasFooterContent = assignedNodes.length > 0;\n };\n\n private accordionClass = tv(\n {\n slots: {\n container: 'accordion-container flex flex-col bcm-ui-element w-full ',\n header:\n 'accordion-header flex flex-row justify-between gap-2 p-4 w-full flex-nowrap rounded-[--bcm-accordion-radius] bg-[--bcm-accordion-bg] text-[--bcm-accordion-text] font-semibold text-size-6 cursor-pointer',\n content: 'accordion-content overflow-hidden transition-all duration-300 ease-in-out bg-color-basic-base',\n footer: 'accordion-footer flex flex-row w-full flex-nowrap bg-[--bcm-accordion-footer-bg] text-[--bcm-accordion-text] px-4 py-2 gap-2 text-size-4 font-normal',\n icon: 'accordion-icon cursor-pointer transform transition-transform duration-300',\n rightSection: 'accordion-right-section flex flex-row gap-2.5 items-center',\n },\n variants: {\n hasFooterContent: {\n false: { footer: 'hidden' },\n true: { footer: 'flex' },\n },\n expanded: {\n true: { icon: 'rotate-180' },\n false: {\n icon: 'rotate-0',\n content: '',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { container, header, content, footer, icon, rightSection } = this.accordionClass({\n hasFooterContent: this.hasFooterContent || !!this.hintText,\n expanded: this.expanded,\n });\n\n return (\n <div class={container()}>\n {/* Header */}\n <header\n class={header()}\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.expanded.toString()}\n aria-controls=\"accordion-content\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.toggle();\n }\n }}\n onClick={() => this.toggle()}\n >\n <slot name=\"title\">{this.headerTitle}</slot>\n {/* Actions */}\n <div class={rightSection()}>\n <span onClick={e => e.stopPropagation()}>\n <slot name=\"actions\"></slot>\n </span>\n <bcm-icon name=\"fa-regular fa-chevron-down\" class={icon()}></bcm-icon>\n </div>\n </header>\n {/* Content */}\n <div class={content()} style={{ maxHeight: this.expanded ? 'auto' : '0px' }} ref={el => (this.contentEl = el as HTMLElement)}>\n <div class=\"px-4 py-2\">\n <slot></slot>\n </div>\n <footer class={footer()}>\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange}>\n {this.hintText}\n </slot>\n </footer>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
.block{display:block}.flex{display:flex}.border{border-width:1px}:host{--bcm-accordion-bg:var(--bcm-ui-color-background-basic-panel);--bcm-accordion-content-bg:var(--bcm-ui-color-background-basic-base);--bcm-accordion-text:var(--bcm-ui-color-text-header);--bcm-accordion-border:var(--bcm-ui-color-border-default);--bcm-accordion-radius:6px;--bcm-accordion-footer-bg:var(--bcm-ui-color-background-default-default);display:block;width:100%}:host(:not([group])) .accordion-container{border:1px solid var(--bcm-accordion-border);border-radius:var(--bcm-accordion-radius)}:host([group]) .accordion-container{border-bottom:1px solid var(--bcm-accordion-border);border-radius:0}:host([group]:last-of-type) .accordion-container{border-bottom:none}:host([group]:first-of-type) .accordion-container{border-top-left-radius:var(--bcm-accordion-radius);border-top-right-radius:var(--bcm-accordion-radius)}:host([group]:last-of-type) .accordion-footer{border-bottom-left-radius:var(--bcm-accordion-radius);border-bottom-right-radius:var(--bcm-accordion-radius)}:host(:not([group])) .accordion-footer{border-bottom-left-radius:var(--bcm-accordion-radius);border-bottom-right-radius:var(--bcm-accordion-radius)}::slotted([slot=title]){align-items:center;display:flex;flex-direction:row;gap:10px}::slotted([slot=actions]){align-items:center;display:flex;flex-direction:row;gap:12px}.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}.collapse{visibility:collapse}.static{position:static}.hidden{display:none}.w-full{width:100%}.rotate-0{--tw-rotate:0deg}.rotate-0,.rotate-180{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))}.rotate-180{--tw-rotate:180deg}.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))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.overflow-hidden{overflow:hidden}.rounded-\[--bcm-accordion-radius\]{border-radius:var(--bcm-accordion-radius)}.bg-\[--bcm-accordion-bg\]{background-color:var(--bcm-accordion-bg)}.bg-\[--bcm-accordion-footer-bg\]{background-color:var(--bcm-accordion-footer-bg)}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-\[--bcm-accordion-text\]{color:var(--bcm-accordion-text)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}
|
|
@@ -129,7 +129,7 @@ export class BcmAccordionGroup {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h("div", { key: '
|
|
132
|
+
return (h("div", { key: '0f246414941ec5215aa36b0a7c063e8782d0db2a', class: "flex flex-col bcm-ui-element w-full border border-[--bcm-accordion-border] rounded-[--bcm-accordion-radius]", role: "group", "aria-label": "Accordion group" }, h("slot", { key: 'b4ea13c00603855d4629fc9cfc0d85c64ef5bce7', onSlotchange: this.handleSlotChange })));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "bcm-accordion-group"; }
|
|
135
135
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
.block{display:block}:host{--bcm-accordion-border:var(--bcm-ui-color-border-default);--bcm-accordion-radius:6px;display:block;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.collapse{visibility:collapse}.static{position:static}.flex{display:flex}.w-full{width:100%}.flex-col{flex-direction:column}.rounded-\[--bcm-accordion-radius\]{border-radius:var(--bcm-accordion-radius)}.border{border-width:1px}.border-\[--bcm-accordion-border\]{border-color:var(--bcm-accordion-border)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{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)}
|
|
@@ -83,7 +83,7 @@ export class BcmAlert {
|
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
85
|
const { base, section } = this.alertClass({ size: this.size });
|
|
86
|
-
return (h("div", { key: '
|
|
86
|
+
return (h("div", { key: 'c1cd1054d0b922391f3cfefc9c235467f7775702', role: "alert", "aria-live": "assertive", "aria-atomic": "true", class: base(), style: this.alertStyles }, h("div", { key: '370803a74a81754a5e3b34c85e9fb9e8f1d79f1e', class: section() }, this.showStatusIcon && h("bcm-icon", { key: 'dca6a4bb6009c9c5a1090d787f8e332c5db49034', "icon-name": this.getStatusIcon() }), h("slot", { key: 'd43da27453a067784da5a3e117ad685783283f2f' })), h("div", { key: '3173e4bfb61d5817679f77689a62e74128ccfbe0', class: section() }, h("div", { key: '922c11093ae01a206dae99ac71b57c8afb14048b', part: "action" }, h("slot", { key: '3a470f25317d0fcbada630464ed74e4593a1a75c', name: "action" })), h("span", { key: '89595ade17c791b22ed5a98d2559b87877839308', part: "icon" }, this.dismissible && h("bcm-icon", { key: '93056d5c2057555d61b2e7ad246e7b163456843e', onClick: () => this.onDismiss(), class: "cursor-pointer", "icon-name": "fa-regular fa-xmark" })))));
|
|
87
87
|
}
|
|
88
88
|
static get is() { return "bcm-alert"; }
|
|
89
89
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:host{--bcm-alert-bg:var(--bcm-ui-color-background-default-default);--bcm-alert-text:var(--bcm-ui-color-text-default);--bcm-alert-radius:6px;display:inline-block;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.flex{display:flex}.w-full{width:100%}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.rounded-\[--bcm-alert-radius\]{border-radius:var(--bcm-alert-radius)}.bg-\[--bcm-alert-bg\]{background-color:var(--bcm-alert-bg)}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.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)}.font-medium{font-weight:500}.text-\[--bcm-alert-text\]{color:var(--bcm-alert-text)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:host{--bcm-avatar-bg:var(--bcm-ui-color-background-default-default);--bcm-avatar-text:var(--bcm-ui-color-text-default);--bcm-avatar-radius:50%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.-right-0\.5{right:-.125rem}.-top-0\.5{top:-.125rem}.right-0{right:0}.top-0{top:0}.inline-flex{display:inline-flex}.h-10{height:2.5rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.w-10{width:2.5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-\[--bcm-ui-radius\]{border-radius:var(--bcm-ui-radius)}.rounded-full{border-radius:9999px}.bg-\[--bcm-avatar-bg\]{background-color:var(--bcm-avatar-bg)}.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)}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.text-\[--bcm-avatar-text\]{color:var(--bcm-avatar-text)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}
|
|
@@ -35,7 +35,7 @@ export class BcmButton {
|
|
|
35
35
|
this.bcmBlur.emit(event);
|
|
36
36
|
};
|
|
37
37
|
this.buttonClass = tv({
|
|
38
|
-
base: 'bcm-button appearance-none inline-flex items-center justify-center border rounded',
|
|
38
|
+
base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',
|
|
39
39
|
variants: {
|
|
40
40
|
size: {
|
|
41
41
|
small: 'text-size-4 py-px px-2 min-h-6',
|
|
@@ -130,13 +130,13 @@ export class BcmButton {
|
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
132
|
const { icon, position } = this.buttonIcon;
|
|
133
|
-
return (h(Host, { key: '
|
|
133
|
+
return (h(Host, { key: '72bb1d2567880894e0c4c7667670e267faa9a6dd' }, h("button", { key: 'a1101e3c0846c6bf1c7059a8992b0b46fce74f8b', type: this.type, disabled: this.disabled || this.loading, "aria-label": this.label, "aria-expanded": this.expanded, "aria-controls": this.controls, "aria-disabled": this.disabled, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur, style: this.buttonStyles, class: this.buttonClass({
|
|
134
134
|
size: this.size,
|
|
135
135
|
kind: this.kind,
|
|
136
136
|
fullWidth: this.fullWidth,
|
|
137
137
|
disabled: this.disabled,
|
|
138
138
|
loading: this.loading,
|
|
139
|
-
}) }, this.loading && h("slot", { key: '
|
|
139
|
+
}) }, this.loading && h("slot", { key: 'c8a58aac8903477638cec974e32cdcd728e1ee8d', name: "loading" }), h("span", { key: '9690dfa5a312885da070ff90036b898c06f69621' }, h("slot", { key: '66eed1efbf522aec86d32ddbf0e9e8e68cbbb592', name: "prefix" }, position === 'prefix' && icon && h("i", { key: 'b0f91818830bd7e74d3d5cb6f957fa05f15b29a5', class: ' leading-none ' + icon }))), h("slot", { key: '7dbb0221b6119d61bc94c67355659e99a5bc75f5' }, this.buttonText), h("span", { key: 'd7547cc65575eef30ee8816b40de4485b0286b83' }, h("slot", { key: '32bd079256e6ca4a74572a726d459a3cb691a3ed', name: "suffix" }, position === 'suffix' && icon && h("i", { key: '66c307ec0637537986cb454f5cf718afc5715529', class: ' leading-none ' + icon }))))));
|
|
140
140
|
}
|
|
141
141
|
static get is() { return "bcm-button"; }
|
|
142
142
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition, 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 /** 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 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\n return kindStyleMap[this.kind];\n }\n\n private buttonClass = tv(\n {\n base: 'bcm-button appearance-none inline-flex items-center justify-center border rounded',\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-button-bg] text-[--bcm-button-text] border-[--bcm-button-border]',\n 'hover:bg-[--bcm-button-bg-hover]',\n 'active:bg-[--bcm-button-bg-active]',\n 'focus-visible:ring',\n ],\n },\n loading: {\n true: '',\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 })}\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"]}
|
|
1
|
+
{"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAiF,cAAc,EAAE,MAAM,SAAS,CAAC;AACxH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAOvC,MAAM,OAAO,SAAS;IALtB;QAME,kDAAkD;QAElD,SAAI,GAAe,SAAS,CAAC;QAE7B,+BAA+B;QAE/B,SAAI,GAAe,QAAQ,CAAC;QAE5B,8CAA8C;QAE9C,WAAM,GAAiB,SAAS,CAAC;QAUjC,qCAAqC;QAErC,iBAAY,GAAiB,QAAQ,CAAC;QAEtC,4BAA4B;QAE5B,aAAQ,GAAG,KAAK,CAAC;QAEjB,wBAAwB;QAExB,cAAS,GAAG,KAAK,CAAC;QAElB,uBAAuB;QAEvB,SAAI,GAAe,QAAQ,CAAC;QAE5B,oBAAoB;QAEpB,YAAO,GAAG,KAAK,CAAC;QAEhB,qBAAqB;QAErB,aAAQ,GAAG,KAAK,CAAC;QAMjB,mBAAmB;QAEnB,WAAM,GAAG,KAAK,CAAC;QA6CP,g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AAQ;oBACvB,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC;gBAED,IAAI,CAAC,OAAO,IAAI,6DAAM,IAAI,EAAC,SAAS,GAAQ;gBAC7C;oBACE,6DAAM,IAAI,EAAC,QAAQ,IAAE,QAAQ,KAAK,QAAQ,IAAI,IAAI,IAAI,0DAAG,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAM,CAAQ,CAChG;gBACP,+DAAO,IAAI,CAAC,UAAU,CAAQ;gBAC9B;oBACE,6DAAM,IAAI,EAAC,QAAQ,IAAE,QAAQ,KAAK,QAAQ,IAAI,IAAI,IAAI,0DAAG,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAM,CAAQ,CAChG,CACA,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition, 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 /** 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 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\n return kindStyleMap[this.kind];\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-button-bg] text-[--bcm-button-text] border-[--bcm-button-border]',\n 'hover:bg-[--bcm-button-bg-hover]',\n 'active:bg-[--bcm-button-bg-active]',\n 'focus-visible:ring',\n ],\n },\n loading: {\n true: '',\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 })}\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:host{display:inline-block}:host([full-width]){width:100%}.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:.25rem}.border{border-width:1px}.border-solid{border-style:solid}.border-\[--bcm-button-border\]{border-color:var(--bcm-button-border)}.bg-\[--bcm-button-bg\]{background-color:var(--bcm-button-bg)}.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-button-text\]{color:var(--bcm-button-text)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);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-button-bg-hover\]:hover{background-color:var(--bcm-button-bg-hover)}.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-button-bg-active\]:active{background-color:var(--bcm-button-bg-active)}
|
|
@@ -131,7 +131,7 @@ export class BcmChip {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
render() {
|
|
134
|
-
return (h("div", { key: '
|
|
134
|
+
return (h("div", { key: '83c822b736059446f9f19c9112ab8b11a1aa17b9', style: this.chipStyle, class: this.chipClass({ size: this.size, kind: this.kind, disabled: this.disabled }), role: "button", "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", { key: 'ef139f27de5b6f3d1c0077a08882fd965b0745c8' }), this.dismissible && h("bcm-icon", { key: '7ac646b4641eb8bd8db9df3e25895bf5b45231c5', onClick: () => this.handleDismiss(), class: "cursor-pointer", "icon-name": "fa-regular fa-xmark", "aria-label": "Dismiss chip" })));
|
|
135
135
|
}
|
|
136
136
|
static get is() { return "bcm-chip"; }
|
|
137
137
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:host{--bcm-chip-bg:var(--bcm-ui-color-background-default-default);--bcm-chip-text:var(--bcm-ui-color-text-default);--bcm-chip-border:var(--bcm-ui-color-border-default);--bcm-chip-hover-bg:var(--bcm-ui-color-background-default-hover);--bcm-chip-active-bg:var(--bcm-ui-color-background-default-active);--bcm-chip-radius:6px;display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.flex{display:flex}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.gap-1{gap:.25rem}.rounded-\[--bcm-chip-radius\]{border-radius:var(--bcm-chip-radius)}.border{border-width:1px}.border-none{border-style:none}.border-\[--bcm-chip-border\]{border-color:var(--bcm-chip-border)}.border-transparent{border-color:transparent}.bg-\[--bcm-chip-bg\]{background-color:var(--bcm-chip-bg)}.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}.py-px{padding-bottom:1px;padding-top:1px}.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-normal{font-weight:400}.text-\[--bcm-chip-text\]{color:var(--bcm-chip-text)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:bg-\[--bcm-chip-hover-bg\]:hover{background-color:var(--bcm-chip-hover-bg)}.active\:bg-\[--bcm-chip-active-bg\]:active{background-color:var(--bcm-chip-active-bg)}
|