bromcom-ui-next 0.1.8 → 0.1.10
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/bromcom-ui.esm.js.map +1 -1
- package/dist/bromcom-ui/{p-a1aae3ef.entry.js → p-09b53a8f.entry.js} +2 -2
- package/dist/bromcom-ui/{p-49b0e982.entry.js → p-1392a235.entry.js} +2 -2
- package/dist/bromcom-ui/{p-389f1976.entry.js → p-1867c3e6.entry.js} +2 -2
- package/dist/bromcom-ui/p-1d44a091.entry.js +2 -0
- package/dist/bromcom-ui/{p-cee68279.entry.js.map → p-1d44a091.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-2820ad28.entry.js +2 -0
- package/dist/bromcom-ui/p-2820ad28.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-58ee24a8.entry.js → p-2cb15e60.entry.js} +2 -2
- package/dist/bromcom-ui/p-3583888a.entry.js +2 -0
- package/dist/bromcom-ui/{p-9ab4d2be.entry.js.map → p-3583888a.entry.js.map} +1 -1
- package/dist/bromcom-ui/{p-cd271b49.entry.js → p-3d424afc.entry.js} +2 -2
- package/dist/bromcom-ui/p-3ed3885e.entry.js +2 -0
- package/dist/bromcom-ui/{p-a3dbbeaf.entry.js.map → p-3ed3885e.entry.js.map} +1 -1
- package/dist/bromcom-ui/{p-e89ab4a7.entry.js → p-3f153277.entry.js} +2 -2
- package/dist/bromcom-ui/{p-13784cd7.entry.js → p-4762d66b.entry.js} +2 -2
- package/dist/bromcom-ui/{p-bf69fc8a.entry.js → p-4bba4ab4.entry.js} +2 -2
- package/dist/bromcom-ui/{p-9594cebb.js → p-50133556.js} +2 -2
- package/dist/bromcom-ui/{p-d57587e5.entry.js → p-50713153.entry.js} +2 -2
- package/dist/bromcom-ui/{p-056c9348.entry.js → p-5541403c.entry.js} +2 -2
- package/dist/bromcom-ui/p-651a6761.entry.js +2 -0
- package/dist/bromcom-ui/p-651a6761.entry.js.map +1 -0
- package/dist/bromcom-ui/p-79082ca0.entry.js +2 -0
- package/dist/bromcom-ui/p-79082ca0.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-bd0f7e78.entry.js → p-86704b91.entry.js} +2 -2
- package/dist/bromcom-ui/{p-55c4263c.entry.js → p-898d5cf6.entry.js} +2 -2
- package/dist/bromcom-ui/p-9bd6c84d.entry.js +2 -0
- package/dist/bromcom-ui/p-9bd6c84d.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-0d0d6483.entry.js → p-c45d9e50.entry.js} +2 -2
- package/dist/bromcom-ui/{p-625bbd86.entry.js → p-c78b12c3.entry.js} +2 -2
- package/dist/bromcom-ui/{p-1bf71c9b.entry.js → p-d7b636bf.entry.js} +2 -2
- package/dist/bromcom-ui/p-ddf64315.js.map +1 -1
- package/dist/bromcom-ui/{p-c995a48c.entry.js → p-ea274e8b.entry.js} +2 -2
- package/dist/bromcom-ui/p-ea6cdc17.entry.js +2 -0
- package/dist/bromcom-ui/{p-0d273bac.entry.js.map → p-ea6cdc17.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-edfa3b52.entry.js +2 -0
- package/dist/bromcom-ui/p-edfa3b52.entry.js.map +1 -0
- package/dist/cjs/app-globals-e0eef2e9.js.map +1 -1
- package/dist/cjs/bcm-accordion-group.cjs.entry.js +2 -2
- package/dist/cjs/bcm-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- 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-badge.cjs.entry.js +123 -0
- package/dist/cjs/bcm-badge.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-basic-badge.cjs.entry.js +92 -0
- package/dist/cjs/bcm-basic-badge.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
- package/dist/cjs/bcm-button_5.cjs.entry.js +830 -0
- package/dist/cjs/bcm-button_5.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
- package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-divider.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +5 -3
- package/dist/cjs/bcm-input.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-pop-confirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-segmented-picker-option.cjs.entry.js +2 -2
- package/dist/cjs/bcm-segmented-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-switch.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tabs-list.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tabs.cjs.entry.js +1 -1
- package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/accordion.component.js +2 -2
- 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/badge/badge.component.js +2 -2
- package/dist/collection/components/badge/badge.css +1 -1
- package/dist/collection/components/basic-badge/basic-badge.component.js +2 -2
- package/dist/collection/components/basic-badge/basic-badge.css +1 -1
- package/dist/collection/components/button/button.component.js +2 -2
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button-group/button-group.component.js +2 -2
- package/dist/collection/components/checkbox/checkbox.component.js +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/divider/divider.component.js +1 -1
- package/dist/collection/components/dropdown/dropdown.component.js +2 -2
- package/dist/collection/components/dropdown/dropdown.component.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.component.js +2 -2
- package/dist/collection/components/input/input.component.js +4 -2
- package/dist/collection/components/input/input.component.js.map +1 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/linked/linked.component.js +610 -49
- 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.component.js +1 -1
- package/dist/collection/components/popover/popover.component.js +1 -1
- package/dist/collection/components/radio/radio.component.js +1 -1
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/radio-group/radio-group.component.js +2 -2
- package/dist/collection/components/segmented-picker/segmented-picker-option.component.js +2 -2
- package/dist/collection/components/segmented-picker/segmented-picker.component.js +2 -2
- package/dist/collection/components/switch/switch.component.js +2 -2
- package/dist/collection/components/tabs/tabs-content.component.js +1 -1
- package/dist/collection/components/tabs/tabs-list.component.js +1 -1
- package/dist/collection/components/tabs/tabs-trigger.component.js +1 -1
- package/dist/collection/components/tabs/tabs.component.js +1 -1
- package/dist/collection/components/text/text.component.js +28 -1
- package/dist/collection/components/text/text.component.js.map +1 -1
- package/dist/collection/components/text/text.css +1 -1
- package/dist/collection/components/textarea/textarea.component.js +3 -3
- package/dist/collection/components/tooltip/tooltip.component.js +1 -1
- package/dist/components/bcm-accordion-group.js +2 -2
- package/dist/components/bcm-accordion-group.js.map +1 -1
- package/dist/components/bcm-accordion.js +2 -2
- package/dist/components/bcm-alert.js +1 -1
- package/dist/components/bcm-avatar.js +1 -1
- package/dist/components/bcm-badge.js +1 -1
- package/dist/components/bcm-basic-badge.js +3 -3
- package/dist/components/bcm-basic-badge.js.map +1 -1
- package/dist/components/bcm-button-group.js +2 -2
- package/dist/components/bcm-button.js +1 -1
- package/dist/components/bcm-checkbox.js +1 -1
- package/dist/components/bcm-chip.js +2 -2
- package/dist/components/bcm-chip.js.map +1 -1
- package/dist/components/bcm-divider.js +1 -1
- package/dist/components/bcm-dropdown-item.js +2 -2
- package/dist/components/bcm-dropdown.js +5 -5
- package/dist/components/bcm-dropdown.js.map +1 -1
- package/dist/components/bcm-input.js +5 -3
- package/dist/components/bcm-input.js.map +1 -1
- package/dist/components/bcm-linked.js +1 -1
- package/dist/components/bcm-pop-confirm.js +3 -3
- package/dist/components/bcm-popover.js +2 -2
- package/dist/components/bcm-radio-group.js +2 -2
- package/dist/components/bcm-radio.js +2 -2
- package/dist/components/bcm-radio.js.map +1 -1
- package/dist/components/bcm-segmented-picker-option.js +2 -2
- package/dist/components/bcm-segmented-picker.js +2 -2
- package/dist/components/bcm-switch.js +2 -2
- package/dist/components/bcm-tabs-content.js +1 -1
- package/dist/components/bcm-tabs-list.js +1 -1
- package/dist/components/bcm-tabs-trigger.js +1 -1
- package/dist/components/bcm-tabs.js +1 -1
- package/dist/components/bcm-text.js +11 -3
- package/dist/components/bcm-text.js.map +1 -1
- package/dist/components/bcm-textarea.js +3 -3
- package/dist/components/bcm-tooltip.js +2 -2
- package/dist/components/{p-49f20ff7.js → p-2fe931c0.js} +4 -4
- package/dist/components/{p-49f20ff7.js.map → p-2fe931c0.js.map} +1 -1
- package/dist/components/{p-9594cebb.js → p-50133556.js} +2 -2
- package/dist/components/{p-9594cebb.js.map → p-50133556.js.map} +1 -1
- package/dist/components/p-9bf969b2.js +336 -0
- package/dist/components/p-9bf969b2.js.map +1 -0
- package/dist/components/{p-434bf03a.js → p-c978f1a7.js} +4 -4
- package/dist/components/{p-434bf03a.js.map → p-c978f1a7.js.map} +1 -1
- package/dist/esm/app-globals-f7994f55.js.map +1 -1
- package/dist/esm/bcm-accordion-group.entry.js +2 -2
- package/dist/esm/bcm-accordion-group.entry.js.map +1 -1
- package/dist/esm/bcm-accordion.entry.js +2 -2
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-avatar.entry.js +85 -0
- package/dist/esm/bcm-avatar.entry.js.map +1 -0
- package/dist/esm/bcm-badge.entry.js +119 -0
- package/dist/esm/bcm-badge.entry.js.map +1 -0
- package/dist/esm/bcm-basic-badge.entry.js +88 -0
- package/dist/esm/bcm-basic-badge.entry.js.map +1 -0
- package/dist/esm/bcm-button-group.entry.js +2 -2
- package/dist/esm/bcm-button_5.entry.js +822 -0
- package/dist/esm/bcm-button_5.entry.js.map +1 -0
- package/dist/esm/bcm-checkbox.entry.js +1 -1
- package/dist/esm/bcm-chip.entry.js +2 -2
- package/dist/esm/bcm-chip.entry.js.map +1 -1
- package/dist/esm/bcm-divider.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +5 -3
- package/dist/esm/bcm-input.entry.js.map +1 -1
- package/dist/esm/bcm-pop-confirm.entry.js +2 -2
- package/dist/esm/bcm-popover.entry.js +2 -2
- package/dist/esm/bcm-radio-group.entry.js +2 -2
- package/dist/esm/bcm-radio.entry.js +2 -2
- package/dist/esm/bcm-radio.entry.js.map +1 -1
- package/dist/esm/bcm-segmented-picker-option.entry.js +2 -2
- package/dist/esm/bcm-segmented-picker.entry.js +2 -2
- package/dist/esm/bcm-switch.entry.js +2 -2
- package/dist/esm/bcm-tabs-content.entry.js +1 -1
- package/dist/esm/bcm-tabs-list.entry.js +1 -1
- package/dist/esm/bcm-tabs-trigger.entry.js +1 -1
- package/dist/esm/bcm-tabs.entry.js +1 -1
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-tooltip.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{floating-ui.dom.esm-480e0f15.js → floating-ui.dom.esm-b7749b71.js} +2 -2
- package/dist/esm/{floating-ui.dom.esm-480e0f15.js.map → floating-ui.dom.esm-b7749b71.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/linked/linked.component.d.ts +47 -7
- package/dist/types/components/text/text.component.d.ts +3 -0
- package/dist/types/components.d.ts +57 -1
- package/package.json +2 -1
- package/dist/bromcom-ui/p-0d273bac.entry.js +0 -2
- package/dist/bromcom-ui/p-9ab4d2be.entry.js +0 -2
- package/dist/bromcom-ui/p-a3dbbeaf.entry.js +0 -2
- package/dist/bromcom-ui/p-b1b493ab.entry.js +0 -2
- package/dist/bromcom-ui/p-b1b493ab.entry.js.map +0 -1
- package/dist/bromcom-ui/p-c427ffee.entry.js +0 -2
- package/dist/bromcom-ui/p-c427ffee.entry.js.map +0 -1
- package/dist/bromcom-ui/p-c444235a.entry.js +0 -2
- package/dist/bromcom-ui/p-c444235a.entry.js.map +0 -1
- package/dist/bromcom-ui/p-cee68279.entry.js +0 -2
- package/dist/bromcom-ui/p-e7e8305f.entry.js +0 -2
- package/dist/bromcom-ui/p-e7e8305f.entry.js.map +0 -1
- package/dist/bromcom-ui/p-f4e8a47d.entry.js +0 -2
- package/dist/bromcom-ui/p-f4e8a47d.entry.js.map +0 -1
- package/dist/bromcom-ui/p-f7890098.entry.js +0 -2
- package/dist/bromcom-ui/p-f7890098.entry.js.map +0 -1
- package/dist/cjs/bcm-avatar_4.cjs.entry.js +0 -596
- package/dist/cjs/bcm-avatar_4.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-dropdown-item.cjs.entry.js +0 -63
- package/dist/cjs/bcm-dropdown-item.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -56
- package/dist/cjs/bcm-dropdown.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-linked.cjs.entry.js +0 -91
- package/dist/cjs/bcm-linked.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-text.cjs.entry.js +0 -119
- package/dist/cjs/bcm-text.cjs.entry.js.map +0 -1
- package/dist/components/p-5f7a0d0d.js +0 -107
- package/dist/components/p-5f7a0d0d.js.map +0 -1
- package/dist/esm/bcm-avatar_4.entry.js +0 -589
- package/dist/esm/bcm-avatar_4.entry.js.map +0 -1
- package/dist/esm/bcm-dropdown-item.entry.js +0 -59
- package/dist/esm/bcm-dropdown-item.entry.js.map +0 -1
- package/dist/esm/bcm-dropdown.entry.js +0 -52
- package/dist/esm/bcm-dropdown.entry.js.map +0 -1
- package/dist/esm/bcm-linked.entry.js +0 -87
- package/dist/esm/bcm-linked.entry.js.map +0 -1
- package/dist/esm/bcm-text.entry.js +0 -115
- package/dist/esm/bcm-text.entry.js.map +0 -1
- /package/dist/bromcom-ui/{p-a1aae3ef.entry.js.map → p-09b53a8f.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-49b0e982.entry.js.map → p-1392a235.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-389f1976.entry.js.map → p-1867c3e6.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-58ee24a8.entry.js.map → p-2cb15e60.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-cd271b49.entry.js.map → p-3d424afc.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-e89ab4a7.entry.js.map → p-3f153277.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-13784cd7.entry.js.map → p-4762d66b.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-bf69fc8a.entry.js.map → p-4bba4ab4.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-9594cebb.js.map → p-50133556.js.map} +0 -0
- /package/dist/bromcom-ui/{p-d57587e5.entry.js.map → p-50713153.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-056c9348.entry.js.map → p-5541403c.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-bd0f7e78.entry.js.map → p-86704b91.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-55c4263c.entry.js.map → p-898d5cf6.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-0d0d6483.entry.js.map → p-c45d9e50.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-625bbd86.entry.js.map → p-c78b12c3.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-1bf71c9b.entry.js.map → p-d7b636bf.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-c995a48c.entry.js.map → p-ea274e8b.entry.js.map} +0 -0
|
@@ -1,596 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-9a2c5938.js');
|
|
6
|
-
const index$1 = require('./index-5a88e57b.js');
|
|
7
|
-
const index$2 = require('./index-310db2a6.js');
|
|
8
|
-
|
|
9
|
-
const avatarCss = ":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}.static{position:static}.-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:var(--bcm-ui-border-radius-full,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: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)}";
|
|
10
|
-
const BcmAvatarStyle0 = avatarCss;
|
|
11
|
-
|
|
12
|
-
const BcmAvatar = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
/** Shape of the avatar (ellipse/square) */
|
|
16
|
-
this.shape = 'ellipse';
|
|
17
|
-
/** Size of the avatar */
|
|
18
|
-
this.size = 'medium';
|
|
19
|
-
/** Fallback icon class */
|
|
20
|
-
this.icon = 'fas fa-user';
|
|
21
|
-
/** Status indicator animation */
|
|
22
|
-
this.blink = false;
|
|
23
|
-
this.isFallback = false;
|
|
24
|
-
}
|
|
25
|
-
getFirstLetters(name) {
|
|
26
|
-
const words = name.split(' ');
|
|
27
|
-
const initials = words.map(word => word.charAt(0).toUpperCase()).join('');
|
|
28
|
-
return initials.substring(0, 2);
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
const baseClass = index$1.classNames('bcm-avatar bcm-ui-element bcm-ui-content-display', 'uppercase font-medium', 'inline-flex items-center justify-center', 'bg-[--bcm-avatar-bg] text-[--bcm-avatar-text]', {
|
|
32
|
-
'shape-ellipse rounded-full': this.shape === 'ellipse',
|
|
33
|
-
'shape-square rounded-[--bcm-ui-radius]': this.shape === 'square',
|
|
34
|
-
'size-small text-size-4 w-6 h-6': this.size === 'small',
|
|
35
|
-
'size-medium text-size-5 w-8 h-8': this.size === 'medium',
|
|
36
|
-
'size-large text-size-6 w-10 h-10': this.size === 'large',
|
|
37
|
-
});
|
|
38
|
-
const badgeClass = index$1.classNames('badge', {
|
|
39
|
-
'top-0 right-0': this.shape === 'ellipse',
|
|
40
|
-
'-top-0.5 -right-0.5': this.shape === 'square',
|
|
41
|
-
});
|
|
42
|
-
const imageClass = index$1.classNames('image w-full h-full', {
|
|
43
|
-
'rounded-full': this.shape === 'ellipse',
|
|
44
|
-
'rounded-[--bcm-ui-radius]': this.shape === 'square',
|
|
45
|
-
});
|
|
46
|
-
let style = {};
|
|
47
|
-
if (this.color) {
|
|
48
|
-
const isColorTone = this.color.includes('-');
|
|
49
|
-
const _color = isColorTone ? this.color.split('-')[0] : this.color;
|
|
50
|
-
const bgColor = `var(--bcm-ui-color-background-palette-${_color}-default)`;
|
|
51
|
-
const textColor = `var(--bcm-ui-color-text-palette-${_color}`;
|
|
52
|
-
style = {
|
|
53
|
-
'--bcm-avatar-bg': bgColor,
|
|
54
|
-
'--bcm-avatar-text': textColor,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
const customSize = !Object.keys(['small', 'medium', 'large']).includes(this.size)
|
|
58
|
-
? {
|
|
59
|
-
width: `${this.size}px`,
|
|
60
|
-
height: `${this.size}px`,
|
|
61
|
-
fontSize: `${+this.size / 2}px`,
|
|
62
|
-
}
|
|
63
|
-
: {};
|
|
64
|
-
const RenderContent = () => {
|
|
65
|
-
if (this.isFallback) {
|
|
66
|
-
if (this.name) {
|
|
67
|
-
return this.getFirstLetters(this.name);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return index.h("i", { class: this.icon });
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else if (this.image) {
|
|
74
|
-
return index.h("img", { class: imageClass, onError: () => (this.isFallback = true), src: this.image, alt: this.alt, "aria-label": this.alt || this.name || 'Avatar' });
|
|
75
|
-
}
|
|
76
|
-
else if (this.name) {
|
|
77
|
-
return this.getFirstLetters(this.name);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
return index.h("i", { class: this.icon });
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
return (index.h("div", { role: "img", "aria-label": this.alt || this.name || 'Avatar', class: baseClass, style: Object.assign(Object.assign({}, style), customSize) }, index.h(RenderContent, null), this.status && index.h("bcm-badge", { class: badgeClass, status: this.status, blink: this.blink, "aria-hidden": "true" }), index.h("slot", null)));
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
BcmAvatar.style = BcmAvatarStyle0;
|
|
87
|
-
|
|
88
|
-
const badgeCss = ".relative{position:relative}: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-block;position:relative}::slotted([slot=badge]){color:var(--bcm-badge-text);font-weight:500}.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}.static{position:static}.absolute{position:absolute}.-bottom-1{bottom:-.25rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.z-10{z-index:10}.inline-flex{display:inline-flex}.size-1{height:.25rem;width:.25rem}.size-1\\.5{height:.375rem;width:.375rem}.size-2{height:.5rem;width:.5rem}.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))}.items-center{align-items:center}.justify-center{justify-content:center}.gap-0{gap:0}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.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)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:h-full:after{content:var(--tw-content);height:100%}.after\\:w-full:after{content:var(--tw-content);width:100%}@keyframes ping{75%,to{content:var(--tw-content);opacity:0;transform:scale(2)}}.after\\:animate-blink:after{animation:ping 2s infinite;content:var(--tw-content)}.after\\:rounded-full:after{border-radius:var(--bcm-ui-border-radius-full,9999px);content:var(--tw-content)}.after\\:bg-\\[--bcm-badge-bg\\]:after{background-color:var(--bcm-badge-bg);content:var(--tw-content)}.after\\:content-\\[\\\"\\\"\\]:after{--tw-content:\"\";content:var(--tw-content)}.-right-0\\.5{right:-.125rem}.-top-0\\.5{top:-.125rem}.right-0{right:0}.top-0{top:0}.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%}.rounded-\\[--bcm-ui-radius\\]{border-radius:var(--bcm-ui-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--bcm-avatar-bg\\]{background-color:var(--bcm-avatar-bg)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.uppercase{text-transform:uppercase}.text-\\[--bcm-avatar-text\\]{color:var(--bcm-avatar-text)}";
|
|
89
|
-
const BcmBadgeStyle0 = badgeCss;
|
|
90
|
-
|
|
91
|
-
const Badge = class {
|
|
92
|
-
constructor(hostRef) {
|
|
93
|
-
index.registerInstance(this, hostRef);
|
|
94
|
-
/**
|
|
95
|
-
* Determines the size of the badge.
|
|
96
|
-
* @type {'small' | 'medium' | 'large'}
|
|
97
|
-
* @default 'medium'
|
|
98
|
-
*/
|
|
99
|
-
this.size = 'medium';
|
|
100
|
-
/**
|
|
101
|
-
* Sets the visual variant of the badge.
|
|
102
|
-
* 'dot': Appears as a small dot indicator
|
|
103
|
-
* 'text': Displays content as text
|
|
104
|
-
* @type {'dot' | 'text'}
|
|
105
|
-
* @default 'text'
|
|
106
|
-
*/
|
|
107
|
-
this.variant = 'text';
|
|
108
|
-
/**
|
|
109
|
-
* Enables soft color mode for the badge.
|
|
110
|
-
* When true, uses lighter tones and pastel colors.
|
|
111
|
-
* @type {boolean}
|
|
112
|
-
* @default false
|
|
113
|
-
*/
|
|
114
|
-
this.soft = false;
|
|
115
|
-
/**
|
|
116
|
-
* Enables blinking animation for the badge.
|
|
117
|
-
* Useful for drawing attention or indicating active status.
|
|
118
|
-
* @type {boolean}
|
|
119
|
-
* @default false
|
|
120
|
-
*/
|
|
121
|
-
this.blink = false;
|
|
122
|
-
/**
|
|
123
|
-
* Sets the position of the badge relative to its container.
|
|
124
|
-
* @type {'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'}
|
|
125
|
-
* @default 'top-right'
|
|
126
|
-
*/
|
|
127
|
-
this.position = 'top-right';
|
|
128
|
-
this.classes = index$2.ce({
|
|
129
|
-
base: 'badge bcm-ui-element absolute font-medium inline-flex items-center justify-center bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius] z-10',
|
|
130
|
-
variants: {
|
|
131
|
-
size: {
|
|
132
|
-
small: 'gap-1 px-1 text-size-3',
|
|
133
|
-
medium: 'gap-1 py-0.5 px-1.5 text-size-4',
|
|
134
|
-
large: 'gap-2 py-1 px-2 text-size-5',
|
|
135
|
-
},
|
|
136
|
-
variant: {
|
|
137
|
-
dot: 'gap-0 p-0 text-[0px] leading-none',
|
|
138
|
-
text: '',
|
|
139
|
-
},
|
|
140
|
-
position: {
|
|
141
|
-
'top-right': '-top-1 -right-1',
|
|
142
|
-
'top-left': '-top-1 -left-1',
|
|
143
|
-
'bottom-right': '-bottom-1 -right-1',
|
|
144
|
-
'bottom-left': '-bottom-1 -left-1',
|
|
145
|
-
},
|
|
146
|
-
blink: {
|
|
147
|
-
true: 'after:content-[""] after:absolute after:rounded-full after:bg-[--bcm-badge-bg] after:animate-blink after:w-full after:h-full',
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
compoundVariants: [
|
|
151
|
-
{
|
|
152
|
-
variant: 'dot',
|
|
153
|
-
size: 'small',
|
|
154
|
-
class: 'size-1',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
variant: 'dot',
|
|
158
|
-
size: 'medium',
|
|
159
|
-
class: 'size-1.5',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
variant: 'dot',
|
|
163
|
-
size: 'large',
|
|
164
|
-
class: 'size-2',
|
|
165
|
-
},
|
|
166
|
-
],
|
|
167
|
-
defaultVariants: {
|
|
168
|
-
variant: 'text',
|
|
169
|
-
size: 'medium',
|
|
170
|
-
position: 'top-right',
|
|
171
|
-
blink: false,
|
|
172
|
-
},
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
get offsetStyle() {
|
|
176
|
-
if (!this.offset)
|
|
177
|
-
return {};
|
|
178
|
-
const [x = 0, y = 0] = this.offset.split(',').map(val => val.trim());
|
|
179
|
-
return { transform: `translate(${x}px, ${y}px)` };
|
|
180
|
-
}
|
|
181
|
-
get badgeStyle() {
|
|
182
|
-
if (!this.color)
|
|
183
|
-
return {};
|
|
184
|
-
const variantType = this.soft ? 'soft' : 'vivid';
|
|
185
|
-
return {
|
|
186
|
-
'--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,
|
|
187
|
-
'--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
render() {
|
|
191
|
-
return (index.h("div", { key: '9c6ce83cc0ae25399f2d97139d9e91578be38237', class: "relative inline-flex" }, index.h("slot", { key: 'b05db7fc70a8ff5c680e79507d44678ea4f8aba4' }), index.h("div", { key: 'e3fe3d09e236ae1569d533824f4bb585a5871b53', role: "status", "aria-live": "polite", "aria-label": this.status ? `Status: ${this.status}` : undefined, class: this.classes({
|
|
192
|
-
size: this.size,
|
|
193
|
-
variant: this.variant,
|
|
194
|
-
position: this.position,
|
|
195
|
-
blink: this.blink,
|
|
196
|
-
}), style: Object.assign(Object.assign({}, this.badgeStyle), this.offsetStyle) }, this.variant == 'text' && index.h("slot", { key: '98e3f9eaa2966a748e41782efbe78ca35a9deee6', name: "badge" }, this.text))));
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
Badge.style = BcmBadgeStyle0;
|
|
200
|
-
|
|
201
|
-
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)}";
|
|
202
|
-
const BcmBasicBadgeStyle0 = basicBadgeCss;
|
|
203
|
-
|
|
204
|
-
const BasicBadge = class {
|
|
205
|
-
constructor(hostRef) {
|
|
206
|
-
index.registerInstance(this, hostRef);
|
|
207
|
-
/**
|
|
208
|
-
* Determines the size of the badge.
|
|
209
|
-
* @type {'small' | 'medium' | 'large'}
|
|
210
|
-
* @default 'medium'
|
|
211
|
-
*/
|
|
212
|
-
this.size = 'medium';
|
|
213
|
-
/**
|
|
214
|
-
* Sets the visual variant of the badge.
|
|
215
|
-
* 'dot': Appears as a small dot indicator
|
|
216
|
-
* 'text': Displays content as text
|
|
217
|
-
* @type {'dot' | 'text'}
|
|
218
|
-
* @default 'text'
|
|
219
|
-
*/
|
|
220
|
-
this.variant = 'text';
|
|
221
|
-
/**
|
|
222
|
-
* Enables soft color mode for the badge.
|
|
223
|
-
* When true, uses lighter tones and pastel colors.
|
|
224
|
-
* @type {boolean}
|
|
225
|
-
* @default false
|
|
226
|
-
*/
|
|
227
|
-
this.soft = false;
|
|
228
|
-
this.classes = index$2.ce({
|
|
229
|
-
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]',
|
|
230
|
-
variants: {
|
|
231
|
-
size: {
|
|
232
|
-
small: 'px-1 text-size-3',
|
|
233
|
-
medium: 'py-0.5 px-1.5 text-size-4',
|
|
234
|
-
large: 'py-1 px-2 text-size-5',
|
|
235
|
-
},
|
|
236
|
-
variant: {
|
|
237
|
-
dot: 'gap-0 p-0 text-[0px] leading-none',
|
|
238
|
-
text: '',
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
compoundVariants: [
|
|
242
|
-
{
|
|
243
|
-
variant: 'dot',
|
|
244
|
-
size: 'small',
|
|
245
|
-
class: 'size-1',
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
variant: 'dot',
|
|
249
|
-
size: 'medium',
|
|
250
|
-
class: 'size-1.5',
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
variant: 'dot',
|
|
254
|
-
size: 'large',
|
|
255
|
-
class: 'size-2',
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
defaultVariants: {
|
|
259
|
-
variant: 'text',
|
|
260
|
-
size: 'medium',
|
|
261
|
-
blink: false,
|
|
262
|
-
},
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
get badgeStyle() {
|
|
266
|
-
if (!this.color)
|
|
267
|
-
return {};
|
|
268
|
-
const variantType = this.soft ? 'palette' : 'vivid';
|
|
269
|
-
return {
|
|
270
|
-
'--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,
|
|
271
|
-
'--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
render() {
|
|
275
|
-
return (index.h("span", { key: '808cd1e3672a57596174767ce793244024a3f6c3', part: "base", role: "status", "aria-live": "polite", style: this.badgeStyle, class: this.classes({
|
|
276
|
-
size: this.size,
|
|
277
|
-
variant: this.variant,
|
|
278
|
-
}) }, this.variant === 'text' && (index.h("span", { key: 'c3b5d31649cf6177173401cafcb8c520d4cf9745', class: "badge-content" }, index.h("slot", { key: 'a6a902a3a2a9c2effa1fc7e0ef4267ab17b6b2ef' })))));
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
BasicBadge.style = BcmBasicBadgeStyle0;
|
|
282
|
-
|
|
283
|
-
const variantOptions = {
|
|
284
|
-
save: {
|
|
285
|
-
text: 'Save',
|
|
286
|
-
status: 'success',
|
|
287
|
-
icon: 'far fa-save',
|
|
288
|
-
iconPosition: 'prefix',
|
|
289
|
-
kind: 'primary',
|
|
290
|
-
},
|
|
291
|
-
ok: {
|
|
292
|
-
text: 'Ok',
|
|
293
|
-
status: 'success',
|
|
294
|
-
icon: 'far fa-check',
|
|
295
|
-
iconPosition: 'prefix',
|
|
296
|
-
},
|
|
297
|
-
new: {
|
|
298
|
-
text: 'New',
|
|
299
|
-
status: 'success',
|
|
300
|
-
icon: 'far fa-plus',
|
|
301
|
-
iconPosition: 'prefix',
|
|
302
|
-
},
|
|
303
|
-
add: {
|
|
304
|
-
text: 'Add',
|
|
305
|
-
status: 'success',
|
|
306
|
-
icon: 'far fa-plus',
|
|
307
|
-
iconPosition: 'prefix',
|
|
308
|
-
},
|
|
309
|
-
create: {
|
|
310
|
-
text: 'Create',
|
|
311
|
-
status: 'success',
|
|
312
|
-
icon: 'far fa-plus',
|
|
313
|
-
iconPosition: 'prefix',
|
|
314
|
-
},
|
|
315
|
-
prev: {
|
|
316
|
-
text: 'Prev',
|
|
317
|
-
status: 'default',
|
|
318
|
-
icon: 'far fa-arrow-left',
|
|
319
|
-
iconPosition: 'prefix',
|
|
320
|
-
},
|
|
321
|
-
next: {
|
|
322
|
-
text: 'Next',
|
|
323
|
-
status: 'default',
|
|
324
|
-
icon: 'far fa-arrow-right',
|
|
325
|
-
iconPosition: 'suffix',
|
|
326
|
-
},
|
|
327
|
-
apply: {
|
|
328
|
-
text: 'Apply',
|
|
329
|
-
status: 'default',
|
|
330
|
-
icon: 'far fa-check-circle',
|
|
331
|
-
iconPosition: 'prefix',
|
|
332
|
-
},
|
|
333
|
-
submit: {
|
|
334
|
-
text: 'Submit',
|
|
335
|
-
status: 'default',
|
|
336
|
-
icon: 'far fa-save',
|
|
337
|
-
iconPosition: 'prefix',
|
|
338
|
-
},
|
|
339
|
-
send: {
|
|
340
|
-
text: 'Send',
|
|
341
|
-
status: 'success',
|
|
342
|
-
icon: 'far fa-paper-plane',
|
|
343
|
-
iconPosition: 'prefix',
|
|
344
|
-
},
|
|
345
|
-
delete: {
|
|
346
|
-
text: 'Delete',
|
|
347
|
-
status: 'error',
|
|
348
|
-
icon: 'far fa-trash',
|
|
349
|
-
iconPosition: 'prefix',
|
|
350
|
-
},
|
|
351
|
-
cancel: {
|
|
352
|
-
text: 'Cancel',
|
|
353
|
-
status: 'error',
|
|
354
|
-
icon: 'far fa-times',
|
|
355
|
-
iconPosition: 'prefix',
|
|
356
|
-
},
|
|
357
|
-
decline: {
|
|
358
|
-
text: 'Decline',
|
|
359
|
-
status: 'error',
|
|
360
|
-
icon: 'far fa-ban',
|
|
361
|
-
iconPosition: 'prefix',
|
|
362
|
-
},
|
|
363
|
-
close: {
|
|
364
|
-
text: 'Close',
|
|
365
|
-
status: 'error',
|
|
366
|
-
icon: 'far fa-times-circle',
|
|
367
|
-
iconPosition: 'prefix',
|
|
368
|
-
},
|
|
369
|
-
archive: {
|
|
370
|
-
text: 'Archive',
|
|
371
|
-
status: 'error',
|
|
372
|
-
icon: 'far fa-folder-open',
|
|
373
|
-
iconPosition: 'prefix',
|
|
374
|
-
},
|
|
375
|
-
remove: {
|
|
376
|
-
text: 'Remove',
|
|
377
|
-
status: 'error',
|
|
378
|
-
icon: 'far fa-minus-circle',
|
|
379
|
-
iconPosition: 'prefix',
|
|
380
|
-
},
|
|
381
|
-
edit: {
|
|
382
|
-
text: 'Edit',
|
|
383
|
-
status: 'default',
|
|
384
|
-
icon: 'far fa-edit',
|
|
385
|
-
iconPosition: 'prefix',
|
|
386
|
-
},
|
|
387
|
-
export: {
|
|
388
|
-
text: 'Export',
|
|
389
|
-
status: 'default',
|
|
390
|
-
icon: 'far fa-sign-out',
|
|
391
|
-
iconPosition: 'prefix',
|
|
392
|
-
},
|
|
393
|
-
import: {
|
|
394
|
-
text: 'Import',
|
|
395
|
-
status: 'default',
|
|
396
|
-
icon: 'far fa-sign-in',
|
|
397
|
-
iconPosition: 'prefix',
|
|
398
|
-
},
|
|
399
|
-
filter: {
|
|
400
|
-
text: 'Filter',
|
|
401
|
-
status: 'default',
|
|
402
|
-
icon: 'far fa-filter',
|
|
403
|
-
iconPosition: 'prefix',
|
|
404
|
-
},
|
|
405
|
-
update: {
|
|
406
|
-
text: 'Update',
|
|
407
|
-
status: 'default',
|
|
408
|
-
icon: 'far fa-sync',
|
|
409
|
-
iconPosition: 'prefix',
|
|
410
|
-
},
|
|
411
|
-
reset: {
|
|
412
|
-
text: 'Reset',
|
|
413
|
-
status: 'default',
|
|
414
|
-
icon: 'far fa-sync',
|
|
415
|
-
iconPosition: 'prefix',
|
|
416
|
-
},
|
|
417
|
-
download: {
|
|
418
|
-
text: 'Download',
|
|
419
|
-
status: 'default',
|
|
420
|
-
icon: 'far fa-download',
|
|
421
|
-
iconPosition: 'prefix',
|
|
422
|
-
},
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
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)}.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}.flex{display:flex}.hidden{display:none}.size-6{height:1.5rem;width:1.5rem}.h-2{height:.5rem}.w-4{width:1rem}.max-w-64{max-width:16rem}.max-w-80{max-width:20rem}.max-w-96{max-width:24rem}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.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)}.max-h-\\[--dropdown-box-max-height\\]{max-height:var(--dropdown-box-max-height)}.min-w-\\[--dropdown-box-min-weight\\]{min-width:var(--dropdown-box-min-weight)}.max-w-\\[--dropdown-box-max-weight\\]{max-width:var(--dropdown-box-max-weight)}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-\\[--dropdown-box-background-color\\]{background-color:var(--dropdown-box-background-color)}.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)}";
|
|
426
|
-
const BcmButtonStyle0 = buttonCss;
|
|
427
|
-
|
|
428
|
-
const BcmButton = class {
|
|
429
|
-
constructor(hostRef) {
|
|
430
|
-
index.registerInstance(this, hostRef);
|
|
431
|
-
this.bcmClick = index.createEvent(this, "bcmClick", 1);
|
|
432
|
-
this.bcmFocus = index.createEvent(this, "bcmFocus", 1);
|
|
433
|
-
this.bcmBlur = index.createEvent(this, "bcmBlur", 1);
|
|
434
|
-
/** Defines the main visual style of the button */
|
|
435
|
-
this.kind = 'primary';
|
|
436
|
-
/** Controls the button size */
|
|
437
|
-
this.size = 'medium';
|
|
438
|
-
/** Defines the button's status/state color */
|
|
439
|
-
this.status = 'default';
|
|
440
|
-
/** Icon placement (prefix/suffix) */
|
|
441
|
-
this.iconPosition = 'prefix';
|
|
442
|
-
/** Icon-only button mode */
|
|
443
|
-
this.iconOnly = false;
|
|
444
|
-
/** Full width button */
|
|
445
|
-
this.fullWidth = false;
|
|
446
|
-
/** HTML button type */
|
|
447
|
-
this.type = 'button';
|
|
448
|
-
/** Loading state */
|
|
449
|
-
this.loading = false;
|
|
450
|
-
/** Disabled state */
|
|
451
|
-
this.disabled = false;
|
|
452
|
-
/** Active state */
|
|
453
|
-
this.active = false;
|
|
454
|
-
this.handleClick = (event) => {
|
|
455
|
-
if (!this.disabled && !this.loading) {
|
|
456
|
-
this.bcmClick.emit(event);
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
this.handleFocus = (event) => {
|
|
460
|
-
this.bcmFocus.emit(event);
|
|
461
|
-
};
|
|
462
|
-
this.handleBlur = (event) => {
|
|
463
|
-
this.bcmBlur.emit(event);
|
|
464
|
-
};
|
|
465
|
-
this.buttonClass = index$2.ce({
|
|
466
|
-
base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',
|
|
467
|
-
variants: {
|
|
468
|
-
size: {
|
|
469
|
-
small: 'text-size-4 py-px px-2 min-h-6',
|
|
470
|
-
medium: 'text-size-5 py-0.5 px-3 min-h-8',
|
|
471
|
-
large: 'text-size-6 py-1 px-3 min-h-10',
|
|
472
|
-
},
|
|
473
|
-
kind: {
|
|
474
|
-
primary: 'kind-primary',
|
|
475
|
-
ghost: 'kind-ghost',
|
|
476
|
-
text: 'kind-text',
|
|
477
|
-
outline: 'kind-outline',
|
|
478
|
-
},
|
|
479
|
-
fullWidth: {
|
|
480
|
-
true: 'full-width w-full',
|
|
481
|
-
},
|
|
482
|
-
disabled: {
|
|
483
|
-
true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',
|
|
484
|
-
false: [
|
|
485
|
-
'cursor-pointer',
|
|
486
|
-
'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',
|
|
487
|
-
'hover:bg-[--bcm-final-hover-bg-color]',
|
|
488
|
-
'active:bg-[--bcm-final-active-bg-color]',
|
|
489
|
-
'focus-visible:ring',
|
|
490
|
-
],
|
|
491
|
-
},
|
|
492
|
-
loading: {
|
|
493
|
-
true: '',
|
|
494
|
-
},
|
|
495
|
-
position: {
|
|
496
|
-
first: 'position-first',
|
|
497
|
-
middle: 'position-middle',
|
|
498
|
-
last: 'position-last',
|
|
499
|
-
},
|
|
500
|
-
},
|
|
501
|
-
defaultVariants: {
|
|
502
|
-
size: 'medium',
|
|
503
|
-
kind: 'primary',
|
|
504
|
-
fullWidth: false,
|
|
505
|
-
disabled: false,
|
|
506
|
-
loading: false,
|
|
507
|
-
},
|
|
508
|
-
}, {
|
|
509
|
-
twMerge: false,
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
get buttonText() {
|
|
513
|
-
return this.text || (this.variant ? variantOptions[this.variant].text : '');
|
|
514
|
-
}
|
|
515
|
-
get buttonIcon() {
|
|
516
|
-
if (this.variant && variantOptions[this.variant].icon) {
|
|
517
|
-
return {
|
|
518
|
-
icon: variantOptions[this.variant].icon,
|
|
519
|
-
position: variantOptions[this.variant].iconPosition || 'prefix',
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
return {
|
|
523
|
-
icon: this.icon,
|
|
524
|
-
position: this.iconPosition,
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
get buttonStatus() {
|
|
528
|
-
return this.variant ? variantOptions[this.variant].status : this.status;
|
|
529
|
-
}
|
|
530
|
-
get buttonStyles() {
|
|
531
|
-
const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;
|
|
532
|
-
// These are the internal default styles based on component props (kind, status)
|
|
533
|
-
const kindStyleMap = {
|
|
534
|
-
primary: {
|
|
535
|
-
'--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,
|
|
536
|
-
'--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,
|
|
537
|
-
'--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,
|
|
538
|
-
'--bcm-button-border': 'transparent',
|
|
539
|
-
'--bcm-button-text': 'var(--bcm-ui-color-text-base)',
|
|
540
|
-
},
|
|
541
|
-
outline: {
|
|
542
|
-
'--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',
|
|
543
|
-
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
544
|
-
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
545
|
-
'--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,
|
|
546
|
-
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
547
|
-
},
|
|
548
|
-
ghost: {
|
|
549
|
-
'--bcm-button-bg': 'transparent',
|
|
550
|
-
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
551
|
-
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
552
|
-
'--bcm-button-border': 'transparent',
|
|
553
|
-
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
554
|
-
},
|
|
555
|
-
text: {
|
|
556
|
-
'--bcm-button-bg': 'transparent',
|
|
557
|
-
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
558
|
-
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
559
|
-
'--bcm-button-border': 'transparent',
|
|
560
|
-
'--bcm-button-text': `var(--bcm-ui-color-text-${status})`,
|
|
561
|
-
},
|
|
562
|
-
};
|
|
563
|
-
const internalDefaultStyles = kindStyleMap[this.kind];
|
|
564
|
-
// These are the "final" CSS custom properties used by the component's styling.
|
|
565
|
-
// They use the "--bcm-button-custom-..." token if provided by the user,
|
|
566
|
-
// otherwise, they fall back to the internal "--bcm-button-..." style defined above.
|
|
567
|
-
const finalEffectiveStyles = {
|
|
568
|
-
'--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,
|
|
569
|
-
'--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,
|
|
570
|
-
'--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,
|
|
571
|
-
'--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,
|
|
572
|
-
'--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,
|
|
573
|
-
};
|
|
574
|
-
// return kindStyleMap[this.kind];
|
|
575
|
-
return Object.assign(Object.assign({}, internalDefaultStyles), finalEffectiveStyles);
|
|
576
|
-
}
|
|
577
|
-
render() {
|
|
578
|
-
const { icon, position } = this.buttonIcon;
|
|
579
|
-
return (index.h(index.Host, { key: '434cab012a2f174ca6b21f7484104ed9952daf38' }, index.h("button", { key: 'bf000fa02d836d0142e3f335b806c20afe10726b', 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({
|
|
580
|
-
size: this.size,
|
|
581
|
-
kind: this.kind,
|
|
582
|
-
fullWidth: this.fullWidth,
|
|
583
|
-
disabled: this.disabled,
|
|
584
|
-
loading: this.loading,
|
|
585
|
-
position: this.position,
|
|
586
|
-
}) }, this.loading && index.h("slot", { key: 'c95198f7776c10c7b380c8f2c3c73a05517a72c8', name: "loading" }), index.h("span", { key: '3433ff03ba933966cab816a8f9882c51b647549d' }, index.h("slot", { key: 'd1027e43b007789d1da57ace2b2f2da585434604', name: "prefix" }, position === 'prefix' && icon && index.h("i", { key: '0be135da5ee717f885f56298e9886112ad44767f', class: ' leading-none ' + icon }))), index.h("slot", { key: '13dc3c513cc364615e15c7074729219a251c8756' }, this.buttonText), index.h("span", { key: '5dab9df786eec4ed2554df88ffbfea8c6a324c1f' }, index.h("slot", { key: 'ca80a898105d9d310fea2b34f9b6c9fe282a7eb0', name: "suffix" }, position === 'suffix' && icon && index.h("i", { key: '57d3a187cf7af1d6ebc289c472579aa973fc6c86', class: ' leading-none ' + icon }))))));
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
BcmButton.style = BcmButtonStyle0;
|
|
590
|
-
|
|
591
|
-
exports.bcm_avatar = BcmAvatar;
|
|
592
|
-
exports.bcm_badge = Badge;
|
|
593
|
-
exports.bcm_basic_badge = BasicBadge;
|
|
594
|
-
exports.bcm_button = BcmButton;
|
|
595
|
-
|
|
596
|
-
//# sourceMappingURL=bcm-avatar_4.cjs.entry.js.map
|