bromcom-ui-next 0.1.25 → 0.1.26
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/bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-tabs-trigger.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-tabs.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-6bc82dd4.entry.js +2 -0
- package/dist/bromcom-ui/p-6bc82dd4.entry.js.map +1 -0
- package/dist/bromcom-ui/p-bd293ffd.entry.js +2 -0
- package/dist/bromcom-ui/p-bd293ffd.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-c709842a.entry.js → p-d3206345.entry.js} +2 -2
- package/dist/bromcom-ui/p-d3206345.entry.js.map +1 -0
- package/dist/cjs/bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-button_8.cjs.entry.js +1414 -0
- package/dist/cjs/bcm-button_8.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-tabs-trigger.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-tabs.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-tabs.entry.cjs.js.map +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/tabs/tabs-trigger.component.js +2 -2
- package/dist/collection/components/tabs/tabs-trigger.component.js.map +1 -1
- package/dist/collection/components/tabs/tabs-trigger.css +1 -1
- package/dist/collection/components/tabs/tabs.component.js +2 -2
- package/dist/collection/components/tabs/tabs.component.js.map +1 -1
- package/dist/components/bcm-button.js +1 -1
- package/dist/components/bcm-dropdown.js +1 -1
- package/dist/components/bcm-pop-confirm.js +1 -1
- package/dist/components/bcm-tabs-trigger.js +3 -3
- package/dist/components/bcm-tabs-trigger.js.map +1 -1
- package/dist/components/bcm-tabs.js +2 -2
- package/dist/components/bcm-tabs.js.map +1 -1
- package/dist/components/{p-e6quW4es.js → p-BdGAZ8M0.js} +3 -3
- package/dist/components/{p-e6quW4es.js.map → p-BdGAZ8M0.js.map} +1 -1
- package/dist/esm/bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.js.map +1 -0
- package/dist/esm/bcm-button_8.entry.js +1405 -0
- package/dist/esm/bcm-button_8.entry.js.map +1 -0
- package/dist/esm/bcm-tabs-trigger.entry.js +3 -3
- package/dist/esm/bcm-tabs-trigger.entry.js.map +1 -1
- package/dist/esm/bcm-tabs.entry.js +2 -2
- package/dist/esm/bcm-tabs.entry.js.map +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/bcm-button.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-drawer.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-dropdown-item.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-dropdown.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-input.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-linked.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-shortcut.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-text.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/p-00dc393e.entry.js +0 -2
- package/dist/bromcom-ui/p-00dc393e.entry.js.map +0 -1
- package/dist/bromcom-ui/p-0421d64a.entry.js +0 -2
- package/dist/bromcom-ui/p-0421d64a.entry.js.map +0 -1
- package/dist/bromcom-ui/p-06656239.entry.js +0 -2
- package/dist/bromcom-ui/p-06656239.entry.js.map +0 -1
- package/dist/bromcom-ui/p-48c554fc.entry.js +0 -2
- package/dist/bromcom-ui/p-48c554fc.entry.js.map +0 -1
- package/dist/bromcom-ui/p-b37f2434.entry.js +0 -2
- package/dist/bromcom-ui/p-b37f2434.entry.js.map +0 -1
- package/dist/bromcom-ui/p-c709842a.entry.js.map +0 -1
- package/dist/bromcom-ui/p-e989b918.entry.js +0 -2
- package/dist/bromcom-ui/p-e989b918.entry.js.map +0 -1
- package/dist/bromcom-ui/p-ed796a79.entry.js +0 -2
- package/dist/bromcom-ui/p-ed796a79.entry.js.map +0 -1
- package/dist/bromcom-ui/p-edd01d0d.entry.js +0 -2
- package/dist/bromcom-ui/p-edd01d0d.entry.js.map +0 -1
- package/dist/bromcom-ui/p-f34bfa88.entry.js +0 -2
- package/dist/bromcom-ui/p-f34bfa88.entry.js.map +0 -1
- package/dist/cjs/bcm-button.cjs.entry.js +0 -316
- package/dist/cjs/bcm-button.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-button.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +0 -206
- package/dist/cjs/bcm-drawer.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-drawer.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-dropdown-item.cjs.entry.js +0 -61
- package/dist/cjs/bcm-dropdown-item.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-dropdown-item.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -54
- package/dist/cjs/bcm-dropdown.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-dropdown.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-input.cjs.entry.js +0 -315
- package/dist/cjs/bcm-input.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-input.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-linked.cjs.entry.js +0 -343
- package/dist/cjs/bcm-linked.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-linked.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-shortcut.cjs.entry.js +0 -50
- package/dist/cjs/bcm-shortcut.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-shortcut.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-text.cjs.entry.js +0 -124
- package/dist/cjs/bcm-text.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-text.entry.cjs.js.map +0 -1
- package/dist/esm/bcm-button.entry.js +0 -314
- package/dist/esm/bcm-button.entry.js.map +0 -1
- package/dist/esm/bcm-drawer.entry.js +0 -204
- package/dist/esm/bcm-drawer.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-input.entry.js +0 -313
- package/dist/esm/bcm-input.entry.js.map +0 -1
- package/dist/esm/bcm-linked.entry.js +0 -341
- package/dist/esm/bcm-linked.entry.js.map +0 -1
- package/dist/esm/bcm-shortcut.entry.js +0 -48
- package/dist/esm/bcm-shortcut.entry.js.map +0 -1
- package/dist/esm/bcm-text.entry.js +0 -122
- package/dist/esm/bcm-text.entry.js.map +0 -1
|
@@ -0,0 +1,1414 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DHDrXFLM.js');
|
|
4
|
+
var tv = require('./tv-ngpIbGlG.js');
|
|
5
|
+
var index$1 = require('./index-Bp6Dd2i1.js');
|
|
6
|
+
var generateId = require('./generate-id-CG_BkTJu.js');
|
|
7
|
+
var validationMessages = require('./validation-messages-BjfpSEWk.js');
|
|
8
|
+
var floatingUi_dom = require('./floating-ui.dom-DyKmFgkP.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-flex;height:-moz-fit-content;height:fit-content;position:relative;width:-moz-fit-content;width:fit-content}:host([full-width]){width:100%}:host([position=first]) .bcm-button{border-bottom-right-radius:0;border-top-right-radius:0}:host([position=middle]) .bcm-button{border-radius:0}:host([position=last]) .bcm-button{border-bottom-left-radius:0;border-top-left-radius:0}:host([position=first].orientation-vertical) .bcm-button{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--bcm-ui-border-radius,4px);border-top-right-radius:var(--bcm-ui-border-radius,4px)}:host([position=middle].orientation-vertical) .bcm-button{border-radius:0}:host([position=last].orientation-vertical) .bcm-button{border-bottom-left-radius:var(--bcm-ui-border-radius,4px);border-bottom-right-radius:var(--bcm-ui-border-radius,4px);border-top-left-radius:0;border-top-right-radius:0}.static{position:static}.inline-flex{display:inline-flex}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-8{min-height:2rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border{border-width:1px}.border-solid{border-style:solid}.border-\\[--bcm-final-border-color\\]{border-color:var(--bcm-final-border-color)}.border-color-disabled{border-color:var(--bcm-ui-color-border-disabled)}.bg-\\[--bcm-final-bg-color\\]{background-color:var(--bcm-final-bg-color)}.bg-\\[--bcm-ui-color-background-disabled-default\\]{background-color:var(--bcm-ui-color-background-disabled-default)}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.leading-none{line-height:1}.text-\\[--bcm-final-text-color\\]{color:var(--bcm-final-text-color)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.outline-0{outline-width:0}.hover\\:bg-\\[--bcm-final-hover-bg-color\\]:hover{background-color:var(--bcm-final-hover-bg-color)}.focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.active\\:bg-\\[--bcm-final-active-bg-color\\]:active{background-color:var(--bcm-final-active-bg-color)}.flex{display:flex}.max-h-64{max-height:16rem}.min-w-10{min-width:2.5rem}.max-w-64{max-width:16rem}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.bg-color-basic-panel{background-color:var(--bcm-ui-color-background-basic-panel)}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.shadow,.shadow-3{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3{--tw-shadow:var(--bcm-ui-box-shadow-3);--tw-shadow-colored:var(--bcm-ui-box-shadow-3)}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.absolute{position:absolute}.z-\\[9999\\]{z-index:9999}.mx-auto{margin-left:auto;margin-right:auto}.hidden{display:none}.size-6{height:1.5rem;width:1.5rem}.h-2{height:.5rem}.w-4{width:1rem}.max-w-80{max-width:20rem}.max-w-96{max-width:24rem}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.text-pretty{text-wrap:pretty}.rounded-\\[--popover-radius\\]{border-radius:var(--popover-radius)}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--popover-bg\\]{background-color:var(--popover-bg)}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.font-sans{font-family:Inter,sans-serif}.text-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.text-size-inherit{font-size:inherit;line-height:inherit}.font-semibold{font-weight:600}.\\!text-color-header{color:var(--bcm-ui-color-text-header)!important}.text-\\[--text-color\\]{color:var(--text-color)}.shadow,.shadow-2{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2{--tw-shadow:var(--bcm-ui-box-shadow-2);--tw-shadow-colored:var(--bcm-ui-box-shadow-2)}.hover\\:bg-gray-100:hover{background-color:oklch(.967 .003 264.542)}";
|
|
153
|
+
|
|
154
|
+
const BcmButton = class {
|
|
155
|
+
constructor(hostRef) {
|
|
156
|
+
index.registerInstance(this, hostRef);
|
|
157
|
+
this.bcmClick = index.createEvent(this, "bcmClick", 1);
|
|
158
|
+
this.bcmFocus = index.createEvent(this, "bcmFocus", 1);
|
|
159
|
+
this.bcmBlur = index.createEvent(this, "bcmBlur", 1);
|
|
160
|
+
/** Defines the main visual style of the button */
|
|
161
|
+
this.kind = 'primary';
|
|
162
|
+
/** Controls the button size */
|
|
163
|
+
this.size = 'medium';
|
|
164
|
+
/** Defines the button's status/state color */
|
|
165
|
+
this.status = 'default';
|
|
166
|
+
/** Icon placement (prefix/suffix) */
|
|
167
|
+
this.iconPosition = 'prefix';
|
|
168
|
+
/** Icon-only button mode */
|
|
169
|
+
this.iconOnly = false;
|
|
170
|
+
/** Full width button */
|
|
171
|
+
this.fullWidth = false;
|
|
172
|
+
/** HTML button type */
|
|
173
|
+
this.type = 'button';
|
|
174
|
+
/** Loading state */
|
|
175
|
+
this.loading = false;
|
|
176
|
+
/** Disabled state */
|
|
177
|
+
this.disabled = false;
|
|
178
|
+
/** Active state */
|
|
179
|
+
this.active = false;
|
|
180
|
+
this.handleClick = (event) => {
|
|
181
|
+
if (!this.disabled && !this.loading) {
|
|
182
|
+
this.bcmClick.emit(event);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
this.handleFocus = (event) => {
|
|
186
|
+
this.bcmFocus.emit(event);
|
|
187
|
+
};
|
|
188
|
+
this.handleBlur = (event) => {
|
|
189
|
+
this.bcmBlur.emit(event);
|
|
190
|
+
};
|
|
191
|
+
this.buttonClass = tv.tv({
|
|
192
|
+
base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',
|
|
193
|
+
variants: {
|
|
194
|
+
size: {
|
|
195
|
+
small: 'text-size-4 py-px px-2 min-h-6',
|
|
196
|
+
medium: 'text-size-5 py-0.5 px-3 min-h-8',
|
|
197
|
+
large: 'text-size-6 py-1 px-3 min-h-10',
|
|
198
|
+
},
|
|
199
|
+
kind: {
|
|
200
|
+
primary: 'kind-primary',
|
|
201
|
+
ghost: 'kind-ghost',
|
|
202
|
+
text: 'kind-text',
|
|
203
|
+
outline: 'kind-outline',
|
|
204
|
+
},
|
|
205
|
+
fullWidth: {
|
|
206
|
+
true: 'full-width w-full',
|
|
207
|
+
},
|
|
208
|
+
disabled: {
|
|
209
|
+
true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',
|
|
210
|
+
false: [
|
|
211
|
+
'cursor-pointer',
|
|
212
|
+
'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',
|
|
213
|
+
'hover:bg-[--bcm-final-hover-bg-color]',
|
|
214
|
+
'active:bg-[--bcm-final-active-bg-color]',
|
|
215
|
+
'focus-visible:ring',
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
loading: {
|
|
219
|
+
true: '',
|
|
220
|
+
},
|
|
221
|
+
position: {
|
|
222
|
+
first: 'position-first',
|
|
223
|
+
middle: 'position-middle',
|
|
224
|
+
last: 'position-last',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
defaultVariants: {
|
|
228
|
+
size: 'medium',
|
|
229
|
+
kind: 'primary',
|
|
230
|
+
fullWidth: false,
|
|
231
|
+
disabled: false,
|
|
232
|
+
loading: false,
|
|
233
|
+
},
|
|
234
|
+
}, {
|
|
235
|
+
twMerge: false,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
get buttonText() {
|
|
239
|
+
return this.text || (this.variant ? variantOptions[this.variant].text : '');
|
|
240
|
+
}
|
|
241
|
+
get buttonIcon() {
|
|
242
|
+
if (this.variant && variantOptions[this.variant].icon) {
|
|
243
|
+
return {
|
|
244
|
+
icon: variantOptions[this.variant].icon,
|
|
245
|
+
position: variantOptions[this.variant].iconPosition || 'prefix',
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
return {
|
|
249
|
+
icon: this.icon,
|
|
250
|
+
position: this.iconPosition,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
get buttonStatus() {
|
|
254
|
+
return this.variant ? variantOptions[this.variant].status : this.status;
|
|
255
|
+
}
|
|
256
|
+
get buttonStyles() {
|
|
257
|
+
const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;
|
|
258
|
+
// These are the internal default styles based on component props (kind, status)
|
|
259
|
+
const kindStyleMap = {
|
|
260
|
+
primary: {
|
|
261
|
+
'--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,
|
|
262
|
+
'--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,
|
|
263
|
+
'--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,
|
|
264
|
+
'--bcm-button-border': 'transparent',
|
|
265
|
+
'--bcm-button-text': 'var(--bcm-ui-color-text-base)',
|
|
266
|
+
},
|
|
267
|
+
outline: {
|
|
268
|
+
'--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',
|
|
269
|
+
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
270
|
+
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
271
|
+
'--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,
|
|
272
|
+
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
273
|
+
},
|
|
274
|
+
ghost: {
|
|
275
|
+
'--bcm-button-bg': 'transparent',
|
|
276
|
+
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
277
|
+
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
278
|
+
'--bcm-button-border': 'transparent',
|
|
279
|
+
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
280
|
+
},
|
|
281
|
+
text: {
|
|
282
|
+
'--bcm-button-bg': 'transparent',
|
|
283
|
+
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
284
|
+
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
285
|
+
'--bcm-button-border': 'transparent',
|
|
286
|
+
'--bcm-button-text': `var(--bcm-ui-color-text-${status})`,
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
const internalDefaultStyles = kindStyleMap[this.kind];
|
|
290
|
+
// These are the "final" CSS custom properties used by the component's styling.
|
|
291
|
+
// They use the "--bcm-button-custom-..." token if provided by the user,
|
|
292
|
+
// otherwise, they fall back to the internal "--bcm-button-..." style defined above.
|
|
293
|
+
const finalEffectiveStyles = {
|
|
294
|
+
'--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,
|
|
295
|
+
'--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,
|
|
296
|
+
'--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,
|
|
297
|
+
'--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,
|
|
298
|
+
'--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,
|
|
299
|
+
};
|
|
300
|
+
// return kindStyleMap[this.kind];
|
|
301
|
+
return Object.assign(Object.assign({}, internalDefaultStyles), finalEffectiveStyles);
|
|
302
|
+
}
|
|
303
|
+
render() {
|
|
304
|
+
const { icon, position } = this.buttonIcon;
|
|
305
|
+
return (index.h(index.Host, { key: '33e438220fdb261ff87289f8dcbaa7e0601d73c1' }, index.h("button", { key: '4fb4d22a44bac12b3780f9570c734f60fdaba788', 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({
|
|
306
|
+
size: this.size,
|
|
307
|
+
kind: this.kind,
|
|
308
|
+
fullWidth: this.fullWidth,
|
|
309
|
+
disabled: this.disabled,
|
|
310
|
+
loading: this.loading,
|
|
311
|
+
position: this.position,
|
|
312
|
+
}) }, this.loading && index.h("slot", { key: 'fa8dcbcba338f94700842fd0482d0261c9a1d3e3', name: "loading" }), index.h("span", { key: '345162b4ad0034d5081dee0438ceeefe4930ecfb' }, index.h("slot", { key: 'c65c9aa07fd2f159426192fc6239c394ee6ec58d', name: "prefix" }, position === 'prefix' && icon && index.h("i", { key: 'c94e32a5d308ba3ad98ac10239fc9a155f47e2ac', class: ' leading-none ' + icon }))), index.h("slot", { key: '171402bb9251492c7e5b0cf572fb0e2ae62a6add' }, this.buttonText), index.h("span", { key: 'ae3c5a885029b3d4c54e5ca21ac22adffa26b013' }, index.h("slot", { key: 'f80819d122624bb279d19822278c8e651dec27c7', name: "suffix" }, position === 'suffix' && icon && index.h("i", { key: '69631e99a8b7f47dd1d00984f582ec6e7b5433e8', class: ' leading-none ' + icon }))))));
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
BcmButton.style = buttonCss;
|
|
316
|
+
|
|
317
|
+
const drawerCss = ".contents{display:contents}:host{display:contents}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.inset-0{inset:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-40{z-index:40}.z-50{z-index:50}.m-0{margin:0}.flex{display:flex}.hidden{display:none}.h-6{height:1.5rem}.w-6{width:1.5rem}.flex-grow{flex-grow:1}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-full{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))}.-translate-y-full{--tw-translate-y:-100%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-full{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))}.translate-x-full{--tw-translate-x:100%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-full{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))}.translate-y-full{--tw-translate-y:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.overflow-y-auto{overflow-y:auto}.border-none{border-style:none}.bg-color-base{background-color:var(--bcm-ui-color-background-base-default)}.bg-color-default{background-color:var(--bcm-ui-color-background-default-default)}.bg-color-transparent{background-color:var(--bcm-ui-color-background-transparent-default)}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.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}.font-semibold{font-weight:600}.text-color-default{color:var(--bcm-ui-color-text-default)}.opacity-0{opacity:0}.opacity-100{opacity:1}.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)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:bg-color-default-hover:hover{background-color:var(--bcm-ui-color-background-default-hover)}.active\\:bg-color-default-active:active{background-color:var(--bcm-ui-color-background-default-active)}";
|
|
318
|
+
|
|
319
|
+
const BcmDrawer = class {
|
|
320
|
+
constructor(hostRef) {
|
|
321
|
+
index.registerInstance(this, hostRef);
|
|
322
|
+
this.bcmOpen = index.createEvent(this, "bcmOpen", 7);
|
|
323
|
+
this.bcmClose = index.createEvent(this, "bcmClose", 7);
|
|
324
|
+
this.bcmBeforeOpen = index.createEvent(this, "bcmBeforeOpen", 7);
|
|
325
|
+
this.bcmBeforeClose = index.createEvent(this, "bcmBeforeClose", 7);
|
|
326
|
+
this.open = false;
|
|
327
|
+
this.size = 'medium';
|
|
328
|
+
this.position = 'right';
|
|
329
|
+
this.fullWidth = false;
|
|
330
|
+
this.noHeader = false;
|
|
331
|
+
this.drawerClass = tv.tv({
|
|
332
|
+
slots: {
|
|
333
|
+
backdrop: 'fixed inset-0 bg-color-transparent z-40 transition-opacity duration-300',
|
|
334
|
+
wrapper: 'bcm-ui-element fixed bg-color-base text-color-default z-50 transform transition-transform duration-300 ease-in-out flex flex-col',
|
|
335
|
+
header: 'flex justify-between items-center bg-color-default text-color-default',
|
|
336
|
+
title: 'font-semibold m-0 text-size-6',
|
|
337
|
+
closeButton: 'text-size-5 font-medium text-color-default bg-transparent border-none p-0 h-6 w-6 hover:bg-color-default-hover cursor-pointer active:bg-color-default-active',
|
|
338
|
+
content: 'overflow-y-auto flex-grow',
|
|
339
|
+
},
|
|
340
|
+
variants: {
|
|
341
|
+
open: {
|
|
342
|
+
true: {
|
|
343
|
+
backdrop: 'opacity-100 visible',
|
|
344
|
+
},
|
|
345
|
+
false: {
|
|
346
|
+
backdrop: 'opacity-0 invisible',
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
position: {
|
|
350
|
+
left: {
|
|
351
|
+
wrapper: 'top-0 left-0 bottom-0',
|
|
352
|
+
},
|
|
353
|
+
right: {
|
|
354
|
+
wrapper: 'top-0 right-0 bottom-0',
|
|
355
|
+
},
|
|
356
|
+
top: {
|
|
357
|
+
wrapper: 'top-0 left-0 right-0',
|
|
358
|
+
},
|
|
359
|
+
bottom: {
|
|
360
|
+
wrapper: 'bottom-0 left-0 right-0',
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
size: {
|
|
364
|
+
small: {
|
|
365
|
+
header: 'py-3 px-4',
|
|
366
|
+
content: 'p-4',
|
|
367
|
+
},
|
|
368
|
+
medium: {
|
|
369
|
+
header: 'py-3 px-4',
|
|
370
|
+
content: 'p-4',
|
|
371
|
+
},
|
|
372
|
+
large: {
|
|
373
|
+
header: 'py-3 px-4',
|
|
374
|
+
content: 'p-4',
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
noHeader: {
|
|
378
|
+
true: {
|
|
379
|
+
header: 'hidden',
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
compoundVariants: [
|
|
384
|
+
{
|
|
385
|
+
open: true,
|
|
386
|
+
position: ['left', 'right'],
|
|
387
|
+
class: {
|
|
388
|
+
wrapper: 'translate-x-0',
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
open: true,
|
|
393
|
+
position: ['top', 'bottom'],
|
|
394
|
+
class: {
|
|
395
|
+
wrapper: 'translate-y-0',
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
open: false,
|
|
400
|
+
position: 'left',
|
|
401
|
+
class: {
|
|
402
|
+
wrapper: '-translate-x-full',
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
open: false,
|
|
407
|
+
position: 'right',
|
|
408
|
+
class: {
|
|
409
|
+
wrapper: 'translate-x-full',
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
open: false,
|
|
414
|
+
position: 'top',
|
|
415
|
+
class: {
|
|
416
|
+
wrapper: '-translate-y-full',
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
open: false,
|
|
421
|
+
position: 'bottom',
|
|
422
|
+
class: {
|
|
423
|
+
wrapper: 'translate-y-full',
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
handleOpenChange(isOpen) {
|
|
430
|
+
if (isOpen) {
|
|
431
|
+
document.body.style.overflow = 'hidden';
|
|
432
|
+
this.bcmOpen.emit();
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
document.body.style.overflow = '';
|
|
436
|
+
this.bcmClose.emit();
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
handleKeyDown(event) {
|
|
440
|
+
if (event.key === 'Escape' && this.open) {
|
|
441
|
+
this.hide();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
async show() {
|
|
445
|
+
const event = this.bcmBeforeOpen.emit();
|
|
446
|
+
if (!event.defaultPrevented) {
|
|
447
|
+
this.open = true;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
async hide() {
|
|
451
|
+
const event = this.bcmBeforeClose.emit();
|
|
452
|
+
if (!event.defaultPrevented) {
|
|
453
|
+
this.open = false;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
disconnectedCallback() {
|
|
457
|
+
document.body.style.overflow = '';
|
|
458
|
+
}
|
|
459
|
+
getWrapperStyle() {
|
|
460
|
+
const style = {};
|
|
461
|
+
if (this.fullWidth) {
|
|
462
|
+
if (this.position === 'left' || this.position === 'right') {
|
|
463
|
+
style.width = '100vw';
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
style.height = '100vh';
|
|
467
|
+
}
|
|
468
|
+
return style;
|
|
469
|
+
}
|
|
470
|
+
if (this.position === 'left' || this.position === 'right') {
|
|
471
|
+
switch (this.size) {
|
|
472
|
+
case 'small':
|
|
473
|
+
style.width = '320px';
|
|
474
|
+
break;
|
|
475
|
+
case 'medium':
|
|
476
|
+
style.width = '480px';
|
|
477
|
+
break;
|
|
478
|
+
case 'large':
|
|
479
|
+
style.width = '1064px';
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
switch (this.size) {
|
|
485
|
+
case 'small':
|
|
486
|
+
style.height = '40vh';
|
|
487
|
+
break;
|
|
488
|
+
case 'medium':
|
|
489
|
+
style.height = '60vh';
|
|
490
|
+
break;
|
|
491
|
+
case 'large':
|
|
492
|
+
style.height = '90vh';
|
|
493
|
+
break;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return style;
|
|
497
|
+
}
|
|
498
|
+
render() {
|
|
499
|
+
const { backdrop, wrapper, header, title, closeButton, content } = this.drawerClass({
|
|
500
|
+
open: this.open,
|
|
501
|
+
position: this.position,
|
|
502
|
+
size: this.size,
|
|
503
|
+
noHeader: this.noHeader,
|
|
504
|
+
});
|
|
505
|
+
return (index.h("div", { key: '44379905f1499a16d625ac4d1ff5e89fc6367d46', part: "base" }, index.h("div", { key: 'bc53e5322a61cd4af0691905c509d4c5fb765939', part: "backdrop", class: backdrop(), onClick: () => this.hide() }), index.h("div", { key: 'd5a666671d24b2f3b55b7462b5218a3e11358982', part: "wrapper", class: wrapper(), style: this.getWrapperStyle(), role: "dialog", "aria-modal": "true", "aria-hidden": !this.open ? 'true' : 'false', "aria-label": this.headerText }, index.h("div", { key: '5124de9d7fa8f3aa7267f0998f4c4f98f3ebbc4a', part: "header", class: header() }, index.h("h2", { key: '8aa4b971efa9fe0fafa1cfb94f0b6b96f21f2f15', part: "title", class: title() }, index.h("slot", { key: '949ae8f65d13e9e1c973c16a9f90205ac7e7042f', name: "header" }, this.headerText)), index.h("button", { key: 'a0c42761ee859e87dee5c267ea7245dde4fb8756', part: "close-button", class: closeButton(), onClick: () => this.hide(), "aria-label": "Close" }, index.h("bcm-icon", { key: '2df273d63da93eda2280759a909906fe4ae0c493', name: "fa-solid fa-xmark" }))), index.h("div", { key: 'b2532537d10f9aa0dcfa2fca8ac806577363e05b', part: "content", class: content() }, index.h("slot", { key: 'bfec5cff35a7bf7bf1d9801ba89559501e6f301f' })), index.h("div", { key: '4d44fdba62c74fd5c893c5296f998754228cf961', part: "footer" }, index.h("slot", { key: 'fd0a58127fd2f0ba0955cef629e55700142a8f32', name: "footer" })))));
|
|
506
|
+
}
|
|
507
|
+
get host() { return index.getElement(this); }
|
|
508
|
+
static get watchers() { return {
|
|
509
|
+
"open": ["handleOpenChange"]
|
|
510
|
+
}; }
|
|
511
|
+
};
|
|
512
|
+
BcmDrawer.style = drawerCss;
|
|
513
|
+
|
|
514
|
+
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}";
|
|
515
|
+
|
|
516
|
+
const Dropdown = class {
|
|
517
|
+
constructor(hostRef) {
|
|
518
|
+
index.registerInstance(this, hostRef);
|
|
519
|
+
this.bcmDropdownChange = index.createEvent(this, "bcmDropdownChange", 1);
|
|
520
|
+
this.isReady = false;
|
|
521
|
+
this.dropdownItems = [];
|
|
522
|
+
this.dropdownClass = tv.tv({
|
|
523
|
+
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',
|
|
524
|
+
});
|
|
525
|
+
this.handleSlotChange = () => {
|
|
526
|
+
this.dropdownItems = Array.from(this.host.querySelectorAll('bcm-dropdown-item'));
|
|
527
|
+
if (this.dropdownItems.length === 0) {
|
|
528
|
+
console.warn('No dropdown items found in dropdown component');
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
componentDidLoad() {
|
|
533
|
+
const button = this.host.shadowRoot.querySelector('bcm-button');
|
|
534
|
+
if (button) {
|
|
535
|
+
this.buttonRef = button;
|
|
536
|
+
this.isReady = true;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
handleDropdownItemChange(event) {
|
|
540
|
+
var _a;
|
|
541
|
+
const { element, selected } = event === null || event === void 0 ? void 0 : event.detail;
|
|
542
|
+
(_a = this.dropdownItems) === null || _a === void 0 ? void 0 : _a.forEach(item => {
|
|
543
|
+
if (item != element) {
|
|
544
|
+
item.selected = false;
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
this.bcmDropdownChange.emit({
|
|
548
|
+
element: element,
|
|
549
|
+
selected,
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
render() {
|
|
553
|
+
return (index.h(index.Host, { key: '6aaff12c84d38c32df5bc8dccb83421afb315eef' }, index.h("bcm-button", { key: '5612cef7303a6b839531e125c895a4e7b8d32282', kind: "outline" }, index.h("span", { key: '951418845cb1ec71fe6dc5bbbc33c49934447640', part: "text" }, this.text)), this.isReady && (index.h("bcm-linked", { key: 'd594359d6a9b7c673307c6a92e6d69cc47be3e1a', targetElement: this.buttonRef }, index.h("div", { key: '9badba5b1e99af6a5d58b02e849cb0923e49dfd8', part: "dropdown-container", class: this.dropdownClass() }, index.h("slot", { key: 'c8191f215600170475d514bb6b4056047e6442d2', onSlotchange: this.handleSlotChange }))))));
|
|
554
|
+
}
|
|
555
|
+
get host() { return index.getElement(this); }
|
|
556
|
+
};
|
|
557
|
+
Dropdown.style = dropdownCss;
|
|
558
|
+
|
|
559
|
+
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)}";
|
|
560
|
+
|
|
561
|
+
const DropdownItem = class {
|
|
562
|
+
constructor(hostRef) {
|
|
563
|
+
index.registerInstance(this, hostRef);
|
|
564
|
+
this.bcmDropDownItemChange = index.createEvent(this, "bcmDropDownItemChange", 1);
|
|
565
|
+
this.selected = false;
|
|
566
|
+
this.error = false;
|
|
567
|
+
this.disabled = false;
|
|
568
|
+
this.dropdownItemClass = tv.tv({
|
|
569
|
+
base: 'dropdown-item bcm-ui-element bcm-ui-content-display flex flex-row gap-2 py-2 px-4 cursor-pointer text-color',
|
|
570
|
+
variants: {
|
|
571
|
+
selected: {
|
|
572
|
+
true: 'bg-[var(--bcm-ui-color-background-base-active)] hover:bg-[var(--bcm-ui-color-background-base-active)]',
|
|
573
|
+
false: 'hover:bg-[var(--bcm-ui-color-background-base-hover)]',
|
|
574
|
+
},
|
|
575
|
+
error: {
|
|
576
|
+
true: 'bg-[var(--bcm-ui-color-background-palette-red-default)] hover:bg-[var(--bcm-ui-color-background-palette-red-default)]',
|
|
577
|
+
false: '',
|
|
578
|
+
},
|
|
579
|
+
disabled: {
|
|
580
|
+
true: '', // should be discuss with ux team
|
|
581
|
+
false: '',
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
defaultVariants: {
|
|
585
|
+
selected: false,
|
|
586
|
+
error: false,
|
|
587
|
+
disabled: false,
|
|
588
|
+
},
|
|
589
|
+
}, {
|
|
590
|
+
twMerge: false,
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
handleClick() {
|
|
594
|
+
this.selected = true;
|
|
595
|
+
this.bcmDropDownItemChange.emit({
|
|
596
|
+
element: this.host,
|
|
597
|
+
selected: this.selected,
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
render() {
|
|
601
|
+
var _a;
|
|
602
|
+
return (index.h("div", { key: '69beaac4c9225bc7803b4002f1543c18e76e36cc', "aria-checked": this.selected, class: this.dropdownItemClass({
|
|
603
|
+
selected: this.selected,
|
|
604
|
+
error: this.error,
|
|
605
|
+
}), onClick: () => this.handleClick() }, index.h("slot", { key: 'ca2712023285689a1774b5869d982e87d3add46a', name: "left-content" }, this.icon && index.h("bcm-icon", { key: 'bef7483a47c823ed746c39ae37acc3a2360f0c59', "icon-name": this.icon })), index.h("div", { key: 'a9bdddf97d4a4e07e601599a4adb11354227dd0f', class: "flex flex-row text-pretty w-full" }, index.h("slot", { key: '51c488350d2daabc32fc9693211a4e89d8cce16f' }, this.text)), index.h("slot", { key: '9bf3f8b4affa41ea72f181a073aea8cd56f8a2df', name: "right-content" }, (_a = this.rightIcons) === null || _a === void 0 ? void 0 : _a.map(icon => (index.h("bcm-icon", { "icon-name": icon }))))));
|
|
606
|
+
}
|
|
607
|
+
get host() { return index.getElement(this); }
|
|
608
|
+
};
|
|
609
|
+
DropdownItem.style = dropdownItemCss;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Checks if a named slot has any content
|
|
613
|
+
* @param element - The host element (component instance)
|
|
614
|
+
* @param slotName - Name of the slot to check
|
|
615
|
+
* @returns boolean indicating if the slot has any assigned nodes
|
|
616
|
+
*/
|
|
617
|
+
const checkSlotContent = (element, slotName) => {
|
|
618
|
+
var _a;
|
|
619
|
+
const slot = (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
|
|
620
|
+
if (!slot)
|
|
621
|
+
return false;
|
|
622
|
+
const assignedNodes = slot.assignedNodes();
|
|
623
|
+
return assignedNodes.length > 0;
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
const inputCss = ".visible{visibility:visible}.collapse{visibility:collapse}.relative{position:relative}.block{display:block}.table{display:table}.contents{display:contents}.hidden{display:none}.border-collapse{border-collapse:collapse}.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))}.resize{resize:both}.border{border-width:1px}.underline{text-decoration-line:underline}.outline{outline-style:solid}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid oklch(92.8% .006 264.531deg);box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:oklch(70.7% .022 261.325deg);opacity:1}input::placeholder,textarea::placeholder{color:oklch(70.7% .022 261.325deg);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:host{display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.mt-1{margin-top:.25rem}.flex{display:flex}.h-full{height:100%}.w-6{width:1.5rem}.w-full{width:100%}.flex-1{flex:1 1 0%}.cursor-not-allowed{cursor:not-allowed}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border-0{border-width:0}.border-solid{border-style:solid}.border-\\[--bcm-ui-color-border-default\\]{border-color:var(--bcm-ui-color-border-default)}.border-\\[--bcm-ui-color-border-error\\]{border-color:var(--bcm-ui-color-border-error)}.border-\\[--bcm-ui-color-border-info\\]{border-color:var(--bcm-ui-color-border-info)}.border-\\[--bcm-ui-color-border-success\\]{border-color:var(--bcm-ui-color-border-success)}.border-\\[--bcm-ui-color-border-warning\\]{border-color:var(--bcm-ui-color-border-warning)}.bg-\\[--bcm-ui-color-background-base-default\\]{background-color:var(--bcm-ui-color-background-base-default)}.bg-transparent{background-color:transparent}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-px{padding-bottom:1px;padding-top:1px}.font-sans{font-family:Inter,sans-serif}.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)}.font-medium{font-weight:500}.leading-6{line-height:1.5rem}.text-\\[--bcm-ui-color-text-caption\\]{color:var(--bcm-ui-color-text-caption)}.text-\\[--bcm-ui-color-text-default\\]{color:var(--bcm-ui-color-text-default)}.text-\\[--bcm-ui-color-text-disabled\\]{color:var(--bcm-ui-color-text-disabled)}.text-\\[--bcm-ui-color-text-error\\]{color:var(--bcm-ui-color-text-error)}.text-\\[--bcm-ui-color-text-info\\]{color:var(--bcm-ui-color-text-info)}.text-\\[--bcm-ui-color-text-success\\]{color:var(--bcm-ui-color-text-success)}.text-\\[--bcm-ui-color-text-warning\\]{color:var(--bcm-ui-color-text-warning)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-label{color:var(--bcm-ui-color-text-label)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.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-0{outline-width:0}.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)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.placeholder\\:font-normal::placeholder{font-weight:400}.placeholder\\:text-\\[--bcm-ui-color-text-placeholder\\]::placeholder{color:var(--bcm-ui-color-text-placeholder)}.hover\\:border-\\[--bcm-ui-color-border-error\\]:hover{border-color:var(--bcm-ui-color-border-error)}.hover\\:border-\\[--bcm-ui-color-border-info\\]:hover{border-color:var(--bcm-ui-color-border-info)}.hover\\:border-\\[--bcm-ui-color-border-primary\\]:hover{border-color:var(--bcm-ui-color-border-primary)}.hover\\:border-\\[--bcm-ui-color-border-success\\]:hover{border-color:var(--bcm-ui-color-border-success)}.hover\\:border-\\[--bcm-ui-color-border-warning\\]:hover{border-color:var(--bcm-ui-color-border-warning)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-error\\]:has(:focus){border-color:var(--bcm-ui-color-border-error)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-info\\]:has(:focus){border-color:var(--bcm-ui-color-border-info)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-primary\\]:has(:focus){border-color:var(--bcm-ui-color-border-primary)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-success\\]:has(:focus){border-color:var(--bcm-ui-color-border-success)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-warning\\]:has(:focus){border-color:var(--bcm-ui-color-border-warning)}.\\[\\&\\:\\:-webkit-inner-spin-button\\]\\:appearance-none::-webkit-inner-spin-button{appearance:none}";
|
|
627
|
+
|
|
628
|
+
const BcmInput = class {
|
|
629
|
+
constructor(hostRef) {
|
|
630
|
+
index.registerInstance(this, hostRef);
|
|
631
|
+
this.bcmInput = index.createEvent(this, "bcmInput", 1);
|
|
632
|
+
this.bcmChange = index.createEvent(this, "bcmChange", 1);
|
|
633
|
+
this.bcmFocus = index.createEvent(this, "bcmFocus", 1);
|
|
634
|
+
this.bcmBlur = index.createEvent(this, "bcmBlur", 1);
|
|
635
|
+
this.bcmKeyDown = index.createEvent(this, "bcmKeyDown", 1);
|
|
636
|
+
this.bcmKeyUp = index.createEvent(this, "bcmKeyUp", 1);
|
|
637
|
+
this.isFocused = false;
|
|
638
|
+
this.isValid = true;
|
|
639
|
+
this.internalStatus = 'default';
|
|
640
|
+
this.isPasswordVisible = false;
|
|
641
|
+
/** Input value */
|
|
642
|
+
this.value = '';
|
|
643
|
+
/** Input id */
|
|
644
|
+
this._id = generateId.generateId('input');
|
|
645
|
+
/** Controls the input size */
|
|
646
|
+
this.size = 'medium';
|
|
647
|
+
/** Defines the input's status/state */
|
|
648
|
+
this.status = 'default';
|
|
649
|
+
/** Full width input */
|
|
650
|
+
this.fullWidth = false;
|
|
651
|
+
/** HTML input type */
|
|
652
|
+
this.type = 'text';
|
|
653
|
+
/** Whether the input is disabled */
|
|
654
|
+
this.disabled = false;
|
|
655
|
+
/** Whether the input is readonly */
|
|
656
|
+
this.readonly = false;
|
|
657
|
+
/** Whether the input is required */
|
|
658
|
+
this.required = false;
|
|
659
|
+
/** Whether to use native form validation
|
|
660
|
+
* If false, component will handle validation internally
|
|
661
|
+
*/
|
|
662
|
+
this.useNativeValidation = true;
|
|
663
|
+
this.onInput = (event) => {
|
|
664
|
+
const input = event.target;
|
|
665
|
+
this.value = input.value;
|
|
666
|
+
this.bcmInput.emit(event);
|
|
667
|
+
this.validateInput();
|
|
668
|
+
};
|
|
669
|
+
this.onChange = (event) => {
|
|
670
|
+
this.bcmChange.emit(event);
|
|
671
|
+
};
|
|
672
|
+
this.onFocus = (event) => {
|
|
673
|
+
this.isFocused = true;
|
|
674
|
+
this.bcmFocus.emit(event);
|
|
675
|
+
};
|
|
676
|
+
this.onBlur = (event) => {
|
|
677
|
+
this.isFocused = false;
|
|
678
|
+
this.bcmBlur.emit(event);
|
|
679
|
+
this.validateInput();
|
|
680
|
+
};
|
|
681
|
+
this.onKeyDown = (event) => {
|
|
682
|
+
this.bcmKeyDown.emit(event);
|
|
683
|
+
};
|
|
684
|
+
this.onKeyUp = (event) => {
|
|
685
|
+
this.bcmKeyUp.emit(event);
|
|
686
|
+
};
|
|
687
|
+
this.styleClass = tv.tv({
|
|
688
|
+
slots: {
|
|
689
|
+
base: [
|
|
690
|
+
'bcm-input bcm-input__container',
|
|
691
|
+
'bg-[--bcm-ui-color-background-base-default]',
|
|
692
|
+
'text-[--bcm-ui-color-text-default]',
|
|
693
|
+
'border border-solid rounded',
|
|
694
|
+
'flex items-center justify-between',
|
|
695
|
+
'transition-colors duration-200',
|
|
696
|
+
'px-2',
|
|
697
|
+
],
|
|
698
|
+
inputClass: [
|
|
699
|
+
'input',
|
|
700
|
+
'w-full flex-1',
|
|
701
|
+
'border-0 outline-0 bg-transparent',
|
|
702
|
+
'appearance-none text-ellipsis',
|
|
703
|
+
'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',
|
|
704
|
+
'font-sans antialiased font-medium',
|
|
705
|
+
'px-1',
|
|
706
|
+
'[appearance:textfield][&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',
|
|
707
|
+
],
|
|
708
|
+
},
|
|
709
|
+
variants: {
|
|
710
|
+
size: {
|
|
711
|
+
small: {
|
|
712
|
+
base: '',
|
|
713
|
+
inputClass: 'text-size-4 py-px',
|
|
714
|
+
},
|
|
715
|
+
medium: {
|
|
716
|
+
base: '',
|
|
717
|
+
inputClass: 'text-size-5 leading-6 py-1',
|
|
718
|
+
},
|
|
719
|
+
large: {
|
|
720
|
+
base: '',
|
|
721
|
+
inputClass: 'text-size-6 py-2',
|
|
722
|
+
},
|
|
723
|
+
},
|
|
724
|
+
status: {
|
|
725
|
+
default: {
|
|
726
|
+
base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],
|
|
727
|
+
},
|
|
728
|
+
error: {
|
|
729
|
+
base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],
|
|
730
|
+
},
|
|
731
|
+
success: {
|
|
732
|
+
base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],
|
|
733
|
+
},
|
|
734
|
+
warning: {
|
|
735
|
+
base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],
|
|
736
|
+
},
|
|
737
|
+
info: {
|
|
738
|
+
base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],
|
|
739
|
+
},
|
|
740
|
+
},
|
|
741
|
+
fullWidth: {
|
|
742
|
+
true: 'full-width w-full',
|
|
743
|
+
},
|
|
744
|
+
disabled: {
|
|
745
|
+
true: 'disabled cursor-not-allowed',
|
|
746
|
+
false: '',
|
|
747
|
+
},
|
|
748
|
+
focused: {
|
|
749
|
+
true: {
|
|
750
|
+
base: '',
|
|
751
|
+
},
|
|
752
|
+
},
|
|
753
|
+
},
|
|
754
|
+
defaultVariants: {
|
|
755
|
+
size: 'medium',
|
|
756
|
+
status: 'default',
|
|
757
|
+
fullWidth: false,
|
|
758
|
+
disabled: false,
|
|
759
|
+
focused: false,
|
|
760
|
+
},
|
|
761
|
+
}, {
|
|
762
|
+
twMerge: false,
|
|
763
|
+
});
|
|
764
|
+
this.togglePasswordVisibility = () => {
|
|
765
|
+
this.isPasswordVisible = !this.isPasswordVisible;
|
|
766
|
+
this.inputRef.type = this.isPasswordVisible ? 'text' : 'password';
|
|
767
|
+
};
|
|
768
|
+
this.PasswordToggleButton = () => {
|
|
769
|
+
var _a;
|
|
770
|
+
if (this.type !== 'password' || this.disabled || this.readonly || ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0)
|
|
771
|
+
return null;
|
|
772
|
+
return (index.h("button", { class: "appearance-none flex items-center w-6 h-full justify-center", onClick: this.togglePasswordVisibility, type: "button" }, index.h("bcm-icon", { name: this.isPasswordVisible ? 'fa-eye-slash fa-regular' : 'fa-regular fa-eye', size: this.iconSize })));
|
|
773
|
+
};
|
|
774
|
+
this.iconSize = {
|
|
775
|
+
small: 14,
|
|
776
|
+
medium: 16,
|
|
777
|
+
large: 18,
|
|
778
|
+
}[this.size];
|
|
779
|
+
}
|
|
780
|
+
handleValueChange(newValue) {
|
|
781
|
+
if (this.inputRef) {
|
|
782
|
+
this.inputRef.value = newValue;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
watchStatus(newValue) {
|
|
786
|
+
this.internalStatus = newValue;
|
|
787
|
+
}
|
|
788
|
+
watchErrorMessage(newValue) {
|
|
789
|
+
this.internalErrorMessage = newValue;
|
|
790
|
+
}
|
|
791
|
+
async setFocus() {
|
|
792
|
+
var _a;
|
|
793
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
794
|
+
}
|
|
795
|
+
async setBlur() {
|
|
796
|
+
var _a;
|
|
797
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.blur();
|
|
798
|
+
}
|
|
799
|
+
async select() {
|
|
800
|
+
var _a;
|
|
801
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.select();
|
|
802
|
+
}
|
|
803
|
+
/** Sets locale and messages for all inputs */
|
|
804
|
+
async setLocale(locale, messages) {
|
|
805
|
+
// Set messages and update validation immediately
|
|
806
|
+
validationMessages.setValidationMessages(locale, messages);
|
|
807
|
+
// Mevcut validasyon mesajını güncelle
|
|
808
|
+
if (!this.isValid) {
|
|
809
|
+
this.validateInput();
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
componentWillLoad() {
|
|
813
|
+
// I18n için default mesajları set et
|
|
814
|
+
validationMessages.setValidationMessages('en', validationMessages.defaultValidationMessages);
|
|
815
|
+
this.internalStatus = this.status;
|
|
816
|
+
this.internalErrorMessage = this.errorMessage;
|
|
817
|
+
}
|
|
818
|
+
validateInput() {
|
|
819
|
+
if (!this.inputRef)
|
|
820
|
+
return;
|
|
821
|
+
// Reset validation state
|
|
822
|
+
this.isValid = true;
|
|
823
|
+
this.validationMessage = '';
|
|
824
|
+
const value = this.inputRef.value;
|
|
825
|
+
// Required check
|
|
826
|
+
if (this.required && !value) {
|
|
827
|
+
this.isValid = false;
|
|
828
|
+
this.validationMessage = validationMessages.getValidationMessage('required');
|
|
829
|
+
this.internalStatus = 'error';
|
|
830
|
+
this.internalErrorMessage = this.validationMessage;
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
// Minimum length check
|
|
834
|
+
else if (this.minLength && value.length < this.minLength) {
|
|
835
|
+
this.isValid = false;
|
|
836
|
+
this.validationMessage = validationMessages.getValidationMessage('minlength', { min: this.minLength });
|
|
837
|
+
}
|
|
838
|
+
// Maximum length check
|
|
839
|
+
else if (this.maxLength && value.length > this.maxLength) {
|
|
840
|
+
this.isValid = false;
|
|
841
|
+
this.validationMessage = validationMessages.getValidationMessage('maxlength', { max: this.maxLength });
|
|
842
|
+
}
|
|
843
|
+
// Pattern check
|
|
844
|
+
else if (this.pattern && !new RegExp(this.pattern).test(value)) {
|
|
845
|
+
this.isValid = false;
|
|
846
|
+
this.validationMessage = validationMessages.getValidationMessage('pattern');
|
|
847
|
+
}
|
|
848
|
+
// Email check
|
|
849
|
+
else if (this.type === 'email' && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
850
|
+
this.isValid = false;
|
|
851
|
+
this.validationMessage = validationMessages.getValidationMessage('email');
|
|
852
|
+
}
|
|
853
|
+
// Number range check
|
|
854
|
+
else if (this.type === 'number' && value) {
|
|
855
|
+
const numValue = parseFloat(value);
|
|
856
|
+
if (this.min !== undefined && numValue < this.min) {
|
|
857
|
+
this.isValid = false;
|
|
858
|
+
this.validationMessage = validationMessages.getValidationMessage('min', { min: this.min });
|
|
859
|
+
}
|
|
860
|
+
else if (this.max !== undefined && numValue > this.max) {
|
|
861
|
+
this.isValid = false;
|
|
862
|
+
this.validationMessage = validationMessages.getValidationMessage('max', { max: this.max });
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
// Update component state
|
|
866
|
+
this.internalStatus = this.isValid ? 'default' : 'error';
|
|
867
|
+
this.internalErrorMessage = this.validationMessage;
|
|
868
|
+
}
|
|
869
|
+
hasSlotContent(slotName) {
|
|
870
|
+
return checkSlotContent(this.el, slotName);
|
|
871
|
+
}
|
|
872
|
+
getDefaultIconForType() {
|
|
873
|
+
return; // TODO: Will be implemented later
|
|
874
|
+
// return defaultIcons[this.type as keyof typeof defaultIcons];
|
|
875
|
+
}
|
|
876
|
+
render() {
|
|
877
|
+
const inputId = this._id + '-input' || this.name;
|
|
878
|
+
const { base, inputClass } = this.styleClass({
|
|
879
|
+
size: this.size,
|
|
880
|
+
status: this.internalStatus,
|
|
881
|
+
fullWidth: this.fullWidth,
|
|
882
|
+
disabled: this.disabled,
|
|
883
|
+
focused: this.isFocused,
|
|
884
|
+
});
|
|
885
|
+
return (index.h("div", { key: 'effaec9bfaf730d8dc64c1eebb18f24f1b81d6a7', class: "bcm-ui-element" }, this.label && (index.h("label", { key: '1ab316bc8c04c5a17280d539976f8304d9a146cf', class: index$1.classNames('input-label font-medium', {
|
|
886
|
+
'text-color-label': !this.disabled,
|
|
887
|
+
'text-color-disabled': this.disabled,
|
|
888
|
+
}, {
|
|
889
|
+
'text-size-3': this.size === 'small',
|
|
890
|
+
'text-size-4': this.size === 'medium',
|
|
891
|
+
'text-size-5': this.size === 'large',
|
|
892
|
+
}), htmlFor: inputId }, index.h("slot", { key: '89fb855f3c84bd43759fdf3ab19298dd376e9714', name: "label" }, this.label), this.required && index.h("span", { key: 'e82f1aa9da8e7b6098128e6a9fb49453aab662a9' }, "*"))), index.h("div", { key: 'b2503d3e60b246fe6342c0ae9ad74c95f993b11b', class: base() }, (this.hasSlotContent('prefix') || this.prefixIcon || this.getDefaultIconForType()) && (index.h("div", { key: '311435f21f3e357d8f7e87e191152d32b2b39ba3', class: "flex items-center gap-2 px-2" }, (this.prefixIcon || this.getDefaultIconForType()) && (index.h("bcm-icon", { key: '9bcff2b57c2364e5e84c4cd5202c9a7c5c6a59f6', class: "prefix-icon", "icon-name": this.prefixIcon || this.getDefaultIconForType(), size: this.iconSize })), index.h("slot", { key: 'bacfdc130d70df0c8e6bcadb9fc4d58a66067a47', name: "prefix" }))), index.h("input", { key: '9d78831b435a606f06214bfb9ac8a17f743c8ba9', ref: el => (this.inputRef = el), id: inputId, class: inputClass(), type: this.type, name: this.name, disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.placeholder, autocomplete: this.autocomplete, minlength: this.minLength, maxlength: this.maxLength, min: this.min, max: this.max, step: this.step, pattern: this.pattern, "aria-invalid": this.status === 'error', "aria-required": this.required, "aria-labelledby": this.labelledby, "aria-describedby": this.describedby, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp }), (this.hasSlotContent('suffix') || this.suffixIcon) && (index.h("div", { key: '060a4cb048a6f041acadfb6375307d736e18c6e4', class: "flex items-center gap-2 px-2" }, index.h("slot", { key: '54536a8b871e6524f3e2aa885ff38dbe8e1f7337', name: "suffix" }), this.suffixIcon && index.h("bcm-icon", { key: 'ec7482256e4fc4154ddaef6070045b6c926d9f7b', class: "suffix-icon", "icon-name": this.suffixIcon, size: this.iconSize }))), this.PasswordToggleButton()), (this.captionText || this.internalErrorMessage || this.validationMessage) && (index.h("div", { key: '6c09a0de12102b805ad224da2007405d4f03e03f', class: index$1.classNames('input-caption-text font-regular mt-1', {
|
|
893
|
+
'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',
|
|
894
|
+
'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),
|
|
895
|
+
'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',
|
|
896
|
+
'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',
|
|
897
|
+
'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',
|
|
898
|
+
'text-[--bcm-ui-color-text-disabled]': this.disabled,
|
|
899
|
+
}, {
|
|
900
|
+
'text-size-3': this.size === 'small',
|
|
901
|
+
'text-size-4': this.size === 'medium',
|
|
902
|
+
'text-size-5': this.size === 'large',
|
|
903
|
+
}) }, !this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText))));
|
|
904
|
+
}
|
|
905
|
+
get el() { return index.getElement(this); }
|
|
906
|
+
static get watchers() { return {
|
|
907
|
+
"value": ["handleValueChange"],
|
|
908
|
+
"status": ["watchStatus"],
|
|
909
|
+
"errorMessage": ["watchErrorMessage"]
|
|
910
|
+
}; }
|
|
911
|
+
};
|
|
912
|
+
BcmInput.style = inputCss;
|
|
913
|
+
|
|
914
|
+
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)}bcm-linked{display:block;position:relative}bcm-linked[append-to-body]{display:none}.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{display:none!important;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)}";
|
|
915
|
+
|
|
916
|
+
const BcmLinked = class {
|
|
917
|
+
constructor(hostRef) {
|
|
918
|
+
index.registerInstance(this, hostRef);
|
|
919
|
+
this.bcmShow = index.createEvent(this, "bcmShow", 7);
|
|
920
|
+
this.bcmHide = index.createEvent(this, "bcmHide", 7);
|
|
921
|
+
this.bcmShown = index.createEvent(this, "bcmShown", 7);
|
|
922
|
+
this.bcmHidden = index.createEvent(this, "bcmHidden", 7);
|
|
923
|
+
// Trigger configuration
|
|
924
|
+
this.trigger = 'click';
|
|
925
|
+
this.placement = 'bottom-start';
|
|
926
|
+
// Timing configuration
|
|
927
|
+
this.showDelay = 0;
|
|
928
|
+
this.hideDelay = 0;
|
|
929
|
+
// Positioning configuration
|
|
930
|
+
this.offset = 8;
|
|
931
|
+
this.arrow = false;
|
|
932
|
+
this.disabled = false;
|
|
933
|
+
// Style configuration
|
|
934
|
+
this.zIndex = 1000;
|
|
935
|
+
this.appendToBody = false;
|
|
936
|
+
this.destroyOnHide = false;
|
|
937
|
+
// State
|
|
938
|
+
this.isVisible = false;
|
|
939
|
+
this.isReady = false;
|
|
940
|
+
this.handleMouseEnter = () => {
|
|
941
|
+
this.clearTimeouts();
|
|
942
|
+
if (this.showDelay > 0) {
|
|
943
|
+
this.showTimeout = setTimeout(() => this.show(), this.showDelay);
|
|
944
|
+
}
|
|
945
|
+
else {
|
|
946
|
+
this.show();
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
this.handleMouseLeave = () => {
|
|
950
|
+
this.clearTimeouts();
|
|
951
|
+
if (this.hideDelay > 0) {
|
|
952
|
+
this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
|
|
953
|
+
}
|
|
954
|
+
else {
|
|
955
|
+
this.hide();
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
this.handleFloatingMouseEnter = () => {
|
|
959
|
+
this.clearTimeouts();
|
|
960
|
+
};
|
|
961
|
+
this.handleFloatingMouseLeave = () => {
|
|
962
|
+
this.clearTimeouts();
|
|
963
|
+
if (this.hideDelay > 0) {
|
|
964
|
+
this.hideTimeout = setTimeout(() => this.hide(), this.hideDelay);
|
|
965
|
+
}
|
|
966
|
+
else {
|
|
967
|
+
this.hide();
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
this.handleClick = (e) => {
|
|
971
|
+
e.stopPropagation();
|
|
972
|
+
this.toggle();
|
|
973
|
+
};
|
|
974
|
+
this.handleFocus = () => {
|
|
975
|
+
this.show();
|
|
976
|
+
};
|
|
977
|
+
this.handleBlur = () => {
|
|
978
|
+
this.hide();
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
// Watch for changes
|
|
982
|
+
setupTarget() {
|
|
983
|
+
this.disconnectTarget();
|
|
984
|
+
this.connectTarget();
|
|
985
|
+
}
|
|
986
|
+
onVisibilityChange(newValue) {
|
|
987
|
+
if (newValue) {
|
|
988
|
+
this.updatePosition();
|
|
989
|
+
this.bcmShown.emit();
|
|
990
|
+
}
|
|
991
|
+
else {
|
|
992
|
+
this.bcmHidden.emit();
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
async componentDidLoad() {
|
|
996
|
+
// Wait for render
|
|
997
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
998
|
+
this.floatingEl = this.host.querySelector('.floating-content');
|
|
999
|
+
if (this.floatingEl) {
|
|
1000
|
+
this.isReady = true;
|
|
1001
|
+
this.connectTarget();
|
|
1002
|
+
this.setupFloatingObserver();
|
|
1003
|
+
console.log('✅ bcm-linked initialized successfully');
|
|
1004
|
+
}
|
|
1005
|
+
else {
|
|
1006
|
+
console.error('❌ Could not find .floating-content element');
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
disconnectedCallback() {
|
|
1010
|
+
var _a, _b;
|
|
1011
|
+
this.disconnectTarget();
|
|
1012
|
+
this.clearTimeouts();
|
|
1013
|
+
(_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1014
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
1015
|
+
// Restore element to original position if component is destroyed while in portal
|
|
1016
|
+
if (this.appendToBody && this.floatingEl && this.originalParent) {
|
|
1017
|
+
this.originalParent.appendChild(this.floatingEl);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
connectTarget() {
|
|
1021
|
+
if (!this.isReady)
|
|
1022
|
+
return;
|
|
1023
|
+
// Find target element
|
|
1024
|
+
this.targetEl =
|
|
1025
|
+
this.targetElement || (this.targetId ? document.getElementById(this.targetId) : null) || this.host.previousElementSibling || this.host.parentElement;
|
|
1026
|
+
if (!this.targetEl) {
|
|
1027
|
+
console.warn('bcm-linked: No target element found');
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
// Setup event listeners based on trigger type
|
|
1031
|
+
this.setupEventListeners();
|
|
1032
|
+
// Setup auto-update for position
|
|
1033
|
+
if (this.targetEl && this.floatingEl) {
|
|
1034
|
+
this.cleanup = floatingUi_dom.autoUpdate(this.targetEl, this.floatingEl, () => {
|
|
1035
|
+
if (this.isVisible) {
|
|
1036
|
+
this.updatePosition();
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
// Setup resize observer for responsive positioning
|
|
1041
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
1042
|
+
if (this.isVisible) {
|
|
1043
|
+
this.updatePosition();
|
|
1044
|
+
}
|
|
1045
|
+
});
|
|
1046
|
+
this.resizeObserver.observe(this.floatingEl);
|
|
1047
|
+
}
|
|
1048
|
+
disconnectTarget() {
|
|
1049
|
+
var _a, _b;
|
|
1050
|
+
if (this.targetEl) {
|
|
1051
|
+
this.removeEventListeners();
|
|
1052
|
+
}
|
|
1053
|
+
(_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1054
|
+
(_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
1055
|
+
}
|
|
1056
|
+
setupEventListeners() {
|
|
1057
|
+
var _a, _b;
|
|
1058
|
+
if (!this.targetEl || this.disabled)
|
|
1059
|
+
return;
|
|
1060
|
+
switch (this.trigger) {
|
|
1061
|
+
case 'hover':
|
|
1062
|
+
this.targetEl.addEventListener('mouseenter', this.handleMouseEnter);
|
|
1063
|
+
this.targetEl.addEventListener('mouseleave', this.handleMouseLeave);
|
|
1064
|
+
(_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', this.handleFloatingMouseEnter);
|
|
1065
|
+
(_b = this.floatingEl) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', this.handleFloatingMouseLeave);
|
|
1066
|
+
break;
|
|
1067
|
+
case 'click':
|
|
1068
|
+
this.targetEl.addEventListener('click', this.handleClick);
|
|
1069
|
+
this.setupClickOutside();
|
|
1070
|
+
break;
|
|
1071
|
+
case 'focus':
|
|
1072
|
+
this.targetEl.addEventListener('focus', this.handleFocus);
|
|
1073
|
+
this.targetEl.addEventListener('blur', this.handleBlur);
|
|
1074
|
+
break;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
removeEventListeners() {
|
|
1078
|
+
var _a, _b;
|
|
1079
|
+
if (!this.targetEl)
|
|
1080
|
+
return;
|
|
1081
|
+
this.targetEl.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
1082
|
+
this.targetEl.removeEventListener('mouseleave', this.handleMouseLeave);
|
|
1083
|
+
this.targetEl.removeEventListener('click', this.handleClick);
|
|
1084
|
+
this.targetEl.removeEventListener('focus', this.handleFocus);
|
|
1085
|
+
this.targetEl.removeEventListener('blur', this.handleBlur);
|
|
1086
|
+
(_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', this.handleFloatingMouseEnter);
|
|
1087
|
+
(_b = this.floatingEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', this.handleFloatingMouseLeave);
|
|
1088
|
+
this.removeClickOutside();
|
|
1089
|
+
}
|
|
1090
|
+
setupClickOutside() {
|
|
1091
|
+
this.clickOutsideHandler = (e) => {
|
|
1092
|
+
var _a, _b;
|
|
1093
|
+
const target = e.target;
|
|
1094
|
+
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)) {
|
|
1095
|
+
this.hide();
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
1098
|
+
document.addEventListener('click', this.clickOutsideHandler, true);
|
|
1099
|
+
}
|
|
1100
|
+
removeClickOutside() {
|
|
1101
|
+
if (this.clickOutsideHandler) {
|
|
1102
|
+
document.removeEventListener('click', this.clickOutsideHandler, true);
|
|
1103
|
+
this.clickOutsideHandler = undefined;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
clearTimeouts() {
|
|
1107
|
+
if (this.showTimeout) {
|
|
1108
|
+
clearTimeout(this.showTimeout);
|
|
1109
|
+
this.showTimeout = undefined;
|
|
1110
|
+
}
|
|
1111
|
+
if (this.hideTimeout) {
|
|
1112
|
+
clearTimeout(this.hideTimeout);
|
|
1113
|
+
this.hideTimeout = undefined;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
async updatePosition() {
|
|
1117
|
+
if (!this.targetEl || !this.floatingEl || !this.isVisible)
|
|
1118
|
+
return;
|
|
1119
|
+
// Use autoPlacement only for bottom-start (dropdown default)
|
|
1120
|
+
// For other placements, respect the manual placement with flip fallback
|
|
1121
|
+
// const useAutoPlacement = this.placement === 'bottom-start';
|
|
1122
|
+
const middleware = [
|
|
1123
|
+
floatingUi_dom.offset(this.offset),
|
|
1124
|
+
// useAutoPlacement
|
|
1125
|
+
// ? autoPlacement({
|
|
1126
|
+
// allowedPlacements: ['bottom-start', 'bottom-end', 'bottom', 'top-start', 'top-end', 'top', 'right-start', 'right-end', 'right', 'left-start', 'left-end', 'left'],
|
|
1127
|
+
// boundary: document.body,
|
|
1128
|
+
// })
|
|
1129
|
+
// :
|
|
1130
|
+
floatingUi_dom.flip({
|
|
1131
|
+
fallbackPlacements: ['top', 'bottom', 'left', 'right', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'left-start', 'left-end', 'right-start', 'right-end'],
|
|
1132
|
+
}),
|
|
1133
|
+
floatingUi_dom.shift({
|
|
1134
|
+
padding: 8,
|
|
1135
|
+
}),
|
|
1136
|
+
];
|
|
1137
|
+
const { x, y, placement } = await floatingUi_dom.computePosition(this.targetEl, this.floatingEl, {
|
|
1138
|
+
placement: this.placement,
|
|
1139
|
+
middleware,
|
|
1140
|
+
strategy: 'fixed',
|
|
1141
|
+
});
|
|
1142
|
+
Object.assign(this.floatingEl.style, {
|
|
1143
|
+
left: `${x}px`,
|
|
1144
|
+
top: `${y}px`,
|
|
1145
|
+
zIndex: this.zIndex.toString(),
|
|
1146
|
+
});
|
|
1147
|
+
// Update arrow if enabled
|
|
1148
|
+
if (this.arrow) {
|
|
1149
|
+
this.updateArrow(placement);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
updateArrow(placement) {
|
|
1153
|
+
var _a;
|
|
1154
|
+
const arrow = (_a = this.floatingEl) === null || _a === void 0 ? void 0 : _a.querySelector('.floating-arrow');
|
|
1155
|
+
if (!arrow)
|
|
1156
|
+
return;
|
|
1157
|
+
// Remove all arrow classes
|
|
1158
|
+
arrow.className = 'floating-arrow';
|
|
1159
|
+
// Add placement-specific class
|
|
1160
|
+
const side = placement.split('-')[0];
|
|
1161
|
+
arrow.classList.add(`arrow-${side}`);
|
|
1162
|
+
}
|
|
1163
|
+
async show() {
|
|
1164
|
+
if (this.disabled || this.isVisible)
|
|
1165
|
+
return;
|
|
1166
|
+
this.bcmShow.emit();
|
|
1167
|
+
// Portalling: Move the floating element to the body
|
|
1168
|
+
if (this.appendToBody && this.floatingEl) {
|
|
1169
|
+
this.originalParent = this.floatingEl.parentNode;
|
|
1170
|
+
this.originalNextSibling = this.floatingEl.nextSibling;
|
|
1171
|
+
document.body.appendChild(this.floatingEl);
|
|
1172
|
+
}
|
|
1173
|
+
this.isVisible = true;
|
|
1174
|
+
// Use requestAnimationFrame to ensure the element is visible before positioning
|
|
1175
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
1176
|
+
await this.updatePosition();
|
|
1177
|
+
}
|
|
1178
|
+
async hide() {
|
|
1179
|
+
if (!this.isVisible)
|
|
1180
|
+
return;
|
|
1181
|
+
this.bcmHide.emit();
|
|
1182
|
+
this.isVisible = false;
|
|
1183
|
+
// Portalling: Restore the floating element to its original position
|
|
1184
|
+
if (this.appendToBody && this.floatingEl && this.originalParent) {
|
|
1185
|
+
if (this.originalNextSibling) {
|
|
1186
|
+
this.originalParent.insertBefore(this.floatingEl, this.originalNextSibling);
|
|
1187
|
+
}
|
|
1188
|
+
else {
|
|
1189
|
+
this.originalParent.appendChild(this.floatingEl);
|
|
1190
|
+
}
|
|
1191
|
+
this.originalParent = undefined;
|
|
1192
|
+
this.originalNextSibling = undefined;
|
|
1193
|
+
}
|
|
1194
|
+
if (this.destroyOnHide && this.floatingEl && this.floatingEl.parentNode) {
|
|
1195
|
+
this.floatingEl.parentNode.removeChild(this.floatingEl);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
async toggle() {
|
|
1199
|
+
if (this.isVisible) {
|
|
1200
|
+
await this.hide();
|
|
1201
|
+
}
|
|
1202
|
+
else {
|
|
1203
|
+
await this.show();
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
async updatePositioning() {
|
|
1207
|
+
await this.updatePosition();
|
|
1208
|
+
}
|
|
1209
|
+
setupFloatingObserver() {
|
|
1210
|
+
if (!this.floatingEl)
|
|
1211
|
+
return;
|
|
1212
|
+
// Observe floating element size changes for position updates
|
|
1213
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
1214
|
+
if (this.isVisible) {
|
|
1215
|
+
this.updatePosition();
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
this.resizeObserver.observe(this.floatingEl);
|
|
1219
|
+
}
|
|
1220
|
+
render() {
|
|
1221
|
+
const floatingClasses = {
|
|
1222
|
+
'floating-content': true,
|
|
1223
|
+
'floating-visible': this.isVisible,
|
|
1224
|
+
'floating-hidden': !this.isVisible,
|
|
1225
|
+
'floating-with-arrow': this.arrow,
|
|
1226
|
+
'floating-destroy-on-hide': this.destroyOnHide,
|
|
1227
|
+
};
|
|
1228
|
+
return (index.h(index.Host, { key: 'f5835cc1b6044476e66402d23a3becf18d3f2049' }, index.h("div", { key: '2c7f92bbe85bc938a767734ef4b27702247fb390', class: floatingClasses, style: {
|
|
1229
|
+
position: 'fixed',
|
|
1230
|
+
top: '0px',
|
|
1231
|
+
left: '0px',
|
|
1232
|
+
zIndex: this.zIndex.toString(),
|
|
1233
|
+
display: this.isVisible ? 'block' : 'none',
|
|
1234
|
+
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
1235
|
+
opacity: this.isVisible ? '1' : '0',
|
|
1236
|
+
pointerEvents: this.isVisible ? 'auto' : 'none',
|
|
1237
|
+
} }, this.arrow && index.h("div", { key: 'f6eedac02b29b3ca00a9a84eea940ac89089f30c', class: "floating-arrow" }), index.h("div", { key: '7cb19f085de1d77a41fd9897be90999e78a0a54d', class: "floating-wrapper" }, index.h("slot", { key: 'a4b4289642850e3c2f7f27771b3d28bc41c8248a' }))), index.h("div", { key: '61cd7af9a4a47c87c308e1e67f96efb987c97312', style: { display: 'none' } }, index.h("slot", { key: '7160df275f5c7c66733158f95266598d0d207a17', name: "fallback" }))));
|
|
1238
|
+
}
|
|
1239
|
+
get host() { return index.getElement(this); }
|
|
1240
|
+
static get watchers() { return {
|
|
1241
|
+
"targetId": ["setupTarget"],
|
|
1242
|
+
"targetElement": ["setupTarget"],
|
|
1243
|
+
"isVisible": ["onVisibilityChange"]
|
|
1244
|
+
}; }
|
|
1245
|
+
};
|
|
1246
|
+
BcmLinked.style = linkedCss;
|
|
1247
|
+
|
|
1248
|
+
const shortcutCss = ":host{display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.block{display:block}.h-fit{height:fit-content}.w-fit{width:fit-content}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.border{border-width:1px}.border-solid{border-style:solid}.border-color-default{border-color:var(--bcm-ui-color-border-default)}.bg-color-default{background-color:var(--bcm-ui-color-background-default-default)}.px-1{padding-left:.25rem;padding-right:.25rem}.text-center{text-align:center}.text-size-2{font-size:var(--bcm-ui-font-size-2,10px);line-height:var(--bcm-ui-line-height-2,12px)}.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)}.font-medium{font-weight:500}.capitalize{text-transform:capitalize}.text-color-default{color:var(--bcm-ui-color-text-default)}.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)}";
|
|
1249
|
+
|
|
1250
|
+
const osKeys = {
|
|
1251
|
+
ctrl: '⌘',
|
|
1252
|
+
alt: '⌥',
|
|
1253
|
+
shift: '⇧',
|
|
1254
|
+
del: '⌫',
|
|
1255
|
+
delete: '⌫',
|
|
1256
|
+
backspace: '⌦',
|
|
1257
|
+
enter: '⏎',
|
|
1258
|
+
return: '⏎',
|
|
1259
|
+
};
|
|
1260
|
+
const BcmShortcut = class {
|
|
1261
|
+
constructor(hostRef) {
|
|
1262
|
+
index.registerInstance(this, hostRef);
|
|
1263
|
+
this.size = 'small';
|
|
1264
|
+
this.isMac = /Mac/.test(window.navigator.userAgent);
|
|
1265
|
+
}
|
|
1266
|
+
getHotkey(key) {
|
|
1267
|
+
if (!key) {
|
|
1268
|
+
return '';
|
|
1269
|
+
}
|
|
1270
|
+
if (this.isMac && (key.includes(' ') || key.includes('+'))) {
|
|
1271
|
+
const keys = key.split(/[\s+]+/);
|
|
1272
|
+
return keys.map(k => osKeys[k] || k).join('');
|
|
1273
|
+
}
|
|
1274
|
+
else {
|
|
1275
|
+
return key;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
render() {
|
|
1279
|
+
const { size, hotkey } = this;
|
|
1280
|
+
return (index.h("div", { key: '007588d1d20941ead644a3d1fd72410cb6793ff5', class: index$1.classNames('bcm-ui-element bcm-ui-content-display', 'block h-fit w-fit rounded border border-solid px-1', 'border-color-default bg-color-default text-color-default', 'text-center font-medium capitalize', {
|
|
1281
|
+
'text-size-2': size === 'small',
|
|
1282
|
+
'text-size-3': size === 'medium',
|
|
1283
|
+
'text-size-4': size === 'large',
|
|
1284
|
+
}) }, this.getHotkey(hotkey)));
|
|
1285
|
+
}
|
|
1286
|
+
};
|
|
1287
|
+
BcmShortcut.style = shortcutCss;
|
|
1288
|
+
|
|
1289
|
+
const variantTagMap = {
|
|
1290
|
+
display: 'h1',
|
|
1291
|
+
heading1: 'h2',
|
|
1292
|
+
heading2: 'h3',
|
|
1293
|
+
title1: 'h4',
|
|
1294
|
+
title2: 'h5',
|
|
1295
|
+
title3: 'h6',
|
|
1296
|
+
body: 'p',
|
|
1297
|
+
bodyAccent: 'p',
|
|
1298
|
+
helper: 'p',
|
|
1299
|
+
caption: 'p',
|
|
1300
|
+
label: 'label',
|
|
1301
|
+
placeholder: 'p',
|
|
1302
|
+
link: 'a',
|
|
1303
|
+
info: 'p',
|
|
1304
|
+
infoAccent: 'p',
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
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)}";
|
|
1308
|
+
|
|
1309
|
+
const BcmText = class {
|
|
1310
|
+
constructor(hostRef) {
|
|
1311
|
+
index.registerInstance(this, hostRef);
|
|
1312
|
+
/** Text variant */
|
|
1313
|
+
this.variant = 'body';
|
|
1314
|
+
/** Text size */
|
|
1315
|
+
this.size = 'medium';
|
|
1316
|
+
/** Text overflow behavior */
|
|
1317
|
+
this.overflow = false;
|
|
1318
|
+
this.variantClassMap = {
|
|
1319
|
+
display: 'font-semibold text-size-12 text-color-header',
|
|
1320
|
+
heading1: 'font-semibold text-size-7 text-color-header',
|
|
1321
|
+
heading2: 'font-semibold text-size-6 text-color-header',
|
|
1322
|
+
title1: {
|
|
1323
|
+
small: 'font-semibold text-size-5 text-color-header',
|
|
1324
|
+
medium: 'font-semibold text-size-6 text-color-header',
|
|
1325
|
+
large: 'font-semibold text-size-7 text-color-header',
|
|
1326
|
+
},
|
|
1327
|
+
title2: {
|
|
1328
|
+
small: 'font-semibold text-size-4 text-color-default',
|
|
1329
|
+
medium: 'font-semibold text-size-5 text-color-default',
|
|
1330
|
+
large: 'font-semibold text-size-6 text-color-default',
|
|
1331
|
+
},
|
|
1332
|
+
title3: {
|
|
1333
|
+
small: 'font-semibold text-size-3 text-color-disabled',
|
|
1334
|
+
medium: 'font-semibold text-size-4 text-color-disabled',
|
|
1335
|
+
large: 'font-semibold text-size-5 text-color-disabled',
|
|
1336
|
+
},
|
|
1337
|
+
body: {
|
|
1338
|
+
small: 'font-regular text-size-4 text-color-default',
|
|
1339
|
+
medium: 'font-regular text-size-5 text-color-default',
|
|
1340
|
+
large: 'font-regular text-size-6 text-color-default',
|
|
1341
|
+
},
|
|
1342
|
+
bodyAccent: {
|
|
1343
|
+
small: 'font-medium text-size-4 text-color-default',
|
|
1344
|
+
medium: 'font-medium text-size-5 text-color-default',
|
|
1345
|
+
large: 'font-medium text-size-6 text-color-default',
|
|
1346
|
+
},
|
|
1347
|
+
helper: {
|
|
1348
|
+
small: 'font-regular text-size-4 text-color-helper',
|
|
1349
|
+
medium: 'font-regular text-size-5 text-color-helper',
|
|
1350
|
+
large: 'font-regular text-size-6 text-color-helper',
|
|
1351
|
+
},
|
|
1352
|
+
caption: {
|
|
1353
|
+
small: 'font-regular text-size-3 text-color-caption',
|
|
1354
|
+
medium: 'font-regular text-size-4 text-color-caption',
|
|
1355
|
+
large: 'font-regular text-size-5 text-color-caption',
|
|
1356
|
+
},
|
|
1357
|
+
link: {
|
|
1358
|
+
small: 'font-medium text-size-4 underline text-color-primary',
|
|
1359
|
+
medium: 'font-medium text-size-5 underline text-color-primary',
|
|
1360
|
+
large: 'font-medium text-size-6 underline text-color-primary',
|
|
1361
|
+
},
|
|
1362
|
+
label: {
|
|
1363
|
+
small: 'font-medium text-size-3 text-color-label',
|
|
1364
|
+
medium: 'font-medium text-size-4 text-color-label',
|
|
1365
|
+
large: 'font-medium text-size-5 text-color-label',
|
|
1366
|
+
},
|
|
1367
|
+
placeholder: {
|
|
1368
|
+
small: 'font-regular text-size-4 text-color-placeholder',
|
|
1369
|
+
medium: 'font-regular text-size-5 text-color-placeholder',
|
|
1370
|
+
large: 'font-regular text-size-6 text-color-placeholder',
|
|
1371
|
+
},
|
|
1372
|
+
info: {
|
|
1373
|
+
small: 'font-regular text-size-3 text-color-default',
|
|
1374
|
+
medium: 'font-regular text-size-4 text-color-default',
|
|
1375
|
+
large: 'font-regular text-size-5 text-color-default',
|
|
1376
|
+
},
|
|
1377
|
+
infoAccent: {
|
|
1378
|
+
small: 'font-medium text-size-3 text-color-header',
|
|
1379
|
+
medium: 'font-medium text-size-4 text-color-header',
|
|
1380
|
+
large: 'font-medium text-size-5 text-color-header',
|
|
1381
|
+
},
|
|
1382
|
+
};
|
|
1383
|
+
this.getTextClass = (variant, size) => {
|
|
1384
|
+
const variantClasses = this.variantClassMap[variant];
|
|
1385
|
+
if (typeof variantClasses === 'string') {
|
|
1386
|
+
return variantClasses;
|
|
1387
|
+
}
|
|
1388
|
+
return variantClasses[size];
|
|
1389
|
+
};
|
|
1390
|
+
this.getOverflowClass = (overflow) => {
|
|
1391
|
+
return overflow ? 'truncate' : '';
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
render() {
|
|
1395
|
+
var _a;
|
|
1396
|
+
const Tag = variantTagMap[this.variant];
|
|
1397
|
+
const variantClass = this.getTextClass(this.variant, this.size);
|
|
1398
|
+
const overflowClass = this.getOverflowClass((_a = this.overflow) !== null && _a !== void 0 ? _a : false);
|
|
1399
|
+
return (index.h(Tag, { key: 'cb3c78143a1f52fdadd9458219ef5f12eace04e6', class: index$1.classNames('bcm-text appearance-none m-0 p-0', variantClass, overflowClass), part: "text" }, index.h("slot", { key: '7ab30bbf72b0fe1be98089b6c452662a382363e1' }, this.text)));
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
BcmText.style = textCss;
|
|
1403
|
+
|
|
1404
|
+
exports.bcm_button = BcmButton;
|
|
1405
|
+
exports.bcm_drawer = BcmDrawer;
|
|
1406
|
+
exports.bcm_dropdown = Dropdown;
|
|
1407
|
+
exports.bcm_dropdown_item = DropdownItem;
|
|
1408
|
+
exports.bcm_input = BcmInput;
|
|
1409
|
+
exports.bcm_linked = BcmLinked;
|
|
1410
|
+
exports.bcm_shortcut = BcmShortcut;
|
|
1411
|
+
exports.bcm_text = BcmText;
|
|
1412
|
+
//# sourceMappingURL=bcm-button.bcm-drawer.bcm-dropdown.bcm-dropdown-item.bcm-input.bcm-linked.bcm-shortcut.bcm-text.entry.cjs.js.map
|
|
1413
|
+
|
|
1414
|
+
//# sourceMappingURL=bcm-button_8.cjs.entry.js.map
|