bromcom-ui-next 0.1.0
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/LICENSE +21 -0
- package/dist/bromcom-ui/bromcom-ui.css +1 -0
- package/dist/bromcom-ui/bromcom-ui.esm.js +2 -0
- package/dist/bromcom-ui/bromcom-ui.esm.js.map +1 -0
- package/dist/bromcom-ui/global/global.js +40 -0
- package/dist/bromcom-ui/index.esm.js +2 -0
- package/dist/bromcom-ui/index.esm.js.map +1 -0
- package/dist/bromcom-ui/p-27c997d8.js +3 -0
- package/dist/bromcom-ui/p-27c997d8.js.map +1 -0
- package/dist/bromcom-ui/p-341d46a8.entry.js +2 -0
- package/dist/bromcom-ui/p-341d46a8.entry.js.map +1 -0
- package/dist/bromcom-ui/p-40643b53.js +2 -0
- package/dist/bromcom-ui/p-40643b53.js.map +1 -0
- package/dist/bromcom-ui/p-5fcf77f9.js +2 -0
- package/dist/bromcom-ui/p-5fcf77f9.js.map +1 -0
- package/dist/bromcom-ui/p-997f314c.entry.js +2 -0
- package/dist/bromcom-ui/p-997f314c.entry.js.map +1 -0
- package/dist/bromcom-ui/p-b36f4f44.js +7 -0
- package/dist/bromcom-ui/p-b36f4f44.js.map +1 -0
- package/dist/bromcom-ui/p-dcb9df00.entry.js +2 -0
- package/dist/bromcom-ui/p-dcb9df00.entry.js.map +1 -0
- package/dist/bromcom-ui/p-f0c61f8c.entry.js +2 -0
- package/dist/bromcom-ui/p-f0c61f8c.entry.js.map +1 -0
- package/dist/cjs/app-globals-e8faea0d.js +43 -0
- package/dist/cjs/app-globals-e8faea0d.js.map +1 -0
- package/dist/cjs/bcm-accordion_4.cjs.entry.js +623 -0
- package/dist/cjs/bcm-accordion_4.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +99 -0
- package/dist/cjs/bcm-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-avatar.cjs.entry.js +89 -0
- package/dist/cjs/bcm-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-text.cjs.entry.js +119 -0
- package/dist/cjs/bcm-text.cjs.entry.js.map +1 -0
- package/dist/cjs/bromcom-ui.cjs.js +27 -0
- package/dist/cjs/bromcom-ui.cjs.js.map +1 -0
- package/dist/cjs/index-310db2a6.js +2584 -0
- package/dist/cjs/index-310db2a6.js.map +1 -0
- package/dist/cjs/index-638f2d15.js +1441 -0
- package/dist/cjs/index-638f2d15.js.map +1 -0
- package/dist/cjs/index-a4eea4bb.js +84 -0
- package/dist/cjs/index-a4eea4bb.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +18 -0
- package/dist/collection/components/accordion/accordion.component.js +399 -0
- package/dist/collection/components/accordion/accordion.component.js.map +1 -0
- package/dist/collection/components/accordion/accordion.css +1 -0
- package/dist/collection/components/accordion/types.js +2 -0
- package/dist/collection/components/accordion/types.js.map +1 -0
- package/dist/collection/components/accordion-group/accordion-group.component.js +269 -0
- package/dist/collection/components/accordion-group/accordion-group.component.js.map +1 -0
- package/dist/collection/components/accordion-group/accordion-group.css +1 -0
- package/dist/collection/components/accordion-group/types.js +2 -0
- package/dist/collection/components/accordion-group/types.js.map +1 -0
- package/dist/collection/components/alert/alert.component.js +241 -0
- package/dist/collection/components/alert/alert.component.js.map +1 -0
- package/dist/collection/components/alert/alert.css +1 -0
- package/dist/collection/components/alert/types.js +2 -0
- package/dist/collection/components/alert/types.js.map +1 -0
- package/dist/collection/components/avatar/avatar.component.js +290 -0
- package/dist/collection/components/avatar/avatar.component.js.map +1 -0
- package/dist/collection/components/avatar/avatar.css +1 -0
- package/dist/collection/components/avatar/types.js +2 -0
- package/dist/collection/components/avatar/types.js.map +1 -0
- package/dist/collection/components/button/button.component.js +628 -0
- package/dist/collection/components/button/button.component.js.map +1 -0
- package/dist/collection/components/button/button.css +1 -0
- package/dist/collection/components/button/types.js +142 -0
- package/dist/collection/components/button/types.js.map +1 -0
- package/dist/collection/components/chip/chip.component.js +308 -0
- package/dist/collection/components/chip/chip.component.js.map +1 -0
- package/dist/collection/components/chip/chip.css +1 -0
- package/dist/collection/components/chip/types.js +7 -0
- package/dist/collection/components/chip/types.js.map +1 -0
- package/dist/collection/components/text/text.component.js +176 -0
- package/dist/collection/components/text/text.component.js.map +1 -0
- package/dist/collection/components/text/text.css +1 -0
- package/dist/collection/components/text/text.types.js +2 -0
- package/dist/collection/components/text/text.types.js.map +1 -0
- package/dist/collection/components/text/text.utils.js +18 -0
- package/dist/collection/components/text/text.utils.js.map +1 -0
- package/dist/collection/global/global.js +40 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/styles/theme-variables.js +355 -0
- package/dist/collection/styles/theme-variables.js.map +1 -0
- package/dist/components/bcm-accordion-group.d.ts +11 -0
- package/dist/components/bcm-accordion-group.js +113 -0
- package/dist/components/bcm-accordion-group.js.map +1 -0
- package/dist/components/bcm-accordion.d.ts +11 -0
- package/dist/components/bcm-accordion.js +152 -0
- package/dist/components/bcm-accordion.js.map +1 -0
- package/dist/components/bcm-alert.d.ts +11 -0
- package/dist/components/bcm-alert.js +120 -0
- package/dist/components/bcm-alert.js.map +1 -0
- package/dist/components/bcm-avatar.d.ts +11 -0
- package/dist/components/bcm-avatar.js +115 -0
- package/dist/components/bcm-avatar.js.map +1 -0
- package/dist/components/bcm-button.d.ts +11 -0
- package/dist/components/bcm-button.js +334 -0
- package/dist/components/bcm-button.js.map +1 -0
- package/dist/components/bcm-chip.d.ts +11 -0
- package/dist/components/bcm-chip.js +152 -0
- package/dist/components/bcm-chip.js.map +1 -0
- package/dist/components/bcm-text.d.ts +11 -0
- package/dist/components/bcm-text.js +138 -0
- package/dist/components/bcm-text.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +38 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/p-0adcc84f.js +1222 -0
- package/dist/components/p-0adcc84f.js.map +1 -0
- package/dist/components/p-5fcf77f9.js +2582 -0
- package/dist/components/p-5fcf77f9.js.map +1 -0
- package/dist/components/p-b36f4f44.js +82 -0
- package/dist/components/p-b36f4f44.js.map +1 -0
- package/dist/esm/app-globals-f781c325.js +41 -0
- package/dist/esm/app-globals-f781c325.js.map +1 -0
- package/dist/esm/bcm-accordion_4.entry.js +616 -0
- package/dist/esm/bcm-accordion_4.entry.js.map +1 -0
- package/dist/esm/bcm-alert.entry.js +95 -0
- package/dist/esm/bcm-alert.entry.js.map +1 -0
- package/dist/esm/bcm-avatar.entry.js +85 -0
- package/dist/esm/bcm-avatar.entry.js.map +1 -0
- package/dist/esm/bcm-text.entry.js +115 -0
- package/dist/esm/bcm-text.entry.js.map +1 -0
- package/dist/esm/bromcom-ui.js +22 -0
- package/dist/esm/bromcom-ui.js.map +1 -0
- package/dist/esm/index-ce2fac11.js +1412 -0
- package/dist/esm/index-ce2fac11.js.map +1 -0
- package/dist/esm/index-f0e9d579.js +82 -0
- package/dist/esm/index-f0e9d579.js.map +1 -0
- package/dist/esm/index-f3b17e60.js +2582 -0
- package/dist/esm/index-f3b17e60.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/accordion/accordion.component.d.ts +137 -0
- package/dist/types/components/accordion/types.d.ts +16 -0
- package/dist/types/components/accordion-group/accordion-group.component.d.ts +95 -0
- package/dist/types/components/accordion-group/types.d.ts +13 -0
- package/dist/types/components/alert/alert.component.d.ts +28 -0
- package/dist/types/components/alert/types.d.ts +3 -0
- package/dist/types/components/avatar/avatar.component.d.ts +24 -0
- package/dist/types/components/avatar/types.d.ts +3 -0
- package/dist/types/components/button/button.component.d.ts +52 -0
- package/dist/types/components/button/types.d.ts +15 -0
- package/dist/types/components/chip/chip.component.d.ts +48 -0
- package/dist/types/components/chip/types.d.ts +9 -0
- package/dist/types/components/text/text.component.d.ts +12 -0
- package/dist/types/components/text/text.types.d.ts +3 -0
- package/dist/types/components/text/text.utils.d.ts +2 -0
- package/dist/types/components.d.ts +1116 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/styles/theme-variables.d.ts +384 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +49 -0
- package/readme.md +170 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { AccordionChangeEventType } from '../accordion/types';
|
|
3
|
+
import { AccordionGroupChangeEventType } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* @component BcmAccordionGroup
|
|
6
|
+
* @description A container component that manages a group of accordions. Provides single/multiple expansion
|
|
7
|
+
* modes and methods for controlling all accordions simultaneously. Uses shadow DOM for style encapsulation.
|
|
8
|
+
*
|
|
9
|
+
* @example Basic usage - Single expansion mode
|
|
10
|
+
* <bcm-accordion-group>
|
|
11
|
+
* <bcm-accordion>
|
|
12
|
+
* <div slot="title">Section 1</div>
|
|
13
|
+
* <div>Content 1</div>
|
|
14
|
+
* </bcm-accordion>
|
|
15
|
+
* <bcm-accordion>
|
|
16
|
+
* <div slot="title">Section 2</div>
|
|
17
|
+
* <div>Content 2</div>
|
|
18
|
+
* </bcm-accordion>
|
|
19
|
+
* </bcm-accordion-group>
|
|
20
|
+
*
|
|
21
|
+
* @example Multiple expansion mode
|
|
22
|
+
* <bcm-accordion-group multi={true}>
|
|
23
|
+
* <bcm-accordion>...</bcm-accordion>
|
|
24
|
+
* <bcm-accordion>...</bcm-accordion>
|
|
25
|
+
* </bcm-accordion-group>
|
|
26
|
+
*
|
|
27
|
+
* @example Event handling
|
|
28
|
+
* // Listen to accordion group changes
|
|
29
|
+
* const accordionGroup = document.querySelector('bcm-accordion-group');
|
|
30
|
+
* accordionGroup.addEventListener('bcmAccordionGroupChange', (event) => {
|
|
31
|
+
* const { expanded, changed, expandedItems, expandedCount } = event.detail;
|
|
32
|
+
* console.log('Accordion expanded state:', expanded);
|
|
33
|
+
* console.log('Changed accordion:', changed);
|
|
34
|
+
* console.log('Currently expanded accordions:', expandedItems);
|
|
35
|
+
* console.log('Number of expanded accordions:', expandedCount);
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* // Using methods
|
|
39
|
+
* await accordionGroup.expandAll(); // Expands all accordions (only in multi mode)
|
|
40
|
+
* await accordionGroup.collapseAll(); // Collapses all accordions
|
|
41
|
+
* const expanded = await accordionGroup.getExpandedItems(); // Gets expanded accordions
|
|
42
|
+
*
|
|
43
|
+
* @prop {boolean} multi - Controls whether multiple accordions can be expanded simultaneously (default: false)
|
|
44
|
+
*
|
|
45
|
+
* @slot default - Container slot for bcm-accordion components
|
|
46
|
+
*
|
|
47
|
+
* @event {EventEmitter<AccordionGroupChangeEventType>} bcmAccordionGroupChange - Emitted when any accordion's state changes
|
|
48
|
+
* @eventProperty {boolean} expanded - Current expanded state of the changed accordion
|
|
49
|
+
* @eventProperty {HTMLElement} changed - The accordion element that triggered the change
|
|
50
|
+
* @eventProperty {HTMLElement[]} expandedItems - Array of currently expanded accordion elements
|
|
51
|
+
* @eventProperty {number} expandedCount - Number of currently expanded accordions
|
|
52
|
+
*
|
|
53
|
+
* @method expandAll() - Expands all accordions (only available in multi mode)
|
|
54
|
+
* @method collapseAll() - Collapses all accordions
|
|
55
|
+
* @method getExpandedItems() - Returns array of currently expanded accordions
|
|
56
|
+
*
|
|
57
|
+
* @csspart container - The accordion group container element
|
|
58
|
+
*
|
|
59
|
+
* @css {string} --bcm-accordion-border - Border color of the accordion group
|
|
60
|
+
* @css {string} --bcm-accordion-radius - Border radius of the accordion group
|
|
61
|
+
*/
|
|
62
|
+
export declare class BcmAccordionGroup implements ComponentInterface {
|
|
63
|
+
/** Reference to the host element */
|
|
64
|
+
host: HTMLElement;
|
|
65
|
+
/** Controls whether multiple accordions can be expanded simultaneously */
|
|
66
|
+
multi: boolean;
|
|
67
|
+
/** Array of accordion elements within the group */
|
|
68
|
+
accordionItems: HTMLBcmAccordionElement[];
|
|
69
|
+
/** Event emitted when any accordion's expanded state changes */
|
|
70
|
+
bcmAccordionGroupChange: EventEmitter<AccordionGroupChangeEventType>;
|
|
71
|
+
/**
|
|
72
|
+
* Expands all accordions in the group
|
|
73
|
+
* Only available when multi=true
|
|
74
|
+
*/
|
|
75
|
+
expandAll(): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Collapses all accordions in the group
|
|
78
|
+
*/
|
|
79
|
+
collapseAll(): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns an array of currently expanded accordion elements
|
|
82
|
+
*/
|
|
83
|
+
getExpandedItems(): Promise<HTMLBcmAccordionElement[]>;
|
|
84
|
+
componentWillLoad(): void;
|
|
85
|
+
private setGroupBehavior;
|
|
86
|
+
/**
|
|
87
|
+
* Updates the accordion items array when slot content changes
|
|
88
|
+
*/
|
|
89
|
+
private handleSlotChange;
|
|
90
|
+
/**
|
|
91
|
+
* Handles state changes of individual accordions
|
|
92
|
+
*/
|
|
93
|
+
handleAccordionChange(event: CustomEvent<AccordionChangeEventType>): void;
|
|
94
|
+
render(): any;
|
|
95
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseAccordionChangeEventType } from '../accordion/types';
|
|
2
|
+
/**
|
|
3
|
+
* Type for accordion group change events
|
|
4
|
+
* @extends BaseAccordionChangeEventType
|
|
5
|
+
*/
|
|
6
|
+
export type AccordionGroupChangeEventType = BaseAccordionChangeEventType & {
|
|
7
|
+
/** The accordion element that triggered the change */
|
|
8
|
+
changed?: HTMLElement;
|
|
9
|
+
/** List of currently expanded accordion elements */
|
|
10
|
+
expandedItems?: HTMLElement[];
|
|
11
|
+
/** Number of currently expanded accordions */
|
|
12
|
+
expandedCount?: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { AlertKind, AlertSize, AlertStatus } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Alert component that displays messages with different statuses and styles
|
|
5
|
+
* @class BcmAlert
|
|
6
|
+
*/
|
|
7
|
+
export declare class BcmAlert implements ComponentInterface {
|
|
8
|
+
/** Alert status type */
|
|
9
|
+
status?: AlertStatus;
|
|
10
|
+
/** Alert size variant */
|
|
11
|
+
size?: AlertSize;
|
|
12
|
+
/** Alert style variant */
|
|
13
|
+
kind?: AlertKind;
|
|
14
|
+
/** Whether alert can be dismissed */
|
|
15
|
+
dismissible?: boolean;
|
|
16
|
+
/** Whether to show status icon */
|
|
17
|
+
showStatusIcon?: boolean;
|
|
18
|
+
bcmDismiss: EventEmitter<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Handles alert dismissal
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
private onDismiss;
|
|
24
|
+
private getStatusIcon;
|
|
25
|
+
private get alertClass();
|
|
26
|
+
private get alertStyles();
|
|
27
|
+
render(): any;
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AvatarShape, AvatarSize, AvatarStatus } from './types';
|
|
2
|
+
export declare class BcmAvatar {
|
|
3
|
+
/** Source URL for avatar image */
|
|
4
|
+
image: string;
|
|
5
|
+
/** Alternative text for image */
|
|
6
|
+
alt: string;
|
|
7
|
+
/** Shape of the avatar (ellipse/square) */
|
|
8
|
+
shape: AvatarShape;
|
|
9
|
+
/** Size of the avatar */
|
|
10
|
+
size: AvatarSize;
|
|
11
|
+
/** Custom background color */
|
|
12
|
+
color: string;
|
|
13
|
+
/** Fallback icon class */
|
|
14
|
+
icon: string;
|
|
15
|
+
/** Status indicator type */
|
|
16
|
+
status: AvatarStatus;
|
|
17
|
+
/** Status indicator animation */
|
|
18
|
+
blink: boolean;
|
|
19
|
+
/** Display name (used for initials) */
|
|
20
|
+
name: string;
|
|
21
|
+
isFallback: boolean;
|
|
22
|
+
private getFirstLetters;
|
|
23
|
+
render(): any;
|
|
24
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition } from './types';
|
|
3
|
+
export declare class BcmButton {
|
|
4
|
+
/** Defines the main visual style of the button */
|
|
5
|
+
kind: ButtonKind;
|
|
6
|
+
/** Controls the button size */
|
|
7
|
+
size: ButtonSize;
|
|
8
|
+
/** Defines the button's status/state color */
|
|
9
|
+
status: ButtonStatus;
|
|
10
|
+
/** Predefined button variants */
|
|
11
|
+
variant?: ButtonVariant;
|
|
12
|
+
/** Icon class name */
|
|
13
|
+
icon?: string;
|
|
14
|
+
/** Icon placement (prefix/suffix) */
|
|
15
|
+
iconPosition: IconPosition;
|
|
16
|
+
/** Icon-only button mode */
|
|
17
|
+
iconOnly: boolean;
|
|
18
|
+
/** Full width button */
|
|
19
|
+
fullWidth: boolean;
|
|
20
|
+
/** HTML button type */
|
|
21
|
+
type: ButtonType;
|
|
22
|
+
/** Loading state */
|
|
23
|
+
loading: boolean;
|
|
24
|
+
/** Disabled state */
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
/** Button text content */
|
|
27
|
+
text?: string;
|
|
28
|
+
/** Active state */
|
|
29
|
+
active: boolean;
|
|
30
|
+
/** Form association */
|
|
31
|
+
form: string;
|
|
32
|
+
value: string;
|
|
33
|
+
name: string;
|
|
34
|
+
/** Screen reader label */
|
|
35
|
+
label: string;
|
|
36
|
+
/** Expanded state for expandable content */
|
|
37
|
+
expanded?: string;
|
|
38
|
+
/** ID of controlled element */
|
|
39
|
+
controls: string;
|
|
40
|
+
bcmClick: EventEmitter<MouseEvent>;
|
|
41
|
+
bcmFocus: EventEmitter<FocusEvent>;
|
|
42
|
+
bcmBlur: EventEmitter<FocusEvent>;
|
|
43
|
+
private handleClick;
|
|
44
|
+
private handleFocus;
|
|
45
|
+
private handleBlur;
|
|
46
|
+
private get buttonText();
|
|
47
|
+
private get buttonIcon();
|
|
48
|
+
private get buttonStatus();
|
|
49
|
+
private get buttonStyles();
|
|
50
|
+
private buttonClass;
|
|
51
|
+
render(): any;
|
|
52
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ButtonKind = 'primary' | 'ghost' | 'text' | 'outline';
|
|
2
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
3
|
+
export type ButtonType = 'button' | 'reset' | 'submit';
|
|
4
|
+
export type ButtonStatus = 'default' | 'success' | 'error' | 'warning' | 'info';
|
|
5
|
+
export type IconPosition = 'prefix' | 'suffix';
|
|
6
|
+
interface ButtonVariantConfig {
|
|
7
|
+
text: string;
|
|
8
|
+
status: ButtonStatus;
|
|
9
|
+
icon?: string;
|
|
10
|
+
iconPosition?: IconPosition;
|
|
11
|
+
kind?: ButtonKind;
|
|
12
|
+
}
|
|
13
|
+
export declare const variantOptions: Record<string, ButtonVariantConfig>;
|
|
14
|
+
export type ButtonVariant = keyof typeof variantOptions;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { ChipKind, ChipSize, ChipStatus } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @component BcmChip
|
|
5
|
+
* @description A versatile chip component that can be used to display compact pieces of information, filters, or actions.
|
|
6
|
+
* Supports different sizes, styles (filled, outlined, text), statuses, and can be dismissible.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <bcm-chip size="medium" kind="filled" status="success">
|
|
10
|
+
* Success Chip
|
|
11
|
+
* </bcm-chip>
|
|
12
|
+
*
|
|
13
|
+
* @example Dismissible chip
|
|
14
|
+
* <bcm-chip dismissible={true} onDismiss={() => handleDismiss()}>
|
|
15
|
+
* Dismissible Chip
|
|
16
|
+
* </bcm-chip>
|
|
17
|
+
*
|
|
18
|
+
* @prop {ChipSize} size - Defines the size of the chip: 'small' | 'medium' | 'large'
|
|
19
|
+
* @prop {ChipKind} kind - Defines the visual style: 'filled' | 'outlined' | 'text'
|
|
20
|
+
* @prop {ChipStatus} status - Defines the status color: 'info' | 'error' | 'warning' | 'success' | 'default'
|
|
21
|
+
* @prop {boolean} dismissible - Whether the chip can be dismissed
|
|
22
|
+
* @prop {boolean} disabled - Whether the chip is disabled
|
|
23
|
+
* @prop {string} color - Custom color override for the chip
|
|
24
|
+
*
|
|
25
|
+
* @event {EventEmitter<void>} dismiss - Emitted when the dismiss button is clicked
|
|
26
|
+
*
|
|
27
|
+
* @csspart chip - The root chip element
|
|
28
|
+
* @csspart dismiss-icon - The dismiss button icon
|
|
29
|
+
*/
|
|
30
|
+
export declare class BcmChip implements ComponentInterface {
|
|
31
|
+
/** Chip size variant */
|
|
32
|
+
size?: ChipSize;
|
|
33
|
+
/** Chip style variant */
|
|
34
|
+
kind?: ChipKind;
|
|
35
|
+
/** Chip status */
|
|
36
|
+
status?: ChipStatus;
|
|
37
|
+
/** Whether chip can be dismissed */
|
|
38
|
+
dismissible?: boolean;
|
|
39
|
+
/** Whether chip is disabled */
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/** Chip color variant */
|
|
42
|
+
color?: string;
|
|
43
|
+
bcmDismiss: EventEmitter<void>;
|
|
44
|
+
private chipClass;
|
|
45
|
+
private get chipStyle();
|
|
46
|
+
private handleDismiss;
|
|
47
|
+
render(): any;
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ChipSize = 'small' | 'medium' | 'large';
|
|
2
|
+
export type ChipKind = 'filled' | 'outlined' | 'text';
|
|
3
|
+
export type ChipStatus = 'info' | 'error' | 'warning' | 'success' | 'default';
|
|
4
|
+
export declare const STATUS_COLORS: {
|
|
5
|
+
readonly info: "blue";
|
|
6
|
+
readonly error: "red";
|
|
7
|
+
readonly warning: "amber";
|
|
8
|
+
readonly success: "green";
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TextVariant, TextSize } from './text.types';
|
|
2
|
+
export declare class BcmText {
|
|
3
|
+
/** Text content */
|
|
4
|
+
text: string;
|
|
5
|
+
/** Text variant */
|
|
6
|
+
variant: TextVariant;
|
|
7
|
+
/** Text size */
|
|
8
|
+
size: TextSize;
|
|
9
|
+
private readonly variantClassMap;
|
|
10
|
+
private getTextClass;
|
|
11
|
+
render(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type TextVariant = 'display' | 'heading1' | 'heading2' | 'title1' | 'title2' | 'title3' | 'body' | 'bodyAccent' | 'helper' | 'caption' | 'link' | 'label' | 'placeholder' | 'info' | 'infoAccent';
|
|
2
|
+
export type TextSize = 'small' | 'medium' | 'large';
|
|
3
|
+
export type TextTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'label' | 'a';
|