bromcom-ui-next 0.1.30 → 0.1.31
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-accordion-group.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-accordion.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-alert.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-avatar.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-badge.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-basic-badge.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-button-group.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-button.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-checkbox.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-chip.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-divider.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-drawer.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-dropdown-item.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-dropdown.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-file-upload.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-input.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-linked.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-modal.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-pop-confirm.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-popover.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-radio-group.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-radio.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-segment.bcm-segmented-picker.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-shortcut.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-switch.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-tab.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bcm-tabs.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-text.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-textarea.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-tooltip.entry.esm.js.map +1 -0
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/global/global.js +33 -30
- package/dist/bromcom-ui/p-010219cf.entry.js +2 -0
- package/dist/bromcom-ui/p-010219cf.entry.js.map +1 -0
- package/dist/bromcom-ui/p-01a4e00b.entry.js +2 -0
- package/dist/bromcom-ui/p-01a4e00b.entry.js.map +1 -0
- package/dist/bromcom-ui/p-14c63d61.entry.js +2 -0
- package/dist/bromcom-ui/p-14c63d61.entry.js.map +1 -0
- package/dist/bromcom-ui/p-20a94dec.entry.js +2 -0
- package/dist/bromcom-ui/p-20a94dec.entry.js.map +1 -0
- package/dist/bromcom-ui/p-398620c2.entry.js +2 -0
- package/dist/bromcom-ui/p-398620c2.entry.js.map +1 -0
- package/dist/bromcom-ui/p-3b898f90.entry.js +2 -0
- package/dist/bromcom-ui/p-3b898f90.entry.js.map +1 -0
- package/dist/bromcom-ui/p-43c85c84.entry.js +2 -0
- package/dist/bromcom-ui/p-43c85c84.entry.js.map +1 -0
- package/dist/bromcom-ui/p-4e6661a5.entry.js +2 -0
- package/dist/bromcom-ui/p-4e6661a5.entry.js.map +1 -0
- package/dist/bromcom-ui/p-52bb0cdc.entry.js +2 -0
- package/dist/bromcom-ui/p-52bb0cdc.entry.js.map +1 -0
- package/dist/bromcom-ui/p-61c1c1c8.entry.js +2 -0
- package/dist/bromcom-ui/p-61c1c1c8.entry.js.map +1 -0
- package/dist/bromcom-ui/p-82e4c5f2.entry.js +2 -0
- package/dist/bromcom-ui/p-82e4c5f2.entry.js.map +1 -0
- package/dist/bromcom-ui/p-86f85963.entry.js +2 -0
- package/dist/bromcom-ui/p-86f85963.entry.js.map +1 -0
- package/dist/bromcom-ui/p-9249c1d1.entry.js +2 -0
- package/dist/bromcom-ui/p-9249c1d1.entry.js.map +1 -0
- package/dist/bromcom-ui/p-B6Ppbs5O.js +3 -0
- package/dist/bromcom-ui/p-B6Ppbs5O.js.map +1 -0
- package/dist/bromcom-ui/p-DBDSgIvP.js +2 -0
- package/dist/bromcom-ui/p-DBDSgIvP.js.map +1 -0
- package/dist/bromcom-ui/p-DaE0ZLar.js +2 -0
- package/dist/bromcom-ui/p-DaE0ZLar.js.map +1 -0
- package/dist/bromcom-ui/p-a25d1cef.entry.js +2 -0
- package/dist/bromcom-ui/p-a25d1cef.entry.js.map +1 -0
- package/dist/bromcom-ui/p-a4cb2e79.entry.js +2 -0
- package/dist/bromcom-ui/p-a4cb2e79.entry.js.map +1 -0
- package/dist/bromcom-ui/p-a68925b4.entry.js +2 -0
- package/dist/bromcom-ui/p-a68925b4.entry.js.map +1 -0
- package/dist/bromcom-ui/p-a750186c.entry.js +2 -0
- package/dist/bromcom-ui/p-a750186c.entry.js.map +1 -0
- package/dist/bromcom-ui/p-ac768b56.entry.js +2 -0
- package/dist/bromcom-ui/p-ac768b56.entry.js.map +1 -0
- package/dist/bromcom-ui/p-b0b193e6.entry.js +2 -0
- package/dist/bromcom-ui/p-b0b193e6.entry.js.map +1 -0
- package/dist/bromcom-ui/p-bf4409ca.entry.js +2 -0
- package/dist/bromcom-ui/p-bf4409ca.entry.js.map +1 -0
- package/dist/bromcom-ui/p-c57fb29b.entry.js +2 -0
- package/dist/bromcom-ui/p-c57fb29b.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-1507908f.entry.js → p-ccc310aa.entry.js} +2 -2
- package/dist/bromcom-ui/p-ccc310aa.entry.js.map +1 -0
- package/dist/bromcom-ui/p-d4ee962d.entry.js +2 -0
- package/dist/bromcom-ui/p-d4ee962d.entry.js.map +1 -0
- package/dist/bromcom-ui/p-e25a2f7a.entry.js +2 -0
- package/dist/bromcom-ui/p-e25a2f7a.entry.js.map +1 -0
- package/dist/bromcom-ui/p-e5b0b2ad.entry.js +2 -0
- package/dist/bromcom-ui/p-e5b0b2ad.entry.js.map +1 -0
- package/dist/bromcom-ui/p-e70d784d.entry.js +2 -0
- package/dist/bromcom-ui/p-e70d784d.entry.js.map +1 -0
- package/dist/bromcom-ui/p-e9fa3a22.entry.js +2 -0
- package/dist/bromcom-ui/p-e9fa3a22.entry.js.map +1 -0
- package/dist/bromcom-ui/p-ef281184.entry.js +2 -0
- package/dist/bromcom-ui/p-ef281184.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-496014ca.entry.js → p-fb6f616c.entry.js} +2 -2
- package/dist/bromcom-ui/p-fb6f616c.entry.js.map +1 -0
- package/dist/bromcom-ui/p-fd31c70c.entry.js +2 -0
- package/dist/bromcom-ui/p-fd31c70c.entry.js.map +1 -0
- package/dist/bromcom-ui/p-nf_HKsGq.js +2 -0
- package/dist/bromcom-ui/{p-CUvT12BL.js.map → p-nf_HKsGq.js.map} +1 -1
- package/dist/cjs/base-choice-control-EmA4JRjR.js +54 -0
- package/dist/cjs/base-choice-control-EmA4JRjR.js.map +1 -0
- package/dist/cjs/bcm-accordion-group.cjs.entry.js +20 -18
- package/dist/cjs/bcm-accordion-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +73 -56
- package/dist/cjs/bcm-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +21 -21
- package/dist/cjs/bcm-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js +22 -12
- package/dist/cjs/bcm-avatar.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-badge.cjs.entry.js +114 -82
- package/dist/cjs/bcm-badge.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-basic-badge.cjs.entry.js +73 -59
- package/dist/cjs/bcm-basic-badge.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +36 -24
- package/dist/cjs/bcm-button-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-button.cjs.entry.js +338 -0
- package/dist/cjs/bcm-button.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-checkbox.cjs.entry.js +284 -174
- package/dist/cjs/bcm-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +38 -35
- package/dist/cjs/bcm-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-divider.cjs.entry.js +55 -55
- package/dist/cjs/bcm-divider.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +332 -0
- package/dist/cjs/bcm-drawer.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-dropdown-item.cjs.entry.js +36 -33
- package/dist/cjs/bcm-dropdown-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-dropdown.cjs.entry.js +18 -17
- package/dist/cjs/bcm-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-file-upload.cjs.entry.js +552 -0
- package/dist/cjs/bcm-file-upload.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-input.cjs.entry.js +250 -158
- package/dist/cjs/bcm-input.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-linked.cjs.entry.js +452 -0
- package/dist/cjs/bcm-linked.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-modal.cjs.entry.js +360 -0
- package/dist/cjs/bcm-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-pop-confirm.cjs.entry.js +381 -0
- package/dist/cjs/bcm-pop-confirm.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-popover.cjs.entry.js +451 -0
- package/dist/cjs/bcm-popover.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-radio-group.cjs.entry.js +103 -80
- package/dist/cjs/bcm-radio-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-radio.cjs.entry.js +239 -106
- package/dist/cjs/bcm-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-segment.bcm-segmented-picker.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-segment_2.cjs.entry.js +335 -0
- package/dist/cjs/bcm-shortcut.cjs.entry.js +5 -4
- package/dist/cjs/bcm-shortcut.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-switch.cjs.entry.js +281 -148
- package/dist/cjs/bcm-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-tab.cjs.entry.js +44 -0
- package/dist/cjs/bcm-tab.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-tabs.cjs.entry.js +191 -237
- package/dist/cjs/bcm-tabs.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-text.cjs.entry.js +86 -85
- package/dist/cjs/bcm-text.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-textarea.cjs.entry.js +224 -154
- package/dist/cjs/bcm-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-tooltip.cjs.entry.js +414 -0
- package/dist/cjs/bcm-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/bromcom-ui.cjs.js +2 -2
- package/dist/cjs/floating-ui.dom-S9nP6zZt.js +1622 -0
- package/dist/{bromcom-ui/floating-ui.dom-ltNPqX34.js.map → cjs/floating-ui.dom-S9nP6zZt.js.map} +1 -1
- package/dist/cjs/{index-CmYzUr-k.js → index-1Qal-onT.js} +111 -33
- package/dist/cjs/index-1Qal-onT.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{validation-messages-BjfpSEWk.js → validation-messages-DieKlSG4.js} +6 -7
- package/dist/{esm/validation-messages-CUvT12BL.js.map → cjs/validation-messages-DieKlSG4.js.map} +1 -1
- package/dist/collection/collection-manifest.json +4 -5
- package/dist/collection/components/_shared/form/base-choice-control.js +90 -0
- package/dist/collection/components/_shared/form/base-choice-control.js.map +1 -0
- package/dist/collection/components/_shared/form/base-form-control.js +115 -0
- package/dist/collection/components/_shared/form/base-form-control.js.map +1 -0
- package/dist/collection/components/accordion/accordion.component.js +72 -55
- package/dist/collection/components/accordion/accordion.component.js.map +1 -1
- package/dist/collection/components/accordion/accordion.css +1 -1
- package/dist/collection/components/accordion-group/accordion-group.component.js +20 -18
- package/dist/collection/components/accordion-group/accordion-group.component.js.map +1 -1
- package/dist/collection/components/alert/alert.component.js +19 -21
- package/dist/collection/components/alert/alert.component.js.map +1 -1
- package/dist/collection/components/alert/alert.css +1 -1
- package/dist/collection/components/avatar/avatar.component.js +20 -12
- package/dist/collection/components/avatar/avatar.component.js.map +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/badge/badge.component.js +111 -81
- package/dist/collection/components/badge/badge.component.js.map +1 -1
- package/dist/collection/components/badge/badge.css +1 -1
- package/dist/collection/components/basic-badge/basic-badge.component.js +70 -58
- package/dist/collection/components/basic-badge/basic-badge.component.js.map +1 -1
- package/dist/collection/components/basic-badge/basic-badge.css +1 -1
- package/dist/collection/components/button/button.component.js +105 -84
- package/dist/collection/components/button/button.component.js.map +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button-group/button-group.component.js +34 -23
- package/dist/collection/components/button-group/button-group.component.js.map +1 -1
- package/dist/collection/components/button-group/button-group.css +1 -1
- package/dist/collection/components/checkbox/checkbox.component.js +355 -236
- package/dist/collection/components/checkbox/checkbox.component.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/chip/chip.component.js +35 -34
- package/dist/collection/components/chip/chip.component.js.map +1 -1
- package/dist/collection/components/chip/chip.css +1 -1
- package/dist/collection/components/divider/divider.component.js +53 -55
- package/dist/collection/components/divider/divider.component.js.map +1 -1
- package/dist/collection/components/drawer/drawer.component.js +168 -144
- package/dist/collection/components/drawer/drawer.component.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.component.js +16 -16
- package/dist/collection/components/dropdown/dropdown.component.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.component.js +34 -32
- package/dist/collection/components/dropdown-item/dropdown-item.component.js.map +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.css +1 -1
- package/dist/collection/components/input/input.component.js +241 -155
- package/dist/collection/components/input/input.component.js.map +1 -1
- package/dist/collection/components/linked/linked.component.js +160 -138
- package/dist/collection/components/linked/linked.component.js.map +1 -1
- package/dist/collection/components/linked/linked.css +1 -1
- package/dist/collection/components/modal/modal.component.js +180 -156
- package/dist/collection/components/modal/modal.component.js.map +1 -1
- package/dist/collection/components/pop-confirm/pop-confirm.component.js +190 -159
- package/dist/collection/components/pop-confirm/pop-confirm.component.js.map +1 -1
- package/dist/collection/components/pop-confirm/pop-confirm.css +1 -1
- package/dist/collection/components/popover/popover.component.js +240 -212
- package/dist/collection/components/popover/popover.component.js.map +1 -1
- package/dist/collection/components/popover/popover.css +1 -1
- package/dist/collection/components/radio/radio.component.js +282 -106
- package/dist/collection/components/radio/radio.component.js.map +1 -1
- package/dist/collection/components/radio-group/radio-group.component.js +102 -80
- package/dist/collection/components/radio-group/radio-group.component.js.map +1 -1
- package/dist/collection/components/segmented-picker/segment.component.js +228 -0
- package/dist/collection/components/segmented-picker/segment.component.js.map +1 -0
- package/dist/collection/components/segmented-picker/segment.css +1 -0
- package/dist/collection/components/segmented-picker/segmented-picker.component.js +354 -139
- package/dist/collection/components/segmented-picker/segmented-picker.component.js.map +1 -1
- package/dist/collection/components/segmented-picker/segmented-picker.css +1 -1
- package/dist/collection/components/shortcut/shortcut.js +4 -5
- package/dist/collection/components/shortcut/shortcut.js.map +1 -1
- package/dist/collection/components/switch/switch.component.js +350 -280
- package/dist/collection/components/switch/switch.component.js.map +1 -1
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/tabs/bcm-tab.css +1 -0
- package/dist/collection/components/tabs/bcm-tabs.css +1 -1
- package/dist/collection/components/tabs/tab.component.js +169 -0
- package/dist/collection/components/tabs/tab.component.js.map +1 -0
- package/dist/collection/components/tabs/tabs.component.js +221 -352
- package/dist/collection/components/tabs/tabs.component.js.map +1 -1
- package/dist/collection/components/text/text.component.js +84 -85
- package/dist/collection/components/text/text.component.js.map +1 -1
- package/dist/collection/components/text/text.css +1 -1
- package/dist/collection/components/textarea/textarea.component.js +216 -153
- package/dist/collection/components/textarea/textarea.component.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.component.js +164 -154
- package/dist/collection/components/tooltip/tooltip.component.js.map +1 -1
- package/dist/collection/components/upload/file-upload.component.js +905 -0
- package/dist/collection/components/upload/file-upload.component.js.map +1 -0
- package/dist/collection/components/upload/file-upload.css +1 -0
- package/dist/collection/global/global.js +33 -30
- package/dist/collection/utils/i18n.js +3 -4
- package/dist/collection/utils/i18n.js.map +1 -1
- package/dist/collection/utils/slot/check-slot-content.js +1 -2
- package/dist/collection/utils/slot/check-slot-content.js.map +1 -1
- package/dist/collection/utils/validation-messages.js +1 -1
- package/dist/collection/utils/validation-messages.js.map +1 -1
- package/dist/components/bcm-accordion-group.js +19 -17
- package/dist/components/bcm-accordion-group.js.map +1 -1
- package/dist/components/bcm-accordion.js +72 -55
- package/dist/components/bcm-accordion.js.map +1 -1
- package/dist/components/bcm-alert.js +1 -114
- package/dist/components/bcm-alert.js.map +1 -1
- package/dist/components/bcm-avatar.js +22 -12
- package/dist/components/bcm-avatar.js.map +1 -1
- package/dist/components/bcm-badge.js +1 -1
- package/dist/components/bcm-basic-badge.js +72 -58
- package/dist/components/bcm-basic-badge.js.map +1 -1
- package/dist/components/bcm-button-group.js +35 -23
- package/dist/components/bcm-button-group.js.map +1 -1
- package/dist/components/bcm-button.js +1 -1
- package/dist/components/bcm-checkbox.js +296 -184
- package/dist/components/bcm-checkbox.js.map +1 -1
- package/dist/components/bcm-chip.js +37 -34
- package/dist/components/bcm-chip.js.map +1 -1
- package/dist/components/bcm-divider.js +54 -54
- package/dist/components/bcm-divider.js.map +1 -1
- package/dist/components/bcm-drawer.js +169 -144
- package/dist/components/bcm-drawer.js.map +1 -1
- package/dist/components/bcm-dropdown-item.js +35 -32
- package/dist/components/bcm-dropdown-item.js.map +1 -1
- package/dist/components/bcm-dropdown.js +19 -18
- package/dist/components/bcm-dropdown.js.map +1 -1
- package/dist/components/{bcm-tabs-content.d.ts → bcm-file-upload.d.ts} +4 -4
- package/dist/components/bcm-file-upload.js +593 -0
- package/dist/components/bcm-file-upload.js.map +1 -0
- package/dist/components/bcm-input.js +244 -158
- package/dist/components/bcm-input.js.map +1 -1
- package/dist/components/bcm-linked.js +1 -1
- package/dist/components/bcm-modal.js +181 -156
- package/dist/components/bcm-modal.js.map +1 -1
- package/dist/components/bcm-pop-confirm.js +192 -160
- package/dist/components/bcm-pop-confirm.js.map +1 -1
- package/dist/components/bcm-popover.js +242 -213
- package/dist/components/bcm-popover.js.map +1 -1
- package/dist/components/bcm-radio-group.js +102 -79
- package/dist/components/bcm-radio-group.js.map +1 -1
- package/dist/components/bcm-radio.js +241 -108
- package/dist/components/bcm-radio.js.map +1 -1
- package/dist/components/{bcm-tabs-list.d.ts → bcm-segment.d.ts} +4 -4
- package/dist/components/bcm-segment.js +110 -0
- package/dist/components/bcm-segment.js.map +1 -0
- package/dist/components/bcm-segmented-picker.js +234 -115
- package/dist/components/bcm-segmented-picker.js.map +1 -1
- package/dist/components/bcm-shortcut.js +4 -3
- package/dist/components/bcm-shortcut.js.map +1 -1
- package/dist/components/bcm-switch.js +292 -156
- package/dist/components/bcm-switch.js.map +1 -1
- package/dist/components/{bcm-tabs-trigger.d.ts → bcm-tab.d.ts} +4 -4
- package/dist/components/bcm-tab.js +71 -0
- package/dist/components/bcm-tab.js.map +1 -0
- package/dist/components/bcm-tabs.js +196 -247
- package/dist/components/bcm-tabs.js.map +1 -1
- package/dist/components/bcm-text.js +85 -84
- package/dist/components/bcm-text.js.map +1 -1
- package/dist/components/bcm-textarea.js +218 -154
- package/dist/components/bcm-textarea.js.map +1 -1
- package/dist/components/bcm-tooltip.js +164 -153
- package/dist/components/bcm-tooltip.js.map +1 -1
- package/dist/components/index.js +105 -32
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-5_TgtzQU.js +119 -0
- package/dist/components/p-5_TgtzQU.js.map +1 -0
- package/dist/components/p-RlBWOSgL.js +179 -0
- package/dist/components/p-RlBWOSgL.js.map +1 -0
- package/dist/components/p-SERXqWcS.js +51 -0
- package/dist/components/p-SERXqWcS.js.map +1 -0
- package/dist/components/{p-CUvT12BL.js → p-nf_HKsGq.js} +6 -7
- package/dist/components/p-nf_HKsGq.js.map +1 -0
- package/dist/components/{p-CsIBm0J5.js → p-xQIzBLsS.js} +108 -85
- package/dist/components/p-xQIzBLsS.js.map +1 -0
- package/dist/components/{p-6VLsKZvR.js → p-z9ESseGb.js} +163 -140
- package/dist/components/p-z9ESseGb.js.map +1 -0
- package/dist/esm/base-choice-control-CKR8UdZ6.js +52 -0
- package/dist/esm/base-choice-control-CKR8UdZ6.js.map +1 -0
- package/dist/esm/bcm-accordion-group.entry.js +20 -18
- package/dist/esm/bcm-accordion-group.entry.js.map +1 -1
- package/dist/esm/bcm-accordion.entry.js +73 -56
- package/dist/esm/bcm-accordion.entry.js.map +1 -1
- package/dist/esm/bcm-alert.entry.js +21 -21
- package/dist/esm/bcm-alert.entry.js.map +1 -1
- package/dist/esm/bcm-avatar.entry.js +22 -12
- package/dist/esm/bcm-avatar.entry.js.map +1 -1
- package/dist/esm/bcm-badge.entry.js +114 -82
- package/dist/esm/bcm-badge.entry.js.map +1 -1
- package/dist/esm/bcm-basic-badge.entry.js +73 -59
- package/dist/esm/bcm-basic-badge.entry.js.map +1 -1
- package/dist/esm/bcm-button-group.entry.js +36 -24
- package/dist/esm/bcm-button-group.entry.js.map +1 -1
- package/dist/esm/bcm-button.entry.js +336 -0
- package/dist/esm/bcm-button.entry.js.map +1 -0
- package/dist/esm/bcm-checkbox.entry.js +284 -174
- package/dist/esm/bcm-checkbox.entry.js.map +1 -1
- package/dist/esm/bcm-chip.entry.js +38 -35
- package/dist/esm/bcm-chip.entry.js.map +1 -1
- package/dist/esm/bcm-divider.entry.js +55 -55
- package/dist/esm/bcm-divider.entry.js.map +1 -1
- package/dist/esm/bcm-drawer.entry.js +330 -0
- package/dist/esm/bcm-drawer.entry.js.map +1 -0
- package/dist/esm/bcm-dropdown-item.entry.js +36 -33
- package/dist/esm/bcm-dropdown-item.entry.js.map +1 -1
- package/dist/esm/bcm-dropdown.entry.js +18 -17
- package/dist/esm/bcm-dropdown.entry.js.map +1 -1
- package/dist/esm/bcm-file-upload.entry.js +550 -0
- package/dist/esm/bcm-file-upload.entry.js.map +1 -0
- package/dist/esm/bcm-input.entry.js +250 -158
- package/dist/esm/bcm-input.entry.js.map +1 -1
- package/dist/esm/bcm-linked.entry.js +450 -0
- package/dist/esm/bcm-linked.entry.js.map +1 -0
- package/dist/esm/bcm-modal.entry.js +358 -0
- package/dist/esm/bcm-modal.entry.js.map +1 -0
- package/dist/esm/bcm-pop-confirm.entry.js +379 -0
- package/dist/esm/bcm-pop-confirm.entry.js.map +1 -0
- package/dist/esm/bcm-popover.entry.js +449 -0
- package/dist/esm/bcm-popover.entry.js.map +1 -0
- package/dist/esm/bcm-radio-group.entry.js +103 -80
- package/dist/esm/bcm-radio-group.entry.js.map +1 -1
- package/dist/esm/bcm-radio.entry.js +239 -106
- package/dist/esm/bcm-radio.entry.js.map +1 -1
- package/dist/esm/bcm-segment.bcm-segmented-picker.entry.js.map +1 -0
- package/dist/esm/bcm-segment_2.entry.js +332 -0
- package/dist/esm/bcm-shortcut.entry.js +5 -4
- package/dist/esm/bcm-shortcut.entry.js.map +1 -1
- package/dist/esm/bcm-switch.entry.js +281 -148
- package/dist/esm/bcm-switch.entry.js.map +1 -1
- package/dist/esm/bcm-tab.entry.js +42 -0
- package/dist/esm/bcm-tab.entry.js.map +1 -0
- package/dist/esm/bcm-tabs.entry.js +191 -237
- package/dist/esm/bcm-tabs.entry.js.map +1 -1
- package/dist/esm/bcm-text.entry.js +86 -85
- package/dist/esm/bcm-text.entry.js.map +1 -1
- package/dist/esm/bcm-textarea.entry.js +224 -154
- package/dist/esm/bcm-textarea.entry.js.map +1 -1
- package/dist/esm/bcm-tooltip.entry.js +412 -0
- package/dist/esm/bcm-tooltip.entry.js.map +1 -0
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/floating-ui.dom-DBDSgIvP.js +1615 -0
- package/dist/esm/floating-ui.dom-DBDSgIvP.js.map +1 -0
- package/dist/esm/{index-CRwAh9Np.js → index-B6Ppbs5O.js} +111 -34
- package/dist/esm/index-B6Ppbs5O.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{validation-messages-CUvT12BL.js → validation-messages-nf_HKsGq.js} +6 -7
- package/dist/{cjs/validation-messages-BjfpSEWk.js.map → esm/validation-messages-nf_HKsGq.js.map} +1 -1
- package/dist/types/components/_shared/form/base-choice-control.d.ts +15 -0
- package/dist/types/components/_shared/form/base-form-control.d.ts +11 -0
- package/dist/types/components/checkbox/checkbox.component.d.ts +89 -71
- package/dist/types/components/input/input.component.d.ts +5 -0
- package/dist/types/components/radio/radio.component.d.ts +21 -0
- package/dist/types/components/segmented-picker/segment.component.d.ts +42 -0
- package/dist/types/components/segmented-picker/segmented-picker.component.d.ts +91 -24
- package/dist/types/components/switch/switch.component.d.ts +83 -43
- package/dist/types/components/tabs/tab.component.d.ts +33 -0
- package/dist/types/components/tabs/tabs.component.d.ts +51 -64
- package/dist/types/components/textarea/textarea.component.d.ts +5 -0
- package/dist/types/components/upload/file-upload.component.d.ts +107 -0
- package/dist/types/components.d.ts +830 -382
- package/package.json +2 -2
- package/dist/bromcom-ui/_commonjsHelpers-CvGrISen.js.map +0 -1
- package/dist/bromcom-ui/bcm-button.bcm-drawer.bcm-linked.bcm-modal.bcm-pop-confirm.bcm-popover.bcm-tooltip.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-segmented-picker-option.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-segmented-picker.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-tabs-content.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-tabs-list.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-tabs-trigger.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/generate-id-Crb5QsB-.js.map +0 -1
- package/dist/bromcom-ui/index-40rmUZjU.js.map +0 -1
- package/dist/bromcom-ui/index-BCaJmHBB.js.map +0 -1
- package/dist/bromcom-ui/p-0c7c6896.entry.js +0 -2
- package/dist/bromcom-ui/p-0c7c6896.entry.js.map +0 -1
- package/dist/bromcom-ui/p-11d0e649.entry.js +0 -2
- package/dist/bromcom-ui/p-11d0e649.entry.js.map +0 -1
- package/dist/bromcom-ui/p-12f38632.entry.js +0 -2
- package/dist/bromcom-ui/p-12f38632.entry.js.map +0 -1
- package/dist/bromcom-ui/p-13cbd1f5.entry.js +0 -2
- package/dist/bromcom-ui/p-13cbd1f5.entry.js.map +0 -1
- package/dist/bromcom-ui/p-1507908f.entry.js.map +0 -1
- package/dist/bromcom-ui/p-1ce9913f.entry.js +0 -2
- package/dist/bromcom-ui/p-1ce9913f.entry.js.map +0 -1
- package/dist/bromcom-ui/p-206d767e.entry.js +0 -2
- package/dist/bromcom-ui/p-206d767e.entry.js.map +0 -1
- package/dist/bromcom-ui/p-3cf7a7f4.entry.js +0 -2
- package/dist/bromcom-ui/p-3cf7a7f4.entry.js.map +0 -1
- package/dist/bromcom-ui/p-4505feba.entry.js +0 -2
- package/dist/bromcom-ui/p-4505feba.entry.js.map +0 -1
- package/dist/bromcom-ui/p-496014ca.entry.js.map +0 -1
- package/dist/bromcom-ui/p-4a932cd3.entry.js +0 -2
- package/dist/bromcom-ui/p-4a932cd3.entry.js.map +0 -1
- package/dist/bromcom-ui/p-4e554b8d.entry.js +0 -2
- package/dist/bromcom-ui/p-4e554b8d.entry.js.map +0 -1
- package/dist/bromcom-ui/p-57c4c4c4.entry.js +0 -2
- package/dist/bromcom-ui/p-57c4c4c4.entry.js.map +0 -1
- package/dist/bromcom-ui/p-61293ab2.entry.js +0 -2
- package/dist/bromcom-ui/p-61293ab2.entry.js.map +0 -1
- package/dist/bromcom-ui/p-61789456.entry.js +0 -2
- package/dist/bromcom-ui/p-61789456.entry.js.map +0 -1
- package/dist/bromcom-ui/p-65d0f188.entry.js +0 -2
- package/dist/bromcom-ui/p-65d0f188.entry.js.map +0 -1
- package/dist/bromcom-ui/p-83f707dc.entry.js +0 -2
- package/dist/bromcom-ui/p-83f707dc.entry.js.map +0 -1
- package/dist/bromcom-ui/p-8ba02e7e.entry.js +0 -2
- package/dist/bromcom-ui/p-8ba02e7e.entry.js.map +0 -1
- package/dist/bromcom-ui/p-9e9bf32e.entry.js +0 -2
- package/dist/bromcom-ui/p-9e9bf32e.entry.js.map +0 -1
- package/dist/bromcom-ui/p-CRwAh9Np.js +0 -3
- package/dist/bromcom-ui/p-CRwAh9Np.js.map +0 -1
- package/dist/bromcom-ui/p-CUvT12BL.js +0 -2
- package/dist/bromcom-ui/p-c87a6acf.entry.js +0 -2
- package/dist/bromcom-ui/p-c87a6acf.entry.js.map +0 -1
- package/dist/bromcom-ui/p-e0e235a8.entry.js +0 -2
- package/dist/bromcom-ui/p-e0e235a8.entry.js.map +0 -1
- package/dist/bromcom-ui/p-e1ce8b55.entry.js +0 -2
- package/dist/bromcom-ui/p-e1ce8b55.entry.js.map +0 -1
- package/dist/bromcom-ui/p-e4dddb0b.entry.js +0 -2
- package/dist/bromcom-ui/p-e4dddb0b.entry.js.map +0 -1
- package/dist/bromcom-ui/p-f9426924.entry.js +0 -2
- package/dist/bromcom-ui/p-f9426924.entry.js.map +0 -1
- package/dist/bromcom-ui/p-faa0e62c.entry.js +0 -2
- package/dist/bromcom-ui/p-faa0e62c.entry.js.map +0 -1
- package/dist/bromcom-ui/p-fcb4399f.entry.js +0 -2
- package/dist/bromcom-ui/p-fcb4399f.entry.js.map +0 -1
- package/dist/bromcom-ui/tv-SlGJ5EfR.js.map +0 -1
- package/dist/bromcom-ui/validation-messages-CUvT12BL.js.map +0 -1
- package/dist/cjs/bcm-button.bcm-drawer.bcm-linked.bcm-modal.bcm-pop-confirm.bcm-popover.bcm-tooltip.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-button_7.cjs.entry.js +0 -4131
- package/dist/cjs/bcm-segmented-picker-option.cjs.entry.js +0 -105
- package/dist/cjs/bcm-segmented-picker-option.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-segmented-picker.cjs.entry.js +0 -142
- package/dist/cjs/bcm-segmented-picker.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +0 -18
- package/dist/cjs/bcm-tabs-content.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-tabs-list.cjs.entry.js +0 -82
- package/dist/cjs/bcm-tabs-list.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +0 -120
- package/dist/cjs/bcm-tabs-trigger.entry.cjs.js.map +0 -1
- package/dist/cjs/index-CmYzUr-k.js.map +0 -1
- package/dist/collection/components/segmented-picker/segmented-picker-option.component.js +0 -253
- package/dist/collection/components/segmented-picker/segmented-picker-option.component.js.map +0 -1
- package/dist/collection/components/segmented-picker/segmented-picker-option.css +0 -1
- package/dist/collection/components/tabs/tabs-content.component.js +0 -46
- package/dist/collection/components/tabs/tabs-content.component.js.map +0 -1
- package/dist/collection/components/tabs/tabs-content.css +0 -1
- package/dist/collection/components/tabs/tabs-list.component.js +0 -133
- package/dist/collection/components/tabs/tabs-list.component.js.map +0 -1
- package/dist/collection/components/tabs/tabs-list.css +0 -1
- package/dist/collection/components/tabs/tabs-trigger.component.js +0 -267
- package/dist/collection/components/tabs/tabs-trigger.component.js.map +0 -1
- package/dist/collection/components/tabs/tabs-trigger.css +0 -1
- package/dist/components/bcm-segmented-picker-option.d.ts +0 -11
- package/dist/components/bcm-segmented-picker-option.js +0 -133
- package/dist/components/bcm-segmented-picker-option.js.map +0 -1
- package/dist/components/bcm-tabs-content.js +0 -41
- package/dist/components/bcm-tabs-content.js.map +0 -1
- package/dist/components/bcm-tabs-list.js +0 -106
- package/dist/components/bcm-tabs-list.js.map +0 -1
- package/dist/components/bcm-tabs-trigger.js +0 -148
- package/dist/components/bcm-tabs-trigger.js.map +0 -1
- package/dist/components/p-6VLsKZvR.js.map +0 -1
- package/dist/components/p-CUvT12BL.js.map +0 -1
- package/dist/components/p-CaemikSK.js +0 -147
- package/dist/components/p-CaemikSK.js.map +0 -1
- package/dist/components/p-CsIBm0J5.js.map +0 -1
- package/dist/esm/bcm-button.bcm-drawer.bcm-linked.bcm-modal.bcm-pop-confirm.bcm-popover.bcm-tooltip.entry.js.map +0 -1
- package/dist/esm/bcm-button_7.entry.js +0 -4123
- package/dist/esm/bcm-segmented-picker-option.entry.js +0 -103
- package/dist/esm/bcm-segmented-picker-option.entry.js.map +0 -1
- package/dist/esm/bcm-segmented-picker.entry.js +0 -140
- package/dist/esm/bcm-segmented-picker.entry.js.map +0 -1
- package/dist/esm/bcm-tabs-content.entry.js +0 -16
- package/dist/esm/bcm-tabs-content.entry.js.map +0 -1
- package/dist/esm/bcm-tabs-list.entry.js +0 -80
- package/dist/esm/bcm-tabs-list.entry.js.map +0 -1
- package/dist/esm/bcm-tabs-trigger.entry.js +0 -118
- package/dist/esm/bcm-tabs-trigger.entry.js.map +0 -1
- package/dist/esm/index-CRwAh9Np.js.map +0 -1
- package/dist/types/components/segmented-picker/segmented-picker-option.component.d.ts +0 -30
- package/dist/types/components/tabs/tabs-content.component.d.ts +0 -13
- package/dist/types/components/tabs/tabs-list.component.d.ts +0 -20
- package/dist/types/components/tabs/tabs-trigger.component.d.ts +0 -49
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bcm-input.entry.js","sources":["src/utils/slot/check-slot-content.ts","src/components/input/input.scss?tag=bcm-input&encapsulation=shadow","src/components/input/input.component.tsx"],"sourcesContent":["/**\n * Checks if a named slot has any content\n * @param element - The host element (component instance)\n * @param slotName - Name of the slot to check\n * @returns boolean indicating if the slot has any assigned nodes\n */\nexport const checkSlotContent = (element: HTMLElement, slotName: string): boolean => {\n const slot = element.shadowRoot?.querySelector(`slot[name=\"${slotName}\"]`) as HTMLSlotElement;\n if (!slot) return false;\n\n const assignedNodes = slot.assignedNodes();\n return assignedNodes.length > 0;\n};\n",":host {\n display: inline-block;\n}\n\n:host([full-width]) {\n width: 100%;\n}\n","import { Component, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\nimport { InputSize, InputStatus, InputType } from './types';\nimport { tv } from '@utils/tv';\nimport classNames from 'classnames';\nimport { generateId } from '../../utils/id/generate-id';\nimport { checkSlotContent } from '../../utils/slot/check-slot-content';\nimport { getValidationMessage, setValidationMessages, defaultValidationMessages } from '../../utils/validation-messages';\n\n@Component({\n tag: 'bcm-input',\n styleUrl: 'input.scss',\n shadow: true,\n})\nexport class BcmInput {\n @Element() el: HTMLElement;\n private inputRef: HTMLInputElement;\n\n @State() isFocused = false;\n @State() validationMessage: string;\n @State() isValid = true;\n @State() internalStatus: InputStatus = 'default';\n @State() internalErrorMessage: string;\n @State() isPasswordVisible = false;\n\n /** Input value */\n @Prop({ mutable: true, reflect: true })\n value: string = '';\n\n /** Input placeholder text */\n @Prop()\n placeholder?: string;\n\n /** Input name */\n @Prop()\n name?: string;\n\n /** Input id */\n @Prop({ attribute: 'id', reflect: true })\n _id?: string = generateId('input');\n\n /** Controls the input size */\n @Prop()\n size: InputSize = 'medium';\n\n /** Defines the input's status/state */\n @Prop()\n status: InputStatus = 'default';\n\n /** Full width input */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML input type */\n @Prop()\n type: InputType = 'text';\n\n /** Whether the input is disabled */\n @Prop()\n disabled = false;\n\n /** Whether the input is readonly */\n @Prop()\n readonly = false;\n\n /** Whether the input is required */\n @Prop()\n required = false;\n\n /** Input autocomplete attribute */\n @Prop()\n autocomplete?: string;\n\n /** Min length for text input */\n @Prop()\n minLength?: number;\n\n /** Max length for text input */\n @Prop()\n maxLength?: number;\n\n /** Min value for number input */\n @Prop()\n min?: number;\n\n /** Max value for number input */\n @Prop()\n max?: number;\n\n /** Step value for number input */\n @Prop()\n step?: number;\n\n /** Pattern for validation */\n @Prop()\n pattern?: string;\n\n /** Input label for accessibility */\n @Prop()\n label?: string;\n\n /** Error message to display */\n @Prop()\n errorMessage?: string;\n\n /** Caption text to display below input */\n @Prop()\n captionText?: string;\n\n /** ID of associated label element */\n @Prop()\n labelledby?: string;\n\n /** ID of associated caption/error text element */\n @Prop()\n describedby?: string;\n\n /** Prefix icon class name */\n @Prop()\n prefixIcon?: string;\n\n /** Suffix icon class name */\n @Prop()\n suffixIcon?: string;\n\n /** Whether to use native form validation\n * If false, component will handle validation internally\n */\n @Prop()\n useNativeValidation = true;\n\n /** Custom validation function */\n @Prop()\n validator?: (value: string) => string | undefined;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmInput: EventEmitter<InputEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmChange: EventEmitter<Event>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyDown: EventEmitter<KeyboardEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyUp: EventEmitter<KeyboardEvent>;\n\n @Watch('value')\n handleValueChange(newValue: string) {\n if (this.inputRef) {\n this.inputRef.value = newValue;\n }\n }\n\n @Watch('status')\n watchStatus(newValue: InputStatus) {\n this.internalStatus = newValue;\n }\n\n @Watch('errorMessage')\n watchErrorMessage(newValue: string) {\n this.internalErrorMessage = newValue;\n }\n\n @Method()\n async setFocus() {\n this.inputRef?.focus();\n }\n\n @Method()\n async setBlur() {\n this.inputRef?.blur();\n }\n\n @Method()\n async select() {\n this.inputRef?.select();\n }\n\n /** Sets locale and messages for all inputs */\n @Method()\n async setLocale(locale: string, messages: Record<string, string>) {\n // Set messages and update validation immediately\n setValidationMessages(locale, messages);\n\n // Mevcut validasyon mesajını güncelle\n if (!this.isValid) {\n this.validateInput();\n }\n }\n\n componentWillLoad() {\n // I18n için default mesajları set et\n setValidationMessages('en', defaultValidationMessages);\n this.internalStatus = this.status;\n this.internalErrorMessage = this.errorMessage;\n }\n\n private validateInput(): void {\n if (!this.inputRef) return;\n\n // Reset validation state\n this.isValid = true;\n this.validationMessage = '';\n\n const value = this.inputRef.value;\n\n // Required check\n if (this.required && !value) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('required');\n this.internalStatus = 'error';\n this.internalErrorMessage = this.validationMessage;\n return;\n }\n\n // Minimum length check\n else if (this.minLength && value.length < this.minLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('minlength', { min: this.minLength });\n }\n // Maximum length check\n else if (this.maxLength && value.length > this.maxLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });\n }\n // Pattern check\n else if (this.pattern && !new RegExp(this.pattern).test(value)) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('pattern');\n }\n // Email check\n else if (this.type === 'email' && value && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('email');\n }\n // Number range check\n else if (this.type === 'number' && value) {\n const numValue = parseFloat(value);\n if (this.min !== undefined && numValue < this.min) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('min', { min: this.min });\n } else if (this.max !== undefined && numValue > this.max) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('max', { max: this.max });\n }\n }\n\n // Update component state\n this.internalStatus = this.isValid ? 'default' : 'error';\n this.internalErrorMessage = this.validationMessage;\n }\n\n private onInput = (event: InputEvent) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.bcmInput.emit(event);\n this.validateInput();\n };\n\n private onChange = (event: Event) => {\n this.bcmChange.emit(event);\n };\n\n private onFocus = (event: FocusEvent) => {\n this.isFocused = true;\n this.bcmFocus.emit(event);\n };\n\n private onBlur = (event: FocusEvent) => {\n this.isFocused = false;\n this.bcmBlur.emit(event);\n this.validateInput();\n };\n\n private onKeyDown = (event: KeyboardEvent) => {\n this.bcmKeyDown.emit(event);\n };\n\n private onKeyUp = (event: KeyboardEvent) => {\n this.bcmKeyUp.emit(event);\n };\n\n private hasSlotContent(slotName: string): boolean {\n return checkSlotContent(this.el, slotName);\n }\n\n private styleClass = tv(\n {\n slots: {\n base: [\n 'bcm-input bcm-input__container',\n 'bg-[--bcm-ui-color-background-base-default]',\n 'text-[--bcm-ui-color-text-default]',\n 'border border-solid rounded',\n 'flex items-center justify-between',\n 'transition-colors duration-200',\n 'px-2',\n ],\n inputClass: [\n 'input',\n 'w-full flex-1',\n 'border-0 outline-0 bg-transparent',\n 'appearance-none text-ellipsis',\n 'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',\n 'font-sans antialiased font-medium',\n 'px-1',\n '[appearance:textfield][&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',\n ],\n },\n variants: {\n size: {\n small: {\n base: '',\n inputClass: 'text-size-4 py-px',\n },\n medium: {\n base: '',\n inputClass: 'text-size-5 leading-6 py-1',\n },\n large: {\n base: '',\n inputClass: 'text-size-6 py-2',\n },\n },\n status: {\n default: {\n base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],\n },\n error: {\n base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],\n },\n success: {\n base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],\n },\n warning: {\n base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],\n },\n info: {\n base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],\n },\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed',\n false: '',\n },\n focused: {\n true: {\n base: '',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n status: 'default',\n fullWidth: false,\n disabled: false,\n focused: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n private getDefaultIconForType(): string | undefined {\n return; // TODO: Will be implemented later\n // return defaultIcons[this.type as keyof typeof defaultIcons];\n }\n\n private togglePasswordVisibility = () => {\n this.isPasswordVisible = !this.isPasswordVisible;\n this.inputRef.type = this.isPasswordVisible ? 'text' : 'password';\n };\n\n private PasswordToggleButton = () => {\n if (this.type !== 'password' || this.disabled || this.readonly || this.value?.length === 0) return null;\n return (\n <button class=\"appearance-none flex items-center w-6 h-full justify-center\" onClick={this.togglePasswordVisibility} type=\"button\">\n <bcm-icon name={this.isPasswordVisible ? 'fa-eye-slash fa-regular' : 'fa-regular fa-eye'} size={this.iconSize}></bcm-icon>\n </button>\n );\n };\n\n private iconSize = {\n small: 14,\n medium: 16,\n large: 18,\n }[this.size];\n\n render() {\n const inputId = this._id + '-input' || this.name;\n\n const { base, inputClass } = this.styleClass({\n size: this.size,\n status: this.internalStatus,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n focused: this.isFocused,\n });\n\n return (\n <div class=\"bcm-ui-element\">\n {this.label && (\n <label\n class={classNames(\n 'input-label font-medium',\n {\n 'text-color-label': !this.disabled,\n 'text-color-disabled': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n htmlFor={inputId}\n >\n <slot name=\"label\">{this.label}</slot>\n {this.required && <span>*</span>}\n </label>\n )}\n\n <div class={base()}>\n {(this.hasSlotContent('prefix') || this.prefixIcon || this.getDefaultIconForType()) && (\n <div class=\"flex items-center gap-2 px-2\">\n {(this.prefixIcon || this.getDefaultIconForType()) && (\n <bcm-icon class=\"prefix-icon\" icon-name={this.prefixIcon || this.getDefaultIconForType()} size={this.iconSize}></bcm-icon>\n )}\n <slot name=\"prefix\"></slot>\n </div>\n )}\n <input\n ref={el => (this.inputRef = el)}\n id={inputId}\n class={inputClass()}\n type={this.type}\n name={this.name}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n placeholder={this.placeholder}\n autocomplete={this.autocomplete}\n minlength={this.minLength}\n maxlength={this.maxLength}\n min={this.min}\n max={this.max}\n step={this.step}\n pattern={this.pattern}\n aria-invalid={this.status === 'error'}\n aria-required={this.required}\n aria-labelledby={this.labelledby}\n aria-describedby={this.describedby}\n value={this.value}\n onInput={this.onInput}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyDown={this.onKeyDown}\n onKeyUp={this.onKeyUp}\n />\n {(this.hasSlotContent('suffix') || this.suffixIcon) && (\n <div class=\"flex items-center gap-2 px-2\">\n <slot name=\"suffix\"></slot>\n {this.suffixIcon && <bcm-icon class=\"suffix-icon\" icon-name={this.suffixIcon} size={this.iconSize}></bcm-icon>}\n </div>\n )}\n {/* {this.type === 'password' && this.value?.length > 0 && !this.disabled && ( \n // <bcm-icon\n // class=\"password-toggle-icon cursor-pointer\"\n // icon-name={this.isPasswordVisible ? 'fa-regular fa-eye-slash' : 'fa-regular fa-eye'}\n // size={iconSize}\n // onClick={this.togglePasswordVisibility}\n // ></bcm-icon>\n // )}*/}\n {this.PasswordToggleButton()}\n </div>\n {(this.captionText || this.internalErrorMessage || this.validationMessage) && (\n <div\n class={classNames(\n 'input-caption-text font-regular mt-1',\n {\n 'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',\n 'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),\n 'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',\n 'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',\n 'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',\n 'text-[--bcm-ui-color-text-disabled]': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n >\n {!this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText}\n </div>\n )}\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,OAAoB,EAAE,QAAgB,KAAa;;AAClF,IAAA,MAAM,IAAI,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,UAAU,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,aAAa,CAAC,CAAA,WAAA,EAAc,QAAQ,CAAA,EAAA,CAAI,CAAoB;AAC7F,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,KAAK;AAEvB,IAAA,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE;AAC1C,IAAA,OAAO,aAAa,CAAC,MAAM,GAAG,CAAC;AACjC,CAAC;;ACZD,MAAM,QAAQ,GAAG,6qPAA6qP;;MCajrP,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;AASW,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AAEjB,QAAA,IAAO,CAAA,OAAA,GAAG,IAAI;AACd,QAAA,IAAc,CAAA,cAAA,GAAgB,SAAS;AAEvC,QAAA,IAAiB,CAAA,iBAAA,GAAG,KAAK;;AAIlC,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;;AAYlB,QAAA,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CACP,EASA,IAAI,CAAC,oBAAoB,EAAE,CACxB,EACL,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,iBAAiB,MACvE,CACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,UAAU,CACf,sCAAsC,EACtC;gBACE,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;AACzF,gBAAA,kCAAkC,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,cAAc,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxG,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;gBACzF,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;gBACzF,iCAAiC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM;gBACnF,qCAAqC,EAAE,IAAI,CAAC,QAAQ;aACrD,EACD;AACE,gBAAA,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;AACpC,gBAAA,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;AACrC,gBAAA,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;AACrC,aAAA,CACF,EAEA,EAAA,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,cAAc,KAAK,OAAO,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,WAAW,CACpH,CACP,CACG;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"bcm-input.entry.js","sources":["src/utils/slot/check-slot-content.ts","src/components/input/input.scss?tag=bcm-input&encapsulation=shadow","src/components/input/input.component.tsx"],"sourcesContent":["/**\n * Checks if a named slot has any content\n * @param element - The host element (component instance)\n * @param slotName - Name of the slot to check\n * @returns boolean indicating if the slot has any assigned nodes\n */\nexport const checkSlotContent = (element: HTMLElement, slotName: string): boolean => {\n const slot = element.shadowRoot?.querySelector(`slot[name=\"${slotName}\"]`) as HTMLSlotElement;\n if (!slot) return false;\n\n const assignedNodes = slot.assignedNodes();\n return assignedNodes.length > 0;\n};\n",":host {\n display: inline-block;\n}\n\n:host([full-width]) {\n width: 100%;\n}\n","import { Component, Prop, h, Event, EventEmitter, Method, State, Watch, Element, AttachInternals } from '@stencil/core';\nimport { InputSize, InputStatus, InputType } from './types';\nimport { tv } from '@utils/tv';\nimport classNames from 'classnames';\nimport { generateId } from '../../utils/id/generate-id';\nimport { checkSlotContent } from '../../utils/slot/check-slot-content';\nimport { getValidationMessage, setValidationMessages, defaultValidationMessages } from '../../utils/validation-messages';\n\n@Component({\n tag: 'bcm-input',\n styleUrl: 'input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class BcmInput {\n @Element() el: HTMLElement;\n private inputRef: HTMLInputElement;\n\n @State() isFocused = false;\n @State() validationMessage: string;\n @State() isValid = true;\n @State() internalStatus: InputStatus = 'default';\n @State() internalErrorMessage: string;\n @State() isPasswordVisible = false;\n\n /** Input value */\n @Prop({ mutable: true, reflect: true })\n value: string = '';\n\n /** Input placeholder text */\n @Prop()\n placeholder?: string;\n\n /** Input name */\n @Prop()\n name?: string;\n\n /** Input id */\n @Prop({ attribute: 'id', reflect: true })\n _id?: string = generateId('input');\n\n /** Controls the input size */\n @Prop()\n size: InputSize = 'medium';\n\n /** Defines the input's status/state */\n @Prop()\n status: InputStatus = 'default';\n\n /** Full width input */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML input type */\n @Prop()\n type: InputType = 'text';\n\n /** Whether the input is disabled */\n @Prop()\n disabled = false;\n\n /** Whether the input is readonly */\n @Prop()\n readonly = false;\n\n /** Whether the input is required */\n @Prop()\n required = false;\n\n /** Input autocomplete attribute */\n @Prop()\n autocomplete?: string;\n\n /** Min length for text input */\n @Prop()\n minLength?: number;\n\n /** Max length for text input */\n @Prop()\n maxLength?: number;\n\n /** Min value for number input */\n @Prop()\n min?: number;\n\n /** Max value for number input */\n @Prop()\n max?: number;\n\n /** Step value for number input */\n @Prop()\n step?: number;\n\n /** Pattern for validation */\n @Prop()\n pattern?: string;\n\n /** Input label for accessibility */\n @Prop()\n label?: string;\n\n /** Error message to display */\n @Prop()\n errorMessage?: string;\n\n /** Caption text to display below input */\n @Prop()\n captionText?: string;\n\n /** ID of associated label element */\n @Prop()\n labelledby?: string;\n\n /** ID of associated caption/error text element */\n @Prop()\n describedby?: string;\n\n /** Prefix icon class name */\n @Prop()\n prefixIcon?: string;\n\n /** Suffix icon class name */\n @Prop()\n suffixIcon?: string;\n\n /** Whether to use native form validation\n * If false, component will handle validation internally\n */\n @Prop()\n useNativeValidation = true;\n\n /** Custom validation function */\n @Prop()\n validator?: (value: string) => string | undefined;\n\n @AttachInternals() internals: ElementInternals;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmInput: EventEmitter<InputEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmChange: EventEmitter<Event>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyDown: EventEmitter<KeyboardEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyUp: EventEmitter<KeyboardEvent>;\n\n @Watch('value')\n handleValueChange(newValue: string) {\n if (this.inputRef) {\n this.inputRef.value = newValue;\n }\n if (this.internals) {\n this.internals.setFormValue(newValue ?? '');\n }\n }\n\n @Watch('status')\n watchStatus(newValue: InputStatus) {\n this.internalStatus = newValue;\n }\n\n @Watch('errorMessage')\n watchErrorMessage(newValue: string) {\n this.internalErrorMessage = newValue;\n }\n\n @Method()\n async setFocus() {\n this.inputRef?.focus();\n }\n\n @Method()\n async setBlur() {\n this.inputRef?.blur();\n }\n\n @Method()\n async select() {\n this.inputRef?.select();\n }\n\n /**\n * When the parent <form> is reset, reset input state as well.\n */\n formResetCallback() {\n this.value = '';\n this.isValid = true;\n this.validationMessage = '';\n this.internalStatus = 'default';\n this.internalErrorMessage = '';\n\n if (this.inputRef) {\n this.inputRef.value = '';\n }\n\n if (this.internals) {\n this.internals.setFormValue('');\n this.internals.setValidity({});\n }\n }\n\n /** Sets locale and messages for all inputs */\n @Method()\n async setLocale(locale: string, messages: Record<string, string>) {\n // Set messages and update validation immediately\n setValidationMessages(locale, messages);\n\n if (!this.isValid) {\n this.validateInput();\n }\n }\n\n componentWillLoad() {\n setValidationMessages('en', defaultValidationMessages);\n this.internalStatus = this.status;\n this.internalErrorMessage = this.errorMessage;\n\n if (this.internals) {\n this.internals.setFormValue(this.value ?? '');\n }\n }\n\n private validateInput(): void {\n if (!this.inputRef) return;\n\n // Reset validation state\n this.isValid = true;\n this.validationMessage = '';\n let validityFlags: ValidityStateFlags = {};\n\n const value = this.inputRef.value;\n\n if (this.validator) {\n const customError = this.validator(value);\n if (customError) {\n this.isValid = false;\n this.validationMessage = customError;\n validityFlags = { customError: true };\n }\n }\n // Required check\n if (this.required && !value) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('required');\n this.internalStatus = 'error';\n this.internalErrorMessage = this.validationMessage;\n validityFlags = { valueMissing: true };\n }\n\n // Minimum length check\n else if (this.minLength && value.length < this.minLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('minlength', { min: this.minLength });\n validityFlags = { tooShort: true };\n }\n // Maximum length check\n else if (this.maxLength && value.length > this.maxLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });\n validityFlags = { tooLong: true };\n }\n // Pattern check\n else if (this.pattern && !new RegExp(this.pattern).test(value)) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('pattern');\n validityFlags = { patternMismatch: true };\n }\n // Email check\n else if (this.type === 'email' && value && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('email');\n validityFlags = { typeMismatch: true };\n }\n // Number range check\n else if (this.type === 'number' && value) {\n const numValue = parseFloat(value);\n if (this.min !== undefined && numValue < this.min) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('min', { min: this.min });\n validityFlags = { rangeUnderflow: true };\n } else if (this.max !== undefined && numValue > this.max) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('max', { max: this.max });\n validityFlags = { rangeOverflow: true };\n }\n }\n\n // Update component state\n this.internalStatus = this.isValid ? 'default' : 'error';\n this.internalErrorMessage = this.validationMessage;\n\n if (this.internals) {\n if (this.isValid) {\n this.internals.setValidity({});\n } else {\n this.internals.setValidity(validityFlags, this.validationMessage || '', this.el);\n }\n }\n }\n\n private onInput = (event: InputEvent) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.internals.setFormValue(this.value);\n this.bcmInput.emit(event);\n this.validateInput();\n };\n\n private onChange = (event: Event) => {\n this.bcmChange.emit(event);\n };\n\n private onFocus = (event: FocusEvent) => {\n this.isFocused = true;\n this.bcmFocus.emit(event);\n };\n\n private onBlur = (event: FocusEvent) => {\n this.isFocused = false;\n this.bcmBlur.emit(event);\n this.validateInput();\n };\n\n private onKeyDown = (event: KeyboardEvent) => {\n this.bcmKeyDown.emit(event);\n };\n\n private onKeyUp = (event: KeyboardEvent) => {\n this.bcmKeyUp.emit(event);\n };\n\n private hasSlotContent(slotName: string): boolean {\n return checkSlotContent(this.el, slotName);\n }\n\n private styleClass = tv(\n {\n slots: {\n base: [\n 'bcm-input bcm-input__container',\n 'bg-[--bcm-ui-color-background-base-default]',\n 'text-[--bcm-ui-color-text-default]',\n 'border border-solid rounded',\n 'flex items-center justify-between',\n 'transition-colors duration-200',\n 'px-2',\n ],\n inputClass: [\n 'input',\n 'w-full flex-1',\n 'border-0 outline-0 bg-transparent',\n 'appearance-none text-ellipsis',\n 'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',\n 'font-sans antialiased font-medium',\n 'px-1',\n '[appearance:textfield][&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',\n ],\n },\n variants: {\n size: {\n small: {\n base: '',\n inputClass: 'text-size-4 py-px',\n },\n medium: {\n base: '',\n inputClass: 'text-size-5 leading-6 py-1',\n },\n large: {\n base: '',\n inputClass: 'text-size-6 py-2',\n },\n },\n status: {\n default: {\n base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],\n },\n error: {\n base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],\n },\n success: {\n base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],\n },\n warning: {\n base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],\n },\n info: {\n base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],\n },\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed',\n false: '',\n },\n focused: {\n true: {\n base: '',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n status: 'default',\n fullWidth: false,\n disabled: false,\n focused: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n private getDefaultIconForType(): string | undefined {\n return; // TODO: Will be implemented later\n // return defaultIcons[this.type as keyof typeof defaultIcons];\n }\n\n private togglePasswordVisibility = () => {\n this.isPasswordVisible = !this.isPasswordVisible;\n this.inputRef.type = this.isPasswordVisible ? 'text' : 'password';\n };\n\n private PasswordToggleButton = () => {\n if (this.type !== 'password' || this.disabled || this.readonly || this.value?.length === 0) return null;\n return (\n <button class=\"appearance-none flex items-center w-6 h-full justify-center\" onClick={this.togglePasswordVisibility} type=\"button\">\n <bcm-icon name={this.isPasswordVisible ? 'fa-eye-slash fa-regular' : 'fa-regular fa-eye'} size={this.iconSize}></bcm-icon>\n </button>\n );\n };\n\n private iconSize = {\n small: 14,\n medium: 16,\n large: 18,\n }[this.size];\n\n render() {\n const inputId = this._id + '-input' || this.name;\n\n const { base, inputClass } = this.styleClass({\n size: this.size,\n status: this.internalStatus,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n focused: this.isFocused,\n });\n\n return (\n <div class=\"bcm-ui-element\">\n {this.label && (\n <label\n class={classNames(\n 'input-label font-medium',\n {\n 'text-color-label': !this.disabled,\n 'text-color-disabled': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n htmlFor={inputId}\n >\n <slot name=\"label\">{this.label}</slot>\n {this.required && <span>*</span>}\n </label>\n )}\n\n <div class={base()}>\n {(this.hasSlotContent('prefix') || this.prefixIcon || this.getDefaultIconForType()) && (\n <div class=\"flex items-center gap-2 px-2\">\n {(this.prefixIcon || this.getDefaultIconForType()) && (\n <bcm-icon class=\"prefix-icon\" icon-name={this.prefixIcon || this.getDefaultIconForType()} size={this.iconSize}></bcm-icon>\n )}\n <slot name=\"prefix\"></slot>\n </div>\n )}\n <input\n ref={el => (this.inputRef = el)}\n id={inputId}\n class={inputClass()}\n type={this.type}\n name={this.name}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n placeholder={this.placeholder}\n autocomplete={this.autocomplete}\n minlength={this.minLength}\n maxlength={this.maxLength}\n min={this.min}\n max={this.max}\n step={this.step}\n pattern={this.pattern}\n aria-invalid={this.status === 'error'}\n aria-required={this.required}\n aria-labelledby={this.labelledby}\n aria-describedby={this.describedby}\n value={this.value}\n onInput={this.onInput}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyDown={this.onKeyDown}\n onKeyUp={this.onKeyUp}\n />\n {(this.hasSlotContent('suffix') || this.suffixIcon) && (\n <div class=\"flex items-center gap-2 px-2\">\n <slot name=\"suffix\"></slot>\n {this.suffixIcon && <bcm-icon class=\"suffix-icon\" icon-name={this.suffixIcon} size={this.iconSize}></bcm-icon>}\n </div>\n )}\n {/* {this.type === 'password' && this.value?.length > 0 && !this.disabled && ( \n // <bcm-icon\n // class=\"password-toggle-icon cursor-pointer\"\n // icon-name={this.isPasswordVisible ? 'fa-regular fa-eye-slash' : 'fa-regular fa-eye'}\n // size={iconSize}\n // onClick={this.togglePasswordVisibility}\n // ></bcm-icon>\n // )}*/}\n {this.PasswordToggleButton()}\n </div>\n {(this.captionText || this.internalErrorMessage || this.validationMessage) && (\n <div\n class={classNames(\n 'input-caption-text font-regular mt-1',\n {\n 'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',\n 'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),\n 'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',\n 'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',\n 'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',\n 'text-[--bcm-ui-color-text-disabled]': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n >\n {!this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText}\n </div>\n )}\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,OAAo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IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;AACzF,gBAAA,kCAAkC,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,cAAc,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxG,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;gBACzF,oCAAoC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;gBACzF,iCAAiC,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM;gBACnF,qCAAqC,EAAE,IAAI,CAAC,QAAQ;aACrD,EACD;AACE,gBAAA,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;AACpC,gBAAA,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;AACrC,gBAAA,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;AACrC,aAAA,CACF,EAEA,EAAA,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,cAAc,KAAK,OAAO,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,WAAW,CACpH,CACP,CACG;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-B6Ppbs5O.js';
|
|
2
|
+
import { c as computePosition, a as autoUpdate, o as offset, f as flip, s as shift, b as arrow } from './floating-ui.dom-DBDSgIvP.js';
|
|
3
|
+
import { t as tv } from './tv-CEcVC0yX.js';
|
|
4
|
+
|
|
5
|
+
const linkedCss = ".visible{visibility:visible}.absolute{position:absolute}.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)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:host{display:inline-block}[popover]{background:transparent;border:none;margin:0;opacity:0;overflow:visible;padding:0;position:absolute;transform:scale(.95);transition:opacity .15s ease-out,transform .15s ease-out,display allow-discrete .15s ease-out,overlay allow-discrete .15s ease-out}[popover]:popover-open{opacity:1;transform:scale(1)}@starting-style{[popover]:popover-open{opacity:0;transform:scale(.95)}}[data-placement^=top] [part=arrow]{border-left:none;border-top:none;bottom:-4px}[data-placement^=bottom] [part=arrow]{border-bottom:none;border-right:none;top:-4px}[data-placement^=left] [part=arrow]{border-bottom:none;border-left:none;right:-4px}[data-placement^=right] [part=arrow]{border-right:none;border-top:none;left:-4px}.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}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.fixed{position:fixed}.relative{position:relative}.inline-block{display:inline-block}.hidden{display:none}.h-2{height:.5rem}.w-2{width:.5rem}.rotate-45{--tw-rotate:45deg;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))}.rounded-md{border-radius:var(--bcm-ui-border-radius-md,6px)}.bg-color-basic-base{background-color:var(--bcm-ui-color-background-basic-base)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:var(--bcm-ui-box-shadow-lg);--tw-shadow-colored:var(--bcm-ui-box-shadow-lg)}.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)}";
|
|
6
|
+
|
|
7
|
+
const BcmLinked = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.bcmBeforeShow = createEvent(this, "bcmBeforeShow", 1);
|
|
11
|
+
this.bcmShow = createEvent(this, "bcmShow", 1);
|
|
12
|
+
this.bcmBeforeHide = createEvent(this, "bcmBeforeHide", 1);
|
|
13
|
+
this.bcmHide = createEvent(this, "bcmHide", 1);
|
|
14
|
+
this.bcmShown = createEvent(this, "bcmShown", 1);
|
|
15
|
+
this.bcmHidden = createEvent(this, "bcmHidden", 1);
|
|
16
|
+
}
|
|
17
|
+
get host() { return getElement(this); }
|
|
18
|
+
// Element references
|
|
19
|
+
floatingRef;
|
|
20
|
+
triggerRef;
|
|
21
|
+
arrowRef;
|
|
22
|
+
// Cleanup references
|
|
23
|
+
cleanupAutoUpdate;
|
|
24
|
+
showTimeout;
|
|
25
|
+
hideTimeout;
|
|
26
|
+
// Unique ID for ARIA
|
|
27
|
+
componentId = `linked-${Math.random().toString(36).substring(2, 11)}`;
|
|
28
|
+
/**
|
|
29
|
+
* @prop {boolean} visible - Controls the visibility state of the floating element.
|
|
30
|
+
* Can be set programmatically or toggled by user interaction.
|
|
31
|
+
* Default: false
|
|
32
|
+
*/
|
|
33
|
+
visible = false;
|
|
34
|
+
/**
|
|
35
|
+
* @prop {TriggerType} trigger - Defines the interaction type to show/hide the floating element.
|
|
36
|
+
* 'click' toggles on click, 'hover' shows on mouse enter and hides on mouse leave,
|
|
37
|
+
* 'focus' shows on focus and hides on blur, 'manual' requires programmatic control.
|
|
38
|
+
* Default: 'click'
|
|
39
|
+
*/
|
|
40
|
+
trigger = 'click';
|
|
41
|
+
/**
|
|
42
|
+
* @prop {Placement} placement - Defines the position of the floating element relative to the trigger.
|
|
43
|
+
* Default: 'bottom-start'
|
|
44
|
+
*/
|
|
45
|
+
placement = 'bottom-start';
|
|
46
|
+
/**
|
|
47
|
+
* @prop {number} showDelay - Delay in milliseconds before showing the floating element.
|
|
48
|
+
* Default: 0
|
|
49
|
+
*/
|
|
50
|
+
showDelay = 0;
|
|
51
|
+
/**
|
|
52
|
+
* @prop {number} hideDelay - Delay in milliseconds before hiding the floating element.
|
|
53
|
+
* Default: 0
|
|
54
|
+
*/
|
|
55
|
+
hideDelay = 0;
|
|
56
|
+
/**
|
|
57
|
+
* @prop {number} offsetDistance - Distance in pixels between the floating element and the trigger.
|
|
58
|
+
* Default: 8
|
|
59
|
+
*/
|
|
60
|
+
offsetDistance = 8;
|
|
61
|
+
/**
|
|
62
|
+
* @prop {boolean} showArrow - Whether to show an arrow pointing to the trigger element.
|
|
63
|
+
* Default: true
|
|
64
|
+
*/
|
|
65
|
+
showArrow = true;
|
|
66
|
+
/**
|
|
67
|
+
* @prop {boolean} disabled - Disables the floating element, preventing it from showing.
|
|
68
|
+
* Default: false
|
|
69
|
+
*/
|
|
70
|
+
disabled = false;
|
|
71
|
+
/**
|
|
72
|
+
* @prop {boolean} closeOnOutsideClick - Whether to close when clicking outside.
|
|
73
|
+
* Default: true
|
|
74
|
+
*/
|
|
75
|
+
closeOnOutsideClick = true;
|
|
76
|
+
/**
|
|
77
|
+
* @prop {boolean} closeOnEscape - Whether to close when pressing Escape key.
|
|
78
|
+
* Default: true
|
|
79
|
+
*/
|
|
80
|
+
closeOnEscape = true;
|
|
81
|
+
// Internal state
|
|
82
|
+
isVisible = false;
|
|
83
|
+
/**
|
|
84
|
+
* @event bcmBeforeShow - Emitted before the floating element shows.
|
|
85
|
+
*/
|
|
86
|
+
bcmBeforeShow;
|
|
87
|
+
/**
|
|
88
|
+
* @event bcmShow - Emitted when the floating element is shown.
|
|
89
|
+
*/
|
|
90
|
+
bcmShow;
|
|
91
|
+
/**
|
|
92
|
+
* @event bcmBeforeHide - Emitted before the floating element hides.
|
|
93
|
+
*/
|
|
94
|
+
bcmBeforeHide;
|
|
95
|
+
/**
|
|
96
|
+
* @event bcmHide - Emitted when the floating element is hidden.
|
|
97
|
+
*/
|
|
98
|
+
bcmHide;
|
|
99
|
+
/**
|
|
100
|
+
* @event bcmShown - Emitted after the floating element is fully shown (after animation).
|
|
101
|
+
*/
|
|
102
|
+
bcmShown;
|
|
103
|
+
/**
|
|
104
|
+
* @event bcmHidden - Emitted after the floating element is fully hidden (after animation).
|
|
105
|
+
*/
|
|
106
|
+
bcmHidden;
|
|
107
|
+
// Watch for visibility prop changes
|
|
108
|
+
handleVisibleChange(newValue) {
|
|
109
|
+
if (this.disabled)
|
|
110
|
+
return;
|
|
111
|
+
if (newValue) {
|
|
112
|
+
this.showInternal();
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
this.hideInternal();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
handleDisabledChange(isDisabled) {
|
|
119
|
+
if (isDisabled && this.visible) {
|
|
120
|
+
this.hide();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
handlePositionPropsChange() {
|
|
124
|
+
if (this.visible) {
|
|
125
|
+
this.updatePosition();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Internal show logic
|
|
129
|
+
showInternal() {
|
|
130
|
+
if (!this.floatingRef || this.disabled)
|
|
131
|
+
return;
|
|
132
|
+
this.bcmShow.emit();
|
|
133
|
+
this.isVisible = true;
|
|
134
|
+
this.floatingRef.showPopover();
|
|
135
|
+
this.startAutoUpdate();
|
|
136
|
+
this.updatePosition();
|
|
137
|
+
this.triggerRef?.setAttribute('aria-expanded', 'true');
|
|
138
|
+
if (this.closeOnOutsideClick && this.trigger !== 'manual') {
|
|
139
|
+
this.addOutsideClickListener();
|
|
140
|
+
}
|
|
141
|
+
// Emit bcmShown after animation
|
|
142
|
+
requestAnimationFrame(() => {
|
|
143
|
+
this.bcmShown.emit();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
// Internal hide logic
|
|
147
|
+
hideInternal() {
|
|
148
|
+
if (!this.floatingRef)
|
|
149
|
+
return;
|
|
150
|
+
this.bcmHide.emit();
|
|
151
|
+
this.isVisible = false;
|
|
152
|
+
this.floatingRef.hidePopover();
|
|
153
|
+
this.stopAutoUpdate();
|
|
154
|
+
this.triggerRef?.setAttribute('aria-expanded', 'false');
|
|
155
|
+
this.removeOutsideClickListener();
|
|
156
|
+
// Emit bcmHidden after animation
|
|
157
|
+
setTimeout(() => {
|
|
158
|
+
this.bcmHidden.emit();
|
|
159
|
+
}, 150);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Programmatically shows the floating element.
|
|
163
|
+
* Respects the showDelay prop.
|
|
164
|
+
*/
|
|
165
|
+
async show() {
|
|
166
|
+
if (this.visible || this.disabled)
|
|
167
|
+
return;
|
|
168
|
+
this.clearTimeouts();
|
|
169
|
+
if (this.showDelay > 0) {
|
|
170
|
+
this.showTimeout = window.setTimeout(() => {
|
|
171
|
+
this.bcmBeforeShow.emit();
|
|
172
|
+
this.visible = true;
|
|
173
|
+
}, this.showDelay);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
this.bcmBeforeShow.emit();
|
|
177
|
+
this.visible = true;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Programmatically hides the floating element.
|
|
182
|
+
* Respects the hideDelay prop.
|
|
183
|
+
*/
|
|
184
|
+
async hide() {
|
|
185
|
+
if (!this.visible)
|
|
186
|
+
return;
|
|
187
|
+
this.clearTimeouts();
|
|
188
|
+
if (this.hideDelay > 0) {
|
|
189
|
+
this.hideTimeout = window.setTimeout(() => {
|
|
190
|
+
this.bcmBeforeHide.emit();
|
|
191
|
+
this.visible = false;
|
|
192
|
+
}, this.hideDelay);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.bcmBeforeHide.emit();
|
|
196
|
+
this.visible = false;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Toggles the floating element visibility.
|
|
201
|
+
*/
|
|
202
|
+
async toggle() {
|
|
203
|
+
if (this.visible) {
|
|
204
|
+
await this.hide();
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
await this.show();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Updates the position of the floating element.
|
|
212
|
+
* Useful when the trigger element moves or resizes.
|
|
213
|
+
*/
|
|
214
|
+
async updatePosition() {
|
|
215
|
+
await this.calculatePosition();
|
|
216
|
+
}
|
|
217
|
+
clearTimeouts() {
|
|
218
|
+
if (this.showTimeout) {
|
|
219
|
+
clearTimeout(this.showTimeout);
|
|
220
|
+
this.showTimeout = undefined;
|
|
221
|
+
}
|
|
222
|
+
if (this.hideTimeout) {
|
|
223
|
+
clearTimeout(this.hideTimeout);
|
|
224
|
+
this.hideTimeout = undefined;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
handleTriggerSlotChange = () => {
|
|
228
|
+
const slot = this.host.shadowRoot?.querySelector('slot[name="trigger"]');
|
|
229
|
+
if (!slot)
|
|
230
|
+
return;
|
|
231
|
+
const elements = slot.assignedElements();
|
|
232
|
+
if (elements.length > 0) {
|
|
233
|
+
this.removeTriggerListeners();
|
|
234
|
+
this.triggerRef = elements[0];
|
|
235
|
+
this.setupTriggerListeners();
|
|
236
|
+
this.setupAriaAttributes();
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
setupAriaAttributes() {
|
|
240
|
+
if (!this.triggerRef)
|
|
241
|
+
return;
|
|
242
|
+
this.triggerRef.setAttribute('aria-describedby', this.componentId);
|
|
243
|
+
this.triggerRef.setAttribute('aria-expanded', String(this.visible));
|
|
244
|
+
this.triggerRef.setAttribute('aria-haspopup', 'true');
|
|
245
|
+
}
|
|
246
|
+
setupTriggerListeners() {
|
|
247
|
+
if (!this.triggerRef || this.disabled)
|
|
248
|
+
return;
|
|
249
|
+
switch (this.trigger) {
|
|
250
|
+
case 'hover':
|
|
251
|
+
this.triggerRef.addEventListener('mouseenter', this.handleMouseEnter);
|
|
252
|
+
this.triggerRef.addEventListener('mouseleave', this.handleMouseLeave);
|
|
253
|
+
this.floatingRef?.addEventListener('mouseenter', this.handleFloatingMouseEnter);
|
|
254
|
+
this.floatingRef?.addEventListener('mouseleave', this.handleFloatingMouseLeave);
|
|
255
|
+
break;
|
|
256
|
+
case 'click':
|
|
257
|
+
this.triggerRef.addEventListener('click', this.handleTriggerClick);
|
|
258
|
+
break;
|
|
259
|
+
case 'focus':
|
|
260
|
+
this.triggerRef.addEventListener('focus', this.handleFocus);
|
|
261
|
+
this.triggerRef.addEventListener('blur', this.handleBlur);
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
removeTriggerListeners() {
|
|
266
|
+
if (!this.triggerRef)
|
|
267
|
+
return;
|
|
268
|
+
this.triggerRef.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
269
|
+
this.triggerRef.removeEventListener('mouseleave', this.handleMouseLeave);
|
|
270
|
+
this.triggerRef.removeEventListener('click', this.handleTriggerClick);
|
|
271
|
+
this.triggerRef.removeEventListener('focus', this.handleFocus);
|
|
272
|
+
this.triggerRef.removeEventListener('blur', this.handleBlur);
|
|
273
|
+
this.floatingRef?.removeEventListener('mouseenter', this.handleFloatingMouseEnter);
|
|
274
|
+
this.floatingRef?.removeEventListener('mouseleave', this.handleFloatingMouseLeave);
|
|
275
|
+
}
|
|
276
|
+
handleMouseEnter = () => {
|
|
277
|
+
this.show();
|
|
278
|
+
};
|
|
279
|
+
handleMouseLeave = () => {
|
|
280
|
+
this.hide();
|
|
281
|
+
};
|
|
282
|
+
handleFloatingMouseEnter = () => {
|
|
283
|
+
this.clearTimeouts();
|
|
284
|
+
};
|
|
285
|
+
handleFloatingMouseLeave = () => {
|
|
286
|
+
this.hide();
|
|
287
|
+
};
|
|
288
|
+
handleTriggerClick = (event) => {
|
|
289
|
+
event.stopPropagation();
|
|
290
|
+
this.toggle();
|
|
291
|
+
};
|
|
292
|
+
handleFocus = () => {
|
|
293
|
+
this.show();
|
|
294
|
+
};
|
|
295
|
+
handleBlur = () => {
|
|
296
|
+
this.hide();
|
|
297
|
+
};
|
|
298
|
+
handleKeyDown(event) {
|
|
299
|
+
if (!this.closeOnEscape || !this.visible)
|
|
300
|
+
return;
|
|
301
|
+
if (event.key === 'Escape') {
|
|
302
|
+
const openLinked = Array.from(document.querySelectorAll('bcm-linked[visible]'));
|
|
303
|
+
const topLinked = openLinked[openLinked.length - 1];
|
|
304
|
+
if (topLinked === this.host) {
|
|
305
|
+
event.preventDefault();
|
|
306
|
+
this.hide();
|
|
307
|
+
this.triggerRef?.focus();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
handleOutsideClick = (event) => {
|
|
312
|
+
if (!this.closeOnOutsideClick || !this.visible)
|
|
313
|
+
return;
|
|
314
|
+
const target = event.target;
|
|
315
|
+
const path = event.composedPath();
|
|
316
|
+
const isInsideHost = this.host.contains(target) || path.includes(this.host);
|
|
317
|
+
const isInsideFloating = this.floatingRef?.contains(target) || (this.floatingRef && path.includes(this.floatingRef));
|
|
318
|
+
if (!isInsideHost && !isInsideFloating) {
|
|
319
|
+
this.hide();
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
addOutsideClickListener() {
|
|
323
|
+
setTimeout(() => {
|
|
324
|
+
document.addEventListener('click', this.handleOutsideClick, true);
|
|
325
|
+
}, 0);
|
|
326
|
+
}
|
|
327
|
+
removeOutsideClickListener() {
|
|
328
|
+
document.removeEventListener('click', this.handleOutsideClick, true);
|
|
329
|
+
}
|
|
330
|
+
async calculatePosition() {
|
|
331
|
+
if (!this.triggerRef || !this.floatingRef || !this.isVisible)
|
|
332
|
+
return;
|
|
333
|
+
const virtualElement = {
|
|
334
|
+
getBoundingClientRect: () => this.triggerRef.getBoundingClientRect(),
|
|
335
|
+
};
|
|
336
|
+
const middlewareList = [
|
|
337
|
+
offset(this.offsetDistance),
|
|
338
|
+
flip({
|
|
339
|
+
fallbackPlacements: ['top', 'bottom', 'left', 'right', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'left-start', 'left-end', 'right-start', 'right-end'],
|
|
340
|
+
}),
|
|
341
|
+
shift({
|
|
342
|
+
padding: 8,
|
|
343
|
+
}),
|
|
344
|
+
];
|
|
345
|
+
if (this.showArrow && this.arrowRef) {
|
|
346
|
+
middlewareList.push(arrow({ element: this.arrowRef }));
|
|
347
|
+
}
|
|
348
|
+
const { x, y, placement, middlewareData } = await computePosition(virtualElement, this.floatingRef, {
|
|
349
|
+
placement: this.placement,
|
|
350
|
+
middleware: middlewareList,
|
|
351
|
+
strategy: 'fixed',
|
|
352
|
+
});
|
|
353
|
+
Object.assign(this.floatingRef.style, {
|
|
354
|
+
left: `${x}px`,
|
|
355
|
+
top: `${y}px`,
|
|
356
|
+
});
|
|
357
|
+
// Arrow positioning
|
|
358
|
+
if (this.showArrow && this.arrowRef && middlewareData.arrow) {
|
|
359
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
360
|
+
const staticSide = {
|
|
361
|
+
top: 'bottom',
|
|
362
|
+
right: 'left',
|
|
363
|
+
bottom: 'top',
|
|
364
|
+
left: 'right',
|
|
365
|
+
}[placement.split('-')[0]];
|
|
366
|
+
Object.assign(this.arrowRef.style, {
|
|
367
|
+
left: arrowX != null ? `${arrowX}px` : '',
|
|
368
|
+
top: arrowY != null ? `${arrowY}px` : '',
|
|
369
|
+
right: '',
|
|
370
|
+
bottom: '',
|
|
371
|
+
[staticSide]: '-4px',
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
this.floatingRef.setAttribute('data-placement', placement);
|
|
375
|
+
}
|
|
376
|
+
startAutoUpdate() {
|
|
377
|
+
if (!this.triggerRef || !this.floatingRef)
|
|
378
|
+
return;
|
|
379
|
+
this.cleanupAutoUpdate = autoUpdate(this.triggerRef, this.floatingRef, () => this.calculatePosition(), {
|
|
380
|
+
ancestorScroll: true,
|
|
381
|
+
ancestorResize: true,
|
|
382
|
+
elementResize: true,
|
|
383
|
+
layoutShift: true,
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
stopAutoUpdate() {
|
|
387
|
+
this.cleanupAutoUpdate?.();
|
|
388
|
+
this.cleanupAutoUpdate = undefined;
|
|
389
|
+
}
|
|
390
|
+
handleToggle = (event) => {
|
|
391
|
+
if (event.newState === 'open' && !this.isVisible) {
|
|
392
|
+
this.isVisible = true;
|
|
393
|
+
}
|
|
394
|
+
else if (event.newState === 'closed' && this.isVisible) {
|
|
395
|
+
this.isVisible = false;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
componentDidLoad() {
|
|
399
|
+
// Toggle event listener (Popover API)
|
|
400
|
+
this.floatingRef?.addEventListener('toggle', this.handleToggle);
|
|
401
|
+
// Initial trigger setup - manually trigger slot change handler
|
|
402
|
+
this.handleTriggerSlotChange();
|
|
403
|
+
// Initial state sync
|
|
404
|
+
if (this.visible) {
|
|
405
|
+
this.showInternal();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
disconnectedCallback() {
|
|
409
|
+
this.clearTimeouts();
|
|
410
|
+
this.stopAutoUpdate();
|
|
411
|
+
this.removeTriggerListeners();
|
|
412
|
+
this.removeOutsideClickListener();
|
|
413
|
+
if (this.floatingRef) {
|
|
414
|
+
this.floatingRef.removeEventListener('toggle', this.handleToggle);
|
|
415
|
+
if (this.isVisible) {
|
|
416
|
+
try {
|
|
417
|
+
this.floatingRef.hidePopover();
|
|
418
|
+
}
|
|
419
|
+
catch (e) {
|
|
420
|
+
// Element might already be removed
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
linkedClass = tv({
|
|
426
|
+
slots: {
|
|
427
|
+
wrapper: 'inline-block',
|
|
428
|
+
floating: ['bcm-ui-element', 'fixed', 'bg-color-basic-base', 'rounded-md', 'shadow-lg', 'border', 'border-color-basic-subtle'],
|
|
429
|
+
arrow: ['absolute', 'w-2', 'h-2', 'bg-color-basic-base', 'border', 'border-color-basic-subtle', 'rotate-45'],
|
|
430
|
+
content: 'bg-color-basic-base',
|
|
431
|
+
},
|
|
432
|
+
});
|
|
433
|
+
render() {
|
|
434
|
+
const { wrapper, floating, arrow, content } = this.linkedClass();
|
|
435
|
+
return (h(Host, { key: 'f58760b6589329f9eabc42f39b6503fad10cf330' }, h("div", { key: 'adb9003eec4ca786bdddc657ba28cbc0a80baf57', class: wrapper() }, h("slot", { key: '61323463e76c395668d02288e5bdcb44826a31ea', name: "trigger", onSlotchange: this.handleTriggerSlotChange }), h("div", { key: '3b395b18152cd302b4511ef89928374f33012594', ref: el => (this.floatingRef = el), id: this.componentId, part: "floating", class: floating(),
|
|
436
|
+
// @ts-ignore - popover is a valid HTML attribute
|
|
437
|
+
popover: "manual", role: "dialog" }, this.showArrow && h("div", { key: '3f5311d21f7fce74c94ac0435a8d2fc076036b10', ref: el => (this.arrowRef = el), part: "arrow", class: arrow() }), h("div", { key: 'ee41f30c7f73c113f129f938fd721476658b5744', part: "content", class: content() }, h("slot", { key: '106502e2f8db8fdc90412fcf59da40d2de377988' }))))));
|
|
438
|
+
}
|
|
439
|
+
static get watchers() { return {
|
|
440
|
+
"visible": ["handleVisibleChange"],
|
|
441
|
+
"disabled": ["handleDisabledChange"],
|
|
442
|
+
"placement": ["handlePositionPropsChange"],
|
|
443
|
+
"offsetDistance": ["handlePositionPropsChange"],
|
|
444
|
+
"showArrow": ["handlePositionPropsChange"]
|
|
445
|
+
}; }
|
|
446
|
+
};
|
|
447
|
+
BcmLinked.style = linkedCss;
|
|
448
|
+
|
|
449
|
+
export { BcmLinked as bcm_linked };
|
|
450
|
+
//# sourceMappingURL=bcm-linked.entry.js.map
|