bromcom-ui-next 0.1.28 → 0.1.30
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/_commonjsHelpers-CvGrISen.js.map +1 -0
- 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-button.bcm-drawer.bcm-linked.bcm-modal.bcm-pop-confirm.bcm-popover.bcm-tooltip.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 -0
- package/dist/bromcom-ui/bcm-divider.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-dropdown.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-input.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-segmented-picker-option.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-segmented-picker.entry.esm.js.map +1 -1
- package/dist/bromcom-ui/bcm-switch.entry.esm.js.map +1 -1
- 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/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js.map +1 -1
- package/dist/bromcom-ui/floating-ui.dom-ltNPqX34.js.map +1 -0
- package/dist/bromcom-ui/generate-id-Crb5QsB-.js.map +1 -0
- package/dist/bromcom-ui/index-40rmUZjU.js.map +1 -0
- package/dist/bromcom-ui/index-BCaJmHBB.js.map +1 -0
- package/dist/bromcom-ui/{p-8ace5a6a.entry.js → p-0c7c6896.entry.js} +2 -2
- package/dist/bromcom-ui/p-0c7c6896.entry.js.map +1 -0
- package/dist/bromcom-ui/p-11d0e649.entry.js +2 -0
- package/dist/bromcom-ui/p-11d0e649.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-6b585adc.entry.js → p-12f38632.entry.js} +2 -2
- package/dist/bromcom-ui/p-12f38632.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-5e0702d1.entry.js → p-13cbd1f5.entry.js} +2 -2
- package/dist/bromcom-ui/p-13cbd1f5.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-2480e468.entry.js → p-1507908f.entry.js} +2 -2
- package/dist/bromcom-ui/p-1507908f.entry.js.map +1 -0
- package/dist/bromcom-ui/p-1ce9913f.entry.js +2 -0
- package/dist/bromcom-ui/p-1ce9913f.entry.js.map +1 -0
- package/dist/bromcom-ui/p-206d767e.entry.js +2 -0
- package/dist/bromcom-ui/p-206d767e.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-ee5f877f.entry.js → p-3cf7a7f4.entry.js} +2 -2
- package/dist/bromcom-ui/p-3cf7a7f4.entry.js.map +1 -0
- package/dist/bromcom-ui/p-4505feba.entry.js +2 -0
- package/dist/bromcom-ui/p-4505feba.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-089edfdc.entry.js → p-496014ca.entry.js} +2 -2
- package/dist/bromcom-ui/p-496014ca.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-26d2db9e.entry.js → p-4a932cd3.entry.js} +2 -2
- package/dist/bromcom-ui/p-4a932cd3.entry.js.map +1 -0
- package/dist/bromcom-ui/p-4e554b8d.entry.js +2 -0
- package/dist/bromcom-ui/p-4e554b8d.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-360bff8a.entry.js → p-57c4c4c4.entry.js} +2 -2
- package/dist/bromcom-ui/p-57c4c4c4.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-211ca6e0.entry.js → p-61293ab2.entry.js} +2 -2
- package/dist/bromcom-ui/p-61293ab2.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-83f64814.entry.js → p-61789456.entry.js} +2 -2
- package/dist/bromcom-ui/p-61789456.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-488d6ef4.entry.js → p-65d0f188.entry.js} +2 -2
- package/dist/bromcom-ui/p-65d0f188.entry.js.map +1 -0
- package/dist/bromcom-ui/p-83f707dc.entry.js +2 -0
- package/dist/bromcom-ui/p-83f707dc.entry.js.map +1 -0
- package/dist/bromcom-ui/p-8ba02e7e.entry.js +2 -0
- package/dist/bromcom-ui/p-8ba02e7e.entry.js.map +1 -0
- package/dist/bromcom-ui/p-9e9bf32e.entry.js +2 -0
- package/dist/bromcom-ui/p-9e9bf32e.entry.js.map +1 -0
- package/dist/bromcom-ui/p-BfTCfPZ1.js.map +1 -1
- package/dist/bromcom-ui/p-CEcVC0yX.js.map +1 -1
- package/dist/bromcom-ui/p-CRwAh9Np.js +3 -0
- package/dist/bromcom-ui/p-CRwAh9Np.js.map +1 -0
- package/dist/bromcom-ui/p-IBjzkjef.js.map +1 -1
- package/dist/bromcom-ui/{p-a88f20e0.entry.js → p-c87a6acf.entry.js} +2 -2
- package/dist/bromcom-ui/p-c87a6acf.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-c34f0a66.entry.js → p-e0e235a8.entry.js} +2 -2
- package/dist/bromcom-ui/p-e0e235a8.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-0101b4f2.entry.js → p-e1ce8b55.entry.js} +2 -2
- package/dist/bromcom-ui/p-e1ce8b55.entry.js.map +1 -0
- package/dist/bromcom-ui/p-e4dddb0b.entry.js +2 -0
- package/dist/bromcom-ui/p-e4dddb0b.entry.js.map +1 -0
- package/dist/bromcom-ui/p-f9426924.entry.js +2 -0
- package/dist/bromcom-ui/p-f9426924.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-c0e7f9d6.entry.js → p-faa0e62c.entry.js} +2 -2
- package/dist/bromcom-ui/p-faa0e62c.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-bdaf5653.entry.js → p-fcb4399f.entry.js} +2 -2
- package/dist/bromcom-ui/p-fcb4399f.entry.js.map +1 -0
- package/dist/bromcom-ui/tv-SlGJ5EfR.js.map +1 -0
- package/dist/bromcom-ui/validation-messages-CUvT12BL.js.map +1 -0
- package/dist/cjs/bcm-accordion-group.cjs.entry.js +2 -4
- package/dist/cjs/bcm-accordion.cjs.entry.js +3 -5
- package/dist/cjs/bcm-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +3 -5
- package/dist/cjs/bcm-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js +1 -3
- package/dist/cjs/bcm-badge.cjs.entry.js +3 -5
- package/dist/cjs/bcm-basic-badge.cjs.entry.js +3 -5
- package/dist/cjs/bcm-button-group.cjs.entry.js +3 -5
- package/dist/cjs/bcm-button.bcm-drawer.bcm-linked.bcm-modal.bcm-pop-confirm.bcm-popover.bcm-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-button_7.cjs.entry.js +4131 -0
- package/dist/cjs/bcm-checkbox.cjs.entry.js +7 -5
- package/dist/cjs/bcm-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +127 -0
- package/dist/cjs/bcm-chip.entry.cjs.js.map +1 -0
- package/dist/cjs/bcm-divider.cjs.entry.js +3 -5
- package/dist/cjs/bcm-divider.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-dropdown-item.cjs.entry.js +3 -5
- package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -13
- package/dist/cjs/bcm-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +4 -6
- package/dist/cjs/bcm-input.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +3 -5
- package/dist/cjs/bcm-radio.cjs.entry.js +2 -4
- package/dist/cjs/bcm-segmented-picker-option.cjs.entry.js +3 -5
- package/dist/cjs/bcm-segmented-picker-option.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-segmented-picker.cjs.entry.js +3 -5
- package/dist/cjs/bcm-segmented-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-shortcut.cjs.entry.js +2 -4
- package/dist/cjs/bcm-switch.cjs.entry.js +4 -6
- package/dist/cjs/bcm-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +2 -4
- package/dist/cjs/bcm-tabs-list.cjs.entry.js +2 -4
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +2 -4
- package/dist/cjs/bcm-tabs.cjs.entry.js +2 -4
- package/dist/cjs/bcm-tabs.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-text.cjs.entry.js +3 -5
- package/dist/cjs/bcm-text.entry.cjs.js.map +1 -1
- package/dist/cjs/bcm-textarea.cjs.entry.js +4 -6
- package/dist/cjs/bromcom-ui.cjs.js +3 -5
- package/dist/cjs/bromcom-ui.cjs.js.map +1 -1
- package/dist/cjs/generate-id-CG_BkTJu.js.map +1 -1
- package/dist/cjs/index-Bp6Dd2i1.js.map +1 -1
- package/dist/cjs/{index-BtiU-G2W.js → index-CmYzUr-k.js} +61 -372
- package/dist/cjs/index-CmYzUr-k.js.map +1 -0
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +2 -4
- package/dist/cjs/tv-ngpIbGlG.js.map +1 -1
- package/dist/collection/collection-manifest.json +5 -5
- package/dist/collection/components/accordion/accordion.component.js +8 -8
- package/dist/collection/components/accordion/accordion.component.js.map +1 -1
- package/dist/collection/components/accordion-group/accordion-group.component.js +3 -3
- package/dist/collection/components/accordion-group/types.js.map +1 -1
- package/dist/collection/components/alert/alert.component.js +6 -6
- package/dist/collection/components/alert/alert.css +1 -1
- package/dist/collection/components/avatar/avatar.component.js +14 -14
- package/dist/collection/components/badge/badge.component.js +15 -15
- package/dist/collection/components/basic-badge/basic-badge.component.js +9 -9
- package/dist/collection/components/button/button.component.js +32 -32
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button-group/button-group.component.js +15 -15
- package/dist/collection/components/checkbox/checkbox.component.js +36 -12
- 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 +8 -8
- package/dist/collection/components/divider/divider.component.js +4 -4
- package/dist/collection/components/divider/divider.css +1 -1
- package/dist/collection/components/drawer/drawer.component.js +429 -132
- package/dist/collection/components/drawer/drawer.component.js.map +1 -1
- package/dist/collection/components/drawer/drawer.css +1 -1
- package/dist/collection/components/drawer/types.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.component.js +3 -12
- 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 +9 -10
- package/dist/collection/components/dropdown-item/dropdown-item.component.js.map +1 -1
- package/dist/collection/components/input/input.component.js +44 -45
- package/dist/collection/components/input/input.component.js.map +1 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/linked/linked.component.js +507 -333
- 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 +137 -34
- package/dist/collection/components/modal/modal.component.js.map +1 -1
- package/dist/collection/components/modal/modal.css +1 -1
- package/dist/collection/components/pop-confirm/pop-confirm.component.js +668 -294
- 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 +533 -148
- 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 +13 -13
- package/dist/collection/components/radio-group/radio-group.component.js +15 -15
- package/dist/collection/components/segmented-picker/segmented-picker-option.component.js +10 -10
- package/dist/collection/components/segmented-picker/segmented-picker-option.component.js.map +1 -1
- package/dist/collection/components/segmented-picker/segmented-picker.component.js +7 -7
- package/dist/collection/components/segmented-picker/segmented-picker.component.js.map +1 -1
- package/dist/collection/components/shortcut/shortcut.js +4 -4
- package/dist/collection/components/switch/switch.component.js +17 -17
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/tabs/tabs-content.component.js +3 -3
- package/dist/collection/components/tabs/tabs-list.component.js +3 -3
- package/dist/collection/components/tabs/tabs-trigger.component.js +8 -8
- package/dist/collection/components/tabs/tabs.component.js +6 -6
- package/dist/collection/components/tabs/tabs.component.js.map +1 -1
- package/dist/collection/components/text/text.component.js +6 -6
- package/dist/collection/components/text/text.css +1 -1
- package/dist/collection/components/textarea/textarea.component.js +39 -40
- package/dist/collection/components/textarea/textarea.component.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.component.js +567 -192
- package/dist/collection/components/tooltip/tooltip.component.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/components/bcm-accordion-group.js +5 -3
- package/dist/components/bcm-accordion-group.js.map +1 -1
- package/dist/components/bcm-accordion.js +6 -4
- package/dist/components/bcm-accordion.js.map +1 -1
- package/dist/components/bcm-alert.js +6 -4
- package/dist/components/bcm-alert.js.map +1 -1
- package/dist/components/bcm-avatar.js +5 -3
- package/dist/components/bcm-avatar.js.map +1 -1
- package/dist/components/bcm-badge.js +1 -1
- package/dist/components/bcm-basic-badge.js +6 -4
- package/dist/components/bcm-basic-badge.js.map +1 -1
- package/dist/components/bcm-button-group.js +6 -4
- package/dist/components/bcm-button-group.js.map +1 -1
- package/dist/components/bcm-button.js +1 -1
- package/dist/components/bcm-checkbox.js +11 -4
- package/dist/components/bcm-checkbox.js.map +1 -1
- package/dist/components/bcm-chip.js +5 -3
- package/dist/components/bcm-chip.js.map +1 -1
- package/dist/components/bcm-divider.js +6 -4
- package/dist/components/bcm-divider.js.map +1 -1
- package/dist/components/bcm-drawer.js +228 -115
- package/dist/components/bcm-drawer.js.map +1 -1
- package/dist/components/bcm-dropdown-item.js +7 -5
- package/dist/components/bcm-dropdown-item.js.map +1 -1
- package/dist/components/bcm-dropdown.js +8 -15
- package/dist/components/bcm-dropdown.js.map +1 -1
- package/dist/components/bcm-input.js +7 -5
- package/dist/components/bcm-input.js.map +1 -1
- package/dist/components/bcm-linked.js +1 -1
- package/dist/components/bcm-modal.js +56 -4
- package/dist/components/bcm-modal.js.map +1 -1
- package/dist/components/bcm-pop-confirm.js +278 -171
- package/dist/components/bcm-pop-confirm.js.map +1 -1
- package/dist/components/bcm-popover.js +355 -110
- package/dist/components/bcm-popover.js.map +1 -1
- package/dist/components/bcm-radio-group.js +6 -4
- package/dist/components/bcm-radio-group.js.map +1 -1
- package/dist/components/bcm-radio.js +5 -3
- package/dist/components/bcm-radio.js.map +1 -1
- package/dist/components/bcm-segmented-picker-option.js +6 -4
- package/dist/components/bcm-segmented-picker-option.js.map +1 -1
- package/dist/components/bcm-segmented-picker.js +6 -4
- package/dist/components/bcm-segmented-picker.js.map +1 -1
- package/dist/components/bcm-shortcut.js +5 -3
- package/dist/components/bcm-shortcut.js.map +1 -1
- package/dist/components/bcm-switch.js +7 -5
- package/dist/components/bcm-switch.js.map +1 -1
- package/dist/components/bcm-tabs-content.js +5 -3
- package/dist/components/bcm-tabs-content.js.map +1 -1
- package/dist/components/bcm-tabs-list.js +5 -3
- package/dist/components/bcm-tabs-list.js.map +1 -1
- package/dist/components/bcm-tabs-trigger.js +5 -3
- package/dist/components/bcm-tabs-trigger.js.map +1 -1
- package/dist/components/bcm-tabs.js +5 -3
- package/dist/components/bcm-tabs.js.map +1 -1
- package/dist/components/bcm-text.js +6 -4
- package/dist/components/bcm-text.js.map +1 -1
- package/dist/components/bcm-textarea.js +7 -5
- package/dist/components/bcm-textarea.js.map +1 -1
- package/dist/components/bcm-tooltip.js +364 -127
- package/dist/components/bcm-tooltip.js.map +1 -1
- package/dist/components/index.js +41 -366
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-6VLsKZvR.js +469 -0
- package/dist/components/p-6VLsKZvR.js.map +1 -0
- package/dist/components/p-BfTCfPZ1.js.map +1 -1
- package/dist/components/p-CEcVC0yX.js.map +1 -1
- package/dist/components/{p-CQF7wlXf.js → p-CaemikSK.js} +8 -6
- package/dist/components/p-CaemikSK.js.map +1 -0
- package/dist/components/{p-DGlecSBr.js → p-CsIBm0J5.js} +9 -7
- package/dist/components/p-CsIBm0J5.js.map +1 -0
- package/dist/components/{p-CzcTU1ty.js → p-DBDSgIvP.js} +40 -23
- package/dist/components/p-DBDSgIvP.js.map +1 -0
- package/dist/components/p-IBjzkjef.js.map +1 -1
- package/dist/esm/bcm-accordion-group.entry.js +2 -4
- package/dist/esm/bcm-accordion.entry.js +3 -5
- package/dist/esm/bcm-accordion.entry.js.map +1 -1
- package/dist/esm/bcm-alert.entry.js +3 -5
- package/dist/esm/bcm-alert.entry.js.map +1 -1
- package/dist/esm/bcm-avatar.entry.js +1 -3
- package/dist/esm/bcm-badge.entry.js +3 -5
- package/dist/esm/bcm-basic-badge.entry.js +3 -5
- package/dist/esm/bcm-button-group.entry.js +3 -5
- package/dist/esm/bcm-button.bcm-drawer.bcm-linked.bcm-modal.bcm-pop-confirm.bcm-popover.bcm-tooltip.entry.js.map +1 -0
- package/dist/esm/bcm-button_7.entry.js +4123 -0
- package/dist/esm/bcm-checkbox.entry.js +7 -5
- package/dist/esm/bcm-checkbox.entry.js.map +1 -1
- package/dist/esm/bcm-chip.entry.js +125 -0
- package/dist/esm/bcm-chip.entry.js.map +1 -0
- package/dist/esm/bcm-divider.entry.js +3 -5
- package/dist/esm/bcm-divider.entry.js.map +1 -1
- package/dist/esm/bcm-dropdown-item.entry.js +3 -5
- package/dist/esm/bcm-dropdown.entry.js +3 -13
- package/dist/esm/bcm-dropdown.entry.js.map +1 -1
- package/dist/esm/bcm-input.entry.js +4 -6
- package/dist/esm/bcm-input.entry.js.map +1 -1
- package/dist/esm/bcm-radio-group.entry.js +3 -5
- package/dist/esm/bcm-radio.entry.js +2 -4
- package/dist/esm/bcm-segmented-picker-option.entry.js +3 -5
- package/dist/esm/bcm-segmented-picker-option.entry.js.map +1 -1
- package/dist/esm/bcm-segmented-picker.entry.js +3 -5
- package/dist/esm/bcm-segmented-picker.entry.js.map +1 -1
- package/dist/esm/bcm-shortcut.entry.js +2 -4
- package/dist/esm/bcm-switch.entry.js +4 -6
- package/dist/esm/bcm-switch.entry.js.map +1 -1
- package/dist/esm/bcm-tabs-content.entry.js +2 -4
- package/dist/esm/bcm-tabs-list.entry.js +2 -4
- package/dist/esm/bcm-tabs-trigger.entry.js +2 -4
- package/dist/esm/bcm-tabs.entry.js +2 -4
- package/dist/esm/bcm-tabs.entry.js.map +1 -1
- package/dist/esm/bcm-text.entry.js +3 -5
- package/dist/esm/bcm-text.entry.js.map +1 -1
- package/dist/esm/bcm-textarea.entry.js +4 -6
- package/dist/esm/bromcom-ui.js +4 -6
- package/dist/esm/bromcom-ui.js.map +1 -1
- package/dist/esm/generate-id-IBjzkjef.js.map +1 -1
- package/dist/esm/index-BfTCfPZ1.js.map +1 -1
- package/dist/esm/{index-BuuGCw0z.js → index-CRwAh9Np.js} +62 -372
- package/dist/esm/index-CRwAh9Np.js.map +1 -0
- package/dist/esm/index.js +0 -2
- package/dist/esm/loader.js +3 -5
- package/dist/esm/tv-CEcVC0yX.js.map +1 -1
- package/dist/types/components/accordion-group/types.d.ts +2 -2
- package/dist/types/components/checkbox/checkbox.component.d.ts +4 -0
- package/dist/types/components/drawer/drawer.component.d.ts +143 -3
- package/dist/types/components/drawer/types.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown.component.d.ts +0 -3
- package/dist/types/components/linked/linked.component.d.ts +152 -36
- package/dist/types/components/modal/modal.component.d.ts +121 -0
- package/dist/types/components/pop-confirm/pop-confirm.component.d.ts +263 -143
- package/dist/types/components/popover/popover.component.d.ts +94 -39
- package/dist/types/components/tooltip/tooltip.component.d.ts +147 -56
- package/dist/types/components.d.ts +1579 -359
- package/dist/types/stencil-public-runtime.d.ts +50 -3
- package/package.json +1 -1
- package/dist/bromcom-ui/bcm-button.bcm-chip.bcm-drawer.bcm-modal.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-linked.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-pop-confirm.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-popover.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/bcm-tooltip.entry.esm.js.map +0 -1
- package/dist/bromcom-ui/p-0101b4f2.entry.js.map +0 -1
- package/dist/bromcom-ui/p-089edfdc.entry.js.map +0 -1
- package/dist/bromcom-ui/p-08bc93c5.entry.js +0 -2
- package/dist/bromcom-ui/p-08bc93c5.entry.js.map +0 -1
- package/dist/bromcom-ui/p-09be61c3.entry.js +0 -2
- package/dist/bromcom-ui/p-09be61c3.entry.js.map +0 -1
- package/dist/bromcom-ui/p-211ca6e0.entry.js.map +0 -1
- package/dist/bromcom-ui/p-2480e468.entry.js.map +0 -1
- package/dist/bromcom-ui/p-26d2db9e.entry.js.map +0 -1
- package/dist/bromcom-ui/p-2d0a6472.entry.js +0 -2
- package/dist/bromcom-ui/p-2d0a6472.entry.js.map +0 -1
- package/dist/bromcom-ui/p-360bff8a.entry.js.map +0 -1
- package/dist/bromcom-ui/p-488d6ef4.entry.js.map +0 -1
- package/dist/bromcom-ui/p-5e0702d1.entry.js.map +0 -1
- package/dist/bromcom-ui/p-6169490c.entry.js +0 -2
- package/dist/bromcom-ui/p-6169490c.entry.js.map +0 -1
- package/dist/bromcom-ui/p-6b585adc.entry.js.map +0 -1
- package/dist/bromcom-ui/p-6d7d73d5.entry.js +0 -2
- package/dist/bromcom-ui/p-6d7d73d5.entry.js.map +0 -1
- package/dist/bromcom-ui/p-7234af90.entry.js +0 -2
- package/dist/bromcom-ui/p-7234af90.entry.js.map +0 -1
- package/dist/bromcom-ui/p-83f64814.entry.js.map +0 -1
- package/dist/bromcom-ui/p-84677827.entry.js +0 -2
- package/dist/bromcom-ui/p-84677827.entry.js.map +0 -1
- package/dist/bromcom-ui/p-8ace5a6a.entry.js.map +0 -1
- package/dist/bromcom-ui/p-8d74249a.entry.js +0 -2
- package/dist/bromcom-ui/p-8d74249a.entry.js.map +0 -1
- package/dist/bromcom-ui/p-BuuGCw0z.js +0 -3
- package/dist/bromcom-ui/p-BuuGCw0z.js.map +0 -1
- package/dist/bromcom-ui/p-DxMLMJ3r.js +0 -2
- package/dist/bromcom-ui/p-DxMLMJ3r.js.map +0 -1
- package/dist/bromcom-ui/p-a88f20e0.entry.js.map +0 -1
- package/dist/bromcom-ui/p-bad299f2.entry.js +0 -2
- package/dist/bromcom-ui/p-bad299f2.entry.js.map +0 -1
- package/dist/bromcom-ui/p-bdaf5653.entry.js.map +0 -1
- package/dist/bromcom-ui/p-c0e7f9d6.entry.js.map +0 -1
- package/dist/bromcom-ui/p-c34f0a66.entry.js.map +0 -1
- package/dist/bromcom-ui/p-c9cf3f14.entry.js +0 -2
- package/dist/bromcom-ui/p-c9cf3f14.entry.js.map +0 -1
- package/dist/bromcom-ui/p-d7cea19f.entry.js +0 -2
- package/dist/bromcom-ui/p-d7cea19f.entry.js.map +0 -1
- package/dist/bromcom-ui/p-e5e0ac07.entry.js +0 -2
- package/dist/bromcom-ui/p-e5e0ac07.entry.js.map +0 -1
- package/dist/bromcom-ui/p-ee5f877f.entry.js.map +0 -1
- package/dist/bromcom-ui/p-fbccbffc.entry.js +0 -2
- package/dist/bromcom-ui/p-fbccbffc.entry.js.map +0 -1
- package/dist/cjs/bcm-accordion-group.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-alert.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-badge.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-basic-badge.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-button.bcm-chip.bcm-drawer.bcm-modal.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-button_4.cjs.entry.js +0 -915
- package/dist/cjs/bcm-button_4.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-checkbox.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-divider.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-dropdown-item.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-dropdown.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-input.cjs.entry.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-pop-confirm.cjs.entry.js +0 -250
- package/dist/cjs/bcm-pop-confirm.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-pop-confirm.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +0 -189
- package/dist/cjs/bcm-popover.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-popover.entry.cjs.js.map +0 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-radio.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-segmented-picker-option.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-segmented-picker.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-shortcut.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-switch.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-tabs-content.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-tabs-list.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-text.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-textarea.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-tooltip.cjs.entry.js +0 -180
- package/dist/cjs/bcm-tooltip.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-tooltip.entry.cjs.js.map +0 -1
- package/dist/cjs/floating-ui.dom-DyKmFgkP.js +0 -1605
- package/dist/cjs/floating-ui.dom-DyKmFgkP.js.map +0 -1
- package/dist/cjs/index-BtiU-G2W.js.map +0 -1
- package/dist/components/p-BHwftRkk.js +0 -379
- package/dist/components/p-BHwftRkk.js.map +0 -1
- package/dist/components/p-CQF7wlXf.js.map +0 -1
- package/dist/components/p-CzcTU1ty.js.map +0 -1
- package/dist/components/p-DGlecSBr.js.map +0 -1
- package/dist/esm/bcm-button.bcm-chip.bcm-drawer.bcm-modal.entry.js.map +0 -1
- package/dist/esm/bcm-button_4.entry.js +0 -910
- package/dist/esm/bcm-button_4.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-pop-confirm.entry.js +0 -248
- package/dist/esm/bcm-pop-confirm.entry.js.map +0 -1
- package/dist/esm/bcm-popover.entry.js +0 -187
- package/dist/esm/bcm-popover.entry.js.map +0 -1
- package/dist/esm/bcm-tooltip.entry.js +0 -178
- package/dist/esm/bcm-tooltip.entry.js.map +0 -1
- package/dist/esm/floating-ui.dom-DxMLMJ3r.js +0 -1598
- package/dist/esm/floating-ui.dom-DxMLMJ3r.js.map +0 -1
- package/dist/esm/index-BuuGCw0z.js.map +0 -1
|
@@ -1,910 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BuuGCw0z.js';
|
|
2
|
-
import { t as tv } from './tv-CEcVC0yX.js';
|
|
3
|
-
|
|
4
|
-
const variantOptions = {
|
|
5
|
-
save: {
|
|
6
|
-
text: 'Save',
|
|
7
|
-
status: 'success',
|
|
8
|
-
icon: 'far fa-save',
|
|
9
|
-
iconPosition: 'prefix',
|
|
10
|
-
kind: 'primary',
|
|
11
|
-
},
|
|
12
|
-
ok: {
|
|
13
|
-
text: 'Ok',
|
|
14
|
-
status: 'success',
|
|
15
|
-
icon: 'far fa-check',
|
|
16
|
-
iconPosition: 'prefix',
|
|
17
|
-
},
|
|
18
|
-
new: {
|
|
19
|
-
text: 'New',
|
|
20
|
-
status: 'success',
|
|
21
|
-
icon: 'far fa-plus',
|
|
22
|
-
iconPosition: 'prefix',
|
|
23
|
-
},
|
|
24
|
-
add: {
|
|
25
|
-
text: 'Add',
|
|
26
|
-
status: 'success',
|
|
27
|
-
icon: 'far fa-plus',
|
|
28
|
-
iconPosition: 'prefix',
|
|
29
|
-
},
|
|
30
|
-
create: {
|
|
31
|
-
text: 'Create',
|
|
32
|
-
status: 'success',
|
|
33
|
-
icon: 'far fa-plus',
|
|
34
|
-
iconPosition: 'prefix',
|
|
35
|
-
},
|
|
36
|
-
prev: {
|
|
37
|
-
text: 'Prev',
|
|
38
|
-
status: 'default',
|
|
39
|
-
icon: 'far fa-arrow-left',
|
|
40
|
-
iconPosition: 'prefix',
|
|
41
|
-
},
|
|
42
|
-
next: {
|
|
43
|
-
text: 'Next',
|
|
44
|
-
status: 'default',
|
|
45
|
-
icon: 'far fa-arrow-right',
|
|
46
|
-
iconPosition: 'suffix',
|
|
47
|
-
},
|
|
48
|
-
apply: {
|
|
49
|
-
text: 'Apply',
|
|
50
|
-
status: 'default',
|
|
51
|
-
icon: 'far fa-check-circle',
|
|
52
|
-
iconPosition: 'prefix',
|
|
53
|
-
},
|
|
54
|
-
submit: {
|
|
55
|
-
text: 'Submit',
|
|
56
|
-
status: 'default',
|
|
57
|
-
icon: 'far fa-save',
|
|
58
|
-
iconPosition: 'prefix',
|
|
59
|
-
},
|
|
60
|
-
send: {
|
|
61
|
-
text: 'Send',
|
|
62
|
-
status: 'success',
|
|
63
|
-
icon: 'far fa-paper-plane',
|
|
64
|
-
iconPosition: 'prefix',
|
|
65
|
-
},
|
|
66
|
-
delete: {
|
|
67
|
-
text: 'Delete',
|
|
68
|
-
status: 'error',
|
|
69
|
-
icon: 'far fa-trash',
|
|
70
|
-
iconPosition: 'prefix',
|
|
71
|
-
},
|
|
72
|
-
cancel: {
|
|
73
|
-
text: 'Cancel',
|
|
74
|
-
status: 'error',
|
|
75
|
-
icon: 'far fa-times',
|
|
76
|
-
iconPosition: 'prefix',
|
|
77
|
-
},
|
|
78
|
-
decline: {
|
|
79
|
-
text: 'Decline',
|
|
80
|
-
status: 'error',
|
|
81
|
-
icon: 'far fa-ban',
|
|
82
|
-
iconPosition: 'prefix',
|
|
83
|
-
},
|
|
84
|
-
close: {
|
|
85
|
-
text: 'Close',
|
|
86
|
-
status: 'error',
|
|
87
|
-
icon: 'far fa-times-circle',
|
|
88
|
-
iconPosition: 'prefix',
|
|
89
|
-
},
|
|
90
|
-
archive: {
|
|
91
|
-
text: 'Archive',
|
|
92
|
-
status: 'error',
|
|
93
|
-
icon: 'far fa-folder-open',
|
|
94
|
-
iconPosition: 'prefix',
|
|
95
|
-
},
|
|
96
|
-
remove: {
|
|
97
|
-
text: 'Remove',
|
|
98
|
-
status: 'error',
|
|
99
|
-
icon: 'far fa-minus-circle',
|
|
100
|
-
iconPosition: 'prefix',
|
|
101
|
-
},
|
|
102
|
-
edit: {
|
|
103
|
-
text: 'Edit',
|
|
104
|
-
status: 'default',
|
|
105
|
-
icon: 'far fa-edit',
|
|
106
|
-
iconPosition: 'prefix',
|
|
107
|
-
},
|
|
108
|
-
export: {
|
|
109
|
-
text: 'Export',
|
|
110
|
-
status: 'default',
|
|
111
|
-
icon: 'far fa-sign-out',
|
|
112
|
-
iconPosition: 'prefix',
|
|
113
|
-
},
|
|
114
|
-
import: {
|
|
115
|
-
text: 'Import',
|
|
116
|
-
status: 'default',
|
|
117
|
-
icon: 'far fa-sign-in',
|
|
118
|
-
iconPosition: 'prefix',
|
|
119
|
-
},
|
|
120
|
-
filter: {
|
|
121
|
-
text: 'Filter',
|
|
122
|
-
status: 'default',
|
|
123
|
-
icon: 'far fa-filter',
|
|
124
|
-
iconPosition: 'prefix',
|
|
125
|
-
},
|
|
126
|
-
update: {
|
|
127
|
-
text: 'Update',
|
|
128
|
-
status: 'default',
|
|
129
|
-
icon: 'far fa-sync',
|
|
130
|
-
iconPosition: 'prefix',
|
|
131
|
-
},
|
|
132
|
-
reset: {
|
|
133
|
-
text: 'Reset',
|
|
134
|
-
status: 'default',
|
|
135
|
-
icon: 'far fa-sync',
|
|
136
|
-
iconPosition: 'prefix',
|
|
137
|
-
},
|
|
138
|
-
download: {
|
|
139
|
-
text: 'Download',
|
|
140
|
-
status: 'default',
|
|
141
|
-
icon: 'far fa-download',
|
|
142
|
-
iconPosition: 'prefix',
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
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)}";
|
|
147
|
-
|
|
148
|
-
const BcmButton = class {
|
|
149
|
-
constructor(hostRef) {
|
|
150
|
-
registerInstance(this, hostRef);
|
|
151
|
-
this.bcmClick = createEvent(this, "bcmClick", 1);
|
|
152
|
-
this.bcmFocus = createEvent(this, "bcmFocus", 1);
|
|
153
|
-
this.bcmBlur = createEvent(this, "bcmBlur", 1);
|
|
154
|
-
/** Defines the main visual style of the button */
|
|
155
|
-
this.kind = 'primary';
|
|
156
|
-
/** Controls the button size */
|
|
157
|
-
this.size = 'medium';
|
|
158
|
-
/** Defines the button's status/state color */
|
|
159
|
-
this.status = 'default';
|
|
160
|
-
/** Icon placement (prefix/suffix) */
|
|
161
|
-
this.iconPosition = 'prefix';
|
|
162
|
-
/** Icon-only button mode */
|
|
163
|
-
this.iconOnly = false;
|
|
164
|
-
/** Full width button */
|
|
165
|
-
this.fullWidth = false;
|
|
166
|
-
/** HTML button type */
|
|
167
|
-
this.type = 'button';
|
|
168
|
-
/** Loading state */
|
|
169
|
-
this.loading = false;
|
|
170
|
-
/** Disabled state */
|
|
171
|
-
this.disabled = false;
|
|
172
|
-
/** Active state */
|
|
173
|
-
this.active = false;
|
|
174
|
-
this.handleClick = (event) => {
|
|
175
|
-
if (!this.disabled && !this.loading) {
|
|
176
|
-
this.bcmClick.emit(event);
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
this.handleFocus = (event) => {
|
|
180
|
-
this.bcmFocus.emit(event);
|
|
181
|
-
};
|
|
182
|
-
this.handleBlur = (event) => {
|
|
183
|
-
this.bcmBlur.emit(event);
|
|
184
|
-
};
|
|
185
|
-
this.buttonClass = tv({
|
|
186
|
-
base: 'bcm-button appearance-none inline-flex items-center justify-center border border-solid rounded outline-0',
|
|
187
|
-
variants: {
|
|
188
|
-
size: {
|
|
189
|
-
small: 'text-size-4 py-px px-2 min-h-6',
|
|
190
|
-
medium: 'text-size-5 py-0.5 px-3 min-h-8',
|
|
191
|
-
large: 'text-size-6 py-1 px-3 min-h-10',
|
|
192
|
-
},
|
|
193
|
-
kind: {
|
|
194
|
-
primary: 'kind-primary',
|
|
195
|
-
ghost: 'kind-ghost',
|
|
196
|
-
text: 'kind-text',
|
|
197
|
-
outline: 'kind-outline',
|
|
198
|
-
},
|
|
199
|
-
fullWidth: {
|
|
200
|
-
true: 'full-width w-full',
|
|
201
|
-
},
|
|
202
|
-
disabled: {
|
|
203
|
-
true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',
|
|
204
|
-
false: [
|
|
205
|
-
'cursor-pointer',
|
|
206
|
-
'bg-[--bcm-final-bg-color] text-[--bcm-final-text-color] border-[--bcm-final-border-color]',
|
|
207
|
-
'hover:bg-[--bcm-final-hover-bg-color]',
|
|
208
|
-
'active:bg-[--bcm-final-active-bg-color]',
|
|
209
|
-
'focus-visible:ring',
|
|
210
|
-
],
|
|
211
|
-
},
|
|
212
|
-
loading: {
|
|
213
|
-
true: '',
|
|
214
|
-
},
|
|
215
|
-
position: {
|
|
216
|
-
first: 'position-first',
|
|
217
|
-
middle: 'position-middle',
|
|
218
|
-
last: 'position-last',
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
defaultVariants: {
|
|
222
|
-
size: 'medium',
|
|
223
|
-
kind: 'primary',
|
|
224
|
-
fullWidth: false,
|
|
225
|
-
disabled: false,
|
|
226
|
-
loading: false,
|
|
227
|
-
},
|
|
228
|
-
}, {
|
|
229
|
-
twMerge: false,
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
get buttonText() {
|
|
233
|
-
return this.text || (this.variant && variantOptions[this.variant] ? variantOptions[this.variant].text : '');
|
|
234
|
-
}
|
|
235
|
-
get buttonIcon() {
|
|
236
|
-
var _a;
|
|
237
|
-
if (this.variant && ((_a = variantOptions[this.variant]) === null || _a === void 0 ? void 0 : _a.icon)) {
|
|
238
|
-
return {
|
|
239
|
-
icon: variantOptions[this.variant].icon,
|
|
240
|
-
position: variantOptions[this.variant].iconPosition || 'prefix',
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
return {
|
|
244
|
-
icon: this.icon,
|
|
245
|
-
position: this.iconPosition,
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
get buttonStatus() {
|
|
249
|
-
return this.variant && variantOptions[this.variant] ? variantOptions[this.variant].status : this.status;
|
|
250
|
-
}
|
|
251
|
-
get buttonStyles() {
|
|
252
|
-
const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;
|
|
253
|
-
// These are the internal default styles based on component props (kind, status)
|
|
254
|
-
const kindStyleMap = {
|
|
255
|
-
primary: {
|
|
256
|
-
'--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,
|
|
257
|
-
'--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,
|
|
258
|
-
'--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,
|
|
259
|
-
'--bcm-button-border': 'transparent',
|
|
260
|
-
'--bcm-button-text': 'var(--bcm-ui-color-text-base)',
|
|
261
|
-
},
|
|
262
|
-
outline: {
|
|
263
|
-
'--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',
|
|
264
|
-
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
265
|
-
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
266
|
-
'--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,
|
|
267
|
-
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
268
|
-
},
|
|
269
|
-
ghost: {
|
|
270
|
-
'--bcm-button-bg': 'transparent',
|
|
271
|
-
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
272
|
-
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
273
|
-
'--bcm-button-border': 'transparent',
|
|
274
|
-
'--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
|
|
275
|
-
},
|
|
276
|
-
text: {
|
|
277
|
-
'--bcm-button-bg': 'transparent',
|
|
278
|
-
'--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
|
|
279
|
-
'--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
|
|
280
|
-
'--bcm-button-border': 'transparent',
|
|
281
|
-
'--bcm-button-text': `var(--bcm-ui-color-text-${status})`,
|
|
282
|
-
},
|
|
283
|
-
};
|
|
284
|
-
const internalDefaultStyles = kindStyleMap[this.kind];
|
|
285
|
-
// These are the "final" CSS custom properties used by the component's styling.
|
|
286
|
-
// They use the "--bcm-button-custom-..." token if provided by the user,
|
|
287
|
-
// otherwise, they fall back to the internal "--bcm-button-..." style defined above.
|
|
288
|
-
const finalEffectiveStyles = {
|
|
289
|
-
'--bcm-final-text-color': `var(--bcm-button-custom-text-color, ${internalDefaultStyles['--bcm-button-text']})`,
|
|
290
|
-
'--bcm-final-border-color': `var(--bcm-button-custom-border-color, ${internalDefaultStyles['--bcm-button-border']})`,
|
|
291
|
-
'--bcm-final-bg-color': `var(--bcm-button-custom-bg-color, ${internalDefaultStyles['--bcm-button-bg']})`,
|
|
292
|
-
'--bcm-final-hover-bg-color': `var(--bcm-button-custom-hover-bg-color, ${internalDefaultStyles['--bcm-button-bg-hover']})`,
|
|
293
|
-
'--bcm-final-active-bg-color': `var(--bcm-button-custom-active-bg-color, ${internalDefaultStyles['--bcm-button-bg-active']})`,
|
|
294
|
-
};
|
|
295
|
-
// return kindStyleMap[this.kind];
|
|
296
|
-
return Object.assign(Object.assign({}, internalDefaultStyles), finalEffectiveStyles);
|
|
297
|
-
}
|
|
298
|
-
render() {
|
|
299
|
-
const { icon, position } = this.buttonIcon;
|
|
300
|
-
return (h(Host, { key: 'a9d5f590bcc4175aa663c999f5a84bee10c3c7f2' }, h("button", { key: 'c18c414edad304b4f9cd0155e683f1f9783b6fde', 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({
|
|
301
|
-
size: this.size,
|
|
302
|
-
kind: this.kind,
|
|
303
|
-
fullWidth: this.fullWidth,
|
|
304
|
-
disabled: this.disabled,
|
|
305
|
-
loading: this.loading,
|
|
306
|
-
position: this.position,
|
|
307
|
-
}) }, this.loading && h("slot", { key: '682e48b9d4a5e4ab6fb66bf44781448fad55f720', name: "loading" }), h("span", { key: 'b201ef2563f68e42416efa2816b890b2d41867ad' }, h("slot", { key: '4b30c9c05551671c45757a7afbccaabe4dea1d9a', name: "prefix" }, position === 'prefix' && icon && h("i", { key: '618a7e811aa190f60621095dbece3d29ee133f9e', class: ' leading-none ' + icon }))), h("slot", { key: 'b3a3a7257767f3e49895c8e7963899a701cdab43' }, this.buttonText), h("span", { key: '81b97078b064ce82516cea7564c64c8a89332759' }, h("slot", { key: '4e4d3bfb4814f207f27f6efc2327575e65f69180', name: "suffix" }, position === 'suffix' && icon && h("i", { key: '75373a66baeae2a66b219626b2f3694ac7cb4179', class: ' leading-none ' + icon }))))));
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
BcmButton.style = buttonCss;
|
|
311
|
-
|
|
312
|
-
const STATUS_COLORS = {
|
|
313
|
-
info: 'blue',
|
|
314
|
-
error: 'red',
|
|
315
|
-
warning: 'amber',
|
|
316
|
-
success: 'green',
|
|
317
|
-
primary: 'primary',
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
const chipCss = ":host{--bcm-chip-bg:var(--bcm-ui-color-background-default-default);--bcm-chip-text:var(--bcm-ui-color-text-default);--bcm-chip-border:var(--bcm-ui-color-border-default);--bcm-chip-hover-bg:var(--bcm-ui-color-background-default-hover);--bcm-chip-active-bg:var(--bcm-ui-color-background-default-active);--bcm-chip-radius:6px;display:inline-block}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.flex{display:flex}.min-w-max{min-width:max-content}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.rounded-\\[--bcm-chip-radius\\]{border-radius:var(--bcm-chip-radius)}.border{border-width:1px}.border-none{border-style:none}.border-\\[--bcm-chip-border\\]{border-color:var(--bcm-chip-border)}.border-transparent{border-color:transparent}.bg-\\[--bcm-chip-bg\\]{background-color:var(--bcm-chip-bg)}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.font-normal{font-weight:400}.text-\\[--bcm-chip-text\\]{color:var(--bcm-chip-text)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:bg-\\[--bcm-chip-hover-bg\\]:hover{background-color:var(--bcm-chip-hover-bg)}.active\\:bg-\\[--bcm-chip-active-bg\\]:active{background-color:var(--bcm-chip-active-bg)}";
|
|
321
|
-
|
|
322
|
-
const BcmChip = class {
|
|
323
|
-
constructor(hostRef) {
|
|
324
|
-
registerInstance(this, hostRef);
|
|
325
|
-
this.bcmDismiss = createEvent(this, "bcmDismiss", 1);
|
|
326
|
-
/** Chip size variant */
|
|
327
|
-
this.size = 'medium';
|
|
328
|
-
/** Chip style variant */
|
|
329
|
-
this.kind = 'filled';
|
|
330
|
-
/** Chip status */
|
|
331
|
-
this.status = 'default';
|
|
332
|
-
/** Whether chip can be dismissed */
|
|
333
|
-
this.dismissible = false;
|
|
334
|
-
/** Whether chip is disabled */
|
|
335
|
-
this.disabled = false;
|
|
336
|
-
this.chipClass = tv({
|
|
337
|
-
base: [
|
|
338
|
-
'chip bcm-ui-element font-normal flex items-center justify-center px-2 gap-1 min-w-max border',
|
|
339
|
-
'bg-[--bcm-chip-bg] text-[--bcm-chip-text] rounded-[--bcm-chip-radius] border-[--bcm-chip-border]',
|
|
340
|
-
'hover:bg-[--bcm-chip-hover-bg] active:bg-[--bcm-chip-active-bg]',
|
|
341
|
-
],
|
|
342
|
-
variants: {
|
|
343
|
-
size: {
|
|
344
|
-
small: 'small py-px text-size-3',
|
|
345
|
-
medium: 'medium py-0.5 text-size-4',
|
|
346
|
-
large: 'large py-1 text-size-5',
|
|
347
|
-
},
|
|
348
|
-
kind: {
|
|
349
|
-
filled: 'filled border-transparent',
|
|
350
|
-
outlined: 'outlined',
|
|
351
|
-
text: 'text border-none',
|
|
352
|
-
},
|
|
353
|
-
disabled: {
|
|
354
|
-
true: 'cursor-not-allowed',
|
|
355
|
-
},
|
|
356
|
-
},
|
|
357
|
-
}, { twMerge: false });
|
|
358
|
-
}
|
|
359
|
-
get chipStyle() {
|
|
360
|
-
let _color = this.color;
|
|
361
|
-
if (this.disabled) {
|
|
362
|
-
return {
|
|
363
|
-
'--bcm-chip-bg': 'var(--bcm-ui-color-background-disabled-default)',
|
|
364
|
-
'--bcm-chip-text': 'var(--bcm-ui-color-text-disabled)',
|
|
365
|
-
'--bcm-chip-border': 'var(--bcm-ui-color-border-disabled)',
|
|
366
|
-
'--bcm-chip-hover-bg': 'var(--bcm-ui-color-background-disabled-default)',
|
|
367
|
-
'--bcm-chip-active-bg': 'var(--bcm-ui-color-background-disabled-default)',
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
if (this.status !== 'default') {
|
|
371
|
-
_color = STATUS_COLORS[this.status];
|
|
372
|
-
}
|
|
373
|
-
const styles = {
|
|
374
|
-
filled: {
|
|
375
|
-
'--bcm-chip-bg': `var(--bcm-ui-color-background-palette-${_color}-default)`,
|
|
376
|
-
'--bcm-chip-text': `var(--bcm-ui-color-text-palette-${_color})`,
|
|
377
|
-
'--bcm-chip-border': `var(--bcm-ui-color-border-${_color})`,
|
|
378
|
-
'--bcm-chip-hover-bg': `var(--bcm-ui-color-background-palette-${_color}-hover)`,
|
|
379
|
-
'--bcm-chip-active-bg': `var(--bcm-ui-color-background-palette-${_color}-active)`,
|
|
380
|
-
},
|
|
381
|
-
outlined: {
|
|
382
|
-
'--bcm-chip-bg': 'transparent',
|
|
383
|
-
'--bcm-chip-text': `var(--bcm-ui-color-text-palette-${_color})`,
|
|
384
|
-
'--bcm-chip-border': `var(--bcm-ui-color-border-${_color})`,
|
|
385
|
-
'--bcm-chip-hover-bg': `var(--bcm-ui-color-background-palette-${_color}-hover)`,
|
|
386
|
-
'--bcm-chip-active-bg': `var(--bcm-ui-color-background-palette-${_color}-active)`,
|
|
387
|
-
},
|
|
388
|
-
text: {
|
|
389
|
-
'--bcm-chip-bg': 'transparent',
|
|
390
|
-
'--bcm-chip-text': `var(--bcm-ui-color-text-palette-${_color})`,
|
|
391
|
-
'--bcm-chip-border': 'transparent',
|
|
392
|
-
'--bcm-chip-hover-bg': `var(--bcm-ui-color-background-palette-${_color}-hover)`,
|
|
393
|
-
'--bcm-chip-active-bg': `var(--bcm-ui-color-background-palette-${_color}-active)`,
|
|
394
|
-
},
|
|
395
|
-
};
|
|
396
|
-
const defaultStyles = {
|
|
397
|
-
filled: {
|
|
398
|
-
'--bcm-chip-bg': 'var(--bcm-ui-color-background-default-default)',
|
|
399
|
-
'--bcm-chip-text': 'var(--bcm-ui-color-text-default)',
|
|
400
|
-
'--bcm-chip-border': 'var(--bcm-ui-color-border-default)',
|
|
401
|
-
'--bcm-chip-hover-bg': 'var(--bcm-ui-color-background-default-hover)',
|
|
402
|
-
'--bcm-chip-active-bg': 'var(--bcm-ui-color-background-default-active)',
|
|
403
|
-
},
|
|
404
|
-
outlined: {
|
|
405
|
-
'--bcm-chip-bg': 'transparent',
|
|
406
|
-
'--bcm-chip-text': 'var(--bcm-ui-color-text-default)',
|
|
407
|
-
'--bcm-chip-border': 'var(--bcm-ui-color-border-default)',
|
|
408
|
-
'--bcm-chip-hover-bg': 'var(--bcm-ui-color-background-default-hover)',
|
|
409
|
-
'--bcm-chip-active-bg': 'var(--bcm-ui-color-background-default-active)',
|
|
410
|
-
},
|
|
411
|
-
text: {
|
|
412
|
-
'--bcm-chip-bg': 'transparent',
|
|
413
|
-
'--bcm-chip-text': 'var(--bcm-ui-color-text-default)',
|
|
414
|
-
'--bcm-chip-border': 'transparent',
|
|
415
|
-
'--bcm-chip-hover-bg': 'var(--bcm-ui-color-background-default-hover)',
|
|
416
|
-
'--bcm-chip-active-bg': 'var(--bcm-ui-color-background-default-active)',
|
|
417
|
-
},
|
|
418
|
-
};
|
|
419
|
-
return _color ? styles[this.kind] : defaultStyles[this.kind];
|
|
420
|
-
}
|
|
421
|
-
handleDismiss() {
|
|
422
|
-
if (!this.disabled) {
|
|
423
|
-
this.bcmDismiss.emit();
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
render() {
|
|
427
|
-
return (h("div", { key: 'd2692652edd6275d143e7ddffbc789d0b5315027', style: this.chipStyle, class: this.chipClass({ size: this.size, kind: this.kind, disabled: this.disabled }), role: "button", "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", { key: '8d3abf8a40a30dc93003077e52edc81062f10424' }), this.dismissible && h("bcm-icon", { key: '9914f1803e5d6feece7221e73b041d46f8237e95', onClick: () => this.handleDismiss(), class: "cursor-pointer", "icon-name": "fa-regular fa-xmark", "aria-label": "Dismiss chip" })));
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
BcmChip.style = chipCss;
|
|
431
|
-
|
|
432
|
-
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)}";
|
|
433
|
-
|
|
434
|
-
const BcmDrawer = class {
|
|
435
|
-
constructor(hostRef) {
|
|
436
|
-
registerInstance(this, hostRef);
|
|
437
|
-
this.bcmOpen = createEvent(this, "bcmOpen", 7);
|
|
438
|
-
this.bcmClose = createEvent(this, "bcmClose", 7);
|
|
439
|
-
this.bcmBeforeOpen = createEvent(this, "bcmBeforeOpen", 7);
|
|
440
|
-
this.bcmBeforeClose = createEvent(this, "bcmBeforeClose", 7);
|
|
441
|
-
this.open = false;
|
|
442
|
-
this.size = 'medium';
|
|
443
|
-
this.position = 'right';
|
|
444
|
-
this.fullWidth = false;
|
|
445
|
-
this.noHeader = false;
|
|
446
|
-
this.drawerClass = tv({
|
|
447
|
-
slots: {
|
|
448
|
-
backdrop: 'fixed inset-0 bg-color-transparent z-40 transition-opacity duration-300',
|
|
449
|
-
wrapper: 'bcm-ui-element fixed bg-color-base text-color-default z-50 transform transition-transform duration-300 ease-in-out flex flex-col',
|
|
450
|
-
header: 'flex justify-between items-center bg-color-default text-color-default',
|
|
451
|
-
title: 'font-semibold m-0 text-size-6',
|
|
452
|
-
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',
|
|
453
|
-
content: 'overflow-y-auto flex-grow',
|
|
454
|
-
},
|
|
455
|
-
variants: {
|
|
456
|
-
open: {
|
|
457
|
-
true: {
|
|
458
|
-
backdrop: 'opacity-100 visible',
|
|
459
|
-
},
|
|
460
|
-
false: {
|
|
461
|
-
backdrop: 'opacity-0 invisible',
|
|
462
|
-
},
|
|
463
|
-
},
|
|
464
|
-
position: {
|
|
465
|
-
left: {
|
|
466
|
-
wrapper: 'top-0 left-0 bottom-0',
|
|
467
|
-
},
|
|
468
|
-
right: {
|
|
469
|
-
wrapper: 'top-0 right-0 bottom-0',
|
|
470
|
-
},
|
|
471
|
-
top: {
|
|
472
|
-
wrapper: 'top-0 left-0 right-0',
|
|
473
|
-
},
|
|
474
|
-
bottom: {
|
|
475
|
-
wrapper: 'bottom-0 left-0 right-0',
|
|
476
|
-
},
|
|
477
|
-
},
|
|
478
|
-
size: {
|
|
479
|
-
small: {
|
|
480
|
-
header: 'py-3 px-4',
|
|
481
|
-
content: 'p-4',
|
|
482
|
-
},
|
|
483
|
-
medium: {
|
|
484
|
-
header: 'py-3 px-4',
|
|
485
|
-
content: 'p-4',
|
|
486
|
-
},
|
|
487
|
-
large: {
|
|
488
|
-
header: 'py-3 px-4',
|
|
489
|
-
content: 'p-4',
|
|
490
|
-
},
|
|
491
|
-
},
|
|
492
|
-
noHeader: {
|
|
493
|
-
true: {
|
|
494
|
-
header: 'hidden',
|
|
495
|
-
},
|
|
496
|
-
},
|
|
497
|
-
},
|
|
498
|
-
compoundVariants: [
|
|
499
|
-
{
|
|
500
|
-
open: true,
|
|
501
|
-
position: ['left', 'right'],
|
|
502
|
-
class: {
|
|
503
|
-
wrapper: 'translate-x-0',
|
|
504
|
-
},
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
open: true,
|
|
508
|
-
position: ['top', 'bottom'],
|
|
509
|
-
class: {
|
|
510
|
-
wrapper: 'translate-y-0',
|
|
511
|
-
},
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
open: false,
|
|
515
|
-
position: 'left',
|
|
516
|
-
class: {
|
|
517
|
-
wrapper: '-translate-x-full',
|
|
518
|
-
},
|
|
519
|
-
},
|
|
520
|
-
{
|
|
521
|
-
open: false,
|
|
522
|
-
position: 'right',
|
|
523
|
-
class: {
|
|
524
|
-
wrapper: 'translate-x-full',
|
|
525
|
-
},
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
open: false,
|
|
529
|
-
position: 'top',
|
|
530
|
-
class: {
|
|
531
|
-
wrapper: '-translate-y-full',
|
|
532
|
-
},
|
|
533
|
-
},
|
|
534
|
-
{
|
|
535
|
-
open: false,
|
|
536
|
-
position: 'bottom',
|
|
537
|
-
class: {
|
|
538
|
-
wrapper: 'translate-y-full',
|
|
539
|
-
},
|
|
540
|
-
},
|
|
541
|
-
],
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
handleOpenChange(isOpen) {
|
|
545
|
-
if (isOpen) {
|
|
546
|
-
document.body.style.overflow = 'hidden';
|
|
547
|
-
this.bcmOpen.emit();
|
|
548
|
-
}
|
|
549
|
-
else {
|
|
550
|
-
document.body.style.overflow = '';
|
|
551
|
-
this.bcmClose.emit();
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
handleKeyDown(event) {
|
|
555
|
-
if (event.key === 'Escape' && this.open) {
|
|
556
|
-
this.hide();
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
async show() {
|
|
560
|
-
const event = this.bcmBeforeOpen.emit();
|
|
561
|
-
if (!event.defaultPrevented) {
|
|
562
|
-
this.open = true;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
async hide() {
|
|
566
|
-
const event = this.bcmBeforeClose.emit();
|
|
567
|
-
if (!event.defaultPrevented) {
|
|
568
|
-
this.open = false;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
disconnectedCallback() {
|
|
572
|
-
document.body.style.overflow = '';
|
|
573
|
-
}
|
|
574
|
-
getWrapperStyle() {
|
|
575
|
-
const style = {};
|
|
576
|
-
if (this.fullWidth) {
|
|
577
|
-
if (this.position === 'left' || this.position === 'right') {
|
|
578
|
-
style.width = '100vw';
|
|
579
|
-
}
|
|
580
|
-
else {
|
|
581
|
-
style.height = '100vh';
|
|
582
|
-
}
|
|
583
|
-
return style;
|
|
584
|
-
}
|
|
585
|
-
if (this.position === 'left' || this.position === 'right') {
|
|
586
|
-
switch (this.size) {
|
|
587
|
-
case 'small':
|
|
588
|
-
style.width = '320px';
|
|
589
|
-
break;
|
|
590
|
-
case 'medium':
|
|
591
|
-
style.width = '480px';
|
|
592
|
-
break;
|
|
593
|
-
case 'large':
|
|
594
|
-
style.width = '1064px';
|
|
595
|
-
break;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
else {
|
|
599
|
-
switch (this.size) {
|
|
600
|
-
case 'small':
|
|
601
|
-
style.height = '40vh';
|
|
602
|
-
break;
|
|
603
|
-
case 'medium':
|
|
604
|
-
style.height = '60vh';
|
|
605
|
-
break;
|
|
606
|
-
case 'large':
|
|
607
|
-
style.height = '90vh';
|
|
608
|
-
break;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
return style;
|
|
612
|
-
}
|
|
613
|
-
render() {
|
|
614
|
-
const { backdrop, wrapper, header, title, closeButton, content } = this.drawerClass({
|
|
615
|
-
open: this.open,
|
|
616
|
-
position: this.position,
|
|
617
|
-
size: this.size,
|
|
618
|
-
noHeader: this.noHeader,
|
|
619
|
-
});
|
|
620
|
-
return (h("div", { key: '120639c39b40ba77d7420813e82c18952ae67514', part: "base" }, h("div", { key: '3f59e0b0c482421b38d8eb39076da51453a91a70', part: "backdrop", class: backdrop(), onClick: () => this.hide() }), h("div", { key: '9b97aeb2ad7067a11c76a7b265adeb2e3c80eac5', part: "wrapper", class: wrapper(), style: this.getWrapperStyle(), role: "dialog", "aria-modal": "true", "aria-hidden": !this.open ? 'true' : 'false', "aria-label": this.headerText }, h("div", { key: 'd2613cabb535822fed605f52fd782af88c6bef8e', part: "header", class: header() }, h("h2", { key: '1771936e710fe478e3793a1846a0acf3f98d8864', part: "title", class: title() }, h("slot", { key: '0f6e8cb671e201d20b54b7669de9abec7a5627d0', name: "header" }, this.headerText)), h("button", { key: 'da006eaf46c4e6e3d7e7f773477e8eb61be69c00', part: "close-button", class: closeButton(), onClick: () => this.hide(), "aria-label": "Close" }, h("bcm-icon", { key: '913497c5cc4305f3b0ddaf751803fdca19143a9d', name: "fa-solid fa-xmark" }))), h("div", { key: 'd0a287ee5726197cd180724fc70984c5f54f5ba2', part: "content", class: content() }, h("slot", { key: '8401ec9c937f0888499ec8bd4c7bdead3141284e' })), h("div", { key: '14991163fc8d7d78b5a89b8ec18cbf82690a4f0d', part: "footer" }, h("slot", { key: '10e3bb6c6e9aefa5eea8d24dd02fa482feedfb18', name: "footer" })))));
|
|
621
|
-
}
|
|
622
|
-
get host() { return getElement(this); }
|
|
623
|
-
static get watchers() { return {
|
|
624
|
-
"open": ["handleOpenChange"]
|
|
625
|
-
}; }
|
|
626
|
-
};
|
|
627
|
-
BcmDrawer.style = drawerCss;
|
|
628
|
-
|
|
629
|
-
const modalCss = ".contents{display:contents}:host{display:contents}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.m-0{margin:0}.flex{display:flex}.hidden{display:none}.h-6{height:1.5rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.w-6{width:1.5rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-y-4{--tw-translate-y:-1rem}.-translate-y-4,.translate-y-0{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-0{--tw-translate-y:0px}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-95{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))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.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))}.animate-shake{animation:shake .82s cubic-bezier(.36,.07,.19,.97) infinite;animation:shake .3s cubic-bezier(.36,.07,.19,.97) both}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:var(--bcm-ui-border-radius-default,6px)}.rounded-lg{border-radius:var(--bcm-ui-border-radius-lg,8px)}.rounded-none{border-radius:var(--bcm-ui-border-radius-none,0)}.rounded-t-lg{border-top-left-radius:var(--bcm-ui-border-radius-lg,8px);border-top-right-radius:var(--bcm-ui-border-radius-lg,8px)}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-color-default{border-color:var(--bcm-ui-color-border-default)}.bg-color-base{background-color:var(--bcm-ui-color-background-base-default)}.bg-color-basic-base{background-color:var(--bcm-ui-color-background-basic-base)}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.pt-20{padding-top:5rem}.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)}.text-color-header{color:var(--bcm-ui-color-text-header)}.text-color-placeholder{color:var(--bcm-ui-color-text-placeholder)}.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)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:var(--bcm-ui-box-shadow-2xl);--tw-shadow-colored:var(--bcm-ui-box-shadow-2xl)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.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-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.backdrop\\:bg-color-default-dark::backdrop{background-color:var(--bcm-ui-color-background-default-dark-default)}.backdrop\\:opacity-50::backdrop{opacity:.5}.backdrop\\:transition-opacity::backdrop{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.backdrop\\:duration-300::backdrop{transition-duration:.3s}.hover\\:bg-color-default-hover:hover{background-color:var(--bcm-ui-color-background-default-hover)}.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)}";
|
|
630
|
-
|
|
631
|
-
const BcmModal = class {
|
|
632
|
-
constructor(hostRef) {
|
|
633
|
-
registerInstance(this, hostRef);
|
|
634
|
-
this.bcmOpen = createEvent(this, "bcmOpen", 7);
|
|
635
|
-
this.bcmClose = createEvent(this, "bcmClose", 7);
|
|
636
|
-
this.bcmBeforeOpen = createEvent(this, "bcmBeforeOpen", 7);
|
|
637
|
-
this.bcmBeforeClose = createEvent(this, "bcmBeforeClose", 7);
|
|
638
|
-
this.open = false;
|
|
639
|
-
this.size = 'medium';
|
|
640
|
-
this.placement = 'center';
|
|
641
|
-
this.backdrop = true;
|
|
642
|
-
this.fullWidth = false;
|
|
643
|
-
this.fullScreen = false;
|
|
644
|
-
this.noHeader = false;
|
|
645
|
-
this.noFooter = false;
|
|
646
|
-
this.closeOnBackdrop = true;
|
|
647
|
-
this.closeOnEscape = true;
|
|
648
|
-
this.isAnimating = false;
|
|
649
|
-
this.shake = false;
|
|
650
|
-
this.modalClass = tv({
|
|
651
|
-
slots: {
|
|
652
|
-
dialog: 'bcm-ui-element fixed inset-0 m-0 p-0 w-full max-w-full h-full max-h-full border-none bg-transparent backdrop:bg-color-default-dark backdrop:opacity-50 backdrop:transition-opacity backdrop:duration-300',
|
|
653
|
-
container: 'fixed inset-0 flex items-start justify-center p-4 overflow-y-auto overscroll-contain',
|
|
654
|
-
modal: 'relative bg-color-basic-base text-color-default rounded-lg shadow-2xl transform transition-all duration-300 ease-in-out flex flex-col',
|
|
655
|
-
header: 'flex justify-between items-start bg-color-base text-color-default border-color-default border-solid border-0 border-b rounded-t-lg',
|
|
656
|
-
headerContent: 'flex-1 min-w-0 flex items-center gap-2',
|
|
657
|
-
title: 'font-semibold m-0 text-size-6 text-color-header',
|
|
658
|
-
helperText: 'text-size-5 text-color-placeholder m-0',
|
|
659
|
-
closeButton: 'text-size-5 font-medium text-color-default bg-transparent border-none p-0 h-6 w-6 rounded hover:bg-color-default-hover cursor-pointer active:bg-color-active transition-colors flex-shrink-0 outline-none focus-visible:ring ',
|
|
660
|
-
content: 'flex-grow overflow-y-auto',
|
|
661
|
-
footer: 'flex items-center justify-end gap-2',
|
|
662
|
-
},
|
|
663
|
-
variants: {
|
|
664
|
-
open: {
|
|
665
|
-
true: {
|
|
666
|
-
modal: 'opacity-100 translate-y-0 scale-100',
|
|
667
|
-
},
|
|
668
|
-
false: {
|
|
669
|
-
modal: 'opacity-0 -translate-y-4 scale-95',
|
|
670
|
-
},
|
|
671
|
-
},
|
|
672
|
-
placement: {
|
|
673
|
-
center: {
|
|
674
|
-
container: 'items-center',
|
|
675
|
-
},
|
|
676
|
-
top: {
|
|
677
|
-
container: 'items-start pt-20',
|
|
678
|
-
},
|
|
679
|
-
},
|
|
680
|
-
size: {
|
|
681
|
-
small: {
|
|
682
|
-
header: 'py-3 px-4',
|
|
683
|
-
content: 'p-4',
|
|
684
|
-
footer: 'py-3 px-4',
|
|
685
|
-
},
|
|
686
|
-
medium: {
|
|
687
|
-
header: 'py-4 px-5',
|
|
688
|
-
content: 'p-5',
|
|
689
|
-
footer: 'py-4 px-5',
|
|
690
|
-
},
|
|
691
|
-
large: {
|
|
692
|
-
header: 'py-4 px-6',
|
|
693
|
-
content: 'p-6',
|
|
694
|
-
footer: 'py-4 px-6',
|
|
695
|
-
},
|
|
696
|
-
xlarge: {
|
|
697
|
-
header: 'py-5 px-6',
|
|
698
|
-
content: 'p-6',
|
|
699
|
-
footer: 'py-5 px-6',
|
|
700
|
-
},
|
|
701
|
-
xxlarge: {
|
|
702
|
-
header: 'py-5 px-8',
|
|
703
|
-
content: 'p-8',
|
|
704
|
-
footer: 'py-5 px-8',
|
|
705
|
-
},
|
|
706
|
-
full: {
|
|
707
|
-
header: 'py-5 px-8',
|
|
708
|
-
content: 'p-8',
|
|
709
|
-
footer: 'py-5 px-8',
|
|
710
|
-
},
|
|
711
|
-
},
|
|
712
|
-
fullScreen: {
|
|
713
|
-
true: {
|
|
714
|
-
modal: 'rounded-none w-screen h-screen max-w-none max-h-none',
|
|
715
|
-
container: 'p-0',
|
|
716
|
-
},
|
|
717
|
-
},
|
|
718
|
-
shake: {
|
|
719
|
-
true: {
|
|
720
|
-
modal: 'animate-shake',
|
|
721
|
-
},
|
|
722
|
-
},
|
|
723
|
-
noHeader: {
|
|
724
|
-
true: {
|
|
725
|
-
header: 'hidden',
|
|
726
|
-
},
|
|
727
|
-
},
|
|
728
|
-
noFooter: {
|
|
729
|
-
true: {
|
|
730
|
-
footer: 'hidden',
|
|
731
|
-
},
|
|
732
|
-
},
|
|
733
|
-
},
|
|
734
|
-
});
|
|
735
|
-
this.handleBackdropClick = (event) => {
|
|
736
|
-
const target = event.target;
|
|
737
|
-
// Check if click is on the container (backdrop area), not on modal content
|
|
738
|
-
if (target.getAttribute('part') === 'container') {
|
|
739
|
-
if (this.backdrop === 'static') {
|
|
740
|
-
this.shakeModal();
|
|
741
|
-
}
|
|
742
|
-
else if (this.closeOnBackdrop) {
|
|
743
|
-
this.hide();
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
};
|
|
747
|
-
this.handleDialogCancel = (event) => {
|
|
748
|
-
event.preventDefault();
|
|
749
|
-
if (this.closeOnEscape) {
|
|
750
|
-
if (this.backdrop === 'static') {
|
|
751
|
-
this.shakeModal();
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
this.hide();
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
};
|
|
758
|
-
}
|
|
759
|
-
async handleOpenChange(isOpen) {
|
|
760
|
-
if (isOpen) {
|
|
761
|
-
this.isAnimating = true;
|
|
762
|
-
const event = this.bcmBeforeOpen.emit();
|
|
763
|
-
if (event.defaultPrevented) {
|
|
764
|
-
this.open = false;
|
|
765
|
-
return;
|
|
766
|
-
}
|
|
767
|
-
// Use native dialog API with top-layer
|
|
768
|
-
if (this.dialogRef) {
|
|
769
|
-
this.dialogRef.showModal();
|
|
770
|
-
// Small delay for animation
|
|
771
|
-
await new Promise(resolve => setTimeout(resolve, 50));
|
|
772
|
-
this.isAnimating = false;
|
|
773
|
-
this.bcmOpen.emit();
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
else {
|
|
777
|
-
this.isAnimating = true;
|
|
778
|
-
const event = this.bcmBeforeClose.emit();
|
|
779
|
-
if (event.defaultPrevented) {
|
|
780
|
-
this.open = true;
|
|
781
|
-
return;
|
|
782
|
-
}
|
|
783
|
-
// Wait for animation before closing
|
|
784
|
-
await new Promise(resolve => setTimeout(resolve, 300));
|
|
785
|
-
if (this.dialogRef) {
|
|
786
|
-
this.dialogRef.close();
|
|
787
|
-
}
|
|
788
|
-
this.isAnimating = false;
|
|
789
|
-
this.bcmClose.emit();
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
handleClick(event) {
|
|
793
|
-
// Use composedPath to work with shadow DOM and slots
|
|
794
|
-
const path = event.composedPath();
|
|
795
|
-
const dismissElement = path.find(el => { var _a; return (_a = el.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(el, 'data-dismiss'); });
|
|
796
|
-
const closeModalElement = path.find(el => { var _a; return (_a = el.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(el, 'data-close-modal'); });
|
|
797
|
-
if (dismissElement) {
|
|
798
|
-
this.hide();
|
|
799
|
-
event.preventDefault();
|
|
800
|
-
event.stopPropagation();
|
|
801
|
-
}
|
|
802
|
-
else if (closeModalElement) {
|
|
803
|
-
const modalId = closeModalElement.getAttribute('data-close-modal');
|
|
804
|
-
// If modalId matches this modal's id, close it
|
|
805
|
-
if (!modalId || modalId === this.host.id) {
|
|
806
|
-
this.hide();
|
|
807
|
-
event.preventDefault();
|
|
808
|
-
event.stopPropagation();
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
handleKeyDown(event) {
|
|
813
|
-
if (event.key === 'Escape' && this.open) {
|
|
814
|
-
// Only handle ESC if this is the topmost modal
|
|
815
|
-
const openModals = Array.from(document.querySelectorAll('bcm-modal[open]'));
|
|
816
|
-
const topModal = openModals[openModals.length - 1];
|
|
817
|
-
if (topModal !== this.host) {
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
event.preventDefault();
|
|
821
|
-
if (this.closeOnEscape) {
|
|
822
|
-
if (this.backdrop === 'static') {
|
|
823
|
-
this.shakeModal();
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
826
|
-
this.hide();
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
else if (this.backdrop === 'static') {
|
|
830
|
-
this.shakeModal();
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
async show() {
|
|
835
|
-
this.open = true;
|
|
836
|
-
}
|
|
837
|
-
async hide() {
|
|
838
|
-
this.open = false;
|
|
839
|
-
}
|
|
840
|
-
async toggle() {
|
|
841
|
-
this.open = !this.open;
|
|
842
|
-
}
|
|
843
|
-
shakeModal() {
|
|
844
|
-
this.shake = true;
|
|
845
|
-
setTimeout(() => {
|
|
846
|
-
this.shake = false;
|
|
847
|
-
}, 300);
|
|
848
|
-
}
|
|
849
|
-
getModalStyle() {
|
|
850
|
-
if (this.fullScreen) {
|
|
851
|
-
return {
|
|
852
|
-
width: '100vw',
|
|
853
|
-
height: '100vh',
|
|
854
|
-
maxWidth: 'none',
|
|
855
|
-
maxHeight: 'none',
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
|
-
if (this.fullWidth) {
|
|
859
|
-
return {
|
|
860
|
-
width: '100%',
|
|
861
|
-
maxWidth: '100%',
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
const widths = {
|
|
865
|
-
small: '400px',
|
|
866
|
-
medium: '600px',
|
|
867
|
-
large: '800px',
|
|
868
|
-
xlarge: '1024px',
|
|
869
|
-
xxlarge: '1200px',
|
|
870
|
-
full: '100%',
|
|
871
|
-
};
|
|
872
|
-
return {
|
|
873
|
-
width: widths[this.size],
|
|
874
|
-
maxWidth: this.fullScreen ? 'none' : '90vw',
|
|
875
|
-
maxHeight: this.fullScreen ? 'none' : '90vh',
|
|
876
|
-
};
|
|
877
|
-
}
|
|
878
|
-
componentDidLoad() {
|
|
879
|
-
if (this.open && this.dialogRef) {
|
|
880
|
-
this.dialogRef.showModal();
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
disconnectedCallback() {
|
|
884
|
-
if (this.dialogRef && this.open) {
|
|
885
|
-
this.dialogRef.close();
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
render() {
|
|
889
|
-
const { dialog, container, modal, header, headerContent, title, helperText, closeButton, content, footer } = this.modalClass({
|
|
890
|
-
open: this.open,
|
|
891
|
-
placement: this.placement,
|
|
892
|
-
size: this.size,
|
|
893
|
-
fullScreen: this.fullScreen,
|
|
894
|
-
shake: this.shake,
|
|
895
|
-
noHeader: this.noHeader,
|
|
896
|
-
noFooter: this.noFooter,
|
|
897
|
-
});
|
|
898
|
-
return (h("dialog", { key: 'c56eace3816f22ce8c5c3d779940c32c1a2504fe', ref: el => (this.dialogRef = el), part: "dialog", class: dialog(), onClick: this.handleBackdropClick, onCancel: this.handleDialogCancel, "aria-labelledby": "modal-title", "aria-describedby": this.helperText ? 'modal-helper' : undefined, "aria-modal": "true" }, h("div", { key: '0c8185cd161cb0dafcbd8a6c5f67528cd32c23de', part: "container", class: container() }, h("div", { key: 'ff66ec6396147a71d7819ae5e2f00ca38070b306', part: "modal", class: modal(), style: this.getModalStyle(), role: "document", onClick: e => e.stopPropagation() }, !this.noHeader && (h("div", { key: '4cc6b28b668fe76dcaee1138887183ea98466cbe', part: "header", class: header() }, h("div", { key: '8b005c9d586d4d2527c0319c4d17512650479bb0', part: "header-content", class: headerContent() }, h("h2", { key: '756e7f7f7e0d7b2b8c1f476fcb2b00a204884b8e', id: "modal-title", part: "title", class: title() }, h("slot", { key: 'd814bb4b44e47455ded1b0f737c8ddf61fddf9b3', name: "header" }, this.headerText)), this.helperText && (h("p", { key: '7c385f9dce88bc22bf0b7700bb2b289b7803683e', id: "modal-helper", part: "helper-text", class: helperText() }, h("slot", { key: '57bdf3201dd678a1ebdda9893b67032ff773fd05', name: "helper" }, this.helperText)))), h("button", { key: '6bcdfc24e13b375f81c9664a20b552a3f0c5d591', part: "close-button", class: closeButton(), onClick: () => this.hide(), "aria-label": "Close modal", type: "button" }, h("bcm-icon", { key: '894f44177f0acbf3e581cbae5cdc76f71e321b57', name: "fa-solid fa-xmark" })))), h("div", { key: '74db820df232cb7728c8a58923a9459b9545e8a1', part: "content", class: content() }, h("slot", { key: '95fd04fbbb441d79d649fd68eeef3868ce65bccc' })), !this.noFooter && (h("div", { key: '7c841bfe1a35abc8d9fe031eb0c8fed5a131db4e', part: "footer", class: footer() }, h("slot", { key: '9bd84178717338a821204f81179571a48bfd1f66', name: "footer" })))))));
|
|
899
|
-
}
|
|
900
|
-
get host() { return getElement(this); }
|
|
901
|
-
static get watchers() { return {
|
|
902
|
-
"open": ["handleOpenChange"]
|
|
903
|
-
}; }
|
|
904
|
-
};
|
|
905
|
-
BcmModal.style = modalCss;
|
|
906
|
-
|
|
907
|
-
export { BcmButton as bcm_button, BcmChip as bcm_chip, BcmDrawer as bcm_drawer, BcmModal as bcm_modal };
|
|
908
|
-
//# sourceMappingURL=bcm-button.bcm-chip.bcm-drawer.bcm-modal.entry.js.map
|
|
909
|
-
|
|
910
|
-
//# sourceMappingURL=bcm-button_4.entry.js.map
|