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
|
@@ -0,0 +1,830 @@
|
|
|
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-310db2a6.js');
|
|
7
|
+
const floatingUi_dom_esm = require('./floating-ui.dom.esm-3ec8404c.js');
|
|
8
|
+
const index$2 = require('./index-5a88e57b.js');
|
|
9
|
+
|
|
10
|
+
const variantOptions = {
|
|
11
|
+
save: {
|
|
12
|
+
text: 'Save',
|
|
13
|
+
status: 'success',
|
|
14
|
+
icon: 'far fa-save',
|
|
15
|
+
iconPosition: 'prefix',
|
|
16
|
+
kind: 'primary',
|
|
17
|
+
},
|
|
18
|
+
ok: {
|
|
19
|
+
text: 'Ok',
|
|
20
|
+
status: 'success',
|
|
21
|
+
icon: 'far fa-check',
|
|
22
|
+
iconPosition: 'prefix',
|
|
23
|
+
},
|
|
24
|
+
new: {
|
|
25
|
+
text: 'New',
|
|
26
|
+
status: 'success',
|
|
27
|
+
icon: 'far fa-plus',
|
|
28
|
+
iconPosition: 'prefix',
|
|
29
|
+
},
|
|
30
|
+
add: {
|
|
31
|
+
text: 'Add',
|
|
32
|
+
status: 'success',
|
|
33
|
+
icon: 'far fa-plus',
|
|
34
|
+
iconPosition: 'prefix',
|
|
35
|
+
},
|
|
36
|
+
create: {
|
|
37
|
+
text: 'Create',
|
|
38
|
+
status: 'success',
|
|
39
|
+
icon: 'far fa-plus',
|
|
40
|
+
iconPosition: 'prefix',
|
|
41
|
+
},
|
|
42
|
+
prev: {
|
|
43
|
+
text: 'Prev',
|
|
44
|
+
status: 'default',
|
|
45
|
+
icon: 'far fa-arrow-left',
|
|
46
|
+
iconPosition: 'prefix',
|
|
47
|
+
},
|
|
48
|
+
next: {
|
|
49
|
+
text: 'Next',
|
|
50
|
+
status: 'default',
|
|
51
|
+
icon: 'far fa-arrow-right',
|
|
52
|
+
iconPosition: 'suffix',
|
|
53
|
+
},
|
|
54
|
+
apply: {
|
|
55
|
+
text: 'Apply',
|
|
56
|
+
status: 'default',
|
|
57
|
+
icon: 'far fa-check-circle',
|
|
58
|
+
iconPosition: 'prefix',
|
|
59
|
+
},
|
|
60
|
+
submit: {
|
|
61
|
+
text: 'Submit',
|
|
62
|
+
status: 'default',
|
|
63
|
+
icon: 'far fa-save',
|
|
64
|
+
iconPosition: 'prefix',
|
|
65
|
+
},
|
|
66
|
+
send: {
|
|
67
|
+
text: 'Send',
|
|
68
|
+
status: 'success',
|
|
69
|
+
icon: 'far fa-paper-plane',
|
|
70
|
+
iconPosition: 'prefix',
|
|
71
|
+
},
|
|
72
|
+
delete: {
|
|
73
|
+
text: 'Delete',
|
|
74
|
+
status: 'error',
|
|
75
|
+
icon: 'far fa-trash',
|
|
76
|
+
iconPosition: 'prefix',
|
|
77
|
+
},
|
|
78
|
+
cancel: {
|
|
79
|
+
text: 'Cancel',
|
|
80
|
+
status: 'error',
|
|
81
|
+
icon: 'far fa-times',
|
|
82
|
+
iconPosition: 'prefix',
|
|
83
|
+
},
|
|
84
|
+
decline: {
|
|
85
|
+
text: 'Decline',
|
|
86
|
+
status: 'error',
|
|
87
|
+
icon: 'far fa-ban',
|
|
88
|
+
iconPosition: 'prefix',
|
|
89
|
+
},
|
|
90
|
+
close: {
|
|
91
|
+
text: 'Close',
|
|
92
|
+
status: 'error',
|
|
93
|
+
icon: 'far fa-times-circle',
|
|
94
|
+
iconPosition: 'prefix',
|
|
95
|
+
},
|
|
96
|
+
archive: {
|
|
97
|
+
text: 'Archive',
|
|
98
|
+
status: 'error',
|
|
99
|
+
icon: 'far fa-folder-open',
|
|
100
|
+
iconPosition: 'prefix',
|
|
101
|
+
},
|
|
102
|
+
remove: {
|
|
103
|
+
text: 'Remove',
|
|
104
|
+
status: 'error',
|
|
105
|
+
icon: 'far fa-minus-circle',
|
|
106
|
+
iconPosition: 'prefix',
|
|
107
|
+
},
|
|
108
|
+
edit: {
|
|
109
|
+
text: 'Edit',
|
|
110
|
+
status: 'default',
|
|
111
|
+
icon: 'far fa-edit',
|
|
112
|
+
iconPosition: 'prefix',
|
|
113
|
+
},
|
|
114
|
+
export: {
|
|
115
|
+
text: 'Export',
|
|
116
|
+
status: 'default',
|
|
117
|
+
icon: 'far fa-sign-out',
|
|
118
|
+
iconPosition: 'prefix',
|
|
119
|
+
},
|
|
120
|
+
import: {
|
|
121
|
+
text: 'Import',
|
|
122
|
+
status: 'default',
|
|
123
|
+
icon: 'far fa-sign-in',
|
|
124
|
+
iconPosition: 'prefix',
|
|
125
|
+
},
|
|
126
|
+
filter: {
|
|
127
|
+
text: 'Filter',
|
|
128
|
+
status: 'default',
|
|
129
|
+
icon: 'far fa-filter',
|
|
130
|
+
iconPosition: 'prefix',
|
|
131
|
+
},
|
|
132
|
+
update: {
|
|
133
|
+
text: 'Update',
|
|
134
|
+
status: 'default',
|
|
135
|
+
icon: 'far fa-sync',
|
|
136
|
+
iconPosition: 'prefix',
|
|
137
|
+
},
|
|
138
|
+
reset: {
|
|
139
|
+
text: 'Reset',
|
|
140
|
+
status: 'default',
|
|
141
|
+
icon: 'far fa-sync',
|
|
142
|
+
iconPosition: 'prefix',
|
|
143
|
+
},
|
|
144
|
+
download: {
|
|
145
|
+
text: 'Download',
|
|
146
|
+
status: 'default',
|
|
147
|
+
icon: 'far fa-download',
|
|
148
|
+
iconPosition: 'prefix',
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const buttonCss = ".relative{position:relative}:host{display:inline-block;position:relative}:host([full-width]){width:100%}:host([position=first]) .bcm-button{border-bottom-right-radius:0;border-top-right-radius:0}:host([position=middle]) .bcm-button{border-radius:0}:host([position=last]) .bcm-button{border-bottom-left-radius:0;border-top-left-radius:0}:host([position=first].orientation-vertical) .bcm-button{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--bcm-ui-border-radius,4px);border-top-right-radius:var(--bcm-ui-border-radius,4px)}:host([position=middle].orientation-vertical) .bcm-button{border-radius:0}:host([position=last].orientation-vertical) .bcm-button{border-bottom-left-radius:var(--bcm-ui-border-radius,4px);border-bottom-right-radius:var(--bcm-ui-border-radius,4px);border-top-left-radius:0;border-top-right-radius:0}.static{position:static}.flex{display:flex}.max-h-64{max-height:16rem}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.items-center{align-items:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default)}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}.outline{outline-style:solid}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.absolute{position:absolute}.z-\\[9999\\]{z-index:9999}.mx-auto{margin-left:auto;margin-right:auto}.hidden{display:none}.size-6{height:1.5rem;width:1.5rem}.h-2{height:.5rem}.w-4{width:1rem}.max-w-80{max-width:20rem}.max-w-96{max-width:24rem}.flex-1{flex:1 1 0%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.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-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)}.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)}.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}.cursor-not-allowed{cursor:not-allowed}.appearance-none{appearance:none}.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}.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)}.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)}";
|
|
153
|
+
const BcmButtonStyle0 = buttonCss;
|
|
154
|
+
|
|
155
|
+
const BcmButton = class {
|
|
156
|
+
constructor(hostRef) {
|
|
157
|
+
index.registerInstance(this, hostRef);
|
|
158
|
+
this.bcmClick = index.createEvent(this, "bcmClick", 1);
|
|
159
|
+
this.bcmFocus = index.createEvent(this, "bcmFocus", 1);
|
|
160
|
+
this.bcmBlur = index.createEvent(this, "bcmBlur", 1);
|
|
161
|
+
/** Defines the main visual style of the button */
|
|
162
|
+
this.kind = 'primary';
|
|
163
|
+
/** Controls the button size */
|
|
164
|
+
this.size = 'medium';
|
|
165
|
+
/** Defines the button's status/state color */
|
|
166
|
+
this.status = 'default';
|
|
167
|
+
/** Icon placement (prefix/suffix) */
|
|
168
|
+
this.iconPosition = 'prefix';
|
|
169
|
+
/** Icon-only button mode */
|
|
170
|
+
this.iconOnly = false;
|
|
171
|
+
/** Full width button */
|
|
172
|
+
this.fullWidth = false;
|
|
173
|
+
/** HTML button type */
|
|
174
|
+
this.type = 'button';
|
|
175
|
+
/** Loading state */
|
|
176
|
+
this.loading = false;
|
|
177
|
+
/** Disabled state */
|
|
178
|
+
this.disabled = false;
|
|
179
|
+
/** Active state */
|
|
180
|
+
this.active = false;
|
|
181
|
+
this.handleClick = (event) => {
|
|
182
|
+
if (!this.disabled && !this.loading) {
|
|
183
|
+
this.bcmClick.emit(event);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
this.handleFocus = (event) => {
|
|
187
|
+
this.bcmFocus.emit(event);
|
|
188
|
+
};
|
|
189
|
+
this.handleBlur = (event) => {
|
|
190
|
+
this.bcmBlur.emit(event);
|
|
191
|
+
};
|
|
192
|
+
this.buttonClass = index$1.ce({
|
|
193
|
+
base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',
|
|
194
|
+
variants: {
|
|
195
|
+
size: {
|
|
196
|
+
small: 'text-size-4 py-px px-2 min-h-6',
|
|
197
|
+
medium: 'text-size-5 py-0.5 px-3 min-h-8',
|
|
198
|
+
large: 'text-size-6 py-1 px-3 min-h-10',
|
|
199
|
+
},
|
|
200
|
+
kind: {
|
|
201
|
+
primary: 'kind-primary',
|
|
202
|
+
ghost: 'kind-ghost',
|
|
203
|
+
text: 'kind-text',
|
|
204
|
+
outline: 'kind-outline',
|
|
205
|
+
},
|
|
206
|
+
fullWidth: {
|
|
207
|
+
true: 'full-width w-full',
|
|
208
|
+
},
|
|
209
|
+
disabled: {
|
|
210
|
+
true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',
|
|
211
|
+
false: [
|
|
212
|
+
'cursor-pointer',
|
|
213
|
+
'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',
|
|
214
|
+
'hover:bg-[--bcm-final-hover-bg-color]',
|
|
215
|
+
'active:bg-[--bcm-final-active-bg-color]',
|
|
216
|
+
'focus-visible:ring',
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
loading: {
|
|
220
|
+
true: '',
|
|
221
|
+
},
|
|
222
|
+
position: {
|
|
223
|
+
first: 'position-first',
|
|
224
|
+
middle: 'position-middle',
|
|
225
|
+
last: 'position-last',
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
defaultVariants: {
|
|
229
|
+
size: 'medium',
|
|
230
|
+
kind: 'primary',
|
|
231
|
+
fullWidth: false,
|
|
232
|
+
disabled: false,
|
|
233
|
+
loading: false,
|
|
234
|
+
},
|
|
235
|
+
}, {
|
|
236
|
+
twMerge: false,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
get buttonText() {
|
|
240
|
+
return this.text || (this.variant ? variantOptions[this.variant].text : '');
|
|
241
|
+
}
|
|
242
|
+
get buttonIcon() {
|
|
243
|
+
if (this.variant && variantOptions[this.variant].icon) {
|
|
244
|
+
return {
|
|
245
|
+
icon: variantOptions[this.variant].icon,
|
|
246
|
+
position: variantOptions[this.variant].iconPosition || 'prefix',
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
icon: this.icon,
|
|
251
|
+
position: this.iconPosition,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
get buttonStatus() {
|
|
255
|
+
return this.variant ? variantOptions[this.variant].status : this.status;
|
|
256
|
+
}
|
|
257
|
+
get buttonStyles() {
|
|
258
|
+
const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;
|
|
259
|
+
// These are the internal default styles based on component props (kind, status)
|
|
260
|
+
const kindStyleMap = {
|
|
261
|
+
primary: {
|
|
262
|
+
'--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,
|
|
263
|
+
'--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,
|
|
264
|
+
'--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,
|
|
265
|
+
'--bcm-button-border': 'transparent',
|
|
266
|
+
'--bcm-button-text': 'var(--bcm-ui-color-text-base)',
|
|
267
|
+
},
|
|
268
|
+
outline: {
|
|
269
|
+
'--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',
|
|
270
|
+
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
271
|
+
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
272
|
+
'--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,
|
|
273
|
+
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
274
|
+
},
|
|
275
|
+
ghost: {
|
|
276
|
+
'--bcm-button-bg': 'transparent',
|
|
277
|
+
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
278
|
+
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
279
|
+
'--bcm-button-border': 'transparent',
|
|
280
|
+
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
281
|
+
},
|
|
282
|
+
text: {
|
|
283
|
+
'--bcm-button-bg': 'transparent',
|
|
284
|
+
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
285
|
+
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
286
|
+
'--bcm-button-border': 'transparent',
|
|
287
|
+
'--bcm-button-text': `var(--bcm-ui-color-text-${status})`,
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
const internalDefaultStyles = kindStyleMap[this.kind];
|
|
291
|
+
// These are the "final" CSS custom properties used by the component's styling.
|
|
292
|
+
// They use the "--bcm-button-custom-..." token if provided by the user,
|
|
293
|
+
// otherwise, they fall back to the internal "--bcm-button-..." style defined above.
|
|
294
|
+
const finalEffectiveStyles = {
|
|
295
|
+
'--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,
|
|
296
|
+
'--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,
|
|
297
|
+
'--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,
|
|
298
|
+
'--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,
|
|
299
|
+
'--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,
|
|
300
|
+
};
|
|
301
|
+
// return kindStyleMap[this.kind];
|
|
302
|
+
return Object.assign(Object.assign({}, internalDefaultStyles), finalEffectiveStyles);
|
|
303
|
+
}
|
|
304
|
+
render() {
|
|
305
|
+
const { icon, position } = this.buttonIcon;
|
|
306
|
+
return (index.h(index.Host, { key: '914c4285f46931841225bb3ec03374424bebf005' }, index.h("button", { key: '56b3364b113a4fd6f97c9a6e6b3e3e14fc814de0', 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({
|
|
307
|
+
size: this.size,
|
|
308
|
+
kind: this.kind,
|
|
309
|
+
fullWidth: this.fullWidth,
|
|
310
|
+
disabled: this.disabled,
|
|
311
|
+
loading: this.loading,
|
|
312
|
+
position: this.position,
|
|
313
|
+
}) }, this.loading && index.h("slot", { key: '0f8c5c99e3489bf49ae66f7b6803f4b46b9b6684', name: "loading" }), index.h("span", { key: '6ecbe1b1eb0c4b7fe389dc923e22df21dc33cad3' }, index.h("slot", { key: 'ac5ccada947a49b0995e149082b15a5aeb885a85', name: "prefix" }, position === 'prefix' && icon && index.h("i", { key: '32f1363e0300fbaa20789b9b5259f5b36f5fe86a', class: ' leading-none ' + icon }))), index.h("slot", { key: 'acfc12c837c3be3025a2c4a9be3de02a116bdfa3' }, this.buttonText), index.h("span", { key: 'e7ff604974e2489bc791d9e853d476e88334c75b' }, index.h("slot", { key: '2a8e9d5db9e907f710da9728ac8cc85c53d8864a', name: "suffix" }, position === 'suffix' && icon && index.h("i", { key: 'a7d25eb005aef8ed4aa807004bb79fc55c45d3de', class: ' leading-none ' + icon }))))));
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
BcmButton.style = BcmButtonStyle0;
|
|
317
|
+
|
|
318
|
+
const dropdownCss = ".visible{visibility:visible}.hidden{display:none}.static{position:static}.flex{display:flex}.max-h-64{max-height:16rem}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.items-center{align-items:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default)}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}.outline{outline-style:solid}";
|
|
319
|
+
const BcmDropdownStyle0 = dropdownCss;
|
|
320
|
+
|
|
321
|
+
const Dropdown = class {
|
|
322
|
+
constructor(hostRef) {
|
|
323
|
+
index.registerInstance(this, hostRef);
|
|
324
|
+
this.bcmDropdownChange = index.createEvent(this, "bcmDropdownChange", 1);
|
|
325
|
+
this.isReady = false;
|
|
326
|
+
this.dropdownItems = [];
|
|
327
|
+
this.dropdownClass = index$1.ce({
|
|
328
|
+
base: 'dropdown flex flex-col items-center min-w-10 shadow-3 max-w-64 max-h-64 w-full bg-color-basic-panel rounded-lg py-1.5 overflow-y-auto',
|
|
329
|
+
});
|
|
330
|
+
this.handleSlotChange = () => {
|
|
331
|
+
this.dropdownItems = Array.from(this.host.querySelectorAll('bcm-dropdown-item'));
|
|
332
|
+
if (this.dropdownItems.length === 0) {
|
|
333
|
+
console.warn('No dropdown items found in dropdown component');
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
componentDidLoad() {
|
|
338
|
+
const button = this.host.shadowRoot.querySelector('bcm-button');
|
|
339
|
+
if (button) {
|
|
340
|
+
this.buttonRef = button;
|
|
341
|
+
this.isReady = true;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
handleDropdownItemChange(event) {
|
|
345
|
+
var _a;
|
|
346
|
+
const { element, selected } = event === null || event === void 0 ? void 0 : event.detail;
|
|
347
|
+
(_a = this.dropdownItems) === null || _a === void 0 ? void 0 : _a.forEach(item => {
|
|
348
|
+
if (item != element) {
|
|
349
|
+
item.selected = false;
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
this.bcmDropdownChange.emit({
|
|
353
|
+
element: element,
|
|
354
|
+
selected,
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
render() {
|
|
358
|
+
return (index.h(index.Host, { key: 'bbbe833906ad9261f0e186a73c38838895b4163a' }, index.h("bcm-button", { key: 'bc658a949cd8d65b92ec8458d6f7fc310a72ef4f', kind: "outline" }, index.h("span", { key: '3ff8e4e6765ea6bc1c8b41094ea7b7d928027d49', part: "text" }, this.text)), this.isReady && (index.h("bcm-linked", { key: 'c625fa0a88c0e88d8ee4b8a9e76e04d2feabb34c', targetElement: this.buttonRef }, index.h("div", { key: 'e45943e172eef094f9009123c8267b74641d5087', part: "dropdown-container", class: this.dropdownClass() }, index.h("slot", { key: 'd6b7558138785231877ab570b3e345b3deae008b', onSlotchange: this.handleSlotChange }))))));
|
|
359
|
+
}
|
|
360
|
+
get host() { return index.getElement(this); }
|
|
361
|
+
};
|
|
362
|
+
Dropdown.style = BcmDropdownStyle0;
|
|
363
|
+
|
|
364
|
+
const dropdownItemCss = ".flex{display:flex}:host{display:inline-block;width:100%}::slotted([slot=left-content]){align-items:center;display:flex;flex-direction:row;gap:8px}::slotted([slot=right-content]){align-items:center;display:flex;flex-direction:row;gap:8px}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.gap-2{gap:.5rem}.text-pretty{text-wrap:pretty}.bg-\\[var\\(--bcm-ui-color-background-base-active\\)\\]{background-color:var(--bcm-ui-color-background-base-active)}.bg-\\[var\\(--bcm-ui-color-background-palette-red-default\\)\\]{background-color:var(--bcm-ui-color-background-palette-red-default)}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.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)}.hover\\:bg-\\[var\\(--bcm-ui-color-background-base-active\\)\\]:hover{background-color:var(--bcm-ui-color-background-base-active)}.hover\\:bg-\\[var\\(--bcm-ui-color-background-base-hover\\)\\]:hover{background-color:var(--bcm-ui-color-background-base-hover)}.hover\\:bg-\\[var\\(--bcm-ui-color-background-palette-red-default\\)\\]:hover{background-color:var(--bcm-ui-color-background-palette-red-default)}";
|
|
365
|
+
const BcmDropdownItemStyle0 = dropdownItemCss;
|
|
366
|
+
|
|
367
|
+
const DropdownItem = class {
|
|
368
|
+
constructor(hostRef) {
|
|
369
|
+
index.registerInstance(this, hostRef);
|
|
370
|
+
this.bcmDropDownItemChange = index.createEvent(this, "bcmDropDownItemChange", 1);
|
|
371
|
+
this.selected = false;
|
|
372
|
+
this.error = false;
|
|
373
|
+
this.disabled = false;
|
|
374
|
+
this.dropdownItemClass = index$1.ce({
|
|
375
|
+
base: 'dropdown-item bcm-ui-element bcm-ui-content-display flex flex-row gap-2 py-2 px-4 cursor-pointer text-color',
|
|
376
|
+
variants: {
|
|
377
|
+
selected: {
|
|
378
|
+
true: 'bg-[var(--bcm-ui-color-background-base-active)] hover:bg-[var(--bcm-ui-color-background-base-active)]',
|
|
379
|
+
false: 'hover:bg-[var(--bcm-ui-color-background-base-hover)]',
|
|
380
|
+
},
|
|
381
|
+
error: {
|
|
382
|
+
true: 'bg-[var(--bcm-ui-color-background-palette-red-default)] hover:bg-[var(--bcm-ui-color-background-palette-red-default)]',
|
|
383
|
+
false: '',
|
|
384
|
+
},
|
|
385
|
+
disabled: {
|
|
386
|
+
true: '', // should be discuss with ux team
|
|
387
|
+
false: '',
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
defaultVariants: {
|
|
391
|
+
selected: false,
|
|
392
|
+
error: false,
|
|
393
|
+
disabled: false,
|
|
394
|
+
},
|
|
395
|
+
}, {
|
|
396
|
+
twMerge: false,
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
handleClick() {
|
|
400
|
+
this.selected = true;
|
|
401
|
+
this.bcmDropDownItemChange.emit({
|
|
402
|
+
element: this.host,
|
|
403
|
+
selected: this.selected,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
render() {
|
|
407
|
+
var _a;
|
|
408
|
+
return (index.h("div", { key: 'dab286a93e70df2389820986b12dbb099686a949', "aria-checked": this.selected, class: this.dropdownItemClass({
|
|
409
|
+
selected: this.selected,
|
|
410
|
+
error: this.error,
|
|
411
|
+
}), onClick: () => this.handleClick() }, index.h("slot", { key: 'd8b3f85acfa5f9744cdcd7aac41cce576123ff2b', name: "left-content" }, this.icon && index.h("bcm-icon", { key: '4a8908b05d48832b5758fa430f8d188b2bcb2caf', "icon-name": this.icon })), index.h("div", { key: '233863671bd28de9c5bc45f7221398f04297dcaa', class: "flex flex-row text-pretty w-full" }, index.h("slot", { key: 'b2cf533aff90f2bff5328d26b964f00664d42473' }, this.text)), index.h("slot", { key: '3f423b125ba32fe7d593a0cb5d000b7a6db8f172', name: "right-content" }, (_a = this.rightIcons) === null || _a === void 0 ? void 0 : _a.map(icon => (index.h("bcm-icon", { "icon-name": icon }))))));
|
|
412
|
+
}
|
|
413
|
+
get host() { return index.getElement(this); }
|
|
414
|
+
};
|
|
415
|
+
DropdownItem.style = BcmDropdownItemStyle0;
|
|
416
|
+
|
|
417
|
+
const linkedCss = ".absolute{position:absolute}.relative{position:relative}.block{display:block}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host{display:block;position:relative}.floating-content{min-width:-moz-max-content;min-width:max-content;transition:opacity .2s ease,visibility .2s ease,transform .2s ease;will-change:transform,opacity}.floating-visible{animation:fadeInScale .2s ease-out}.floating-hidden{pointer-events:none}.floating-wrapper{position:relative;z-index:1}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.floating-arrow{z-index:-1}.floating-arrow,.floating-arrow:before{height:10px;position:absolute;width:10px}.floating-arrow:before{background:#fff;border:1px solid #e2e8f0;content:\"\";transform:rotate(45deg)}.arrow-top{bottom:-5px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%)}.arrow-bottom{top:-5px}.arrow-left{right:-5px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%)}.arrow-right{left:-5px}.arrow-top:before{border-bottom:0;border-right:0}.arrow-bottom:before{border-left:0;border-top:0}.arrow-left:before{border-right:0;border-top:0}.arrow-right:before{border-bottom:0;border-left:0}@media (max-width:768px){.floating-content{max-height:calc(100vh - 32px);max-width:calc(100vw - 32px)}}.static{position:static}.flex{display:flex}.max-h-64{max-height:16rem}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.items-center{align-items:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default)}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}.outline{outline-style:solid}.visible{visibility:visible}.fixed{position:fixed}.hidden{display:none}.resize{resize:both}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}";
|
|
418
|
+
const BcmLinkedStyle0 = linkedCss;
|
|
419
|
+
|
|
420
|
+
const BcmLinked = class {
|
|
421
|
+
constructor(hostRef) {
|
|
422
|
+
index.registerInstance(this, hostRef);
|
|
423
|
+
this.bcmShow = index.createEvent(this, "bcmShow", 7);
|
|
424
|
+
this.bcmHide = index.createEvent(this, "bcmHide", 7);
|
|
425
|
+
this.bcmShown = index.createEvent(this, "bcmShown", 7);
|
|
426
|
+
this.bcmHidden = index.createEvent(this, "bcmHidden", 7);
|
|
427
|
+
// Trigger configuration
|
|
428
|
+
this.trigger = 'click';
|
|
429
|
+
this.placement = 'bottom-start';
|
|
430
|
+
// Timing configuration
|
|
431
|
+
this.showDelay = 0;
|
|
432
|
+
this.hideDelay = 0;
|
|
433
|
+
// Positioning configuration
|
|
434
|
+
this.offset = 8;
|
|
435
|
+
this.arrow = false;
|
|
436
|
+
this.disabled = false;
|
|
437
|
+
// Style configuration
|
|
438
|
+
this.zIndex = 1000;
|
|
439
|
+
this.appendToBody = false;
|
|
440
|
+
this.destroyOnHide = false;
|
|
441
|
+
// State
|
|
442
|
+
this.isVisible = false;
|
|
443
|
+
this.isReady = false;
|
|
444
|
+
this.handleMouseEnter = () => {
|
|
445
|
+
this.clearTimeouts();
|
|
446
|
+
if (this.showDelay > 0) {
|
|
447
|
+
this.showTimeout = setTimeout(() => this.show(), this.showDelay);
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
this.show();
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
this.handleMouseLeave = () => {
|
|
454
|
+
this.clearTimeouts();
|
|
455
|
+
if (this.hideDelay > 0) {
|
|
456
|
+
this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
this.hide();
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
this.handleFloatingMouseEnter = () => {
|
|
463
|
+
this.clearTimeouts();
|
|
464
|
+
};
|
|
465
|
+
this.handleFloatingMouseLeave = () => {
|
|
466
|
+
this.clearTimeouts();
|
|
467
|
+
if (this.hideDelay > 0) {
|
|
468
|
+
this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
this.hide();
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
this.handleClick = (e) => {
|
|
475
|
+
e.stopPropagation();
|
|
476
|
+
this.toggle();
|
|
477
|
+
};
|
|
478
|
+
this.handleFocus = () => {
|
|
479
|
+
this.show();
|
|
480
|
+
};
|
|
481
|
+
this.handleBlur = () => {
|
|
482
|
+
this.hide();
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
// Watch for changes
|
|
486
|
+
setupTarget() {
|
|
487
|
+
this.disconnectTarget();
|
|
488
|
+
this.connectTarget();
|
|
489
|
+
}
|
|
490
|
+
onVisibilityChange(newValue) {
|
|
491
|
+
if (newValue) {
|
|
492
|
+
this.updatePosition();
|
|
493
|
+
this.bcmShown.emit();
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
this.bcmHidden.emit();
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
componentDidLoad() {
|
|
500
|
+
requestAnimationFrame(() => {
|
|
501
|
+
this.floatingEl = this.host.shadowRoot.querySelector('.floating-content');
|
|
502
|
+
this.isReady = true;
|
|
503
|
+
this.connectTarget();
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
disconnectedCallback() {
|
|
507
|
+
var _a, _b;
|
|
508
|
+
this.disconnectTarget();
|
|
509
|
+
this.clearTimeouts();
|
|
510
|
+
(_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
511
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
512
|
+
}
|
|
513
|
+
connectTarget() {
|
|
514
|
+
if (!this.isReady)
|
|
515
|
+
return;
|
|
516
|
+
// Find target element
|
|
517
|
+
this.targetEl =
|
|
518
|
+
this.targetElement || (this.targetId ? document.getElementById(this.targetId) : null) || this.host.previousElementSibling || this.host.parentElement;
|
|
519
|
+
if (!this.targetEl) {
|
|
520
|
+
console.warn('bcm-linked: No target element found');
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
// Setup event listeners based on trigger type
|
|
524
|
+
this.setupEventListeners();
|
|
525
|
+
// Setup auto-update for position
|
|
526
|
+
if (this.targetEl && this.floatingEl) {
|
|
527
|
+
this.cleanup = floatingUi_dom_esm.autoUpdate(this.targetEl, this.floatingEl, () => {
|
|
528
|
+
if (this.isVisible) {
|
|
529
|
+
this.updatePosition();
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
// Setup resize observer for responsive positioning
|
|
534
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
535
|
+
if (this.isVisible) {
|
|
536
|
+
this.updatePosition();
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
this.resizeObserver.observe(this.floatingEl);
|
|
540
|
+
}
|
|
541
|
+
disconnectTarget() {
|
|
542
|
+
var _a, _b;
|
|
543
|
+
if (this.targetEl) {
|
|
544
|
+
this.removeEventListeners();
|
|
545
|
+
}
|
|
546
|
+
(_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
547
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
548
|
+
}
|
|
549
|
+
setupEventListeners() {
|
|
550
|
+
var _a, _b;
|
|
551
|
+
if (!this.targetEl || this.disabled)
|
|
552
|
+
return;
|
|
553
|
+
switch (this.trigger) {
|
|
554
|
+
case 'hover':
|
|
555
|
+
this.targetEl.addEventListener('mouseenter', this.handleMouseEnter);
|
|
556
|
+
this.targetEl.addEventListener('mouseleave', this.handleMouseLeave);
|
|
557
|
+
(_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', this.handleFloatingMouseEnter);
|
|
558
|
+
(_b = this.floatingEl) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', this.handleFloatingMouseLeave);
|
|
559
|
+
break;
|
|
560
|
+
case 'click':
|
|
561
|
+
this.targetEl.addEventListener('click', this.handleClick);
|
|
562
|
+
this.setupClickOutside();
|
|
563
|
+
break;
|
|
564
|
+
case 'focus':
|
|
565
|
+
this.targetEl.addEventListener('focus', this.handleFocus);
|
|
566
|
+
this.targetEl.addEventListener('blur', this.handleBlur);
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
removeEventListeners() {
|
|
571
|
+
var _a, _b;
|
|
572
|
+
if (!this.targetEl)
|
|
573
|
+
return;
|
|
574
|
+
this.targetEl.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
575
|
+
this.targetEl.removeEventListener('mouseleave', this.handleMouseLeave);
|
|
576
|
+
this.targetEl.removeEventListener('click', this.handleClick);
|
|
577
|
+
this.targetEl.removeEventListener('focus', this.handleFocus);
|
|
578
|
+
this.targetEl.removeEventListener('blur', this.handleBlur);
|
|
579
|
+
(_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', this.handleFloatingMouseEnter);
|
|
580
|
+
(_b = this.floatingEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', this.handleFloatingMouseLeave);
|
|
581
|
+
this.removeClickOutside();
|
|
582
|
+
}
|
|
583
|
+
setupClickOutside() {
|
|
584
|
+
this.clickOutsideHandler = (e) => {
|
|
585
|
+
var _a, _b;
|
|
586
|
+
const target = e.target;
|
|
587
|
+
if (!((_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.contains(target)) && !((_b = this.targetEl) === null || _b === void 0 ? void 0 : _b.contains(target)) && !this.host.contains(target)) {
|
|
588
|
+
this.hide();
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
document.addEventListener('click', this.clickOutsideHandler, true);
|
|
592
|
+
}
|
|
593
|
+
removeClickOutside() {
|
|
594
|
+
if (this.clickOutsideHandler) {
|
|
595
|
+
document.removeEventListener('click', this.clickOutsideHandler, true);
|
|
596
|
+
this.clickOutsideHandler = undefined;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
clearTimeouts() {
|
|
600
|
+
if (this.showTimeout) {
|
|
601
|
+
clearTimeout(this.showTimeout);
|
|
602
|
+
this.showTimeout = undefined;
|
|
603
|
+
}
|
|
604
|
+
if (this.hideTimeout) {
|
|
605
|
+
clearTimeout(this.hideTimeout);
|
|
606
|
+
this.hideTimeout = undefined;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
async updatePosition() {
|
|
610
|
+
if (!this.targetEl || !this.floatingEl || !this.isVisible)
|
|
611
|
+
return;
|
|
612
|
+
const middleware = [
|
|
613
|
+
floatingUi_dom_esm.offset(this.offset),
|
|
614
|
+
floatingUi_dom_esm.flip({
|
|
615
|
+
fallbackPlacements: ['top-start', 'bottom-start', 'right-start', 'left-start'],
|
|
616
|
+
}),
|
|
617
|
+
floatingUi_dom_esm.shift({ padding: 8 }),
|
|
618
|
+
];
|
|
619
|
+
const { x, y, placement } = await floatingUi_dom_esm.computePosition(this.targetEl, this.floatingEl, {
|
|
620
|
+
placement: this.placement,
|
|
621
|
+
middleware,
|
|
622
|
+
strategy: 'fixed',
|
|
623
|
+
});
|
|
624
|
+
Object.assign(this.floatingEl.style, {
|
|
625
|
+
left: `${x}px`,
|
|
626
|
+
top: `${y}px`,
|
|
627
|
+
zIndex: this.zIndex.toString(),
|
|
628
|
+
});
|
|
629
|
+
// Update arrow if enabled
|
|
630
|
+
if (this.arrow) {
|
|
631
|
+
this.updateArrow(placement);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
updateArrow(placement) {
|
|
635
|
+
var _a;
|
|
636
|
+
const arrow = (_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.querySelector('.floating-arrow');
|
|
637
|
+
if (!arrow)
|
|
638
|
+
return;
|
|
639
|
+
// Remove all arrow classes
|
|
640
|
+
arrow.className = 'floating-arrow';
|
|
641
|
+
// Add placement-specific class
|
|
642
|
+
const side = placement.split('-')[0];
|
|
643
|
+
arrow.classList.add(`arrow-${side}`);
|
|
644
|
+
}
|
|
645
|
+
async show() {
|
|
646
|
+
if (this.disabled || this.isVisible)
|
|
647
|
+
return;
|
|
648
|
+
this.bcmShow.emit();
|
|
649
|
+
this.isVisible = true;
|
|
650
|
+
// Don't move to body in StencilJS, keep in shadow DOM
|
|
651
|
+
// if (this.appendToBody && this.floatingEl) {
|
|
652
|
+
// document.body.appendChild(this.floatingEl);
|
|
653
|
+
// }
|
|
654
|
+
await this.updatePosition();
|
|
655
|
+
}
|
|
656
|
+
async hide() {
|
|
657
|
+
if (!this.isVisible)
|
|
658
|
+
return;
|
|
659
|
+
this.bcmHide.emit();
|
|
660
|
+
this.isVisible = false;
|
|
661
|
+
if (this.destroyOnHide && this.floatingEl && this.floatingEl.parentNode) {
|
|
662
|
+
this.floatingEl.parentNode.removeChild(this.floatingEl);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
async toggle() {
|
|
666
|
+
if (this.isVisible) {
|
|
667
|
+
await this.hide();
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
await this.show();
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
async updatePositioning() {
|
|
674
|
+
await this.updatePosition();
|
|
675
|
+
}
|
|
676
|
+
render() {
|
|
677
|
+
const floatingClasses = {
|
|
678
|
+
'floating-content': true,
|
|
679
|
+
'floating-visible': this.isVisible,
|
|
680
|
+
'floating-hidden': !this.isVisible,
|
|
681
|
+
'floating-with-arrow': this.arrow,
|
|
682
|
+
'floating-destroy-on-hide': this.destroyOnHide,
|
|
683
|
+
};
|
|
684
|
+
return [
|
|
685
|
+
// Portal div to body for positioning, but keep slot in shadow DOM
|
|
686
|
+
index.h("div", { key: 'b6af79e7bb9a025d39686d02416175ace281a19a', class: floatingClasses, style: {
|
|
687
|
+
position: 'fixed',
|
|
688
|
+
top: '0px',
|
|
689
|
+
left: '0px',
|
|
690
|
+
zIndex: this.zIndex.toString(),
|
|
691
|
+
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
692
|
+
opacity: this.isVisible ? '1' : '0',
|
|
693
|
+
pointerEvents: this.isVisible ? 'auto' : 'none',
|
|
694
|
+
} }, this.arrow && index.h("div", { key: 'ec25846caa6c8c3ee71ca01e802f714a01491a67', class: "floating-arrow" }), index.h("div", { key: '7a855e6caaee49c17c1f57d8283af789e7bb458f', class: "floating-wrapper" }, index.h("slot", { key: 'ba15b2faf8a0c7e6fa14441aa366deaa582aa419' }))),
|
|
695
|
+
// Hidden content holder for slot fallback
|
|
696
|
+
index.h("div", { key: 'e1542255d3d34e5c3d2d3b3e5d752848dc706ed5', style: { display: 'none' } }, index.h("slot", { key: 'aa62f7a2a3f109160082fb6ef798bd7b61760fb2', name: "fallback" })),
|
|
697
|
+
];
|
|
698
|
+
}
|
|
699
|
+
get host() { return index.getElement(this); }
|
|
700
|
+
static get watchers() { return {
|
|
701
|
+
"targetId": ["setupTarget"],
|
|
702
|
+
"targetElement": ["setupTarget"],
|
|
703
|
+
"isVisible": ["onVisibilityChange"]
|
|
704
|
+
}; }
|
|
705
|
+
};
|
|
706
|
+
BcmLinked.style = BcmLinkedStyle0;
|
|
707
|
+
|
|
708
|
+
const variantTagMap = {
|
|
709
|
+
display: 'h1',
|
|
710
|
+
heading1: 'h2',
|
|
711
|
+
heading2: 'h3',
|
|
712
|
+
title1: 'h4',
|
|
713
|
+
title2: 'h5',
|
|
714
|
+
title3: 'h6',
|
|
715
|
+
body: 'p',
|
|
716
|
+
bodyAccent: 'p',
|
|
717
|
+
helper: 'p',
|
|
718
|
+
caption: 'p',
|
|
719
|
+
label: 'label',
|
|
720
|
+
placeholder: 'p',
|
|
721
|
+
link: 'a',
|
|
722
|
+
info: 'p',
|
|
723
|
+
infoAccent: 'p',
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
const textCss = ".static{position:static}.m-0{margin:0}.appearance-none{appearance:none}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-0{padding:0}.text-size-12{font-size:var(--bcm-ui-font-size-12,60px);line-height:var(--bcm-ui-line-height-12,72px)}.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)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.text-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-color-caption{color:var(--bcm-ui-color-text-caption)}.text-color-default{color:var(--bcm-ui-color-text-default)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-header{color:var(--bcm-ui-color-text-header)}.text-color-helper{color:var(--bcm-ui-color-text-helper)}.text-color-label{color:var(--bcm-ui-color-text-label)}.text-color-placeholder{color:var(--bcm-ui-color-text-placeholder)}.text-color-primary{color:var(--bcm-ui-color-text-primary)}.underline{text-decoration-line:underline}.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)}";
|
|
727
|
+
const BcmTextStyle0 = textCss;
|
|
728
|
+
|
|
729
|
+
const BcmText = class {
|
|
730
|
+
constructor(hostRef) {
|
|
731
|
+
index.registerInstance(this, hostRef);
|
|
732
|
+
/** Text variant */
|
|
733
|
+
this.variant = 'body';
|
|
734
|
+
/** Text size */
|
|
735
|
+
this.size = 'medium';
|
|
736
|
+
/** Text overflow behavior */
|
|
737
|
+
this.overflow = false;
|
|
738
|
+
this.variantClassMap = {
|
|
739
|
+
display: 'font-semibold text-size-12 text-color-header',
|
|
740
|
+
heading1: 'font-semibold text-size-7 text-color-header',
|
|
741
|
+
heading2: 'font-semibold text-size-6 text-color-header',
|
|
742
|
+
title1: {
|
|
743
|
+
small: 'font-semibold text-size-5 text-color-header',
|
|
744
|
+
medium: 'font-semibold text-size-6 text-color-header',
|
|
745
|
+
large: 'font-semibold text-size-7 text-color-header',
|
|
746
|
+
},
|
|
747
|
+
title2: {
|
|
748
|
+
small: 'font-semibold text-size-4 text-color-default',
|
|
749
|
+
medium: 'font-semibold text-size-5 text-color-default',
|
|
750
|
+
large: 'font-semibold text-size-6 text-color-default',
|
|
751
|
+
},
|
|
752
|
+
title3: {
|
|
753
|
+
small: 'font-semibold text-size-3 text-color-disabled',
|
|
754
|
+
medium: 'font-semibold text-size-4 text-color-disabled',
|
|
755
|
+
large: 'font-semibold text-size-5 text-color-disabled',
|
|
756
|
+
},
|
|
757
|
+
body: {
|
|
758
|
+
small: 'font-regular text-size-4 text-color-default',
|
|
759
|
+
medium: 'font-regular text-size-5 text-color-default',
|
|
760
|
+
large: 'font-regular text-size-6 text-color-default',
|
|
761
|
+
},
|
|
762
|
+
bodyAccent: {
|
|
763
|
+
small: 'font-medium text-size-4 text-color-default',
|
|
764
|
+
medium: 'font-medium text-size-5 text-color-default',
|
|
765
|
+
large: 'font-medium text-size-6 text-color-default',
|
|
766
|
+
},
|
|
767
|
+
helper: {
|
|
768
|
+
small: 'font-regular text-size-4 text-color-helper',
|
|
769
|
+
medium: 'font-regular text-size-5 text-color-helper',
|
|
770
|
+
large: 'font-regular text-size-6 text-color-helper',
|
|
771
|
+
},
|
|
772
|
+
caption: {
|
|
773
|
+
small: 'font-regular text-size-3 text-color-caption',
|
|
774
|
+
medium: 'font-regular text-size-4 text-color-caption',
|
|
775
|
+
large: 'font-regular text-size-5 text-color-caption',
|
|
776
|
+
},
|
|
777
|
+
link: {
|
|
778
|
+
small: 'font-medium text-size-4 underline text-color-primary',
|
|
779
|
+
medium: 'font-medium text-size-5 underline text-color-primary',
|
|
780
|
+
large: 'font-medium text-size-6 underline text-color-primary',
|
|
781
|
+
},
|
|
782
|
+
label: {
|
|
783
|
+
small: 'font-medium text-size-3 text-color-label',
|
|
784
|
+
medium: 'font-medium text-size-4 text-color-label',
|
|
785
|
+
large: 'font-medium text-size-5 text-color-label',
|
|
786
|
+
},
|
|
787
|
+
placeholder: {
|
|
788
|
+
small: 'font-regular text-size-4 text-color-placeholder',
|
|
789
|
+
medium: 'font-regular text-size-5 text-color-placeholder',
|
|
790
|
+
large: 'font-regular text-size-6 text-color-placeholder',
|
|
791
|
+
},
|
|
792
|
+
info: {
|
|
793
|
+
small: 'font-regular text-size-3 text-color-default',
|
|
794
|
+
medium: 'font-regular text-size-4 text-color-default',
|
|
795
|
+
large: 'font-regular text-size-5 text-color-default',
|
|
796
|
+
},
|
|
797
|
+
infoAccent: {
|
|
798
|
+
small: 'font-medium text-size-3 text-color-header',
|
|
799
|
+
medium: 'font-medium text-size-4 text-color-header',
|
|
800
|
+
large: 'font-medium text-size-5 text-color-header',
|
|
801
|
+
},
|
|
802
|
+
};
|
|
803
|
+
this.getTextClass = (variant, size) => {
|
|
804
|
+
const variantClasses = this.variantClassMap[variant];
|
|
805
|
+
if (typeof variantClasses === 'string') {
|
|
806
|
+
return variantClasses;
|
|
807
|
+
}
|
|
808
|
+
return variantClasses[size];
|
|
809
|
+
};
|
|
810
|
+
this.getOverflowClass = (overflow) => {
|
|
811
|
+
return overflow ? 'truncate' : '';
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
render() {
|
|
815
|
+
var _a;
|
|
816
|
+
const Tag = variantTagMap[this.variant];
|
|
817
|
+
const variantClass = this.getTextClass(this.variant, this.size);
|
|
818
|
+
const overflowClass = this.getOverflowClass((_a = this.overflow) !== null && _a !== void 0 ? _a : false);
|
|
819
|
+
return (index.h(Tag, { key: '0c9e834dbe47309b7ec41c7c79bf07bf7d825f26', class: index$2.classNames('bcm-text appearance-none m-0 p-0', variantClass, overflowClass), part: "text" }, index.h("slot", { key: 'c947db45b7b7147c0780bbb3294802cd0f1be268' }, this.text)));
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
BcmText.style = BcmTextStyle0;
|
|
823
|
+
|
|
824
|
+
exports.bcm_button = BcmButton;
|
|
825
|
+
exports.bcm_dropdown = Dropdown;
|
|
826
|
+
exports.bcm_dropdown_item = DropdownItem;
|
|
827
|
+
exports.bcm_linked = BcmLinked;
|
|
828
|
+
exports.bcm_text = BcmText;
|
|
829
|
+
|
|
830
|
+
//# sourceMappingURL=bcm-button_5.cjs.entry.js.map
|