bromcom-ui 2.8.0-rc.10-h → 2.8.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/global/helper/index.ts +1 -0
- package/dist/bromcom-ui/global/helper/toast.ts +136 -0
- package/dist/bromcom-ui/p-01832535.entry.js +5 -0
- package/dist/bromcom-ui/p-04aac882.js +5 -0
- package/dist/bromcom-ui/{p-00a0bbb0.entry.js → p-04d4c6e7.entry.js} +1 -1
- package/dist/bromcom-ui/p-08372949.entry.js +5 -0
- package/dist/bromcom-ui/{p-213fa01f.js → p-09d8a268.js} +1 -1
- package/dist/bromcom-ui/{p-3bf3f141.entry.js → p-0a16fcfa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-20ecbc71.entry.js → p-0b663779.entry.js} +1 -1
- package/dist/bromcom-ui/p-0d7fcdef.entry.js +5 -0
- package/dist/bromcom-ui/p-1351e665.entry.js +5 -0
- package/dist/bromcom-ui/{p-d5f9c429.entry.js → p-14a0a646.entry.js} +1 -1
- package/dist/bromcom-ui/p-16cb2d3d.entry.js +5 -0
- package/dist/bromcom-ui/p-175a2b31.entry.js +5 -0
- package/dist/bromcom-ui/p-21c41833.entry.js +5 -0
- package/dist/bromcom-ui/{p-19769caf.entry.js → p-221448f8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d02b6aa2.js → p-24aefda6.js} +1 -1
- package/dist/bromcom-ui/{p-fe8f6043.entry.js → p-31226526.entry.js} +1 -1
- package/dist/bromcom-ui/p-31d72d3e.entry.js +5 -0
- package/dist/bromcom-ui/p-36b364af.entry.js +5 -0
- package/dist/bromcom-ui/p-37e672f8.entry.js +5 -0
- package/dist/bromcom-ui/{p-4f77fafe.entry.js → p-39eda493.entry.js} +1 -1
- package/dist/bromcom-ui/p-3c1bd5fd.entry.js +5 -0
- package/dist/bromcom-ui/p-3fcbf33c.entry.js +10 -0
- package/dist/bromcom-ui/p-42645311.entry.js +5 -0
- package/dist/bromcom-ui/p-4701df7c.entry.js +5 -0
- package/dist/bromcom-ui/p-4aa0e6b1.js +5 -0
- package/dist/bromcom-ui/p-4fb0b07a.entry.js +5 -0
- package/dist/bromcom-ui/{p-d10a20eb.entry.js → p-4fcf03c1.entry.js} +1 -1
- package/dist/bromcom-ui/p-52953d34.entry.js +5 -0
- package/dist/bromcom-ui/{p-da1aa726.entry.js → p-533cb826.entry.js} +1 -1
- package/dist/bromcom-ui/p-5374828c.js +5 -0
- package/dist/bromcom-ui/p-5432f9e0.entry.js +5 -0
- package/dist/bromcom-ui/p-5a464d76.entry.js +5 -0
- package/dist/bromcom-ui/p-5c059eba.entry.js +5 -0
- package/dist/bromcom-ui/p-5c5db6d2.entry.js +5 -0
- package/dist/bromcom-ui/p-60aab0f0.entry.js +5 -0
- package/dist/bromcom-ui/{p-c89c3f46.entry.js → p-6b7a9d96.entry.js} +1 -1
- package/dist/bromcom-ui/p-6cc73d59.entry.js +5 -0
- package/dist/bromcom-ui/p-74540539.entry.js +5 -0
- package/dist/bromcom-ui/p-74970793.entry.js +5 -0
- package/dist/bromcom-ui/p-75887a27.entry.js +5 -0
- package/dist/bromcom-ui/{p-9d908441.js → p-76154996.js} +1 -1
- package/dist/bromcom-ui/p-774cc8c5.entry.js +5 -0
- package/dist/bromcom-ui/p-79fd816c.js +5 -0
- package/dist/bromcom-ui/p-7afeaca9.entry.js +5 -0
- package/dist/bromcom-ui/p-7f85ba54.entry.js +5 -0
- package/dist/bromcom-ui/p-82549604.entry.js +5 -0
- package/dist/bromcom-ui/p-843905c8.js +5 -0
- package/dist/bromcom-ui/p-8620b754.entry.js +5 -0
- package/dist/bromcom-ui/p-86dae775.entry.js +5 -0
- package/dist/bromcom-ui/p-88c0d54d.entry.js +5 -0
- package/dist/bromcom-ui/p-8c6057d0.entry.js +5 -0
- package/dist/bromcom-ui/{p-ea218e23.js → p-8d0ca8c2.js} +1 -1
- package/dist/bromcom-ui/{p-c7e245a3.entry.js → p-8e2540d8.entry.js} +1 -1
- package/dist/bromcom-ui/p-8fccd984.entry.js +5 -0
- package/dist/bromcom-ui/p-8fd8d750.entry.js +5 -0
- package/dist/bromcom-ui/p-91517b40.entry.js +5 -0
- package/dist/bromcom-ui/p-96d00dc7.entry.js +5 -0
- package/dist/bromcom-ui/{p-04e3d67d.entry.js → p-976f682f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-de1567c7.entry.js → p-97933e31.entry.js} +1 -1
- package/dist/bromcom-ui/p-9aa25453.entry.js +5 -0
- package/dist/bromcom-ui/p-9f6c06b3.entry.js +5 -0
- package/dist/bromcom-ui/{p-c9bd85e9.js → p-a429e85b.js} +1 -1
- package/dist/bromcom-ui/{p-19cd9e89.js → p-a51e8ad2.js} +1 -1
- package/dist/bromcom-ui/{p-4df600d5.js → p-a60a2dd0.js} +1 -1
- package/dist/bromcom-ui/p-a76148e1.entry.js +5 -0
- package/dist/bromcom-ui/p-a8ff8106.entry.js +5 -0
- package/dist/bromcom-ui/p-ab53518d.entry.js +5 -0
- package/dist/bromcom-ui/{p-e8d18848.js → p-b60bcecf.js} +1 -1
- package/dist/bromcom-ui/p-b6522bad.entry.js +5 -0
- package/dist/bromcom-ui/p-b93d2841.entry.js +5 -0
- package/dist/bromcom-ui/p-bb3ee847.entry.js +5 -0
- package/dist/bromcom-ui/p-bb5102ad.entry.js +5 -0
- package/dist/bromcom-ui/{p-33330368.entry.js → p-bc840f30.entry.js} +1 -1
- package/dist/bromcom-ui/p-bdae6fa2.entry.js +5 -0
- package/dist/bromcom-ui/p-be7a34ac.entry.js +5 -0
- package/dist/bromcom-ui/p-c23b6240.js +5 -0
- package/dist/bromcom-ui/p-c271533b.entry.js +5 -0
- package/dist/bromcom-ui/{p-ad9c9bdb.js → p-c834b5c2.js} +1 -1
- package/dist/bromcom-ui/{p-4371dc2d.entry.js → p-c85b8abc.entry.js} +1 -1
- package/dist/bromcom-ui/p-c8e13fd7.js +5 -0
- package/dist/bromcom-ui/{p-39b8a477.entry.js → p-d644b6d9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-35ea8fad.js → p-da1055cb.js} +1 -1
- package/dist/bromcom-ui/p-dafe02b6.entry.js +5 -0
- package/dist/bromcom-ui/{p-aaac4637.js → p-dbc4c30c.js} +1 -1
- package/dist/bromcom-ui/p-e0c548ea.entry.js +5 -0
- package/dist/bromcom-ui/{p-4f89942a.entry.js → p-e19e9dc1.entry.js} +1 -1
- package/dist/bromcom-ui/p-ec8cf4f0.entry.js +5 -0
- package/dist/bromcom-ui/p-ed026255.js +5 -0
- package/dist/bromcom-ui/p-eee421df.entry.js +5 -0
- package/dist/bromcom-ui/p-ef1b4760.entry.js +5 -0
- package/dist/bromcom-ui/p-f1c374c6.entry.js +5 -0
- package/dist/bromcom-ui/p-f4ce5b4e.entry.js +5 -0
- package/dist/bromcom-ui/{p-3f7e7354.entry.js → p-f8c20298.entry.js} +1 -1
- package/dist/bromcom-ui/p-f9f8c1c4.entry.js +5 -0
- package/dist/bromcom-ui/p-faed1c9e.entry.js +5 -0
- package/dist/bromcom-ui/p-fc784983.entry.js +5 -0
- package/dist/cjs/{bcm-2c51bf0c.js → bcm-634604e3.js} +1 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js +5 -3
- package/dist/cjs/bcm-alert.cjs.entry.js +7 -6
- package/dist/cjs/bcm-attendance.cjs.entry.js +7 -5
- package/dist/cjs/bcm-autocomplete.cjs.entry.js +2 -2
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +12 -11
- package/dist/cjs/bcm-box.cjs.entry.js +2 -2
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +4 -3
- package/dist/cjs/bcm-button-group.cjs.entry.js +7 -6
- package/dist/cjs/bcm-button_7.cjs.entry.js +1570 -0
- package/dist/cjs/bcm-card.cjs.entry.js +9 -8
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +6 -5
- package/dist/cjs/bcm-chip.cjs.entry.js +7 -6
- package/dist/cjs/bcm-collapse-group.cjs.entry.js +2 -2
- package/dist/cjs/bcm-collapse.cjs.entry.js +4 -3
- package/dist/cjs/bcm-color-input.cjs.entry.js +76 -0
- package/dist/cjs/bcm-colorful_2.cjs.entry.js +17971 -0
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-date-picker.cjs.entry.js +5 -4
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +11 -10
- package/dist/cjs/bcm-default.cjs.entry.js +5 -3
- package/dist/cjs/bcm-drawer.cjs.entry.js +10 -9
- package/dist/cjs/bcm-dropdown.cjs.entry.js +7 -6
- package/dist/cjs/bcm-error-layout.cjs.entry.js +3 -3
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +8 -7
- package/dist/cjs/bcm-form-2.cjs.entry.js +6 -5
- package/dist/cjs/bcm-form-group.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-custom.cjs.entry.js +73 -0
- package/dist/cjs/bcm-input.cjs.entry.js +41 -12
- package/dist/cjs/bcm-item.cjs.entry.js +7 -6
- package/dist/cjs/bcm-items.cjs.entry.js +6 -5
- package/dist/cjs/bcm-link.cjs.entry.js +5 -5
- package/dist/cjs/bcm-list.cjs.entry.js +33 -25
- package/dist/cjs/bcm-menu.cjs.entry.js +138 -0
- package/dist/cjs/bcm-message.cjs.entry.js +2 -2
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +50 -0
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +49 -0
- package/dist/cjs/bcm-modal-2.cjs.entry.js +172 -0
- package/dist/cjs/bcm-modal.cjs.entry.js +8 -7
- package/dist/cjs/bcm-notification.cjs.entry.js +2 -2
- package/dist/cjs/bcm-old-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-old-tag_2.cjs.entry.js +2 -2
- package/dist/cjs/bcm-overlay_2.cjs.entry.js +48 -0
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +9 -8
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +6 -5
- package/dist/cjs/bcm-popover.cjs.entry.js +92 -42
- package/dist/cjs/bcm-progress.cjs.entry.js +7 -6
- package/dist/cjs/bcm-radio-group.cjs.entry.js +93 -210
- package/dist/cjs/bcm-radio.cjs.entry.js +37 -78
- package/dist/cjs/bcm-range.cjs.entry.js +6 -5
- package/dist/cjs/bcm-result.cjs.entry.js +2 -2
- package/dist/cjs/bcm-search.cjs.entry.js +21 -14
- package/dist/cjs/bcm-select-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-select-option.cjs.entry.js +1 -1
- package/dist/cjs/bcm-select.cjs.entry.js +5 -5
- package/dist/cjs/bcm-skeleton.cjs.entry.js +10 -8
- package/dist/cjs/bcm-step.cjs.entry.js +6 -5
- package/dist/cjs/bcm-stepper.cjs.entry.js +42 -25
- package/dist/cjs/bcm-switch.cjs.entry.js +8 -7
- package/dist/cjs/bcm-tab-group.cjs.entry.js +158 -114
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +87 -0
- package/dist/cjs/bcm-tab-item.cjs.entry.js +104 -0
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tab.cjs.entry.js +3 -3
- package/dist/cjs/bcm-table.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tabs.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tag.cjs.entry.js +7 -6
- package/dist/cjs/bcm-text.cjs.entry.js +8 -7
- package/dist/cjs/bcm-textarea.cjs.entry.js +10 -8
- package/dist/cjs/bcm-time-picker.cjs.entry.js +5 -4
- package/dist/cjs/bcm-timeline-item.cjs.entry.js +2 -2
- package/dist/cjs/bcm-timeline.cjs.entry.js +2 -2
- package/dist/cjs/bcm-toast.cjs.entry.js +115 -0
- package/dist/cjs/bcm-treeview-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-typography.cjs.entry.js +35 -0
- package/dist/cjs/bromcom-ui.cjs.js +2 -2
- package/dist/cjs/{caption-template-1b6b0819.js → caption-template-8d099fd6.js} +1 -1
- package/dist/cjs/color-helper-d6d2028b.js +86 -0
- package/dist/cjs/{color-helper-d1cb7959.js → colors-e1d142ad.js} +4 -81
- package/dist/cjs/{floating-ui-ded9c11f.js → floating-ui-74eb26d6.js} +1 -1
- package/dist/cjs/{generate-24f01256.js → generate-d32dfcf9.js} +118 -16
- package/dist/cjs/{index-b6a28fdb.js → index-4506fcd7.js} +1 -1
- package/dist/cjs/{index-b4a2fb85.js → index-ddfd6d8f.js} +1 -1
- package/dist/cjs/input-template-272244eb.js +92 -0
- package/dist/cjs/{is-load-decorator-888172a8.js → is-load-decorator-137dded1.js} +1 -3
- package/dist/cjs/{json-parse-decarator-5049611b.js → json-parse-decarator-fe63bae0.js} +2 -2
- package/dist/cjs/{label-template-5d3d6f6c.js → label-template-cc69bc21.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{number-helper-5829e9a9.js → number-helper-8286f839.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +10 -9
- package/dist/cjs/old-bcm-popover.cjs.entry.js +5 -4
- package/dist/cjs/{popover-placement-dd87671c.js → popover-placement-3c8f3a72.js} +1 -1
- package/dist/cjs/{slot-template-720b35b8.js → slot-template-3e59d7d8.js} +2 -2
- package/dist/cjs/{stepper-states-04642356.js → stepper-states-fd08aaf7.js} +3 -3
- package/dist/cjs/{string-helper-a54773f3.js → string-helper-45cffee0.js} +1 -1
- package/dist/cjs/tooltip-helper-ce53d70b.js +149 -0
- package/dist/cjs/{validators-07e09750.js → validators-53bfb47b.js} +1 -1
- package/dist/collection/collection-manifest.json +16 -5
- package/dist/collection/components/atoms/avatar/avatar.css +0 -250
- package/dist/collection/components/atoms/badge/badge.css +0 -250
- package/dist/collection/components/atoms/button/button.css +0 -250
- package/dist/collection/components/atoms/button/button.js +1 -1
- package/dist/collection/components/atoms/chip/chip.css +0 -250
- package/dist/collection/components/atoms/chip/chip.js +1 -1
- package/dist/collection/components/atoms/label/label.css +0 -250
- package/dist/collection/components/atoms/link/link.css +0 -250
- package/dist/collection/components/atoms/link/link.js +1 -1
- package/dist/collection/components/molecules/button-group/button-group.css +0 -250
- package/dist/collection/components/molecules/card/card.css +0 -250
- package/dist/collection/components/molecules/checkbox/checkbox.css +1 -750
- package/dist/collection/components/molecules/checkbox/checkbox.js +1 -1
- package/dist/collection/components/molecules/color-input/color-input.js +206 -0
- package/dist/collection/components/molecules/colorful/colorful.css +497 -0
- package/dist/collection/components/molecules/colorful/colorful.js +72 -0
- package/dist/collection/components/molecules/drawer/drawer.css +0 -250
- package/dist/collection/components/molecules/dropdown/dropdown.css +0 -250
- package/dist/collection/components/molecules/error-layout/error-layout.css +0 -250
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +0 -250
- package/dist/collection/components/molecules/input/input.css +3 -752
- package/dist/collection/components/molecules/input/input.js +31 -3
- package/dist/collection/components/molecules/item/item.css +0 -250
- package/dist/collection/components/molecules/linked/linked.js +87 -31
- package/dist/collection/components/molecules/menu/menu.css +0 -250
- package/dist/collection/components/molecules/menu/menu.js +1 -1
- package/dist/collection/components/molecules/modal/modal.css +0 -250
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +0 -250
- package/dist/collection/components/molecules/popconfirm/popconfirm.js +1 -1
- package/dist/collection/components/molecules/popover/popover.js +117 -12
- package/dist/collection/components/molecules/progress/progress.css +0 -250
- package/dist/collection/components/molecules/radio/{group.js → radio-group.js} +185 -247
- package/dist/collection/components/molecules/radio/radio.js +42 -132
- package/dist/collection/components/molecules/range/range.css +0 -250
- package/dist/collection/components/molecules/search/search.css +3 -752
- package/dist/collection/components/molecules/search/search.js +21 -2
- package/dist/collection/components/molecules/skeleton/skeleton.js +8 -8
- package/dist/collection/components/molecules/states/search.states.js +12 -7
- package/dist/collection/components/molecules/stepper/stepper.css +0 -250
- package/dist/collection/components/molecules/stepper/stepper.js +33 -26
- package/dist/collection/components/molecules/switch/switch.css +0 -750
- package/dist/collection/components/molecules/switch/switch.js +1 -1
- package/dist/collection/components/molecules/tab-group/tab-group.js +177 -114
- package/dist/collection/components/molecules/tab-group/tab-item-header.js +186 -0
- package/dist/collection/components/molecules/tab-group/tab-item.js +161 -0
- package/dist/collection/components/molecules/textarea/textarea.css +3 -752
- package/dist/collection/components/molecules/textarea/textarea.js +2 -1
- package/dist/collection/components/molecules/tooltip/tooltip.js +143 -10
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +0 -750
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +1 -1
- package/dist/collection/components/organism/form/form.js +1 -1
- package/dist/collection/components/organism/list/list.css +1 -1000
- package/dist/collection/components/organism/list/list.js +21 -2
- package/dist/collection/components/other/attendance/attendance.css +0 -250
- package/dist/collection/components/other/attendance/attendance.js +1 -1
- package/dist/collection/components/other/input-custom/input-custom.js +249 -0
- package/dist/collection/components/other/modal-2/modal-2-footer.js +54 -0
- package/dist/collection/components/other/modal-2/modal-2-header.js +53 -0
- package/dist/collection/components/other/modal-2/modal-2.js +450 -0
- package/dist/collection/components/other/overlay/overlay.js +101 -0
- package/dist/collection/components/other/scroll-area/scroll-area.js +77 -0
- package/dist/collection/components/other/toast/toast.js +365 -0
- package/dist/collection/components/other_deprecated/old-input/old-input.css +0 -750
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +0 -250
- package/dist/collection/components/other_deprecated/select/select.js +1 -1
- package/dist/collection/components/other_deprecated/tabs/tab.css +0 -250
- package/dist/collection/components/other_deprecated/text/text.css +0 -250
- package/dist/collection/decorators/is-load-decorator.js +0 -2
- package/dist/collection/global/components/_checkbox.css +1 -250
- package/dist/collection/global/helper/index.js +5 -0
- package/dist/collection/global/helper/index.ts +1 -0
- package/dist/collection/global/helper/toast.js +114 -0
- package/dist/collection/global/helper/toast.ts +136 -0
- package/dist/collection/helper/generate.js +120 -19
- package/dist/collection/helper/popover-helper.js +57 -29
- package/dist/collection/helper/tooltip-helper.js +69 -26
- package/dist/collection/models/bcm.js +1 -0
- package/dist/collection/stories/assets/button/1.svg +35 -0
- package/dist/collection/stories/assets/button/10.svg +24 -0
- package/dist/collection/stories/assets/button/11.svg +24 -0
- package/dist/collection/stories/assets/button/12.svg +24 -0
- package/dist/collection/stories/assets/button/2.svg +28 -0
- package/dist/collection/stories/assets/button/3.svg +41 -0
- package/dist/collection/stories/assets/button/4.svg +9 -0
- package/dist/collection/stories/assets/button/5.svg +65 -0
- package/dist/collection/stories/assets/button/6.svg +68 -0
- package/dist/collection/stories/assets/button/7.svg +203 -0
- package/dist/collection/stories/assets/button/8.svg +316 -0
- package/dist/collection/stories/assets/button/9.svg +9 -0
- package/dist/collection/templates/button-template.js +1 -1
- package/dist/collection/templates/input-template.js +30 -29
- package/dist/collection/templates/list-item-template.js +1 -1
- package/dist/collection/templates/list-template.js +10 -4
- package/dist/collection/templates/tag-template.js +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/bcm-attendance.js +2 -2
- package/dist/components/bcm-button-group.js +1 -1
- package/dist/components/bcm-card.js +1 -1
- package/dist/components/bcm-chip.js +2 -2
- package/dist/components/bcm-color-input.d.ts +11 -0
- package/dist/components/bcm-color-input.js +129 -0
- package/dist/components/bcm-colorful.d.ts +11 -0
- package/dist/components/bcm-colorful.js +10 -0
- package/dist/components/bcm-drawer.js +1 -1
- package/dist/components/bcm-dropdown.js +1 -1
- package/dist/components/bcm-error-layout.js +1 -1
- package/dist/components/bcm-expansion-panel.js +1 -1
- package/dist/components/bcm-form.js +1 -1
- package/dist/components/bcm-input-custom.d.ts +11 -0
- package/dist/components/bcm-input-custom.js +114 -0
- package/dist/components/bcm-input.js +1 -411
- package/dist/components/bcm-item.js +1 -1
- package/dist/components/bcm-list.js +18 -10
- package/dist/components/bcm-modal-2-footer.d.ts +11 -0
- package/dist/components/bcm-modal-2-footer.js +60 -0
- package/dist/components/bcm-modal-2-header.d.ts +11 -0
- package/dist/components/bcm-modal-2-header.js +59 -0
- package/dist/components/bcm-modal-2.d.ts +11 -0
- package/dist/components/bcm-modal-2.js +207 -0
- package/dist/components/bcm-modal.js +1 -1
- package/dist/components/bcm-overlay.d.ts +11 -0
- package/dist/components/bcm-overlay.js +10 -0
- package/dist/components/bcm-popconfirm.js +1 -1
- package/dist/components/bcm-popover.js +86 -33
- package/dist/components/bcm-progress.js +1 -1
- package/dist/components/bcm-radio-group.js +103 -228
- package/dist/components/bcm-range.js +1 -1
- package/dist/components/bcm-scroll-area.d.ts +11 -0
- package/dist/components/bcm-scroll-area.js +10 -0
- package/dist/components/bcm-select.js +1 -1
- package/dist/components/bcm-stepper.js +34 -26
- package/dist/components/bcm-switch.js +2 -2
- package/dist/components/bcm-tab-group.js +154 -112
- package/dist/components/bcm-tab-item-header.d.ts +11 -0
- package/dist/components/bcm-tab-item-header.js +102 -0
- package/dist/components/bcm-tab-item.d.ts +11 -0
- package/dist/components/bcm-tab-item.js +117 -0
- package/dist/components/bcm-tab.js +2 -2
- package/dist/components/bcm-tabs-content.js +1 -1
- package/dist/components/bcm-tabs.js +1 -1
- package/dist/components/bcm-tag.js +1 -1
- package/dist/components/bcm-textarea.js +3 -2
- package/dist/components/bcm-toast.d.ts +11 -0
- package/dist/components/bcm-toast.js +140 -0
- package/dist/components/bcm.js +1 -0
- package/dist/components/button.js +3 -3
- package/dist/components/checkbox-lite.js +1 -1
- package/dist/components/checkbox.js +2 -2
- package/dist/components/color-helper.js +8 -434
- package/dist/components/colorful.js +17768 -0
- package/dist/components/colors2.js +433 -0
- package/dist/components/datetime-picker.js +2 -2
- package/dist/components/generate.js +117 -16
- package/dist/components/index.d.ts +16 -5
- package/dist/components/index.js +11 -0
- package/dist/components/input-template.js +46 -53
- package/dist/components/input.js +457 -0
- package/dist/components/is-load-decorator.js +0 -2
- package/dist/components/label.js +1 -1
- package/dist/components/link.js +2 -2
- package/dist/components/linked.js +62 -29
- package/dist/components/menu.js +2 -2
- package/dist/components/old-input.js +1 -1
- package/dist/components/old-popover-box.js +1 -1
- package/dist/components/overlay.js +47 -0
- package/dist/components/popconfirm-box.js +1 -1
- package/dist/components/radio.js +38 -82
- package/dist/components/scroll-area.js +40 -0
- package/dist/components/search.js +13 -6
- package/dist/components/skeleton.js +5 -5
- package/dist/components/text.js +1 -1
- package/dist/components/tooltip-helper.js +68 -24
- package/dist/components/tooltip.js +35 -5
- package/dist/components/types.js +14 -27
- package/dist/components/types2.js +25 -25
- package/dist/components/types3.js +32 -0
- package/dist/esm/{bcm-b8d8a236.js → bcm-9f50af9c.js} +1 -0
- package/dist/esm/bcm-accordion.entry.js +5 -3
- package/dist/esm/bcm-alert.entry.js +7 -6
- package/dist/esm/bcm-attendance.entry.js +7 -5
- package/dist/esm/bcm-autocomplete.entry.js +2 -2
- package/dist/esm/bcm-avatar_2.entry.js +12 -11
- package/dist/esm/bcm-box.entry.js +2 -2
- package/dist/esm/bcm-breadcrumb.entry.js +4 -3
- package/dist/esm/bcm-button-group.entry.js +7 -6
- package/dist/esm/bcm-button_7.entry.js +1560 -0
- package/dist/esm/bcm-card.entry.js +9 -8
- package/dist/esm/bcm-checkbox-lite_9.entry.js +6 -5
- package/dist/esm/bcm-chip.entry.js +7 -6
- package/dist/esm/bcm-collapse-group.entry.js +2 -2
- package/dist/esm/bcm-collapse.entry.js +4 -3
- package/dist/esm/bcm-color-input.entry.js +72 -0
- package/dist/esm/bcm-colorful_2.entry.js +17966 -0
- package/dist/esm/bcm-colorpicker.entry.js +2 -2
- package/dist/esm/bcm-date-picker.entry.js +5 -4
- package/dist/esm/bcm-datetime-picker.entry.js +11 -10
- package/dist/esm/bcm-default.entry.js +5 -3
- package/dist/esm/bcm-drawer.entry.js +10 -9
- package/dist/esm/bcm-dropdown.entry.js +7 -6
- package/dist/esm/bcm-error-layout.entry.js +3 -3
- package/dist/esm/bcm-expansion-panel.entry.js +8 -7
- package/dist/esm/bcm-form-2.entry.js +6 -5
- package/dist/esm/bcm-form-group.entry.js +2 -2
- package/dist/esm/bcm-input-custom.entry.js +69 -0
- package/dist/esm/bcm-input.entry.js +41 -12
- package/dist/esm/bcm-item.entry.js +7 -6
- package/dist/esm/bcm-items.entry.js +6 -5
- package/dist/esm/bcm-link.entry.js +5 -5
- package/dist/esm/bcm-list.entry.js +33 -25
- package/dist/esm/bcm-menu.entry.js +134 -0
- package/dist/esm/bcm-message.entry.js +2 -2
- package/dist/esm/bcm-modal-2-footer.entry.js +46 -0
- package/dist/esm/bcm-modal-2-header.entry.js +45 -0
- package/dist/esm/bcm-modal-2.entry.js +168 -0
- package/dist/esm/bcm-modal.entry.js +8 -7
- package/dist/esm/bcm-notification.entry.js +2 -2
- package/dist/esm/bcm-old-input.entry.js +4 -4
- package/dist/esm/bcm-old-tag_2.entry.js +2 -2
- package/dist/esm/bcm-overlay_2.entry.js +43 -0
- package/dist/esm/bcm-popconfirm-box.entry.js +9 -8
- package/dist/esm/bcm-popconfirm.entry.js +6 -5
- package/dist/esm/bcm-popover.entry.js +92 -42
- package/dist/esm/bcm-progress.entry.js +7 -6
- package/dist/esm/bcm-radio-group.entry.js +89 -206
- package/dist/esm/bcm-radio.entry.js +36 -77
- package/dist/esm/bcm-range.entry.js +6 -5
- package/dist/esm/bcm-result.entry.js +2 -2
- package/dist/esm/bcm-search.entry.js +21 -14
- package/dist/esm/bcm-select-group.entry.js +1 -1
- package/dist/esm/bcm-select-option.entry.js +1 -1
- package/dist/esm/bcm-select.entry.js +5 -5
- package/dist/esm/bcm-skeleton.entry.js +10 -8
- package/dist/esm/bcm-step.entry.js +6 -5
- package/dist/esm/bcm-stepper.entry.js +40 -23
- package/dist/esm/bcm-switch.entry.js +8 -7
- package/dist/esm/bcm-tab-group.entry.js +156 -112
- package/dist/esm/bcm-tab-item-header.entry.js +83 -0
- package/dist/esm/bcm-tab-item.entry.js +100 -0
- package/dist/esm/bcm-tab-pane.entry.js +2 -2
- package/dist/esm/bcm-tab.entry.js +3 -3
- package/dist/esm/bcm-table.entry.js +2 -2
- package/dist/esm/bcm-tabs-content.entry.js +2 -2
- package/dist/esm/bcm-tabs.entry.js +2 -2
- package/dist/esm/bcm-tag.entry.js +7 -6
- package/dist/esm/bcm-text.entry.js +8 -7
- package/dist/esm/bcm-textarea.entry.js +10 -8
- package/dist/esm/bcm-time-picker.entry.js +5 -4
- package/dist/esm/bcm-timeline-item.entry.js +2 -2
- package/dist/esm/bcm-timeline.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +111 -0
- package/dist/esm/bcm-treeview-group.entry.js +1 -1
- package/dist/esm/bcm-typography.entry.js +31 -0
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{caption-template-ced0e2ef.js → caption-template-da16ba7b.js} +1 -1
- package/dist/esm/color-helper-e8ce23d7.js +84 -0
- package/dist/esm/{color-helper-cb1cfc1e.js → colors-44c95e7e.js} +4 -81
- package/dist/esm/{floating-ui-54c1f339.js → floating-ui-e7341329.js} +1 -1
- package/dist/esm/{generate-ffcc7e3a.js → generate-c1a5001c.js} +118 -16
- package/dist/esm/{index-85cce099.js → index-39133086.js} +1 -1
- package/dist/esm/{index-0f68d8f0.js → index-93e36fdb.js} +1 -1
- package/dist/esm/input-template-61daf88f.js +90 -0
- package/dist/esm/{is-load-decorator-87c09179.js → is-load-decorator-bc14ec4b.js} +1 -3
- package/dist/esm/{json-parse-decarator-64166384.js → json-parse-decarator-f6c2451e.js} +2 -2
- package/dist/esm/{label-template-4f474794.js → label-template-d74fe788.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{number-helper-8e72bacd.js → number-helper-72dfe745.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +10 -9
- package/dist/esm/old-bcm-popover.entry.js +5 -4
- package/dist/esm/{popover-placement-0e158c8b.js → popover-placement-78f86f15.js} +1 -1
- package/dist/esm/{slot-template-97e4665e.js → slot-template-5b2db362.js} +2 -2
- package/dist/esm/{stepper-states-96090572.js → stepper-states-7876bdf9.js} +3 -3
- package/dist/esm/{string-helper-8793366d.js → string-helper-6bd24967.js} +1 -1
- package/dist/esm/tooltip-helper-45e5fc94.js +147 -0
- package/dist/esm/{validators-c7341d67.js → validators-5197f61b.js} +1 -1
- package/dist/types/components/molecules/color-input/color-input.d.ts +20 -0
- package/dist/types/components/molecules/colorful/colorful.d.ts +8 -0
- package/dist/types/components/molecules/input/input.d.ts +4 -1
- package/dist/types/components/molecules/linked/linked.d.ts +10 -3
- package/dist/types/components/molecules/popover/popover.d.ts +12 -3
- package/dist/types/components/molecules/radio/{group.d.ts → radio-group.d.ts} +22 -27
- package/dist/types/components/molecules/radio/radio.d.ts +5 -11
- package/dist/types/components/molecules/search/search.d.ts +1 -0
- package/dist/types/components/molecules/skeleton/skeleton.d.ts +1 -1
- package/dist/types/components/molecules/states/search.states.d.ts +1 -1
- package/dist/types/components/molecules/stepper/stepper.d.ts +2 -2
- package/dist/types/components/molecules/tab-group/tab-group.d.ts +15 -6
- package/dist/types/components/molecules/tab-group/tab-item-header.d.ts +13 -0
- package/dist/types/components/molecules/tab-group/tab-item.d.ts +17 -0
- package/dist/types/components/molecules/textarea/textarea.d.ts +1 -1
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +13 -3
- package/dist/types/components/organism/list/list.d.ts +1 -0
- package/dist/types/components/other/input-custom/input-custom.d.ts +20 -0
- package/dist/types/components/other/modal-2/modal-2-footer.d.ts +7 -0
- package/dist/types/components/other/modal-2/modal-2-header.d.ts +7 -0
- package/dist/types/components/other/modal-2/modal-2.d.ts +33 -0
- package/dist/types/components/other/overlay/overlay.d.ts +8 -0
- package/dist/types/components/other/scroll-area/scroll-area.d.ts +7 -0
- package/dist/types/components/other/toast/toast.d.ts +25 -0
- package/dist/types/components.d.ts +339 -41
- package/dist/types/global/helper/index.d.ts +1 -0
- package/dist/types/global/helper/toast.d.ts +96 -0
- package/dist/types/helper/generate.d.ts +3 -0
- package/dist/types/helper/popover-helper.d.ts +13 -3
- package/dist/types/helper/tooltip-helper.d.ts +16 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/models/bcm.d.ts +2 -1
- package/dist/types/templates/input-template.d.ts +5 -3
- package/dist/types/templates/list-template.d.ts +1 -0
- package/helper/index.d.ts +2 -0
- package/helper/index.d.ts.map +1 -0
- package/helper/index.js +17 -0
- package/helper/toast.d.ts +97 -0
- package/helper/toast.d.ts.map +1 -0
- package/helper/toast.js +115 -0
- package/package.json +30 -19
- package/dist/bromcom-ui/p-0a9b2124.entry.js +0 -5
- package/dist/bromcom-ui/p-0e3e135f.entry.js +0 -5
- package/dist/bromcom-ui/p-0e77d1f3.entry.js +0 -5
- package/dist/bromcom-ui/p-0f9c9047.entry.js +0 -5
- package/dist/bromcom-ui/p-12da638d.entry.js +0 -5
- package/dist/bromcom-ui/p-14b1b4b2.entry.js +0 -5
- package/dist/bromcom-ui/p-1845582b.entry.js +0 -5
- package/dist/bromcom-ui/p-1c09af4f.js +0 -5
- package/dist/bromcom-ui/p-1de5af32.entry.js +0 -5
- package/dist/bromcom-ui/p-1f4d9b1f.entry.js +0 -5
- package/dist/bromcom-ui/p-231bff46.entry.js +0 -5
- package/dist/bromcom-ui/p-251629c7.entry.js +0 -5
- package/dist/bromcom-ui/p-38dc893a.entry.js +0 -5
- package/dist/bromcom-ui/p-3edd3360.js +0 -5
- package/dist/bromcom-ui/p-400ec1f7.entry.js +0 -5
- package/dist/bromcom-ui/p-4067c2e0.entry.js +0 -5
- package/dist/bromcom-ui/p-421cd232.js +0 -5
- package/dist/bromcom-ui/p-4260a393.entry.js +0 -5
- package/dist/bromcom-ui/p-44236a8b.entry.js +0 -5
- package/dist/bromcom-ui/p-46a546fb.entry.js +0 -5
- package/dist/bromcom-ui/p-4a9005ec.entry.js +0 -5
- package/dist/bromcom-ui/p-529c955c.js +0 -5
- package/dist/bromcom-ui/p-5546b28e.entry.js +0 -5
- package/dist/bromcom-ui/p-596611eb.entry.js +0 -5
- package/dist/bromcom-ui/p-63f90701.entry.js +0 -5
- package/dist/bromcom-ui/p-65c4ae21.entry.js +0 -5
- package/dist/bromcom-ui/p-685b892c.js +0 -5
- package/dist/bromcom-ui/p-6b748546.entry.js +0 -5
- package/dist/bromcom-ui/p-724f5a0b.entry.js +0 -5
- package/dist/bromcom-ui/p-78d82111.js +0 -5
- package/dist/bromcom-ui/p-7d3ed6cb.entry.js +0 -5
- package/dist/bromcom-ui/p-7dabd101.entry.js +0 -5
- package/dist/bromcom-ui/p-81b62ce8.entry.js +0 -5
- package/dist/bromcom-ui/p-88062515.entry.js +0 -5
- package/dist/bromcom-ui/p-961cab35.entry.js +0 -5
- package/dist/bromcom-ui/p-9aa699c1.entry.js +0 -5
- package/dist/bromcom-ui/p-9f95f24f.entry.js +0 -5
- package/dist/bromcom-ui/p-a051162a.entry.js +0 -5
- package/dist/bromcom-ui/p-a35fc9d4.entry.js +0 -5
- package/dist/bromcom-ui/p-b4a3871f.entry.js +0 -5
- package/dist/bromcom-ui/p-bb7760d7.entry.js +0 -5
- package/dist/bromcom-ui/p-bdeb220d.entry.js +0 -5
- package/dist/bromcom-ui/p-c09a1784.entry.js +0 -5
- package/dist/bromcom-ui/p-c0ba4ab5.entry.js +0 -5
- package/dist/bromcom-ui/p-c12555c7.entry.js +0 -5
- package/dist/bromcom-ui/p-c7bfb126.js +0 -5
- package/dist/bromcom-ui/p-d0bfb53b.entry.js +0 -5
- package/dist/bromcom-ui/p-d68d4ce0.entry.js +0 -5
- package/dist/bromcom-ui/p-d7f06284.entry.js +0 -5
- package/dist/bromcom-ui/p-dd1c6c24.entry.js +0 -5
- package/dist/bromcom-ui/p-e1a323b8.entry.js +0 -5
- package/dist/bromcom-ui/p-e5724ed4.entry.js +0 -5
- package/dist/bromcom-ui/p-e5fee9dc.entry.js +0 -5
- package/dist/bromcom-ui/p-e8359a46.entry.js +0 -5
- package/dist/bromcom-ui/p-e8436609.entry.js +0 -5
- package/dist/bromcom-ui/p-eb0ab3d9.entry.js +0 -5
- package/dist/bromcom-ui/p-f8864d6e.entry.js +0 -5
- package/dist/bromcom-ui/p-f8b43cb2.entry.js +0 -5
- package/dist/bromcom-ui/p-f8eb60b6.entry.js +0 -5
- package/dist/bromcom-ui/p-ffdc7a09.entry.js +0 -5
- package/dist/cjs/bcm-button.cjs.entry.js +0 -384
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -415
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -205
- package/dist/cjs/bcm-form.cjs.entry.js +0 -487
- package/dist/cjs/bcm-icon.cjs.entry.js +0 -41
- package/dist/cjs/bcm-label_2.cjs.entry.js +0 -122
- package/dist/cjs/bcm-linked_2.cjs.entry.js +0 -308
- package/dist/cjs/input-template-657a8fc1.js +0 -86
- package/dist/cjs/tooltip-helper-6c8bfde7.js +0 -105
- package/dist/collection/components/molecules/radio/group.css +0 -798
- package/dist/collection/components/molecules/radio/radio.css +0 -1280
- package/dist/collection/components/molecules/radio/types.js +0 -30
- package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
- package/dist/esm/bcm-button.entry.js +0 -380
- package/dist/esm/bcm-checkbox-group.entry.js +0 -411
- package/dist/esm/bcm-checkbox_2.entry.js +0 -200
- package/dist/esm/bcm-form.entry.js +0 -483
- package/dist/esm/bcm-icon.entry.js +0 -37
- package/dist/esm/bcm-label_2.entry.js +0 -117
- package/dist/esm/bcm-linked_2.entry.js +0 -303
- package/dist/esm/input-template-7aaafa99.js +0 -84
- package/dist/esm/tooltip-helper-f58d482d.js +0 -103
- package/dist/types/components/molecules/radio/types.d.ts +0 -29
- package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
- /package/dist/bromcom-ui/{p-5fd7a8b6.js → p-2e73d572.js} +0 -0
- /package/dist/cjs/{types-6eb7e028.js → types-7523fd99.js} +0 -0
- /package/dist/collection/components/{atoms → other}/box/box.js +0 -0
- /package/dist/collection/components/{atoms → other}/typography/typography.js +0 -0
- /package/dist/collection/components/{organism → other_deprecated}/colorpicker/colorpicker.css +0 -0
- /package/dist/collection/components/{organism → other_deprecated}/colorpicker/colorpicker.js +0 -0
- /package/dist/collection/components/{organism → other_deprecated}/colorpicker/static/chess.png +0 -0
- /package/dist/collection/components/{organism → other_deprecated}/colorpicker/static/color.svg +0 -0
- /package/dist/collection/components/{organism → other_deprecated}/colorpicker/static/colors.svg +0 -0
- /package/dist/collection/components/{atoms → other_deprecated}/tag/tag.js +0 -0
- /package/dist/collection/components/{atoms → other_deprecated}/tag/types.js +0 -0
- /package/dist/esm/{types-bfc3bba1.js → types-9493a7ed.js} +0 -0
- /package/dist/types/components/{atoms → other}/box/box.d.ts +0 -0
- /package/dist/types/components/{atoms → other}/typography/typography.d.ts +0 -0
- /package/dist/types/components/{organism → other_deprecated}/colorpicker/colorpicker.d.ts +0 -0
- /package/dist/types/components/{atoms → other_deprecated}/tag/tag.d.ts +0 -0
- /package/dist/types/components/{atoms → other_deprecated}/tag/types.d.ts +0 -0
|
@@ -0,0 +1,1570 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
+
|
|
9
|
+
const index$1 = require('./index-ddfd6d8f.js');
|
|
10
|
+
const generate = require('./generate-d32dfcf9.js');
|
|
11
|
+
const bcm = require('./bcm-634604e3.js');
|
|
12
|
+
const index$2 = require('./index-fdbf5226.js');
|
|
13
|
+
const index = require('./index-4506fcd7.js');
|
|
14
|
+
const slotTemplate = require('./slot-template-3e59d7d8.js');
|
|
15
|
+
const colorHelper = require('./color-helper-d6d2028b.js');
|
|
16
|
+
const isLoadDecorator = require('./is-load-decorator-137dded1.js');
|
|
17
|
+
const captionTemplate = require('./caption-template-8d099fd6.js');
|
|
18
|
+
const utils = require('./utils-fc077139.js');
|
|
19
|
+
const labelTemplate = require('./label-template-cc69bc21.js');
|
|
20
|
+
const stringHelper = require('./string-helper-45cffee0.js');
|
|
21
|
+
require('./datetime-helper-eaf4fadb.js');
|
|
22
|
+
require('./number-helper-8286f839.js');
|
|
23
|
+
require('./validators-53bfb47b.js');
|
|
24
|
+
const tooltipHelper = require('./tooltip-helper-ce53d70b.js');
|
|
25
|
+
require('./element-dragger-a8562f82.js');
|
|
26
|
+
require('./colors-e1d142ad.js');
|
|
27
|
+
require('./_commonjsHelpers-bd20f4c0.js');
|
|
28
|
+
require('./colors-56282b00.js');
|
|
29
|
+
require('./floating-ui-74eb26d6.js');
|
|
30
|
+
|
|
31
|
+
const variantOptions = {
|
|
32
|
+
save: {
|
|
33
|
+
text: 'Save',
|
|
34
|
+
color: 'emerald',
|
|
35
|
+
icon: 'far fa-save',
|
|
36
|
+
iconPosition: 'prefix',
|
|
37
|
+
},
|
|
38
|
+
ok: {
|
|
39
|
+
text: 'Ok',
|
|
40
|
+
color: 'emerald',
|
|
41
|
+
icon: 'far fa-check',
|
|
42
|
+
iconPosition: 'prefix',
|
|
43
|
+
},
|
|
44
|
+
new: {
|
|
45
|
+
text: 'New',
|
|
46
|
+
color: 'emerald',
|
|
47
|
+
icon: 'far fa-plus',
|
|
48
|
+
iconPosition: 'prefix',
|
|
49
|
+
},
|
|
50
|
+
add: {
|
|
51
|
+
text: 'Add',
|
|
52
|
+
color: 'emerald',
|
|
53
|
+
icon: 'far fa-plus',
|
|
54
|
+
iconPosition: 'prefix',
|
|
55
|
+
},
|
|
56
|
+
create: {
|
|
57
|
+
text: 'Create',
|
|
58
|
+
color: 'emerald',
|
|
59
|
+
icon: 'far fa-plus',
|
|
60
|
+
iconPosition: 'prefix',
|
|
61
|
+
},
|
|
62
|
+
prev: {
|
|
63
|
+
text: 'Prev',
|
|
64
|
+
color: '',
|
|
65
|
+
icon: 'far fa-arrow-left',
|
|
66
|
+
iconPosition: 'prefix',
|
|
67
|
+
},
|
|
68
|
+
next: {
|
|
69
|
+
text: 'Next',
|
|
70
|
+
color: '',
|
|
71
|
+
icon: 'far fa-arrow-right',
|
|
72
|
+
iconPosition: 'suffix',
|
|
73
|
+
},
|
|
74
|
+
apply: {
|
|
75
|
+
text: 'Apply',
|
|
76
|
+
color: '',
|
|
77
|
+
icon: 'far fa-check-circle',
|
|
78
|
+
iconPosition: 'prefix',
|
|
79
|
+
},
|
|
80
|
+
submit: {
|
|
81
|
+
text: 'Submit',
|
|
82
|
+
color: '',
|
|
83
|
+
icon: 'far fa-save',
|
|
84
|
+
iconPosition: 'prefix',
|
|
85
|
+
},
|
|
86
|
+
send: {
|
|
87
|
+
text: 'Send',
|
|
88
|
+
color: 'emerald',
|
|
89
|
+
icon: 'far fa-paper-plane',
|
|
90
|
+
iconPosition: 'prefix',
|
|
91
|
+
},
|
|
92
|
+
delete: {
|
|
93
|
+
text: 'Delete',
|
|
94
|
+
color: 'red',
|
|
95
|
+
icon: 'far fa-trash',
|
|
96
|
+
iconPosition: 'prefix',
|
|
97
|
+
},
|
|
98
|
+
cancel: {
|
|
99
|
+
text: 'Cancel',
|
|
100
|
+
color: 'red',
|
|
101
|
+
icon: 'far fa-times',
|
|
102
|
+
iconPosition: 'prefix',
|
|
103
|
+
},
|
|
104
|
+
decline: {
|
|
105
|
+
text: 'Decline',
|
|
106
|
+
color: 'red',
|
|
107
|
+
icon: 'far fa-ban',
|
|
108
|
+
iconPosition: 'prefix',
|
|
109
|
+
},
|
|
110
|
+
close: {
|
|
111
|
+
text: 'Close',
|
|
112
|
+
color: 'red',
|
|
113
|
+
icon: 'far fa-times-circle',
|
|
114
|
+
iconPosition: 'prefix',
|
|
115
|
+
},
|
|
116
|
+
archive: {
|
|
117
|
+
text: 'Archive',
|
|
118
|
+
color: 'red',
|
|
119
|
+
icon: 'far fa-folder-open',
|
|
120
|
+
iconPosition: 'prefix',
|
|
121
|
+
},
|
|
122
|
+
remove: {
|
|
123
|
+
text: 'Remove',
|
|
124
|
+
color: 'red',
|
|
125
|
+
icon: 'far fa-minus-circle',
|
|
126
|
+
iconPosition: 'prefix',
|
|
127
|
+
},
|
|
128
|
+
edit: {
|
|
129
|
+
text: 'Edit',
|
|
130
|
+
color: '',
|
|
131
|
+
icon: 'far fa-edit',
|
|
132
|
+
iconPosition: 'prefix',
|
|
133
|
+
},
|
|
134
|
+
export: {
|
|
135
|
+
text: 'Export',
|
|
136
|
+
color: '',
|
|
137
|
+
icon: 'far fa-sign-out',
|
|
138
|
+
iconPosition: 'prefix',
|
|
139
|
+
},
|
|
140
|
+
import: {
|
|
141
|
+
text: 'Import',
|
|
142
|
+
color: '',
|
|
143
|
+
icon: 'far fa-sign-in',
|
|
144
|
+
iconPosition: 'prefix',
|
|
145
|
+
},
|
|
146
|
+
filter: {
|
|
147
|
+
text: 'Filter',
|
|
148
|
+
color: '',
|
|
149
|
+
icon: 'far fa-filter',
|
|
150
|
+
iconPosition: 'prefix',
|
|
151
|
+
},
|
|
152
|
+
update: {
|
|
153
|
+
text: 'Update',
|
|
154
|
+
color: '',
|
|
155
|
+
icon: 'far fa-sync',
|
|
156
|
+
iconPosition: 'prefix',
|
|
157
|
+
},
|
|
158
|
+
reset: {
|
|
159
|
+
text: "Reset",
|
|
160
|
+
color: "",
|
|
161
|
+
icon: 'far fa-sync',
|
|
162
|
+
iconPosition: "prefix",
|
|
163
|
+
},
|
|
164
|
+
download: {
|
|
165
|
+
text: 'Download',
|
|
166
|
+
color: '',
|
|
167
|
+
icon: 'far fa-download',
|
|
168
|
+
iconPosition: 'prefix',
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
var VariantProps;
|
|
172
|
+
(function (VariantProps) {
|
|
173
|
+
VariantProps["save"] = "save";
|
|
174
|
+
VariantProps["submit"] = "submit";
|
|
175
|
+
VariantProps["ok"] = "ok";
|
|
176
|
+
VariantProps["new"] = "new";
|
|
177
|
+
VariantProps["add"] = "add";
|
|
178
|
+
VariantProps["create"] = "create";
|
|
179
|
+
VariantProps["apply"] = "apply";
|
|
180
|
+
VariantProps["prev"] = "prev";
|
|
181
|
+
VariantProps["next"] = "next";
|
|
182
|
+
VariantProps["send"] = "send";
|
|
183
|
+
VariantProps["delete"] = "delete";
|
|
184
|
+
VariantProps["cancel"] = "cancel";
|
|
185
|
+
VariantProps["decline"] = "decline";
|
|
186
|
+
VariantProps["close"] = "close";
|
|
187
|
+
VariantProps["archive"] = "archive";
|
|
188
|
+
VariantProps["remove"] = "remove";
|
|
189
|
+
VariantProps["edit"] = "edit";
|
|
190
|
+
VariantProps["export"] = "export";
|
|
191
|
+
VariantProps["import"] = "import";
|
|
192
|
+
VariantProps["filter"] = "filter";
|
|
193
|
+
VariantProps["update"] = "update";
|
|
194
|
+
VariantProps["reset"] = "Reset";
|
|
195
|
+
VariantProps["download"] = "download";
|
|
196
|
+
})(VariantProps || (VariantProps = {}));
|
|
197
|
+
|
|
198
|
+
const { state: state$1 } = index.createStore({
|
|
199
|
+
value: new Map(),
|
|
200
|
+
setData: {},
|
|
201
|
+
removeData: {}
|
|
202
|
+
});
|
|
203
|
+
const setValue$1 = (val) => {
|
|
204
|
+
const data = Object.assign(Object.assign({}, val), (variantOptions[val.variant] && {
|
|
205
|
+
icon: variantOptions[val.variant].icon,
|
|
206
|
+
value: variantOptions[val.variant].text,
|
|
207
|
+
iconPosition: bcm.Bcm.IconPosition[variantOptions[val.variant].iconPosition],
|
|
208
|
+
variantColor: variantOptions[val.variant].color
|
|
209
|
+
}));
|
|
210
|
+
state$1.value.set(data.id, data);
|
|
211
|
+
};
|
|
212
|
+
const removeValue = (_id) => {
|
|
213
|
+
state$1.value.delete(_id);
|
|
214
|
+
};
|
|
215
|
+
const getValue$1 = (id) => generate.snq(() => state$1.value.get(id), {});
|
|
216
|
+
const buttonState = {
|
|
217
|
+
setValue: setValue$1,
|
|
218
|
+
removeValue,
|
|
219
|
+
getValue: getValue$1
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const ButtonTemplate = ({ value, type, componentClass, disabled, href, target, loading, isIconOnly, icon, iconPosition, id }) => {
|
|
223
|
+
const ButtonTagType = (href) ? bcm.Bcm.HtmlElementType.a : bcm.Bcm.HtmlElementType.button;
|
|
224
|
+
return (index$1.h(ButtonTagType, Object.assign({ id: id }, (type == bcm.Bcm.HtmlElementType.button && { type }), { class: componentClass, disabled: disabled, href: href, target: target, tabindex: "0" }),
|
|
225
|
+
index$1.h("span", { hidden: true },
|
|
226
|
+
index$1.h("slot", null)),
|
|
227
|
+
loading && index$1.h("span", { class: "bcm-button__container-loading" },
|
|
228
|
+
" ",
|
|
229
|
+
index$1.h("span", { class: "bcm-button__container-icon" },
|
|
230
|
+
index$1.h("i", { class: "far fa-spinner-third fa-spin" }),
|
|
231
|
+
" ")),
|
|
232
|
+
icon && index$1.h("span", { class: `${iconPosition} bcm-button__container-icon` },
|
|
233
|
+
index$1.h("i", { class: `${icon}` })),
|
|
234
|
+
!isIconOnly && (index$1.h(slotTemplate.SlotTemplate, { className: "bcm-button__container-text", value: value })),
|
|
235
|
+
index$1.h("slot", { name: "suffix" })));
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const buttonCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-button{display:inline-flex;width:fit-content;height:fit-content;--bcm-button-solid-color-default:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-border-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-color-hover:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-border-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-border-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-color-active:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-border-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-color-disabled:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-solid-border-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-default:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-default:var(--bcm-new-ds-color-slate-100);--bcm-button-ghost-border-default:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-color-hover:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-hover:var(--bcm-new-ds-color-slate-200);--bcm-button-ghost-border-hover:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-focus-visible:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-border-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-color-active:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-active:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-border-active:var(--bcm-new-ds-color-slate-500);--bcm-button-ghost-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-background-color-disabled:var(--bcm-new-ds-color-slate-50);--bcm-button-ghost-border-disabled:var(--bcm-new-ds-color-slate-200);--bcm-button-link-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-link-background-color-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-link-background-color-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-link-background-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-link-background-color-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-link-background-color-disabled:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-disabled:var(--bcm-new-ds-color-transparent)}.bcm-button.full-width{width:100%}.bcm-button.full-width .bcm-button__container{width:100%}.bcm-button:after,.bcm-button:before{content:\"\";clear:both}.bcm-button__container{border:none;color:inherit;background-color:inherit;padding:0;margin:0;font:inherit;cursor:pointer;outline:none;text-decoration:none;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:4px 12px;outline:none;border-radius:4px;transition:background-color 0.1s ease-in-out;position:relative;min-width:40px;border-width:1px;border-style:solid;border-color:initial}.bcm-button__container:hover,.bcm-button__container:focus,.bcm-button__container:active{outline:none;text-decoration:none}.bcm-button__container-loading{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:4px;display:flex;align-items:center;justify-content:center}.bcm-button__container-kind-solid{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-solid:hover{color:var(--bcm-button-solid-color-hover);background-color:var(--bcm-button-solid-background-color-hover);border-color:var(--bcm-button-solid-border-hover)}.bcm-button__container-kind-solid:focus-visible{color:var(--bcm-button-solid-color-focus-visible);background-color:var(--bcm-button-solid-background-color-focus-visible);border-color:var(--bcm-button-solid-border-focus-visible)}.bcm-button__container-kind-solid:active{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid:disabled{color:var(--bcm-button-solid-color-disabled);background-color:var(--bcm-button-solid-background-color-disabled);border-color:var(--bcm-button-solid-border-disabled)}.bcm-button__container-kind-solid.checked{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid.disabled{color:var(--bcm-button-solid-color-disabled);background-color:var(--bcm-button-solid-background-color-disabled);border-color:var(--bcm-button-solid-border-disabled)}.bcm-button__container-kind-solid .bcm-button__container-loading{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-ghost{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-ghost:not([disabled]) .bcm-icon{color:var(--bcm-new-ds-color-slate-500)}.bcm-button__container-kind-ghost:hover{color:var(--bcm-button-ghost-color-hover);background-color:var(--bcm-button-ghost-background-color-hover);border-color:var(--bcm-button-ghost-border-hover)}.bcm-button__container-kind-ghost:focus-visible{color:var(--bcm-button-ghost-color-focus-visible);background-color:var(--bcm-button-ghost-background-color-focus-visible);border-color:var(--bcm-button-ghost-border-focus-visible)}.bcm-button__container-kind-ghost:active{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost:disabled{color:var(--bcm-button-ghost-color-disabled);background-color:var(--bcm-button-ghost-background-color-disabled);border-color:var(--bcm-button-ghost-border-disabled)}.bcm-button__container-kind-ghost.checked{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost.disabled{color:var(--bcm-button-ghost-color-disabled);background-color:var(--bcm-button-ghost-background-color-disabled);border-color:var(--bcm-button-ghost-border-disabled)}.bcm-button__container-kind-ghost .bcm-button__container-loading{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-link{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container-kind-link:hover{color:var(--bcm-button-link-color-hover);background-color:var(--bcm-button-link-background-color-hover);border-color:var(--bcm-button-link-border-hover)}.bcm-button__container-kind-link:focus-visible{color:var(--bcm-button-link-color-focus-visible);background-color:var(--bcm-button-link-background-color-focus-visible);border-color:var(--bcm-button-link-border-focus-visible)}.bcm-button__container-kind-link:active{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link:disabled{color:var(--bcm-button-link-color-disabled);background-color:var(--bcm-button-link-background-color-disabled);border-color:var(--bcm-button-link-border-disabled)}.bcm-button__container-kind-link.checked{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link.disabled{color:var(--bcm-button-link-color-disabled);background-color:var(--bcm-button-link-background-color-disabled);border-color:var(--bcm-button-link-border-disabled)}.bcm-button__container-kind-link .bcm-button__container-loading{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container[disabled]{cursor:not-allowed}.bcm-button__container-text{order:3;display:flex;align-items:center;gap:8px;white-space:nowrap}.bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-icon.prefix{order:2}.bcm-button__container-icon.suffix{order:4}.bcm-button__container-size-small{font-size:12px;line-height:calc(12px + 8px);padding:calc(4px - 3px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px - 2px)) * 2)}.bcm-button__container-size-small .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-medium{font-size:calc(12px + 1px);line-height:calc(12px + 8px);padding:calc(4px + 1px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px + 2px)) * 2)}.bcm-button__container-size-medium .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-large{font-size:16px;line-height:calc(16px + 8px);padding:calc(8px - 1px) 12px;min-height:calc(calc(16px + 8px) + (calc(8px) * 2))}.bcm-button__container-size-large .bcm-button__container-icon{min-height:calc(16px + 8px)}";
|
|
239
|
+
|
|
240
|
+
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
241
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
242
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
243
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
244
|
+
else
|
|
245
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
246
|
+
if (d = decorators[i])
|
|
247
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
248
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
249
|
+
};
|
|
250
|
+
const BcmButton = class {
|
|
251
|
+
constructor(hostRef) {
|
|
252
|
+
index$1.registerInstance(this, hostRef);
|
|
253
|
+
this.bcmClick = index$1.createEvent(this, "bcm-click", 7);
|
|
254
|
+
this._id = generate.Generate.UID();
|
|
255
|
+
this.hidden = false;
|
|
256
|
+
this.type = bcm.Bcm.ButtonType.button;
|
|
257
|
+
this.size = bcm.Bcm.Size.medium;
|
|
258
|
+
this.disabled = false;
|
|
259
|
+
this.kind = bcm.Bcm.Kind.solid;
|
|
260
|
+
this.outline = false;
|
|
261
|
+
this.icon = undefined;
|
|
262
|
+
this.href = undefined;
|
|
263
|
+
this.target = undefined;
|
|
264
|
+
this.value = undefined;
|
|
265
|
+
this.loading = false;
|
|
266
|
+
this.variant = undefined;
|
|
267
|
+
this.dataDismiss = false;
|
|
268
|
+
this.fullWidth = false;
|
|
269
|
+
this.iconPosition = bcm.Bcm.IconPosition.prefix;
|
|
270
|
+
this.color = undefined;
|
|
271
|
+
this.checked = false;
|
|
272
|
+
}
|
|
273
|
+
handleOnClick(e) {
|
|
274
|
+
if (this.disabled) {
|
|
275
|
+
e.preventDefault();
|
|
276
|
+
e.stopPropagation();
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
componentWillRender() {
|
|
281
|
+
const { size, kind, icon, iconPosition, disabled, outline, href, type, target, loading, variant, fullWidth, hidden, value } = this;
|
|
282
|
+
buttonState.setValue({
|
|
283
|
+
id: this._id,
|
|
284
|
+
size,
|
|
285
|
+
type,
|
|
286
|
+
kind,
|
|
287
|
+
icon,
|
|
288
|
+
iconPosition,
|
|
289
|
+
disabled,
|
|
290
|
+
outline,
|
|
291
|
+
href,
|
|
292
|
+
target,
|
|
293
|
+
loading,
|
|
294
|
+
variant,
|
|
295
|
+
fullWidth,
|
|
296
|
+
hidden,
|
|
297
|
+
value,
|
|
298
|
+
isIconOnly: !!(this.isHaveChildNodes() && this.icon),
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
getStateData() {
|
|
302
|
+
return buttonState.getValue(this._id);
|
|
303
|
+
}
|
|
304
|
+
isHaveChildNodes() {
|
|
305
|
+
const childNodes = Array.from(this.el.childNodes);
|
|
306
|
+
return childNodes.find(node => node.nodeType === Node.TEXT_NODE) === undefined;
|
|
307
|
+
}
|
|
308
|
+
setColor(color = this.color) {
|
|
309
|
+
if (!color)
|
|
310
|
+
return;
|
|
311
|
+
const { kind } = this;
|
|
312
|
+
const prefix = `--bcm-button-${kind}`;
|
|
313
|
+
if (kind === 'solid') {
|
|
314
|
+
return {
|
|
315
|
+
[`${prefix}-color-default`]: colorHelper.ColorHelper.dsColor('white'),
|
|
316
|
+
[`${prefix}-color-hover`]: colorHelper.ColorHelper.dsColor('white'),
|
|
317
|
+
[`${prefix}-color-focus-visible`]: colorHelper.ColorHelper.dsColor('white'),
|
|
318
|
+
[`${prefix}-color-active`]: colorHelper.ColorHelper.dsColor('white'),
|
|
319
|
+
[`${prefix}-color-disabled`]: colorHelper.ColorHelper.dsColor('white'),
|
|
320
|
+
[`${prefix}-background-color-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
321
|
+
[`${prefix}-background-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
322
|
+
[`${prefix}-background-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
323
|
+
[`${prefix}-background-color-active`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
324
|
+
[`${prefix}-background-color-disabled`]: colorHelper.ColorHelper.dsColor('slate-400'),
|
|
325
|
+
[`${prefix}-border-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
326
|
+
[`${prefix}-border-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
327
|
+
[`${prefix}-border-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
328
|
+
[`${prefix}-border-active`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
329
|
+
[`${prefix}-border-disabled`]: colorHelper.ColorHelper.dsColor('slate-400')
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
else if (kind == 'link') {
|
|
333
|
+
return {
|
|
334
|
+
[`${prefix}-color-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
335
|
+
[`${prefix}-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
336
|
+
[`${prefix}-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
337
|
+
[`${prefix}-color-active`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
338
|
+
[`${prefix}-color-disabled`]: colorHelper.ColorHelper.dsColor('slate-400'),
|
|
339
|
+
[`${prefix}-background-color-default`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
340
|
+
[`${prefix}-background-color-hover`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
341
|
+
[`${prefix}-background-color-focus-visible`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
342
|
+
[`${prefix}-background-color-active`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
343
|
+
[`${prefix}-background-color-disabled`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
344
|
+
[`${prefix}-border-default`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
345
|
+
[`${prefix}-border-hover`]: colorHelper.ColorHelper.dsColor('transparent'),
|
|
346
|
+
[`${prefix}-border-focus-visible`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
347
|
+
[`${prefix}-border-active`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
348
|
+
[`${prefix}-border-disabled`]: colorHelper.ColorHelper.dsColor('transparent')
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
else if (kind == 'ghost') {
|
|
352
|
+
return {
|
|
353
|
+
[`${prefix}-color-default`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
354
|
+
[`${prefix}-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
355
|
+
[`${prefix}-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
356
|
+
[`${prefix}-color-active`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
357
|
+
[`${prefix}-color-disabled`]: colorHelper.ColorHelper.dsColor(color + '-300'),
|
|
358
|
+
[`${prefix}-background-color-default`]: colorHelper.ColorHelper.dsColor(color + '-100'),
|
|
359
|
+
[`${prefix}-background-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-200'),
|
|
360
|
+
[`${prefix}-background-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-400'),
|
|
361
|
+
[`${prefix}-background-color-active`]: colorHelper.ColorHelper.dsColor(color + '-300'),
|
|
362
|
+
[`${prefix}-background-color-disabled`]: colorHelper.ColorHelper.dsColor(color + '-50'),
|
|
363
|
+
[`${prefix}-border-default`]: colorHelper.ColorHelper.dsColor(color + '-300'),
|
|
364
|
+
[`${prefix}-border-hover`]: colorHelper.ColorHelper.dsColor(color + '-400'),
|
|
365
|
+
[`${prefix}-border-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
366
|
+
[`${prefix}-border-active`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
367
|
+
[`${prefix}-border-disabled`]: colorHelper.ColorHelper.dsColor(color + '-200'),
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
render() {
|
|
373
|
+
const { size, kind, disabled, outline, type, href, target, loading, variantColor, fullWidth, hidden, icon, iconPosition, value, isIconOnly, iconSize } = this.getStateData();
|
|
374
|
+
const classPrefix = 'bcm-button';
|
|
375
|
+
let componentClass = index$2.classnames('bcm-button__container', `bcm-button__container-size-${size}`, `bcm-button__container-kind-${outline ? 'ghost' : kind}`, {
|
|
376
|
+
'full-width': fullWidth,
|
|
377
|
+
'checked': this.checked,
|
|
378
|
+
'disabled': disabled,
|
|
379
|
+
});
|
|
380
|
+
const hostClasses = index$2.classnames(`${classPrefix}`, {
|
|
381
|
+
hidden,
|
|
382
|
+
'full-width': fullWidth,
|
|
383
|
+
});
|
|
384
|
+
return (index$1.h(index$1.Host, { class: hostClasses, style: this.setColor(variantColor), onClick: () => !disabled && this.bcmClick.emit(this.el) }, index$1.h(ButtonTemplate, { type: type, value: value, componentClass: componentClass, disabled: disabled, href: href, target: target, icon: icon, loading: loading, iconSize: iconSize, isIconOnly: isIconOnly, iconPosition: iconPosition })));
|
|
385
|
+
}
|
|
386
|
+
get el() { return index$1.getElement(this); }
|
|
387
|
+
};
|
|
388
|
+
__decorate$6([
|
|
389
|
+
isLoadDecorator.IsLoad()
|
|
390
|
+
], BcmButton.prototype, "el", void 0);
|
|
391
|
+
BcmButton.style = buttonCss;
|
|
392
|
+
|
|
393
|
+
const checkboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:\"\";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}";
|
|
394
|
+
|
|
395
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
396
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
397
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
398
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
399
|
+
else
|
|
400
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
401
|
+
if (d = decorators[i])
|
|
402
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
403
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
404
|
+
};
|
|
405
|
+
const BcmCheckbox = class {
|
|
406
|
+
constructor(hostRef) {
|
|
407
|
+
index$1.registerInstance(this, hostRef);
|
|
408
|
+
this.blur = index$1.createEvent(this, "bcm-blur", 7);
|
|
409
|
+
this.focus = index$1.createEvent(this, "bcm-focus", 7);
|
|
410
|
+
this.change = index$1.createEvent(this, "bcm-change", 7);
|
|
411
|
+
this.changeCheckbox = index$1.createEvent(this, "bcm-change-checkbox", 7);
|
|
412
|
+
this._id = generate.Generate.UID();
|
|
413
|
+
this.inGroup = false;
|
|
414
|
+
this.value = false;
|
|
415
|
+
this.checked = false;
|
|
416
|
+
this.name = undefined;
|
|
417
|
+
this.disabled = false;
|
|
418
|
+
this.hidden = false;
|
|
419
|
+
this.required = false;
|
|
420
|
+
this.label = undefined;
|
|
421
|
+
this.readonly = false;
|
|
422
|
+
this.size = bcm.Bcm.Size.medium;
|
|
423
|
+
this.indeterminate = null;
|
|
424
|
+
this.color = "blue";
|
|
425
|
+
this.caption = undefined;
|
|
426
|
+
this.noCaption = false;
|
|
427
|
+
this.captionError = undefined;
|
|
428
|
+
this.captionType = bcm.Bcm.Status.default;
|
|
429
|
+
this.captionCache = undefined;
|
|
430
|
+
this.captionTypeCache = undefined;
|
|
431
|
+
}
|
|
432
|
+
connectedCallback() {
|
|
433
|
+
this.captionCache = this.caption;
|
|
434
|
+
this.captionTypeCache = this.captionType;
|
|
435
|
+
this.value = this.checked;
|
|
436
|
+
}
|
|
437
|
+
componentDidRender() {
|
|
438
|
+
this.inputElement.checked = this.checked;
|
|
439
|
+
}
|
|
440
|
+
async onBcmFocus() {
|
|
441
|
+
this.el.focus();
|
|
442
|
+
}
|
|
443
|
+
async onBcmBlur() {
|
|
444
|
+
this.el.blur();
|
|
445
|
+
}
|
|
446
|
+
async setClear() {
|
|
447
|
+
this.check(false);
|
|
448
|
+
this.handleChange();
|
|
449
|
+
await utils.delay(10);
|
|
450
|
+
return Promise.resolve();
|
|
451
|
+
}
|
|
452
|
+
async resetCaption() {
|
|
453
|
+
await utils.delay(10);
|
|
454
|
+
this.caption = this.captionCache;
|
|
455
|
+
this.captionType = this.captionTypeCache;
|
|
456
|
+
this.captionError = null;
|
|
457
|
+
await utils.delay(10);
|
|
458
|
+
return Promise.resolve();
|
|
459
|
+
}
|
|
460
|
+
handleChange() {
|
|
461
|
+
this.checked = this.inputElement.checked;
|
|
462
|
+
this.value = this.checked;
|
|
463
|
+
if (!this.indeterminate) {
|
|
464
|
+
this.changeCheckbox.emit();
|
|
465
|
+
this.change.emit({
|
|
466
|
+
name: this.name,
|
|
467
|
+
value: this.checked
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
watchIndeterminate(newValue, oldValue) {
|
|
472
|
+
if (newValue != oldValue) {
|
|
473
|
+
this.inputElement.checked = this.indeterminate == bcm.Bcm.IndeterminateType.determinate ? true : false;
|
|
474
|
+
this.handleChange();
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
async set(data) {
|
|
478
|
+
if (typeof data === 'boolean') {
|
|
479
|
+
await this.check(data);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
async get() {
|
|
483
|
+
return this.checked || false;
|
|
484
|
+
}
|
|
485
|
+
async check(uncheck = true) {
|
|
486
|
+
this.inputElement.checked = uncheck;
|
|
487
|
+
this.handleChange();
|
|
488
|
+
}
|
|
489
|
+
handleKeyUp(ev) {
|
|
490
|
+
if (ev.keyCode == bcm.Bcm.KeyCode.space || ev.keyCode == bcm.Bcm.KeyCode.enter) {
|
|
491
|
+
if (!this.disabled && !this.readonly) {
|
|
492
|
+
this.inputElement.checked = !this.inputElement.checked;
|
|
493
|
+
this.handleChange();
|
|
494
|
+
}
|
|
495
|
+
ev.stopPropagation();
|
|
496
|
+
ev.preventDefault();
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
watchChecked() {
|
|
501
|
+
if (this.checked) {
|
|
502
|
+
this.resetCaption();
|
|
503
|
+
}
|
|
504
|
+
this.value = this.checked;
|
|
505
|
+
}
|
|
506
|
+
setColor(color = this.color) {
|
|
507
|
+
if (!color)
|
|
508
|
+
return;
|
|
509
|
+
const prefix = `--bcm-checkbox`;
|
|
510
|
+
return {
|
|
511
|
+
[`${prefix}-primary-color-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
512
|
+
[`${prefix}-primary-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
513
|
+
[`${prefix}-primary-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
514
|
+
[`${prefix}-primary-color-active`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
515
|
+
// [`${prefix}-primary-color-disabled`]: ColorHelper.dsColor(color + '-300'),
|
|
516
|
+
[`${prefix}-secondary-color-default`]: colorHelper.ColorHelper.dsColor('white'),
|
|
517
|
+
[`${prefix}-secondary-color-hover`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
518
|
+
[`${prefix}-secondary-color-focus-visible`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
519
|
+
[`${prefix}-secondary-color-active`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
520
|
+
// [`${prefix}-secondary-color-disabled`]: ColorHelper.dsColor('slate-200')
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
render() {
|
|
524
|
+
const { label, _id, indeterminate, hidden, disabled, checked, readonly, required, caption, captionError, captionType, noCaption, size } = this;
|
|
525
|
+
//////
|
|
526
|
+
const bcmCheckboxClass = index$2.classnames('bcm-checkbox', `bcm-checkbox-size-${size}`, {
|
|
527
|
+
'error': captionType == bcm.Bcm.Status.error,
|
|
528
|
+
hidden,
|
|
529
|
+
checked,
|
|
530
|
+
disabled,
|
|
531
|
+
required,
|
|
532
|
+
readonly,
|
|
533
|
+
});
|
|
534
|
+
const bcmCheckboxIconClass = index$2.classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
|
|
535
|
+
'bcm-checkbox__label-icon-checked': checked,
|
|
536
|
+
});
|
|
537
|
+
const bcmCheckboxLabelClass = index$2.classnames('bcm-checkbox__label');
|
|
538
|
+
const bcmCheckboxInputClass = index$2.classnames('bcm-checkbox__input');
|
|
539
|
+
return (index$1.h(index$1.Host, { tabindex: "0", onFocus: () => this.focus.emit(this.el), onBlur: () => this.blur.emit(this.el), style: this.setColor(this.color), class: bcmCheckboxClass, disabled: disabled }, index$1.h("span", { hidden: true }, index$1.h("slot", null)), label && index$1.h("bcm-label", { htmlFor: `input-${_id}`, type: captionType, value: label, required: required }), index$1.h("div", { class: bcmCheckboxInputClass }, index$1.h("input", { id: `input-${_id}`, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly, onChange: () => { !disabled && !readonly && (this.handleChange()); }, ref: el => (this.inputElement = el) }), index$1.h("label", { class: bcmCheckboxLabelClass, htmlFor: `input-${_id}` }, index$1.h("span", { class: bcmCheckboxIconClass }, index$1.h("bcm-icon", { icon: "far fa-check" })), index$1.h(slotTemplate.SlotTemplate, { className: "slot" }))), index$1.h(captionTemplate.CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
|
|
540
|
+
}
|
|
541
|
+
get el() { return index$1.getElement(this); }
|
|
542
|
+
static get watchers() { return {
|
|
543
|
+
"indeterminate": ["watchIndeterminate"],
|
|
544
|
+
"checked": ["watchChecked"]
|
|
545
|
+
}; }
|
|
546
|
+
};
|
|
547
|
+
__decorate$5([
|
|
548
|
+
isLoadDecorator.IsLoad()
|
|
549
|
+
], BcmCheckbox.prototype, "el", void 0);
|
|
550
|
+
BcmCheckbox.style = checkboxCss;
|
|
551
|
+
|
|
552
|
+
const { state } = index.createStore({
|
|
553
|
+
group: new Map(),
|
|
554
|
+
allChecked: true,
|
|
555
|
+
allUnchecked: true,
|
|
556
|
+
changeInderminate: {},
|
|
557
|
+
});
|
|
558
|
+
const setValue = async ({ fullWidth, optionType, buttonStyle, size, defaultCheckedItems, el, id, label, required, captionType, hidden, direction, childs, indeterminate, gap, noCaption, }) => {
|
|
559
|
+
if (el) {
|
|
560
|
+
state.group.set(id, {
|
|
561
|
+
fullWidth,
|
|
562
|
+
optionType,
|
|
563
|
+
buttonStyle,
|
|
564
|
+
size,
|
|
565
|
+
defaultCheckedItems,
|
|
566
|
+
label,
|
|
567
|
+
required,
|
|
568
|
+
captionType,
|
|
569
|
+
hidden,
|
|
570
|
+
direction,
|
|
571
|
+
indeterminate,
|
|
572
|
+
gap,
|
|
573
|
+
noCaption,
|
|
574
|
+
childs: childs === null || childs === void 0 ? void 0 : childs.map(child => {
|
|
575
|
+
child.checked && (state.allUnchecked = false);
|
|
576
|
+
!child.checked && (state.allChecked = false);
|
|
577
|
+
// fullWidth && (fullWidth == 'flex' ? (child.style.flex = 'auto') : (child.style.width = '100%'));
|
|
578
|
+
optionType && (child.optionType = optionType);
|
|
579
|
+
buttonStyle && (child.buttonStyle = buttonStyle);
|
|
580
|
+
size && (child.size = size);
|
|
581
|
+
defaultCheckedItems && defaultCheckedItems.find(e => e === child.name) && (child.checked = true);
|
|
582
|
+
child.noCaption = noCaption;
|
|
583
|
+
return {
|
|
584
|
+
id: child.id || generate.Generate.UID(),
|
|
585
|
+
checked: child.checked || false,
|
|
586
|
+
name: child.name,
|
|
587
|
+
size: child.size,
|
|
588
|
+
buttonStyle: child.buttonStyle,
|
|
589
|
+
optionType: child.optionType,
|
|
590
|
+
style: child.style,
|
|
591
|
+
noCaption: child.noCaption,
|
|
592
|
+
color: child.color,
|
|
593
|
+
disabled: child.disabled,
|
|
594
|
+
readonly: child.readonly,
|
|
595
|
+
label: child.label || child.name,
|
|
596
|
+
slot: child.slot || generate.snq(() => child.querySelector('.slot').textContent, child.textContent),
|
|
597
|
+
required: child.required || required,
|
|
598
|
+
el: child,
|
|
599
|
+
captionType,
|
|
600
|
+
hidden,
|
|
601
|
+
};
|
|
602
|
+
}),
|
|
603
|
+
indeterminateState: !state.allChecked && !state.allUnchecked ? 'indeterminate' : state.allChecked ? 'determinate' : 'uncheck',
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
const getProperty = id => {
|
|
608
|
+
return generate.snq(() => state.group.get(id), {});
|
|
609
|
+
};
|
|
610
|
+
const getValue = (id, name) => {
|
|
611
|
+
var _a;
|
|
612
|
+
const group = getProperty(id);
|
|
613
|
+
let value = {};
|
|
614
|
+
(_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
615
|
+
if (name) {
|
|
616
|
+
if (child.name === name) {
|
|
617
|
+
value[child.name] = {
|
|
618
|
+
value: !!child.checked,
|
|
619
|
+
name: child.name,
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
value[child.name] = {
|
|
625
|
+
value: !!child.checked,
|
|
626
|
+
name: child.name,
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
return value;
|
|
631
|
+
};
|
|
632
|
+
const getCheckedList = id => {
|
|
633
|
+
var _a;
|
|
634
|
+
const group = getProperty(id);
|
|
635
|
+
let value = {};
|
|
636
|
+
(_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
637
|
+
if (child.checked === true) {
|
|
638
|
+
value[child.name] = {
|
|
639
|
+
value: !!child.checked,
|
|
640
|
+
name: child.name,
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
return value;
|
|
645
|
+
};
|
|
646
|
+
const setClear = id => {
|
|
647
|
+
var _a;
|
|
648
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
|
|
649
|
+
child.checked = false;
|
|
650
|
+
});
|
|
651
|
+
checkInderminate(id);
|
|
652
|
+
};
|
|
653
|
+
const setCheckedItems = (id, items, checked, reset) => {
|
|
654
|
+
var _a;
|
|
655
|
+
const checkedItems = items && (typeof items == 'string' ? JSON.parse(items) : items);
|
|
656
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
|
|
657
|
+
if (checkedItems) {
|
|
658
|
+
const checkedItem = checkedItems.find(e => e === child.name || e.name === child.name);
|
|
659
|
+
if (checkedItem) {
|
|
660
|
+
if (typeof checkedItem == 'object') {
|
|
661
|
+
Object.keys(checkedItem).map(key => {
|
|
662
|
+
if (key === 'checked') {
|
|
663
|
+
child.checked = checkedItem[key];
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
child.checked = checked;
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
else {
|
|
671
|
+
child.checked = checked;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
else {
|
|
675
|
+
reset && (child.checked = false);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
child.checked = false;
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
checkInderminate(id);
|
|
683
|
+
};
|
|
684
|
+
const resetCaption = id => {
|
|
685
|
+
var _a;
|
|
686
|
+
// const noCaption = getProperty(id).noCaption;
|
|
687
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
|
|
688
|
+
child.resetCaption();
|
|
689
|
+
// child.noCaption = noCaption;
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
const changeIndeterminate = id => {
|
|
693
|
+
var _a;
|
|
694
|
+
const group = getProperty(id);
|
|
695
|
+
if (!group.disabled) {
|
|
696
|
+
let checkAll = true;
|
|
697
|
+
if (group.indeterminateState === 'determinate') {
|
|
698
|
+
checkAll = false;
|
|
699
|
+
}
|
|
700
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
701
|
+
child.checked = checkAll;
|
|
702
|
+
});
|
|
703
|
+
checkInderminate(id);
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
const checkInderminate = id => {
|
|
707
|
+
var _a;
|
|
708
|
+
const group = getProperty(id);
|
|
709
|
+
let allChecked = true;
|
|
710
|
+
let allUnchecked = true;
|
|
711
|
+
(_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
712
|
+
child.checked && (allUnchecked = false);
|
|
713
|
+
!child.checked && (allChecked = false);
|
|
714
|
+
});
|
|
715
|
+
group.indeterminateState = !allChecked && !allUnchecked ? 'indeterminate' : allChecked ? 'determinate' : 'uncheck';
|
|
716
|
+
};
|
|
717
|
+
const onChange = (obj) => {
|
|
718
|
+
var _a;
|
|
719
|
+
(_a = getProperty(obj.id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
720
|
+
child.checked = child.id === obj.childId ? !child.checked : child.checked;
|
|
721
|
+
});
|
|
722
|
+
checkInderminate(obj.id);
|
|
723
|
+
};
|
|
724
|
+
const removeState = id => {
|
|
725
|
+
return Promise.resolve(state.group.delete(id));
|
|
726
|
+
};
|
|
727
|
+
const getStatesKeys = id => {
|
|
728
|
+
return Object.keys(state.group.get(id));
|
|
729
|
+
};
|
|
730
|
+
const checkBoxGroupState = {
|
|
731
|
+
setValue,
|
|
732
|
+
getValue,
|
|
733
|
+
setCheckedItems,
|
|
734
|
+
getCheckedList,
|
|
735
|
+
getProperty,
|
|
736
|
+
setClear,
|
|
737
|
+
resetCaption,
|
|
738
|
+
onChange,
|
|
739
|
+
getStatesKeys,
|
|
740
|
+
state,
|
|
741
|
+
removeState,
|
|
742
|
+
changeIndeterminate,
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
const CheckboxGroupTemplate = ({ customStyle, groupContainerClasses, onBcmSelect, items }) => {
|
|
746
|
+
return (index$1.h("div", { class: groupContainerClasses, style: customStyle }, items.childs && items.childs.map((checkbox) => {
|
|
747
|
+
return (index$1.h("bcm-checkbox", { id: checkbox.id, name: checkbox.name, color: checkbox.color, checked: checkbox.checked, disabled: checkbox.disabled, readonly: checkbox.readonly, required: checkbox.required, noCaption: checkbox.noCaption, "no-margin": true, size: checkbox.size, "full-width": checkbox.fullWidth, onClick: (e) => { !checkbox.disabled && !checkbox.readonly && (onBcmSelect(checkbox.id), e.preventDefault()); } }, checkbox.slot || checkbox.label));
|
|
748
|
+
})));
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
const groupCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-checkbox-group{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin-bottom:8px}.bcm-checkbox-group.hidden{display:none}.bcm-checkbox-group__container{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%}.bcm-checkbox-group__container.full-width{max-width:100%}.bcm-checkbox-group__container.vertical{gap:8px;flex-direction:column}.bcm-checkbox-group__container.button{gap:unset}.bcm-checkbox-group__container.indeterminate{padding-top:16px;margin-top:16px;border-top:1px solid #efefef}";
|
|
752
|
+
|
|
753
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
754
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
755
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
756
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
757
|
+
else
|
|
758
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
759
|
+
if (d = decorators[i])
|
|
760
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
761
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
762
|
+
};
|
|
763
|
+
const BcmCheckboxGroup = class {
|
|
764
|
+
constructor(hostRef) {
|
|
765
|
+
index$1.registerInstance(this, hostRef);
|
|
766
|
+
this.change = index$1.createEvent(this, "bcm-change", 7);
|
|
767
|
+
this.groupCheckedList = index$1.createEvent(this, "bcm-group-checked-list", 7);
|
|
768
|
+
this._id = generate.Generate.UID();
|
|
769
|
+
this.direction = bcm.Bcm.Direction.horizontal;
|
|
770
|
+
this.items = [];
|
|
771
|
+
this.indeterminate = false;
|
|
772
|
+
this.name = undefined;
|
|
773
|
+
this.value = undefined;
|
|
774
|
+
this.disabled = false;
|
|
775
|
+
this.readonly = false;
|
|
776
|
+
this.hidden = false;
|
|
777
|
+
this.required = false;
|
|
778
|
+
this.label = undefined;
|
|
779
|
+
this.gap = undefined;
|
|
780
|
+
this.defaultValue = undefined;
|
|
781
|
+
this.fullWidth = false;
|
|
782
|
+
this.optionType = 'default';
|
|
783
|
+
this.buttonStyle = 'solid';
|
|
784
|
+
this.size = bcm.Bcm.Size.medium;
|
|
785
|
+
this.caption = undefined;
|
|
786
|
+
this.noCaption = false;
|
|
787
|
+
this.captionType = bcm.Bcm.Status.default;
|
|
788
|
+
this.tick = {};
|
|
789
|
+
}
|
|
790
|
+
componentDidLoad() {
|
|
791
|
+
this.initState();
|
|
792
|
+
}
|
|
793
|
+
disconnectedCallback() {
|
|
794
|
+
checkBoxGroupState.removeState(this._id);
|
|
795
|
+
}
|
|
796
|
+
componentShouldUpdate(newVal, oldVal, propName) {
|
|
797
|
+
if (propName == 'tick' && newVal !== oldVal) {
|
|
798
|
+
const isHaveChild = generate.snq(() => checkBoxGroupState.getProperty(this._id).childs.length > 0, false);
|
|
799
|
+
if (isHaveChild) {
|
|
800
|
+
this.getValue().then(values => this.value = values);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
if (this.getOptions().indexOf(propName) > -1 && newVal !== oldVal) {
|
|
804
|
+
this.initState();
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
getOptions() {
|
|
808
|
+
return generate.snq(() => checkBoxGroupState.getStatesKeys(this._id), []);
|
|
809
|
+
}
|
|
810
|
+
async initState() {
|
|
811
|
+
const { fullWidth, optionType, buttonStyle, size, noCaption, defaultValue, label, required, captionType, hidden, direction, indeterminate, gap, items } = this;
|
|
812
|
+
const defaultCheckedItems = defaultValue && (typeof defaultValue == 'string' ? JSON.parse(defaultValue) : defaultValue);
|
|
813
|
+
const childElements = items.length > 0 ? items : await this.getCheckboxes();
|
|
814
|
+
await checkBoxGroupState.setValue({
|
|
815
|
+
id: this._id,
|
|
816
|
+
el: this.el,
|
|
817
|
+
indeterminate,
|
|
818
|
+
fullWidth,
|
|
819
|
+
optionType,
|
|
820
|
+
buttonStyle,
|
|
821
|
+
size,
|
|
822
|
+
defaultCheckedItems,
|
|
823
|
+
label,
|
|
824
|
+
noCaption,
|
|
825
|
+
required,
|
|
826
|
+
captionType,
|
|
827
|
+
hidden,
|
|
828
|
+
gap,
|
|
829
|
+
direction,
|
|
830
|
+
childs: childElements
|
|
831
|
+
});
|
|
832
|
+
const slotArea = this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);
|
|
833
|
+
if (slotArea) {
|
|
834
|
+
slotArea.innerHTML && (slotArea.innerHTML = '');
|
|
835
|
+
}
|
|
836
|
+
this.value = await this.getValue();
|
|
837
|
+
}
|
|
838
|
+
async markForCheck() {
|
|
839
|
+
await utils.delay(10);
|
|
840
|
+
this.tick = generate.Generate.UID();
|
|
841
|
+
}
|
|
842
|
+
async onBcmFocus() {
|
|
843
|
+
//focus first item
|
|
844
|
+
const childs = this.getCheckboxes();
|
|
845
|
+
if (childs.length > 0) {
|
|
846
|
+
childs[0].onBcmFocus();
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
async onBcmBlur() {
|
|
850
|
+
this.el.blur();
|
|
851
|
+
}
|
|
852
|
+
async setClear() {
|
|
853
|
+
checkBoxGroupState.setClear(this._id);
|
|
854
|
+
await utils.delay(10);
|
|
855
|
+
this.getCheckboxes().forEach(item => {
|
|
856
|
+
item.setClear();
|
|
857
|
+
});
|
|
858
|
+
this.markForCheck();
|
|
859
|
+
await utils.delay(10);
|
|
860
|
+
return Promise.resolve();
|
|
861
|
+
}
|
|
862
|
+
async resetCaption() {
|
|
863
|
+
await utils.delay(10);
|
|
864
|
+
this.getCheckboxes().forEach(item => {
|
|
865
|
+
item.resetCaption();
|
|
866
|
+
});
|
|
867
|
+
await utils.delay(10);
|
|
868
|
+
return Promise.resolve();
|
|
869
|
+
}
|
|
870
|
+
async set(data) {
|
|
871
|
+
if (Array.isArray(data)) {
|
|
872
|
+
await this.check(data, true, true);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
async get() {
|
|
876
|
+
const checklist = await this.getCheckedList() && Object.keys(await this.getCheckedList());
|
|
877
|
+
return checklist.length > 0 ? checklist : [];
|
|
878
|
+
}
|
|
879
|
+
async check(items, checked = true, reset = false) {
|
|
880
|
+
checkBoxGroupState.setCheckedItems(this._id, items, checked, reset);
|
|
881
|
+
this.markForCheck();
|
|
882
|
+
}
|
|
883
|
+
async getValue(name) {
|
|
884
|
+
return Promise.resolve(checkBoxGroupState.getValue(this._id, name));
|
|
885
|
+
}
|
|
886
|
+
async getCheckedList() {
|
|
887
|
+
return checkBoxGroupState.getCheckedList(this._id);
|
|
888
|
+
}
|
|
889
|
+
handleItemsChange() {
|
|
890
|
+
this.initState();
|
|
891
|
+
}
|
|
892
|
+
getCheckboxes() {
|
|
893
|
+
return utils.getChildElements(this.el, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
894
|
+
}
|
|
895
|
+
async getCheckbox(id) {
|
|
896
|
+
const element = this.el.querySelector(`bcm-checkbox[id="${id}"]`);
|
|
897
|
+
if (element) {
|
|
898
|
+
const name = element["name"];
|
|
899
|
+
const value = await this.getValue(name);
|
|
900
|
+
return { element, event: generate.snq(() => value[name], null) };
|
|
901
|
+
}
|
|
902
|
+
return {};
|
|
903
|
+
}
|
|
904
|
+
async indeterminateClick() {
|
|
905
|
+
checkBoxGroupState.changeIndeterminate(this._id);
|
|
906
|
+
this.markForCheck();
|
|
907
|
+
}
|
|
908
|
+
async changeCheckBox(id) {
|
|
909
|
+
checkBoxGroupState.onChange({ id: this._id, childId: id });
|
|
910
|
+
this.markForCheck();
|
|
911
|
+
await utils.delay(10);
|
|
912
|
+
this.value = await this.getValue();
|
|
913
|
+
this.change.emit({ value: this.value, changed: Object.assign({}, await this.getCheckbox(id)) });
|
|
914
|
+
this.groupCheckedList.emit(await this.getCheckedList());
|
|
915
|
+
}
|
|
916
|
+
getItems() {
|
|
917
|
+
return checkBoxGroupState.getProperty(this._id);
|
|
918
|
+
}
|
|
919
|
+
render() {
|
|
920
|
+
const items = this.getItems();
|
|
921
|
+
const { disabled, captionType, label, indeterminate, indeterminateState, required, direction, optionType, hidden, fullWidth, gap } = items;
|
|
922
|
+
const bcmChechboxGroup = index$2.classnames('bcm-checkbox-group', direction, optionType, {
|
|
923
|
+
hidden,
|
|
924
|
+
'full-width': fullWidth
|
|
925
|
+
});
|
|
926
|
+
const bcmChechboxGroupContainer = index$2.classnames('bcm-checkbox-group__container', optionType, {
|
|
927
|
+
[direction]: optionType === 'default',
|
|
928
|
+
indeterminate,
|
|
929
|
+
hidden,
|
|
930
|
+
'full-width': fullWidth
|
|
931
|
+
});
|
|
932
|
+
return (index$1.h(index$1.Host, { class: bcmChechboxGroup }, index$1.h("span", { hidden: true, id: `bcm-checkbox-group__items-${this._id}` }, index$1.h("slot", null)), index$1.h("div", { class: "bcm-checkbox-group__label" }, label &&
|
|
933
|
+
index$1.h("div", null, index$1.h(labelTemplate.LabelTemplate, { size: this.size, type: captionType, value: label, required: required }))), indeterminate &&
|
|
934
|
+
index$1.h("bcm-checkbox", { onClick: (e) => { this.indeterminateClick(), e.preventDefault(); }, "no-caption": true, id: "bcm-indeterminate-element", indeterminate: indeterminateState, disabled: disabled }, "Check All"), index$1.h(CheckboxGroupTemplate, { items: items, groupContainerClasses: bcmChechboxGroupContainer, customStyle: gap && ({ 'gap': gap }), onBcmSelect: (id) => this.changeCheckBox(id) })));
|
|
935
|
+
}
|
|
936
|
+
get el() { return index$1.getElement(this); }
|
|
937
|
+
static get watchers() { return {
|
|
938
|
+
"items": ["handleItemsChange"]
|
|
939
|
+
}; }
|
|
940
|
+
};
|
|
941
|
+
__decorate$4([
|
|
942
|
+
isLoadDecorator.IsLoad()
|
|
943
|
+
], BcmCheckboxGroup.prototype, "el", void 0);
|
|
944
|
+
BcmCheckboxGroup.style = groupCss;
|
|
945
|
+
|
|
946
|
+
// /**
|
|
947
|
+
// *
|
|
948
|
+
// * @param type
|
|
949
|
+
// */
|
|
950
|
+
// export const required = (value:any) => {
|
|
951
|
+
// if ( value || value != null ) {
|
|
952
|
+
// return true
|
|
953
|
+
// } else {
|
|
954
|
+
// return true
|
|
955
|
+
// }
|
|
956
|
+
// }
|
|
957
|
+
class rules {
|
|
958
|
+
constructor() { }
|
|
959
|
+
response(status, message) {
|
|
960
|
+
return Object.assign(Object.assign({ valid: status }, (message && { message })), (!status && { type: 'error' }));
|
|
961
|
+
}
|
|
962
|
+
required(value, componentValidation) {
|
|
963
|
+
let validation = this.response(true);
|
|
964
|
+
if (value == '' || value == "" || value == undefined || value == null || value === false) {
|
|
965
|
+
validation = this.response(false, 'This field is required.');
|
|
966
|
+
}
|
|
967
|
+
if (componentValidation) {
|
|
968
|
+
if (!componentValidation.valid) {
|
|
969
|
+
validation = this.response(false, componentValidation.errorText);
|
|
970
|
+
}
|
|
971
|
+
if (value instanceof Object) {
|
|
972
|
+
if (value.isValid) {
|
|
973
|
+
if (value.isValid == false)
|
|
974
|
+
validation = this.response(false, 'This field is required.');
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
return validation;
|
|
979
|
+
}
|
|
980
|
+
selfValidation(input) {
|
|
981
|
+
let validation = this.response(true);
|
|
982
|
+
if (input.captionError != null || input.captionType == 'error') {
|
|
983
|
+
validation = this.response(false, input.captionError);
|
|
984
|
+
}
|
|
985
|
+
return validation;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
const validate = new rules;
|
|
989
|
+
|
|
990
|
+
const formCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block;margin-bottom:8px}:host(.hidden){display:none}";
|
|
991
|
+
|
|
992
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
993
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
994
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
995
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
996
|
+
else
|
|
997
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
998
|
+
if (d = decorators[i])
|
|
999
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1000
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1001
|
+
};
|
|
1002
|
+
const BcmForm = class {
|
|
1003
|
+
constructor(hostRef) {
|
|
1004
|
+
index$1.registerInstance(this, hostRef);
|
|
1005
|
+
this.bcmForm = index$1.createEvent(this, "bcm-form", 7);
|
|
1006
|
+
this.formData = {};
|
|
1007
|
+
this.inputs = [];
|
|
1008
|
+
this.duplicateInput = [];
|
|
1009
|
+
this.isValid = true;
|
|
1010
|
+
this.returnCaption = [];
|
|
1011
|
+
this.Bromcom = {
|
|
1012
|
+
errors: {
|
|
1013
|
+
targetFormNotExist: 'target form is not exist --> ',
|
|
1014
|
+
},
|
|
1015
|
+
inputComponents: {
|
|
1016
|
+
// Birbirinin aynısı
|
|
1017
|
+
INPUT: 'input',
|
|
1018
|
+
TEXTAREA: 'textarea',
|
|
1019
|
+
//çok benzer
|
|
1020
|
+
SWITCH: 'switch',
|
|
1021
|
+
CHECKBOX: 'checkbox',
|
|
1022
|
+
RADIO_GROUP: 'radio-group',
|
|
1023
|
+
CHECKBOX_GROUP: 'checkbox-group',
|
|
1024
|
+
RANGE: 'range',
|
|
1025
|
+
// sadece value fırlatıyor
|
|
1026
|
+
FORM: 'form',
|
|
1027
|
+
FORM_GROUP: 'form-group',
|
|
1028
|
+
// *En vakit alacak => içinde select, autocomplete, listbox, treeview özellikleri var
|
|
1029
|
+
LIST: 'list',
|
|
1030
|
+
//
|
|
1031
|
+
COLORPICKER: 'colorpicker',
|
|
1032
|
+
// picker aslında tek komponent hepsi datetimepicker
|
|
1033
|
+
DATE_PICKER: 'date-picker',
|
|
1034
|
+
TIME_PICKER: 'time-picker',
|
|
1035
|
+
DATETIME_PICKER: 'datetime-picker',
|
|
1036
|
+
// silinecek komponentler
|
|
1037
|
+
SELECT: 'select',
|
|
1038
|
+
LISTBOX: 'listbox'
|
|
1039
|
+
},
|
|
1040
|
+
helpers: {
|
|
1041
|
+
randomId: function () {
|
|
1042
|
+
return Math.random().toString(16).slice(2, -1);
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
};
|
|
1046
|
+
this._id = (Math.random() * 4).toString(16).replace('.', '');
|
|
1047
|
+
this.hidden = false;
|
|
1048
|
+
this.validation = false;
|
|
1049
|
+
this.name = "";
|
|
1050
|
+
this.value = undefined;
|
|
1051
|
+
this.autocomplete = false;
|
|
1052
|
+
}
|
|
1053
|
+
handleSubmit() {
|
|
1054
|
+
// if (lowercase(e.target.nodeName) === 'bcm-button') {
|
|
1055
|
+
// if (e.target.type === 'submit') {
|
|
1056
|
+
// this.submitFunction()
|
|
1057
|
+
// }
|
|
1058
|
+
// }
|
|
1059
|
+
}
|
|
1060
|
+
async submitFunction() {
|
|
1061
|
+
this.formData = {};
|
|
1062
|
+
this.inputs = [];
|
|
1063
|
+
this.selector = this.el;
|
|
1064
|
+
await this.getInputs();
|
|
1065
|
+
await utils.delay(10);
|
|
1066
|
+
const usrFrmData = await this.userFormData();
|
|
1067
|
+
var formData = { isValid: true, formData: usrFrmData };
|
|
1068
|
+
if (this.name) {
|
|
1069
|
+
formData = Object.assign(Object.assign({}, formData), { formName: this.name });
|
|
1070
|
+
}
|
|
1071
|
+
if (this.isValid) {
|
|
1072
|
+
this.bcmForm.emit(formData);
|
|
1073
|
+
return formData;
|
|
1074
|
+
}
|
|
1075
|
+
else {
|
|
1076
|
+
this.returnCaption = { isValid: false, 'message': 'Please fill in all inputs', 'errorDetails': this.returnCaption, formData: usrFrmData };
|
|
1077
|
+
if (this.name) {
|
|
1078
|
+
this.returnCaption = Object.assign(Object.assign({}, this.returnCaption), { formName: this.name });
|
|
1079
|
+
}
|
|
1080
|
+
this.bcmForm.emit(this.returnCaption);
|
|
1081
|
+
return this.returnCaption;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
async submit() {
|
|
1085
|
+
return Promise.resolve(this.submitFunction());
|
|
1086
|
+
}
|
|
1087
|
+
async set(data) {
|
|
1088
|
+
var _a;
|
|
1089
|
+
const validate = this.validation;
|
|
1090
|
+
this.validation = false;
|
|
1091
|
+
// debugger
|
|
1092
|
+
this.selector = this.el;
|
|
1093
|
+
await this.getInputs();
|
|
1094
|
+
if (data && ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
1095
|
+
for (const key of Object.keys(data)) {
|
|
1096
|
+
const item = this.inputs.find(item => item.name === key);
|
|
1097
|
+
if (item) {
|
|
1098
|
+
try {
|
|
1099
|
+
await item.set(data[key]);
|
|
1100
|
+
}
|
|
1101
|
+
catch (error) {
|
|
1102
|
+
console.log(item.nodeName, "set", error);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
this.validation = validate;
|
|
1108
|
+
}
|
|
1109
|
+
async get() {
|
|
1110
|
+
var _a;
|
|
1111
|
+
let formData = {};
|
|
1112
|
+
this.selector = this.el;
|
|
1113
|
+
const inputsCache = this.inputs;
|
|
1114
|
+
await this.getInputs();
|
|
1115
|
+
((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.inputs.forEach(async (item) => {
|
|
1116
|
+
try {
|
|
1117
|
+
const value = await item.get();
|
|
1118
|
+
formData = Object.assign(Object.assign({}, formData), { [item.name]: value });
|
|
1119
|
+
}
|
|
1120
|
+
catch (error) {
|
|
1121
|
+
console.log(`${item.nodeName} get error`);
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
this.inputs = inputsCache;
|
|
1125
|
+
await utils.delay(10);
|
|
1126
|
+
return Promise.resolve(formData);
|
|
1127
|
+
}
|
|
1128
|
+
async setClear() {
|
|
1129
|
+
this.formData = {};
|
|
1130
|
+
this.inputs = [];
|
|
1131
|
+
this.selector = this.el;
|
|
1132
|
+
let clear = [];
|
|
1133
|
+
await this.getInputs();
|
|
1134
|
+
this.inputs.forEach(async (item) => {
|
|
1135
|
+
try {
|
|
1136
|
+
clear.push(await item.setClear());
|
|
1137
|
+
}
|
|
1138
|
+
catch (error) {
|
|
1139
|
+
console.log(error);
|
|
1140
|
+
}
|
|
1141
|
+
});
|
|
1142
|
+
await Promise.all(clear).then(() => {
|
|
1143
|
+
this.formData = {};
|
|
1144
|
+
this.inputs = [];
|
|
1145
|
+
this.duplicateInput = [];
|
|
1146
|
+
this.isValid = true;
|
|
1147
|
+
this.returnCaption = [];
|
|
1148
|
+
});
|
|
1149
|
+
await utils.delay(10);
|
|
1150
|
+
return Promise.resolve(true);
|
|
1151
|
+
}
|
|
1152
|
+
async resetCaption() {
|
|
1153
|
+
await utils.delay(10);
|
|
1154
|
+
this.formData = {};
|
|
1155
|
+
this.inputs = [];
|
|
1156
|
+
this.selector = this.el;
|
|
1157
|
+
await this.getInputs();
|
|
1158
|
+
for (const item of this.inputs) {
|
|
1159
|
+
try {
|
|
1160
|
+
await item.resetCaption();
|
|
1161
|
+
}
|
|
1162
|
+
catch (error) {
|
|
1163
|
+
console.log(item.nodeName, "rc p");
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
await utils.delay(10);
|
|
1167
|
+
return Promise.resolve();
|
|
1168
|
+
}
|
|
1169
|
+
async config(_config) {
|
|
1170
|
+
if (_config['validation']) {
|
|
1171
|
+
typeof _config['validation'] == 'boolean'
|
|
1172
|
+
? this.validation = _config['validation']
|
|
1173
|
+
: this.validation = false;
|
|
1174
|
+
}
|
|
1175
|
+
return true;
|
|
1176
|
+
}
|
|
1177
|
+
async getInputs() {
|
|
1178
|
+
var form = this.selector;
|
|
1179
|
+
if (!form) {
|
|
1180
|
+
console.warn(this.Bromcom.errors.targetFormNotExist + this.selector);
|
|
1181
|
+
return;
|
|
1182
|
+
}
|
|
1183
|
+
const inputs = Array.from(form.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
|
|
1184
|
+
this.duplicateInput = [];
|
|
1185
|
+
// s-hn: Stencil private flag that contains host web component
|
|
1186
|
+
// https://github.com/ionic-team/stencil/blob/45388e95edb46ef357eb9ae37cd32bbb5bc1ed23/src/runtime/vdom/vdom-render.ts#L116
|
|
1187
|
+
const rootInputs = inputs.filter((input) => { var _a; return !input['s-hn'] || ((_a = input['s-hn']) === null || _a === void 0 ? void 0 : _a.nodeName) !== 'BcmForm'; });
|
|
1188
|
+
// debugger;
|
|
1189
|
+
for (const item of rootInputs) {
|
|
1190
|
+
if (stringHelper.StringHelper.lowercase(item.nodeName) == "bcm-checkbox-group") {
|
|
1191
|
+
let checkboxs = item.querySelectorAll("bcm-checkbox");
|
|
1192
|
+
if (checkboxs) {
|
|
1193
|
+
for (const checkbox of checkboxs) {
|
|
1194
|
+
this.duplicateInput.push(checkbox.name);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
if (stringHelper.StringHelper.lowercase(item.nodeName) == "bcm-form") {
|
|
1199
|
+
const groupInputs = Array.from(item.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
|
|
1200
|
+
let itemObject = {};
|
|
1201
|
+
for (const element of groupInputs) {
|
|
1202
|
+
var name = element.name;
|
|
1203
|
+
var value = element.value;
|
|
1204
|
+
itemObject = Object.assign(Object.assign({}, itemObject), { [name]: value });
|
|
1205
|
+
this.duplicateInput.push(element.name);
|
|
1206
|
+
}
|
|
1207
|
+
item.value = itemObject;
|
|
1208
|
+
let checkboxs = item.querySelectorAll("bcm-checkbox");
|
|
1209
|
+
if (checkboxs) {
|
|
1210
|
+
for (const checkbox of checkboxs) {
|
|
1211
|
+
this.duplicateInput.push(checkbox.name);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
await utils.delay(10);
|
|
1217
|
+
this.inputs = rootInputs;
|
|
1218
|
+
}
|
|
1219
|
+
getItemValue(item) {
|
|
1220
|
+
const tagName = item.tagName.toLowerCase().replace('bcm-', '');
|
|
1221
|
+
switch (tagName) {
|
|
1222
|
+
/* case 'date-picker':
|
|
1223
|
+
case 'datetime-picker':
|
|
1224
|
+
return item.value.timestamp
|
|
1225
|
+
case 'time-picker':
|
|
1226
|
+
return item.value.time */
|
|
1227
|
+
default:
|
|
1228
|
+
return item.value;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
isWrapperComponent(item) {
|
|
1232
|
+
return ['bcm-datetime-picker', 'bcm-date-picker', 'bcm-time-picker'].includes(item.toLowerCase());
|
|
1233
|
+
}
|
|
1234
|
+
isGroupComponent(item) {
|
|
1235
|
+
return ['bcm-checkbox-group'].includes(item.toLowerCase());
|
|
1236
|
+
}
|
|
1237
|
+
isListComponent(item) {
|
|
1238
|
+
return ['bcm-list'].includes(item.toLowerCase());
|
|
1239
|
+
}
|
|
1240
|
+
async userFormData() {
|
|
1241
|
+
this.formData = {};
|
|
1242
|
+
this.isValid = true;
|
|
1243
|
+
this.returnCaption = [];
|
|
1244
|
+
for (const item of this.inputs) {
|
|
1245
|
+
// const isListComponent = this.isListComponent(item.tagName);
|
|
1246
|
+
const isGroupComponent = this.isGroupComponent(item.tagName);
|
|
1247
|
+
const isWrapperComponent = this.isWrapperComponent(item.tagName);
|
|
1248
|
+
const wrapperComponent = isWrapperComponent && item;
|
|
1249
|
+
const input = isWrapperComponent
|
|
1250
|
+
? await item.getInput() && item
|
|
1251
|
+
: item;
|
|
1252
|
+
// input.caption = ''
|
|
1253
|
+
// input.captionType = ''
|
|
1254
|
+
if (this.validation) {
|
|
1255
|
+
let valid = null;
|
|
1256
|
+
// if (isListComponent) {
|
|
1257
|
+
// valid = !(input.value && input.value.length > 0) && validate.required(input.value)
|
|
1258
|
+
// } else
|
|
1259
|
+
if (isWrapperComponent) {
|
|
1260
|
+
const isPickerValid = await wrapperComponent.isValid();
|
|
1261
|
+
valid = validate.required(input.value, isPickerValid);
|
|
1262
|
+
if (valid) {
|
|
1263
|
+
if (input.value instanceof Object) {
|
|
1264
|
+
if (input.value["isValid"] == false) {
|
|
1265
|
+
valid = validate.required("", isPickerValid);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
else {
|
|
1269
|
+
valid = validate.required(input.value, isPickerValid);
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
else if (isGroupComponent) {
|
|
1274
|
+
const childsCheckbox = utils.getChildElements(input, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
1275
|
+
if (childsCheckbox && childsCheckbox.length > 0) {
|
|
1276
|
+
for (const element of childsCheckbox) {
|
|
1277
|
+
if (element && element.required === true) {
|
|
1278
|
+
valid = validate.required(element.checked);
|
|
1279
|
+
if (!valid['valid']) {
|
|
1280
|
+
element.noCaption = false;
|
|
1281
|
+
element.captionError = valid['message'];
|
|
1282
|
+
element.captionType = valid['type'];
|
|
1283
|
+
}
|
|
1284
|
+
else {
|
|
1285
|
+
element.noCaption = input.noCaption;
|
|
1286
|
+
element.captionError = null;
|
|
1287
|
+
element.captionType = "default";
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
else {
|
|
1294
|
+
valid = validate.required(input.value);
|
|
1295
|
+
}
|
|
1296
|
+
if (input.required) {
|
|
1297
|
+
if (!valid['valid']) {
|
|
1298
|
+
input.captionError = valid['message'];
|
|
1299
|
+
input.captionType = valid['type'];
|
|
1300
|
+
}
|
|
1301
|
+
else {
|
|
1302
|
+
input.captionError = null;
|
|
1303
|
+
input.captionType = "default";
|
|
1304
|
+
}
|
|
1305
|
+
await utils.delay(10);
|
|
1306
|
+
const selfValidation = validate.selfValidation(input);
|
|
1307
|
+
if (valid['valid']) {
|
|
1308
|
+
if (!selfValidation['valid']) {
|
|
1309
|
+
input.captionError = selfValidation['message'];
|
|
1310
|
+
input.captionType = selfValidation['type'];
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
let name = input.name;
|
|
1315
|
+
let value = input.captionError;
|
|
1316
|
+
!input.hidden && input.captionType == 'error' && (this.returnCaption = [...Array.from(this.returnCaption), { [name]: value }],
|
|
1317
|
+
this.isValid = false);
|
|
1318
|
+
}
|
|
1319
|
+
if (input.name && !this.duplicateInput.includes(input.name)) {
|
|
1320
|
+
var itemValue = this.getItemValue(input);
|
|
1321
|
+
if (!itemValue || itemValue == undefined || itemValue == null) {
|
|
1322
|
+
itemValue = null;
|
|
1323
|
+
}
|
|
1324
|
+
this.formData[input.name] = itemValue;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
return this.formData;
|
|
1328
|
+
}
|
|
1329
|
+
async handleChange(e) {
|
|
1330
|
+
const isWrapperComponent = this.isWrapperComponent(e.target.tagName);
|
|
1331
|
+
const isGroupComponent = this.isGroupComponent(e.target.tagName);
|
|
1332
|
+
let target;
|
|
1333
|
+
if (isWrapperComponent) {
|
|
1334
|
+
target = e.target.getInput && await e.target.getInput() || e.target;
|
|
1335
|
+
}
|
|
1336
|
+
else if (isGroupComponent) {
|
|
1337
|
+
let req = false;
|
|
1338
|
+
const childsCheckbox = utils.getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
1339
|
+
childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
|
|
1340
|
+
if (element && element.required === true) {
|
|
1341
|
+
req = true;
|
|
1342
|
+
}
|
|
1343
|
+
}));
|
|
1344
|
+
target = Object.assign(Object.assign({}, e.target), { required: req });
|
|
1345
|
+
}
|
|
1346
|
+
else {
|
|
1347
|
+
target = e.target;
|
|
1348
|
+
}
|
|
1349
|
+
const value = e.target.value;
|
|
1350
|
+
const wrapperComponent = isWrapperComponent && e.target;
|
|
1351
|
+
var isPickerValid;
|
|
1352
|
+
if (isWrapperComponent) {
|
|
1353
|
+
isPickerValid = await wrapperComponent.isValid();
|
|
1354
|
+
}
|
|
1355
|
+
const tick = setTimeout(() => {
|
|
1356
|
+
if (target.required) {
|
|
1357
|
+
let valid = null;
|
|
1358
|
+
if (isWrapperComponent) {
|
|
1359
|
+
valid = validate.required(value, isPickerValid);
|
|
1360
|
+
if (valid) {
|
|
1361
|
+
if (value instanceof Object) {
|
|
1362
|
+
if (value["isValid"] == false) {
|
|
1363
|
+
valid = validate.required("", isPickerValid);
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
else {
|
|
1367
|
+
valid = validate.required(value, isPickerValid);
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
else if (isGroupComponent) {
|
|
1372
|
+
const childsCheckbox = utils.getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
1373
|
+
childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
|
|
1374
|
+
if (element && element.required === true) {
|
|
1375
|
+
valid = validate.required(element.checked);
|
|
1376
|
+
if (!valid['valid']) {
|
|
1377
|
+
element.noCaption = false;
|
|
1378
|
+
element.captionError = valid['message'];
|
|
1379
|
+
element.captionType = valid['type'];
|
|
1380
|
+
}
|
|
1381
|
+
else {
|
|
1382
|
+
element.noCaption = e.target.noCaption;
|
|
1383
|
+
element.captionError = null;
|
|
1384
|
+
element.captionType = "default";
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}));
|
|
1388
|
+
}
|
|
1389
|
+
else {
|
|
1390
|
+
valid = validate.required(value);
|
|
1391
|
+
}
|
|
1392
|
+
if (valid['valid']) {
|
|
1393
|
+
target.captionError = null;
|
|
1394
|
+
target.captionType = null;
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
target.captionError = valid['message'];
|
|
1398
|
+
target.captionType = valid['type'];
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
clearTimeout(tick);
|
|
1402
|
+
});
|
|
1403
|
+
this.value = await this.userFormData();
|
|
1404
|
+
}
|
|
1405
|
+
render() {
|
|
1406
|
+
const hostClasses = index$2.classnames(this.hidden ? 'hidden' : null);
|
|
1407
|
+
return (index$1.h(index$1.Host, { class: hostClasses }, index$1.h("form", { class: "bcm-form", autocomplete: this.autocomplete ? "on" : "off" }, index$1.h("slot", null))));
|
|
1408
|
+
}
|
|
1409
|
+
get el() { return index$1.getElement(this); }
|
|
1410
|
+
};
|
|
1411
|
+
__decorate$3([
|
|
1412
|
+
isLoadDecorator.IsLoad()
|
|
1413
|
+
], BcmForm.prototype, "el", void 0);
|
|
1414
|
+
BcmForm.style = formCss;
|
|
1415
|
+
|
|
1416
|
+
const iconCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-icon.hidden{display:none}";
|
|
1417
|
+
|
|
1418
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1419
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1420
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1421
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1422
|
+
else
|
|
1423
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1424
|
+
if (d = decorators[i])
|
|
1425
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1426
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1427
|
+
};
|
|
1428
|
+
const BcmIcon = class {
|
|
1429
|
+
constructor(hostRef) {
|
|
1430
|
+
index$1.registerInstance(this, hostRef);
|
|
1431
|
+
this.hidden = false;
|
|
1432
|
+
this.icon = undefined;
|
|
1433
|
+
}
|
|
1434
|
+
render() {
|
|
1435
|
+
const { icon, hidden } = this;
|
|
1436
|
+
return (index$1.h(index$1.Host, { class: `bcm-icon fa ${hidden ? 'hidden' : ''}` }, index$1.h("i", { class: `${icon}` })));
|
|
1437
|
+
}
|
|
1438
|
+
get el() { return index$1.getElement(this); }
|
|
1439
|
+
};
|
|
1440
|
+
__decorate$2([
|
|
1441
|
+
isLoadDecorator.IsLoad()
|
|
1442
|
+
], BcmIcon.prototype, "el", void 0);
|
|
1443
|
+
BcmIcon.style = iconCss;
|
|
1444
|
+
|
|
1445
|
+
const labelCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}";
|
|
1446
|
+
|
|
1447
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1448
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1449
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1450
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1451
|
+
else
|
|
1452
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1453
|
+
if (d = decorators[i])
|
|
1454
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1455
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1456
|
+
};
|
|
1457
|
+
const BcmLabel = class {
|
|
1458
|
+
constructor(hostRef) {
|
|
1459
|
+
index$1.registerInstance(this, hostRef);
|
|
1460
|
+
this._id = generate.Generate.UID();
|
|
1461
|
+
this.required = false;
|
|
1462
|
+
this.value = undefined;
|
|
1463
|
+
this.size = "medium";
|
|
1464
|
+
this.form = undefined;
|
|
1465
|
+
this.htmlFor = undefined;
|
|
1466
|
+
this.hidden = false;
|
|
1467
|
+
this.type = bcm.Bcm.Status.default;
|
|
1468
|
+
this.tooltip = undefined;
|
|
1469
|
+
}
|
|
1470
|
+
render() {
|
|
1471
|
+
const { required, value, size, form, htmlFor, hidden, type, tooltip } = this;
|
|
1472
|
+
const hostClasses = index$2.classnames('bcm-label', { hidden });
|
|
1473
|
+
const Label = (index$1.h(labelTemplate.LabelTemplate, { form: form, htmlFor: htmlFor, value: value, size: size, type: type, required: required }));
|
|
1474
|
+
return (index$1.h(index$1.Host, { class: hostClasses }, Label, tooltip && (index$1.h("bcm-tooltip", { message: tooltip, placement: 'top', trigger: 'hover' }, index$1.h("bcm-icon", { icon: "far fa-question-circle" })))));
|
|
1475
|
+
}
|
|
1476
|
+
get el() { return index$1.getElement(this); }
|
|
1477
|
+
};
|
|
1478
|
+
__decorate$1([
|
|
1479
|
+
isLoadDecorator.IsLoad()
|
|
1480
|
+
], BcmLabel.prototype, "el", void 0);
|
|
1481
|
+
BcmLabel.style = labelCss;
|
|
1482
|
+
|
|
1483
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1484
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1485
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1486
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1487
|
+
else
|
|
1488
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1489
|
+
if (d = decorators[i])
|
|
1490
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1491
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1492
|
+
};
|
|
1493
|
+
const BcmTooltip = class {
|
|
1494
|
+
constructor(hostRef) {
|
|
1495
|
+
index$1.registerInstance(this, hostRef);
|
|
1496
|
+
this.bcmTooltipShow = index$1.createEvent(this, "bcmTooltipShow", 7);
|
|
1497
|
+
this.bcmTooltipHide = index$1.createEvent(this, "bcmTooltipHide", 7);
|
|
1498
|
+
this._id = generate.Generate.UID();
|
|
1499
|
+
this.message = "";
|
|
1500
|
+
this.placement = bcm.Bcm$1.Placement.top;
|
|
1501
|
+
this.trigger = bcm.Bcm$1.TriggerType.click;
|
|
1502
|
+
this.open = false;
|
|
1503
|
+
this.color = "slate";
|
|
1504
|
+
this.size = bcm.Bcm$1.Size.medium;
|
|
1505
|
+
this.openDelay = 0;
|
|
1506
|
+
this.closeDelay = 0;
|
|
1507
|
+
this.targetId = undefined;
|
|
1508
|
+
this.tooltip = undefined;
|
|
1509
|
+
}
|
|
1510
|
+
emitShow() {
|
|
1511
|
+
this.bcmTooltipShow.emit();
|
|
1512
|
+
}
|
|
1513
|
+
emitHide() {
|
|
1514
|
+
this.bcmTooltipHide.emit();
|
|
1515
|
+
}
|
|
1516
|
+
connectedCallback() {
|
|
1517
|
+
this.tooltip = new tooltipHelper.Tooltip({
|
|
1518
|
+
targetId: this.targetId || this._id,
|
|
1519
|
+
message: this.message,
|
|
1520
|
+
placement: this.placement,
|
|
1521
|
+
color: this.color,
|
|
1522
|
+
trigger: this.trigger,
|
|
1523
|
+
size: this.size,
|
|
1524
|
+
openDelay: this.openDelay,
|
|
1525
|
+
closeDelay: this.closeDelay,
|
|
1526
|
+
emitShow: () => this.emitShow(),
|
|
1527
|
+
emitHide: () => this.emitHide(),
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
componentDidLoad() {
|
|
1531
|
+
this.tooltip.listener();
|
|
1532
|
+
}
|
|
1533
|
+
componentDidRender() {
|
|
1534
|
+
this.tooltip.message = this.message;
|
|
1535
|
+
this.tooltip.placement = this.placement;
|
|
1536
|
+
this.tooltip.color = this.color;
|
|
1537
|
+
this.tooltip.trigger = this.trigger;
|
|
1538
|
+
this.tooltip.size = this.size;
|
|
1539
|
+
this.tooltip.openDelay = this.openDelay;
|
|
1540
|
+
this.tooltip.closeDelay = this.closeDelay;
|
|
1541
|
+
this.tooltip.update();
|
|
1542
|
+
}
|
|
1543
|
+
disconnectedCallback() {
|
|
1544
|
+
this.tooltip.destroy();
|
|
1545
|
+
}
|
|
1546
|
+
async show() {
|
|
1547
|
+
this.tooltip.show();
|
|
1548
|
+
}
|
|
1549
|
+
async hide() {
|
|
1550
|
+
this.tooltip.hide();
|
|
1551
|
+
}
|
|
1552
|
+
async toggle() {
|
|
1553
|
+
this.tooltip.toggle();
|
|
1554
|
+
}
|
|
1555
|
+
render() {
|
|
1556
|
+
return (index$1.h(index$1.Host, { "aria-describedby": "tooltip", class: "tw-inline-flex tw-h-fit tw-w-fit" }, index$1.h("slot", null)));
|
|
1557
|
+
}
|
|
1558
|
+
get el() { return index$1.getElement(this); }
|
|
1559
|
+
};
|
|
1560
|
+
__decorate([
|
|
1561
|
+
isLoadDecorator.IsLoad()
|
|
1562
|
+
], BcmTooltip.prototype, "el", void 0);
|
|
1563
|
+
|
|
1564
|
+
exports.bcm_button = BcmButton;
|
|
1565
|
+
exports.bcm_checkbox = BcmCheckbox;
|
|
1566
|
+
exports.bcm_checkbox_group = BcmCheckboxGroup;
|
|
1567
|
+
exports.bcm_form = BcmForm;
|
|
1568
|
+
exports.bcm_icon = BcmIcon;
|
|
1569
|
+
exports.bcm_label = BcmLabel;
|
|
1570
|
+
exports.bcm_tooltip = BcmTooltip;
|