bromcom-ui 2.12.1-test.0 → 3.0.0-preview.0
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/p-0125212b.entry.js +5 -0
- package/dist/bromcom-ui/{p-58c0a1f5.js → p-014f7aa2.js} +1 -1
- package/dist/bromcom-ui/{p-c54aaa8c.entry.js → p-0167c2cc.entry.js} +1 -1
- package/dist/bromcom-ui/p-033f2926.entry.js +5 -0
- package/dist/bromcom-ui/{p-7d18ce0e.entry.js → p-0c494f44.entry.js} +1 -1
- package/dist/bromcom-ui/{p-daeb868a.js → p-0e65fd54.js} +1 -1
- package/dist/bromcom-ui/p-14ed2c86.js +5 -0
- package/dist/bromcom-ui/{p-7c5763cc.entry.js → p-1ca7e1a1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-053dc717.entry.js → p-1d577d30.entry.js} +1 -1
- package/dist/bromcom-ui/p-2032843f.entry.js +5 -0
- package/dist/bromcom-ui/{p-2aaeb247.entry.js → p-23c01e93.entry.js} +1 -1
- package/dist/bromcom-ui/p-2663c49f.entry.js +5 -0
- package/dist/bromcom-ui/{p-bdc78a44.entry.js → p-2903e611.entry.js} +1 -1
- package/dist/bromcom-ui/p-2ecb8899.entry.js +5 -0
- package/dist/bromcom-ui/p-31368d21.entry.js +5 -0
- package/dist/bromcom-ui/{p-c02d4055.entry.js → p-370b6020.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9850cbce.js → p-397c1438.js} +1 -1
- package/dist/bromcom-ui/p-3a944947.entry.js +5 -0
- package/dist/bromcom-ui/{p-cebe6c15.entry.js → p-3aa7e1ce.entry.js} +1 -1
- package/dist/bromcom-ui/p-3db88841.entry.js +5 -0
- package/dist/bromcom-ui/{p-c99dbd93.entry.js → p-3f4d5368.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3a60a194.js → p-403d3912.js} +1 -1
- package/dist/bromcom-ui/p-40871628.js +5 -0
- package/dist/bromcom-ui/p-4254234c.entry.js +5 -0
- package/dist/bromcom-ui/p-42a7244e.entry.js +5 -0
- package/dist/bromcom-ui/p-4c5168fe.js +5 -0
- package/dist/bromcom-ui/{p-69260d36.entry.js → p-51341d24.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0bda558d.js → p-588ba8fc.js} +1 -1
- package/dist/bromcom-ui/{p-d73d6a2f.entry.js → p-58fa6ecf.entry.js} +1 -1
- package/dist/bromcom-ui/p-5a65b538.js +5 -0
- package/dist/bromcom-ui/p-5f74f707.js +5 -0
- package/dist/bromcom-ui/{p-35f2e15a.js → p-5fbbf611.js} +1 -1
- package/dist/bromcom-ui/p-66d74084.js +5 -0
- package/dist/bromcom-ui/p-74912375.js +5 -0
- package/dist/bromcom-ui/p-7fa410eb.entry.js +5 -0
- package/dist/bromcom-ui/{p-626b805d.entry.js → p-87291a4f.entry.js} +1 -1
- package/dist/bromcom-ui/p-8d2e1aea.entry.js +5 -0
- package/dist/bromcom-ui/p-9acc7a1c.entry.js +5 -0
- package/dist/bromcom-ui/p-9f913f3e.entry.js +5 -0
- package/dist/bromcom-ui/{p-e82dab5a.entry.js → p-a02650af.entry.js} +1 -1
- package/dist/bromcom-ui/p-aa370552.js +5 -0
- package/dist/bromcom-ui/{p-7c223356.entry.js → p-ac200139.entry.js} +1 -1
- package/dist/bromcom-ui/p-afe35470.entry.js +16 -0
- package/dist/bromcom-ui/p-affe097a.entry.js +5 -0
- package/dist/bromcom-ui/{p-79d5c3d8.entry.js → p-b702f1e5.entry.js} +1 -1
- package/dist/bromcom-ui/p-bc6ecf66.entry.js +5 -0
- package/dist/bromcom-ui/{p-313b7bb0.entry.js → p-bdda1f76.entry.js} +1 -1
- package/dist/bromcom-ui/p-bde34843.entry.js +5 -0
- package/dist/bromcom-ui/{p-f0e30624.entry.js → p-c187994f.entry.js} +1 -1
- package/dist/bromcom-ui/p-cc583dbc.js +5 -0
- package/dist/bromcom-ui/p-ccc61045.js +5 -0
- package/dist/bromcom-ui/{p-67343ad8.entry.js → p-cd12ef44.entry.js} +1 -1
- package/dist/bromcom-ui/p-cf164584.js +5 -0
- package/dist/bromcom-ui/{p-594a57c3.entry.js → p-cfb0bdbe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d551a51d.entry.js → p-dc23865f.entry.js} +1 -1
- package/dist/bromcom-ui/p-ddf90943.entry.js +5 -0
- package/dist/bromcom-ui/{p-170cf07d.js → p-e3ce7150.js} +2 -2
- package/dist/bromcom-ui/p-e45072df.entry.js +5 -0
- package/dist/bromcom-ui/p-e747137c.entry.js +5 -0
- package/dist/bromcom-ui/{p-ba9eff2a.entry.js → p-e8f7282a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1c9314bd.entry.js → p-e9672b15.entry.js} +1 -1
- package/dist/bromcom-ui/p-ef34f278.entry.js +5 -0
- package/dist/bromcom-ui/{p-11a5ae6d.entry.js → p-ef84ca66.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1c7ea00b.entry.js → p-ef8636fe.entry.js} +1 -1
- package/dist/bromcom-ui/p-f530cf23.js +5 -0
- package/dist/bromcom-ui/{p-5dea2654.entry.js → p-f65dae79.entry.js} +1 -1
- package/dist/bromcom-ui/p-f68a946f.js +5 -0
- package/dist/bromcom-ui/p-f9e5528f.entry.js +5 -0
- package/dist/bromcom-ui/{p-1bdfc73a.entry.js → p-fa1eae97.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1c801d0c.entry.js → p-fb083e20.entry.js} +1 -1
- package/dist/bromcom-ui/p-fb490a1f.entry.js +5 -0
- package/dist/cjs/{bcm-1d1fcf21.js → bcm-51d38d17.js} +7 -1
- package/dist/cjs/{bcm-accordion_63.cjs.entry.js → bcm-accordion_68.cjs.entry.js} +2641 -1319
- package/dist/cjs/bcm-alert.cjs.entry.js +89 -75
- package/dist/cjs/bcm-arrow.cjs.entry.js +34 -0
- package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +10 -9
- package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +10 -9
- package/dist/cjs/bcm-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/bcm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/bcm-caption.cjs.entry.js +10 -9
- package/dist/cjs/bcm-card.cjs.entry.js +6 -6
- package/dist/cjs/bcm-chip-group.cjs.entry.js +15 -19
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-content.cjs.entry.js +1 -1
- package/dist/cjs/bcm-date-picker.cjs.entry.js +5 -5
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +9 -9
- package/dist/cjs/bcm-default.cjs.entry.js +3 -3
- package/dist/cjs/bcm-error-layout.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +6 -6
- package/dist/cjs/bcm-form-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +3 -3
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +10 -10
- package/dist/cjs/bcm-message.cjs.entry.js +1 -1
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +8 -7
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +8 -7
- package/dist/cjs/bcm-modal-2.cjs.entry.js +8 -7
- package/dist/cjs/bcm-notification.cjs.entry.js +1 -1
- package/dist/cjs/bcm-number-input.cjs.entry.js +12 -12
- package/dist/cjs/bcm-overlay_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm-box-v2.cjs.entry.js +109 -0
- package/dist/cjs/bcm-popconfirm-host.cjs.entry.js +135 -0
- package/dist/cjs/bcm-range.cjs.entry.js +4 -4
- package/dist/cjs/bcm-react-number.cjs.entry.js +1 -1
- package/dist/cjs/bcm-resizable-pane.cjs.entry.js +42 -0
- package/dist/cjs/bcm-result-footer.cjs.entry.js +39 -0
- package/dist/cjs/bcm-result.cjs.entry.js +16 -47
- package/dist/cjs/bcm-segment-picker-item.cjs.entry.js +33 -0
- package/dist/cjs/bcm-segment-picker.cjs.entry.js +67 -0
- 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-skeleton.cjs.entry.js +8 -8
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/bcm-table.cjs.entry.js +9 -8
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tag.cjs.entry.js +5 -5
- package/dist/cjs/bcm-time-picker.cjs.entry.js +5 -5
- package/dist/cjs/bcm-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/bcm-timeline.cjs.entry.js +1 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +198 -42
- package/dist/cjs/bcm-treeview-group.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +4 -4
- package/dist/cjs/{caption-template-85a18b6d.js → caption-template-1ba40085.js} +10 -10
- package/dist/cjs/floating-ui-4c31473e.js +101 -0
- package/dist/{esm/floating-ui-3f4394da.js → cjs/floating-ui.dom.esm-f0638c44.js} +8 -93
- package/dist/cjs/{generate-7510539d.js → generate-eda14f12.js} +13 -36
- package/dist/cjs/{global-711c589c.js → global-971b32f6.js} +2 -2
- package/dist/cjs/{index-c591ecec.js → index-bb6ac306.js} +3 -0
- package/dist/cjs/{index-5279dea2.js → index-d3b89435.js} +386 -347
- package/dist/cjs/{input.style-b5676e6a.js → input.style-3e8b7803.js} +16 -15
- package/dist/cjs/{is-load-decorator-15036f37.js → is-load-decorator-60805e8b.js} +1 -1
- package/dist/cjs/{label-template-e83447b5.js → label-template-540044c9.js} +8 -7
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{number-helper-9d2d1d5a.js → number-helper-d14c9546.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +10 -9
- package/dist/cjs/old-bcm-popover.cjs.entry.js +4 -4
- package/dist/cjs/{package-a60955f7.js → package-f644e6eb.js} +1 -1
- package/dist/cjs/{popover-placement-d1aa81f0.js → popover-placement-3c0ad75e.js} +1 -1
- package/dist/cjs/popover.style-e390b5a1.js +108 -0
- package/dist/cjs/result.style-f58d0ac4.js +56 -0
- package/dist/cjs/segment-picker.style-ce057603.js +55 -0
- package/dist/cjs/{slot-template-29229e8f.js → slot-template-d02ae4e4.js} +2 -2
- package/dist/cjs/{string-helper-1ee6dc21.js → string-helper-cc89c9d6.js} +1 -1
- package/dist/cjs/types-e4c4d1b2.js +175 -0
- package/dist/collection/collection-manifest.json +15 -5
- package/dist/collection/components/atoms/{chip/chip-group.css → avatar/avatar.css} +4 -2
- package/dist/collection/components/atoms/avatar/avatar.js +13 -3
- package/dist/collection/components/atoms/avatar/avatar.style.js +6 -6
- package/dist/collection/components/atoms/{icon/icon.css → badge/badge.css} +3 -2
- package/dist/collection/components/atoms/badge/badge.js +10 -0
- package/dist/collection/components/atoms/badge/badge.style.js +10 -10
- package/dist/collection/components/atoms/button/button.css +11 -332
- package/dist/collection/components/atoms/button/button.js +429 -241
- package/dist/collection/components/atoms/button/button.style.js +89 -0
- package/dist/collection/components/atoms/chip/chip-group.js +2 -14
- package/dist/collection/components/atoms/chip/chip.css +11 -87
- package/dist/collection/components/atoms/chip/chip.js +84 -45
- package/dist/collection/components/atoms/chip/chip.style.js +99 -0
- package/dist/collection/components/atoms/divider/divider.js +7 -38
- package/dist/collection/components/atoms/divider/divider.style.js +19 -0
- package/dist/collection/components/atoms/icon/icon.js +14 -37
- package/dist/collection/components/atoms/label/label.js +21 -2
- package/dist/collection/components/atoms/link/link.js +132 -58
- package/dist/collection/components/atoms/link/link.style.js +39 -0
- package/dist/collection/components/molecules/accordion/accordion.js +3 -13
- package/dist/collection/components/molecules/alert/alert.js +118 -137
- package/dist/collection/components/molecules/alert/alert.style.js +65 -0
- package/dist/collection/components/molecules/checkbox/checkbox.css +10 -317
- package/dist/collection/components/molecules/checkbox/checkbox.js +119 -142
- package/dist/collection/components/molecules/checkbox/checkbox.style.js +156 -0
- package/dist/collection/components/molecules/{checkbox/group.js → checkbox-group/checkbox-group.js} +23 -40
- package/dist/collection/components/molecules/checkbox-group/checkbox-group.style.js +40 -0
- package/dist/collection/components/molecules/color-input/color-input.js +3 -1
- package/dist/collection/components/molecules/color-input/color-input.style.js +17 -0
- package/dist/collection/components/molecules/drawer/drawer.css +0 -81
- package/dist/collection/components/molecules/drawer/drawer.js +7 -13
- package/dist/collection/components/molecules/drawer/drawer.style.js +55 -0
- package/dist/collection/components/molecules/dropdown/dropdown.js +13 -7
- package/dist/collection/components/molecules/empty/empty.js +91 -3
- package/dist/collection/components/molecules/empty/empty.style.js +64 -0
- package/dist/collection/components/molecules/expansion-panel/bcm-expansion-panel-description.js +16 -0
- package/dist/collection/components/molecules/expansion-panel/bcm-expansion-panel-extra.js +16 -0
- package/dist/collection/components/molecules/expansion-panel/bcm-expansion-panel-header.js +16 -0
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +91 -57
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.style.js +91 -0
- package/dist/collection/components/molecules/input/input.js +78 -66
- package/dist/collection/components/molecules/input/input.style.js +15 -14
- package/dist/collection/components/molecules/menu/menu.js +14 -0
- package/dist/collection/components/molecules/modal/modal-footer.js +41 -0
- package/dist/collection/components/molecules/modal/modal-header.js +39 -0
- package/dist/collection/components/molecules/modal/modal.css +1 -139
- package/dist/collection/components/molecules/modal/modal.js +9 -16
- package/dist/collection/components/molecules/modal/modal.style.js +111 -0
- package/dist/collection/components/molecules/number-input/number-input.js +1 -1
- package/dist/collection/components/molecules/number-input/react-input.js +1 -1
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +22 -6
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +11 -9
- package/dist/collection/components/molecules/popconfirm-v2/pop-confirm-host.js +309 -0
- package/dist/collection/components/molecules/popconfirm-v2/popconf.style.js +57 -0
- package/dist/collection/components/molecules/popconfirm-v2/popconfirm-v2.js +201 -0
- package/dist/collection/components/molecules/popover/popover.js +3 -1
- package/dist/collection/components/molecules/popover/popover.style.js +42 -0
- package/dist/collection/components/molecules/radio/radio-group.js +6 -2
- package/dist/collection/components/molecules/radio/radio-group.style.js +37 -0
- package/dist/collection/components/{atoms/divider/divider.css → molecules/radio/radio.css} +9 -17
- package/dist/collection/components/molecules/radio/radio.js +21 -22
- package/dist/collection/components/molecules/radio/radio.style.js +67 -0
- package/dist/collection/components/molecules/result/result-footer.js +41 -0
- package/dist/collection/components/molecules/result/result.js +36 -65
- package/dist/collection/components/molecules/result/result.style.js +51 -0
- package/dist/collection/components/molecules/search/search.js +10 -13
- package/dist/collection/components/molecules/stepper/stepper.css +41 -35
- package/dist/collection/components/molecules/switch/switch.js +11 -24
- package/dist/collection/components/molecules/switch/switch.style.js +182 -0
- package/dist/collection/components/molecules/tab-group/tab-group.js +3 -28
- package/dist/collection/components/molecules/tab-group/tab-group.syle.js +63 -0
- package/dist/collection/components/molecules/tab-group/tab-item-header.js +7 -32
- package/dist/collection/components/molecules/tab-group/tab-item.js +7 -6
- package/dist/collection/components/molecules/textarea/textarea.js +55 -44
- package/dist/collection/components/molecules/textarea/textarea.style.js +122 -0
- package/dist/collection/components/molecules/tooltip/tooltip.js +5 -3
- package/dist/collection/components/molecules/tooltip/tooltip.style.js +38 -0
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +20 -20
- package/dist/collection/components/organism/list/list.css +73 -324
- package/dist/collection/components/organism/list/list.js +2 -2
- package/dist/collection/components/{molecules/checkbox/group.css → other/arrow/arrow.css} +24 -31
- package/dist/collection/components/other/arrow/arrow.js +70 -0
- package/dist/collection/components/other/resizable-pane/resizable-pane.js +79 -0
- package/dist/collection/components/other/segment-picker/segment-picker-item.js +158 -0
- package/dist/collection/components/other/segment-picker/segment-picker.js +252 -0
- package/dist/collection/components/other/segment-picker/segment-picker.style.js +50 -0
- package/dist/collection/components/other/shortcut/shortcut.js +12 -6
- package/dist/collection/components/other/shortcut/shortcut.style.js +38 -0
- package/dist/collection/components/other/toast/toast.js +15 -31
- package/dist/collection/components/other/toast/toast.style.js +176 -0
- package/dist/collection/components/other_deprecated/listbox/listbox-item.js +1 -1
- package/dist/collection/components/other_deprecated/listbox/listbox.js +1 -1
- package/dist/collection/components/other_deprecated/old-input/old-input.css +38 -24
- package/dist/collection/components/other_deprecated/old-input/old-input.js +4 -2
- package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +3 -2
- package/dist/collection/components/third-parts/colorful/colorful.css +0 -242
- package/dist/collection/components/third-parts/rc-picker/rc-picker.css +31 -27
- package/dist/collection/helper/generate.js +11 -16
- package/dist/collection/helper/index.js +1 -0
- package/dist/collection/helper/pop-confirm-helper.js +76 -0
- package/dist/collection/helper/popover-helper.js +8 -7
- package/dist/collection/helper/tooltip-helper.js +3 -15
- package/dist/collection/models/bcm.js +9 -1
- package/dist/collection/templates/caption-template.js +9 -9
- package/dist/collection/templates/checkbox-template.js +11 -16
- package/dist/collection/templates/icon-template.js +4 -19
- package/dist/collection/templates/info-footer-template.js +1 -1
- package/dist/collection/templates/label-template.js +6 -5
- package/dist/collection/templates/list-item-template.js +3 -2
- package/dist/collection/templates/step-template.js +1 -1
- package/dist/components/avatar.js +17 -20
- package/dist/components/badge.js +16 -13
- package/dist/components/bcm-accordion.js +3 -6
- package/dist/components/bcm-alert.js +99 -88
- package/dist/components/{bcm-input-2.d.ts → bcm-arrow.d.ts} +4 -4
- package/dist/components/bcm-arrow.js +47 -0
- package/dist/components/bcm-attendance-actions-comment.js +3 -3
- package/dist/components/bcm-attendance-actions-dropdown.js +3 -3
- package/dist/components/bcm-attendance-actions.js +3 -3
- package/dist/components/bcm-autocomplete.js +6 -12
- package/dist/components/bcm-button-group.js +1 -1
- package/dist/components/bcm-caption.js +3 -2
- package/dist/components/bcm-checkbox-group.js +62 -40
- package/dist/components/bcm-chip-group.js +6 -9
- package/dist/components/bcm-color-input.js +17 -2
- package/dist/components/bcm-date-picker.js +2 -2
- package/dist/components/bcm-date.js +3 -2
- package/dist/components/bcm-drawer.js +61 -29
- package/dist/components/bcm-dropdown.js +3 -3
- package/dist/components/bcm-expansion-panel-description.d.ts +11 -0
- package/dist/components/bcm-expansion-panel-description.js +36 -0
- package/dist/components/bcm-expansion-panel-extra.d.ts +11 -0
- package/dist/components/bcm-expansion-panel-extra.js +36 -0
- package/dist/components/bcm-expansion-panel-header.d.ts +11 -0
- package/dist/components/bcm-expansion-panel-header.js +36 -0
- package/dist/components/bcm-expansion-panel.js +118 -52
- package/dist/components/bcm-form-2.js +1 -1
- package/dist/components/bcm-input-dropdown.js +4 -3
- package/dist/components/bcm-item.js +1 -1
- package/dist/components/bcm-modal-2-footer.js +1 -1
- package/dist/components/bcm-modal-2-header.js +1 -1
- package/dist/components/bcm-modal-2.js +2 -2
- package/dist/components/bcm-modal-footer.d.ts +11 -0
- package/dist/components/bcm-modal-footer.js +47 -0
- package/dist/components/bcm-modal-header.d.ts +11 -0
- package/dist/components/bcm-modal-header.js +45 -0
- package/dist/components/bcm-modal.js +12 -25
- package/dist/components/bcm-number-input.js +4 -3
- package/dist/components/bcm-popconfirm-box-v2.d.ts +11 -0
- package/dist/components/bcm-popconfirm-box-v2.js +132 -0
- package/dist/components/bcm-popconfirm-host.d.ts +11 -0
- package/dist/components/bcm-popconfirm-host.js +158 -0
- package/dist/components/bcm-popconfirm.js +5 -17
- package/dist/components/bcm-popover.js +11 -10
- package/dist/components/bcm-progress.js +1 -1
- package/dist/components/bcm-radio-group.js +43 -4
- package/dist/components/bcm-range.js +1 -1
- package/dist/components/bcm-resizable-pane.d.ts +11 -0
- package/dist/components/bcm-resizable-pane.js +60 -0
- package/dist/components/{bcm-checkbox-lite.d.ts → bcm-result-footer.d.ts} +4 -4
- package/dist/components/bcm-result-footer.js +47 -0
- package/dist/components/bcm-result.js +20 -61
- package/dist/components/bcm-segment-picker-item.d.ts +11 -0
- package/dist/components/bcm-segment-picker-item.js +51 -0
- package/dist/components/bcm-segment-picker.d.ts +11 -0
- package/dist/components/bcm-segment-picker.js +87 -0
- package/dist/components/bcm-select.js +6 -12
- package/dist/components/bcm-shortcut.js +48 -8
- package/dist/components/bcm-stepper.js +5 -4
- package/dist/components/bcm-switch.js +189 -17
- package/dist/components/bcm-tab-group.js +5 -13
- package/dist/components/bcm-tab-item-header.js +9 -17
- package/dist/components/bcm-tab-item.js +8 -7
- package/dist/components/bcm-table.js +2 -1
- package/dist/components/bcm-tag.js +1 -1
- package/dist/components/bcm-time-picker.js +1 -1
- package/dist/components/bcm-toast.js +188 -32
- package/dist/components/bcm.js +8 -2
- package/dist/components/button.js +232 -184
- package/dist/components/caption-template.js +9 -9
- package/dist/components/checkbox.js +94 -104
- package/dist/components/checkbox.style.js +159 -0
- package/dist/components/chip.js +152 -40
- package/dist/components/colorful.js +1 -1
- package/dist/components/datetime-picker.js +3 -3
- package/dist/components/divider.js +21 -13
- package/dist/components/empty.js +75 -3
- package/dist/{cjs/floating-ui-5b396838.js → components/floating-ui.dom.esm.js} +1 -96
- package/dist/components/floating-ui.js +2 -1407
- package/dist/components/generate.js +14 -37
- package/dist/components/icon.js +14 -13
- package/dist/components/index.d.ts +14 -4
- package/dist/components/index.js +12 -2
- package/dist/components/index4.js +2590 -173
- package/dist/components/index5.js +171 -2549
- package/dist/components/input.js +77 -54
- package/dist/components/input.style.js +16 -15
- package/dist/components/label.js +12 -9
- package/dist/components/link.js +83 -39
- package/dist/components/linked.js +2 -2
- package/dist/components/list.js +28 -33
- package/dist/components/listbox-item.js +21 -9
- package/dist/components/listbox.js +7 -13
- package/dist/components/menu.js +15 -1
- package/dist/components/modal.style.js +114 -0
- package/dist/components/old-bcm-popover.js +1 -1
- package/dist/components/old-input.js +5 -3
- package/dist/components/old-popover-box.js +1 -1
- package/dist/components/popconfirm-box.js +12 -22
- package/dist/components/popover.style.js +108 -0
- package/dist/components/radio.js +79 -24
- package/dist/components/rc-overflow.js +1 -1
- package/dist/components/rc-picker.js +2 -2
- package/dist/components/result.style.js +54 -0
- package/dist/components/search.js +14 -16
- package/dist/components/segment-picker.style.js +53 -0
- package/dist/components/select-box.js +6 -12
- package/dist/components/skeleton.js +2 -2
- package/dist/components/step.js +1 -1
- package/dist/components/string-helper.js +1 -1
- package/dist/components/tab-group.syle.js +66 -0
- package/dist/components/textarea.js +152 -36
- package/dist/components/tooltip-helper.js +3 -16
- package/dist/components/tooltip.js +5 -4
- package/dist/esm/{bcm-a50d55ba.js → bcm-7f07539b.js} +7 -1
- package/dist/esm/{bcm-accordion_63.entry.js → bcm-accordion_68.entry.js} +2198 -881
- package/dist/esm/bcm-alert.entry.js +89 -75
- package/dist/esm/bcm-arrow.entry.js +30 -0
- package/dist/esm/bcm-attendance-actions-comment.entry.js +10 -9
- package/dist/esm/bcm-attendance-actions-dropdown.entry.js +10 -9
- package/dist/esm/bcm-autocomplete.entry.js +1 -1
- package/dist/esm/bcm-box.entry.js +1 -1
- package/dist/esm/bcm-breadcrumb.entry.js +3 -3
- package/dist/esm/bcm-caption.entry.js +10 -9
- package/dist/esm/bcm-card.entry.js +6 -6
- package/dist/esm/bcm-chip-group.entry.js +15 -19
- package/dist/esm/bcm-colorpicker.entry.js +1 -1
- package/dist/esm/bcm-content.entry.js +1 -1
- package/dist/esm/bcm-date-picker.entry.js +5 -5
- package/dist/esm/bcm-datetime-picker.entry.js +9 -9
- package/dist/esm/bcm-default.entry.js +3 -3
- package/dist/esm/bcm-error-layout.entry.js +1 -1
- package/dist/esm/bcm-form-2.entry.js +6 -6
- package/dist/esm/bcm-form-group.entry.js +1 -1
- package/dist/esm/bcm-input-custom.entry.js +3 -3
- package/dist/esm/bcm-input-dropdown.entry.js +10 -10
- package/dist/esm/bcm-message.entry.js +1 -1
- package/dist/esm/bcm-modal-2-footer.entry.js +8 -7
- package/dist/esm/bcm-modal-2-header.entry.js +8 -7
- package/dist/esm/bcm-modal-2.entry.js +8 -7
- package/dist/esm/bcm-notification.entry.js +1 -1
- package/dist/esm/bcm-number-input.entry.js +12 -12
- package/dist/esm/bcm-overlay_2.entry.js +1 -1
- package/dist/esm/bcm-popconfirm-box-v2.entry.js +105 -0
- package/dist/esm/bcm-popconfirm-host.entry.js +131 -0
- package/dist/esm/bcm-range.entry.js +4 -4
- package/dist/esm/bcm-react-number.entry.js +1 -1
- package/dist/esm/bcm-resizable-pane.entry.js +38 -0
- package/dist/esm/bcm-result-footer.entry.js +35 -0
- package/dist/esm/bcm-result.entry.js +16 -47
- package/dist/esm/bcm-segment-picker-item.entry.js +29 -0
- package/dist/esm/bcm-segment-picker.entry.js +63 -0
- package/dist/esm/bcm-select-group.entry.js +1 -1
- package/dist/esm/bcm-select-option.entry.js +1 -1
- package/dist/esm/bcm-skeleton.entry.js +8 -8
- package/dist/esm/bcm-tab-pane.entry.js +1 -1
- package/dist/esm/bcm-table.entry.js +9 -8
- package/dist/esm/bcm-tabs-content.entry.js +1 -1
- package/dist/esm/bcm-tag.entry.js +5 -5
- package/dist/esm/bcm-time-picker.entry.js +5 -5
- package/dist/esm/bcm-timeline-item.entry.js +1 -1
- package/dist/esm/bcm-timeline.entry.js +1 -1
- package/dist/esm/bcm-toast.entry.js +192 -36
- package/dist/esm/bcm-treeview-group.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +5 -5
- package/dist/esm/{caption-template-3cd42c3b.js → caption-template-56977835.js} +10 -10
- package/dist/esm/floating-ui-4016b544.js +99 -0
- package/dist/esm/floating-ui.dom.esm-40a07b59.js +1411 -0
- package/dist/esm/{generate-74379aca.js → generate-8470dd6c.js} +14 -37
- package/dist/esm/{global-e20393a3.js → global-e694da71.js} +2 -2
- package/dist/esm/{index-0615c2b8.js → index-15387314.js} +3 -1
- package/dist/esm/{index-3bc8c6e3.js → index-9f698d35.js} +386 -347
- package/dist/esm/{input.style-e855c0f3.js → input.style-fe41ebc8.js} +16 -15
- package/dist/esm/{is-load-decorator-8277e3b8.js → is-load-decorator-5b0610df.js} +1 -1
- package/dist/esm/{label-template-ef97aadb.js → label-template-c7e70e5f.js} +8 -7
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{number-helper-6c691943.js → number-helper-56061510.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +10 -9
- package/dist/esm/old-bcm-popover.entry.js +4 -4
- package/dist/esm/{package-0b936309.js → package-387afefd.js} +1 -1
- package/dist/esm/{popover-placement-1b15cc99.js → popover-placement-6391b815.js} +1 -1
- package/dist/esm/popover.style-be349acc.js +104 -0
- package/dist/esm/result.style-de3bc950.js +54 -0
- package/dist/esm/segment-picker.style-1e837fe7.js +53 -0
- package/dist/esm/{slot-template-0d958dcc.js → slot-template-250f6ed4.js} +2 -2
- package/dist/esm/{string-helper-b4602002.js → string-helper-243b3e1d.js} +1 -1
- package/dist/esm/types-ec7dcf4f.js +173 -0
- package/dist/types/components/atoms/avatar/avatar.style.d.ts +21 -21
- package/dist/types/components/atoms/button/button.d.ts +32 -20
- package/dist/types/components/atoms/button/button.style.d.ts +334 -0
- package/dist/types/components/atoms/chip/chip.d.ts +4 -14
- package/dist/types/components/atoms/chip/chip.style.d.ts +387 -0
- package/dist/types/components/atoms/divider/divider.d.ts +1 -2
- package/dist/types/components/atoms/divider/divider.style.d.ts +42 -0
- package/dist/types/components/atoms/icon/icon.d.ts +0 -2
- package/dist/types/components/atoms/label/label.d.ts +1 -0
- package/dist/types/components/atoms/link/link.d.ts +10 -6
- package/dist/types/components/atoms/link/link.style.d.ts +171 -0
- package/dist/types/components/molecules/alert/alert.d.ts +15 -17
- package/dist/types/components/molecules/alert/alert.style.d.ts +331 -0
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +16 -29
- package/dist/types/components/molecules/checkbox/checkbox.style.d.ts +498 -0
- package/dist/types/components/molecules/checkbox-group/checkbox-group.style.d.ts +108 -0
- package/dist/types/components/molecules/color-input/color-input.d.ts +0 -1
- package/dist/types/components/molecules/color-input/color-input.style.d.ts +10 -0
- package/dist/types/components/molecules/drawer/drawer.style.d.ts +252 -0
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +2 -2
- package/dist/types/components/molecules/empty/empty.d.ts +6 -0
- package/dist/types/components/molecules/empty/empty.style.d.ts +296 -0
- package/dist/types/components/molecules/expansion-panel/bcm-expansion-panel-description.d.ts +6 -0
- package/dist/types/components/molecules/expansion-panel/bcm-expansion-panel-extra.d.ts +6 -0
- package/dist/types/components/molecules/expansion-panel/bcm-expansion-panel-header.d.ts +6 -0
- package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +6 -5
- package/dist/types/components/molecules/expansion-panel/expansion-panel.style.d.ts +437 -0
- package/dist/types/components/molecules/input/input.d.ts +2 -2
- package/dist/types/components/molecules/modal/modal-footer.d.ts +7 -0
- package/dist/types/components/molecules/modal/modal-header.d.ts +7 -0
- package/dist/types/components/molecules/modal/modal.style.d.ts +364 -0
- package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +1 -1
- package/dist/types/components/molecules/popconfirm-v2/pop-confirm-host.d.ts +26 -0
- package/dist/types/components/molecules/popconfirm-v2/popconf.style.d.ts +277 -0
- package/dist/types/components/molecules/popconfirm-v2/popconfirm-v2.d.ts +15 -0
- package/dist/types/components/molecules/popover/popover.style.d.ts +103 -0
- package/dist/types/components/molecules/radio/radio-group.style.d.ts +108 -0
- package/dist/types/components/molecules/radio/radio.style.d.ts +202 -0
- package/dist/types/components/molecules/result/result-footer.d.ts +7 -0
- package/dist/types/components/molecules/result/result.d.ts +3 -7
- package/dist/types/components/molecules/result/result.style.d.ts +180 -0
- package/dist/types/components/molecules/switch/switch.style.d.ts +537 -0
- package/dist/types/components/molecules/tab-group/tab-group.d.ts +0 -1
- package/dist/types/components/molecules/tab-group/tab-group.syle.d.ts +236 -0
- package/dist/types/components/molecules/tab-group/tab-item-header.d.ts +0 -1
- package/dist/types/components/molecules/textarea/textarea.d.ts +2 -2
- package/dist/types/components/molecules/textarea/textarea.style.d.ts +610 -0
- package/dist/types/components/molecules/tooltip/tooltip.style.d.ts +94 -0
- package/dist/types/components/other/arrow/arrow.d.ts +7 -0
- package/dist/types/components/other/resizable-pane/resizable-pane.d.ts +11 -0
- package/dist/types/components/other/segment-picker/segment-picker-item.d.ts +12 -0
- package/dist/types/components/other/segment-picker/segment-picker.d.ts +35 -0
- package/dist/types/components/other/segment-picker/segment-picker.style.d.ts +150 -0
- package/dist/types/components/other/shortcut/shortcut.style.d.ts +91 -0
- package/dist/types/components/other/toast/toast.style.d.ts +539 -0
- package/dist/types/components.d.ts +448 -278
- package/dist/types/helper/generate.d.ts +0 -3
- package/dist/types/helper/index.d.ts +1 -0
- package/dist/types/helper/pop-confirm-helper.d.ts +23 -0
- package/dist/types/helper/tooltip-helper.d.ts +0 -1
- package/dist/types/models/bcm-types.d.ts +3 -2
- package/dist/types/models/bcm.d.ts +7 -1
- package/dist/types/templates/icon-template.d.ts +2 -2
- package/dist/types/templates/label-template.d.ts +1 -0
- package/package.json +2 -2
- package/dist/bromcom-ui/p-0345ed68.entry.js +0 -5
- package/dist/bromcom-ui/p-069ae664.entry.js +0 -5
- package/dist/bromcom-ui/p-08c75801.js +0 -5
- package/dist/bromcom-ui/p-193d926a.entry.js +0 -5
- package/dist/bromcom-ui/p-228c74e9.entry.js +0 -5
- package/dist/bromcom-ui/p-29c4dc0a.entry.js +0 -5
- package/dist/bromcom-ui/p-2d34eb30.entry.js +0 -5
- package/dist/bromcom-ui/p-2df6b47d.js +0 -5
- package/dist/bromcom-ui/p-2ee89105.entry.js +0 -5
- package/dist/bromcom-ui/p-305b0bc8.entry.js +0 -5
- package/dist/bromcom-ui/p-3238bf36.js +0 -5
- package/dist/bromcom-ui/p-3b863650.entry.js +0 -5
- package/dist/bromcom-ui/p-3fac58f7.js +0 -5
- package/dist/bromcom-ui/p-43c578cf.js +0 -5
- package/dist/bromcom-ui/p-4f05c6a4.entry.js +0 -5
- package/dist/bromcom-ui/p-4f6eb6d6.js +0 -5
- package/dist/bromcom-ui/p-6e5f5f36.js +0 -5
- package/dist/bromcom-ui/p-7400e3c3.entry.js +0 -5
- package/dist/bromcom-ui/p-74e6d2b6.js +0 -5
- package/dist/bromcom-ui/p-87d9dff7.entry.js +0 -5
- package/dist/bromcom-ui/p-8e683b32.js +0 -5
- package/dist/bromcom-ui/p-a2ed89f0.entry.js +0 -5
- package/dist/bromcom-ui/p-a313fba6.js +0 -5
- package/dist/bromcom-ui/p-ae57f046.entry.js +0 -5
- package/dist/bromcom-ui/p-bbae06ed.entry.js +0 -5
- package/dist/bromcom-ui/p-d1298c40.js +0 -5
- package/dist/bromcom-ui/p-e99cc26b.entry.js +0 -5
- package/dist/bromcom-ui/p-ea7368b4.entry.js +0 -5
- package/dist/bromcom-ui/p-ec1fe98f.entry.js +0 -16
- package/dist/bromcom-ui/p-ece578ef.entry.js +0 -5
- package/dist/cjs/bcm-input-2.cjs.entry.js +0 -153
- package/dist/cjs/bcm-popover.cjs.entry.js +0 -230
- package/dist/cjs/index-d321de96.js +0 -193
- package/dist/cjs/types-cc4adee7.js +0 -19
- package/dist/cjs/validators-9369c82a.js +0 -33
- package/dist/collection/components/atoms/link/link.css +0 -175
- package/dist/collection/components/atoms/states/button.states.js +0 -31
- package/dist/collection/components/molecules/accordion/accordion.css +0 -127
- package/dist/collection/components/molecules/alert/alert.css +0 -191
- package/dist/collection/components/molecules/alert/types.js +0 -23
- package/dist/collection/components/molecules/checkbox/checkbox-lite.js +0 -236
- package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +0 -238
- package/dist/collection/components/molecules/input/input.css +0 -365
- package/dist/collection/components/molecules/input/input2.js +0 -918
- package/dist/collection/components/molecules/result/result.css +0 -164
- package/dist/collection/components/molecules/result/types.js +0 -22
- package/dist/collection/components/molecules/search/search.css +0 -365
- package/dist/collection/components/molecules/states/alert.states.js +0 -25
- package/dist/collection/components/molecules/switch/switch.css +0 -434
- package/dist/collection/components/molecules/textarea/textarea.css +0 -365
- package/dist/collection/components/molecules/textarea/types.js +0 -13
- package/dist/collection/global/components/_checkbox.css +0 -378
- package/dist/components/bcm-checkbox-lite.js +0 -10
- package/dist/components/bcm-input-2.js +0 -225
- package/dist/components/checkbox-lite.js +0 -97
- package/dist/components/input-template.js +0 -90
- package/dist/components/validators.js +0 -35
- package/dist/esm/bcm-input-2.entry.js +0 -149
- package/dist/esm/bcm-popover.entry.js +0 -226
- package/dist/esm/index-7e71bbc8.js +0 -191
- package/dist/esm/types-6f06fa1a.js +0 -19
- package/dist/esm/validators-c067048c.js +0 -31
- package/dist/types/components/atoms/states/button.states.d.ts +0 -7
- package/dist/types/components/molecules/alert/types.d.ts +0 -25
- package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +0 -14
- package/dist/types/components/molecules/input/input2.d.ts +0 -64
- package/dist/types/components/molecules/result/types.d.ts +0 -19
- package/dist/types/components/molecules/states/alert.states.d.ts +0 -7
- package/dist/types/components/molecules/textarea/types.d.ts +0 -9
- /package/dist/collection/components/{third-parts/rc-picker → organism/date}/date.js +0 -0
- /package/dist/types/components/molecules/{checkbox/group.d.ts → checkbox-group/checkbox-group.d.ts} +0 -0
- /package/dist/types/components/{third-parts/rc-picker → organism/date}/date.d.ts +0 -0
|
@@ -2,13 +2,95 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { c as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
6
|
+
import { G as Generate } from './generate.js';
|
|
7
|
+
import { B as Bcm } from './bcm.js';
|
|
8
|
+
import { c as ce } from './index4.js';
|
|
9
|
+
|
|
10
|
+
const buttonStyle = ce({
|
|
11
|
+
slots: {
|
|
12
|
+
base: "",
|
|
13
|
+
hostStyle: "bcm-button bcm-ui-element bcm-ui-action tw-w-fit tw-relative tw-inline-block",
|
|
14
|
+
containerStyle: ["bcm-button__container tw-button-reset", "tw-font-medium tw-no-underline", "tw-flex tw-items-center tw-justify-center tw-gap-2", "tw-rounded-[--bcm-button-radius] tw-border tw-border-solid"],
|
|
15
|
+
iconStyle: "",
|
|
16
|
+
textStyle: "empty:tw-hidden tw-flex tw-items-center tw-justify-center tw-gap-2",
|
|
17
|
+
},
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
small: {
|
|
21
|
+
containerStyle: ["bcm-button__container-size-small", "tw-text-size-4 tw-py-px tw-px-2", "tw-min-h-6"],
|
|
22
|
+
},
|
|
23
|
+
medium: {
|
|
24
|
+
containerStyle: ["bcm-button__container-size-medium", "tw-text-size-5 tw-py-0.5 tw-px-3", "tw-min-h-8"],
|
|
25
|
+
},
|
|
26
|
+
large: {
|
|
27
|
+
containerStyle: ["bcm-button__container-size-large", "tw-text-size-6 tw-py-1 tw-px-3", "tw-min-h-10"],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
solid: {
|
|
32
|
+
containerStyle: "bcm-button__container-kind-solid",
|
|
33
|
+
},
|
|
34
|
+
ghost: {
|
|
35
|
+
containerStyle: "bcm-button__container-kind-ghost",
|
|
36
|
+
},
|
|
37
|
+
link: {
|
|
38
|
+
containerStyle: ["bcm-button__container-kind-link"],
|
|
39
|
+
},
|
|
40
|
+
outline: {
|
|
41
|
+
containerStyle: "bcm-button__container-kind-outline",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
fullWidth: {
|
|
45
|
+
true: {
|
|
46
|
+
containerStyle: "full-width tw-w-full",
|
|
47
|
+
hostStyle: "full-width tw-w-full",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
checked: {
|
|
51
|
+
true: {
|
|
52
|
+
containerStyle: "checked !tw-bg-[--bcm-button-bg-active]",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
disabled: {
|
|
56
|
+
true: {
|
|
57
|
+
containerStyle: "disabled tw-cursor-not-allowed",
|
|
58
|
+
},
|
|
59
|
+
false: {
|
|
60
|
+
containerStyle: [
|
|
61
|
+
"tw-cursor-pointer",
|
|
62
|
+
"tw-bg-[--bcm-button-bg] tw-text-[--bcm-button-text] tw-border-[--bcm-button-border]",
|
|
63
|
+
"hover:tw-bg-[--bcm-button-bg-hover] hover:tw-text-[--bcm-button-text-hover] hover:tw-border-[--bcm-button-border-hover]",
|
|
64
|
+
"active:tw-bg-[--bcm-button-bg-active] active:tw-text-[--bcm-button-text-active] active:tw-border-[--bcm-button-border-active]",
|
|
65
|
+
"focus-visible:tw-ring",
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
compoundVariants: [
|
|
71
|
+
{
|
|
72
|
+
disabled: true,
|
|
73
|
+
kind: ["solid", "ghost"],
|
|
74
|
+
class: {
|
|
75
|
+
containerStyle: "tw-bg-color-disabled tw-text-color-disabled tw-border-color-disabled",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
disabled: true,
|
|
80
|
+
kind: ["link"],
|
|
81
|
+
class: {
|
|
82
|
+
containerStyle: "tw-text-color-disabled tw-border-transparent tw-bg-transparent",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
defaultVariants: {
|
|
87
|
+
size: "medium",
|
|
88
|
+
kind: "solid",
|
|
89
|
+
fullWidth: false,
|
|
90
|
+
checked: false,
|
|
91
|
+
disabled: false,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
12
94
|
|
|
13
95
|
const variantOptions = {
|
|
14
96
|
save: {
|
|
@@ -177,207 +259,173 @@ var VariantProps;
|
|
|
177
259
|
VariantProps["download"] = "download";
|
|
178
260
|
})(VariantProps || (VariantProps = {}));
|
|
179
261
|
|
|
180
|
-
const {
|
|
181
|
-
value: new Map(),
|
|
182
|
-
setData: {},
|
|
183
|
-
removeData: {}
|
|
184
|
-
});
|
|
185
|
-
const setValue = (val) => {
|
|
186
|
-
const data = Object.assign(Object.assign({}, val), (variantOptions[val.variant] && {
|
|
187
|
-
icon: variantOptions[val.variant].icon,
|
|
188
|
-
value: variantOptions[val.variant].text,
|
|
189
|
-
iconPosition: Bcm.IconPosition[variantOptions[val.variant].iconPosition],
|
|
190
|
-
variantColor: variantOptions[val.variant].color
|
|
191
|
-
}));
|
|
192
|
-
state.value.set(data.id, data);
|
|
193
|
-
};
|
|
194
|
-
const removeValue = (_id) => {
|
|
195
|
-
state.value.delete(_id);
|
|
196
|
-
};
|
|
197
|
-
const getValue = (id) => snq(() => state.value.get(id), {});
|
|
198
|
-
const buttonState = {
|
|
199
|
-
setValue,
|
|
200
|
-
removeValue,
|
|
201
|
-
getValue
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
const ButtonTemplate = ({ value, type, componentClass, disabled, href, target, loading, isIconOnly, icon, iconPosition, id }) => {
|
|
205
|
-
const ButtonTagType = (href) ? Bcm.HtmlElementType.a : Bcm.HtmlElementType.button;
|
|
206
|
-
return (h(ButtonTagType, Object.assign({ id: id }, (type == Bcm.HtmlElementType.button && { type }), { class: componentClass, disabled: disabled, href: href, target: target, tabindex: "0", "aria-label": "button" }),
|
|
207
|
-
h("span", { hidden: true },
|
|
208
|
-
h("slot", null)),
|
|
209
|
-
loading && h("span", { class: "bcm-button__container-loading" },
|
|
210
|
-
" ",
|
|
211
|
-
h("span", { class: "bcm-button__container-icon" },
|
|
212
|
-
h("i", { class: "far fa-spinner-third fa-spin" }),
|
|
213
|
-
" ")),
|
|
214
|
-
icon && h("span", { class: `${iconPosition} bcm-button__container-icon` },
|
|
215
|
-
h("i", { class: `${icon}` })),
|
|
216
|
-
!isIconOnly && (h(SlotTemplate, { className: "bcm-button__container-text", value: value })),
|
|
217
|
-
h("slot", { name: "suffix" })));
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
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-700);--bcm-button-solid-border-default:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-color-hover:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-hover:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-border-hover:var(--bcm-new-ds-color-blue-800);--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-900);--bcm-button-solid-border-focus-visible:var(--bcm-new-ds-color-blue-900);--bcm-button-solid-color-active:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-active:var(--bcm-new-ds-color-blue-900);--bcm-button-solid-border-active:var(--bcm-new-ds-color-blue-900);--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-700);--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-700);--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-700);--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-700);--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-700);--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-ghost-link-color-default:var(--bcm-new-ds-color-slate-700);--bcm-button-ghost-link-background-color-default:var(--bcm-new-ds-color-transparent);--bcm-button-ghost-link-border-default:var(--bcm-new-ds-color-transparent);--bcm-button-ghost-link-color-hover:var(--bcm-new-ds-color-slate-700);--bcm-button-ghost-link-background-color-hover:var(--bcm-new-ds-color-slate-200);--bcm-button-ghost-link-border-hover:var(--bcm-new-ds-color-transparent);--bcm-button-ghost-link-color-focus-visible:var(--bcm-new-ds-color-slate-700);--bcm-button-ghost-link-background-color-focus-visible:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-link-border-focus-visible:var(--bcm-new-ds-color-transparent);--bcm-button-ghost-link-color-active:var(--bcm-new-ds-color-slate-700);--bcm-button-ghost-link-background-color-active:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-link-border-active:var(--bcm-new-ds-color-transparent);--bcm-button-ghost-link-color-disabled:var(--bcm-new-ds-color-slate-500);--bcm-button-ghost-link-background-color-disabled:var(--bcm-new-ds-color-transparent);--bcm-button-ghost-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-kind-ghost-link{color:var(--bcm-button-ghost-link-color-default);background-color:var(--bcm-button-ghost-link-background-color-default);border-color:var(--bcm-button-ghost-link-border-default)}.bcm-button__container-kind-ghost-link:hover{color:var(--bcm-button-ghost-link-color-hover);background-color:var(--bcm-button-ghost-link-background-color-hover);border-color:var(--bcm-button-ghost-link-border-hover)}.bcm-button__container-kind-ghost-link:focus-visible{color:var(--bcm-button-ghost-link-color-focus-visible);background-color:var(--bcm-button-ghost-link-background-color-focus-visible);border-color:var(--bcm-button-ghost-link-border-focus-visible)}.bcm-button__container-kind-ghost-link:active{color:var(--bcm-button-ghost-link-color-active);background-color:var(--bcm-button-ghost-link-background-color-active);border-color:var(--bcm-button-ghost-link-border-active)}.bcm-button__container-kind-ghost-link:disabled{color:var(--bcm-button-ghost-link-color-disabled);background-color:var(--bcm-button-ghost-link-background-color-disabled);border-color:var(--bcm-button-ghost-link-border-disabled)}.bcm-button__container-kind-ghost-link.checked{color:var(--bcm-button-ghost-link-color-active);background-color:var(--bcm-button-ghost-link-background-color-active);border-color:var(--bcm-button-ghost-link-border-active)}.bcm-button__container-kind-ghost-link.disabled{color:var(--bcm-button-ghost-link-color-disabled);background-color:var(--bcm-button-ghost-link-background-color-disabled);border-color:var(--bcm-button-ghost-link-border-disabled)}.bcm-button__container-kind-ghost-link .bcm-button__container-loading{color:var(--bcm-button-ghost-link-color-default);background-color:var(--bcm-button-ghost-link-background-color-default);border-color:var(--bcm-button-ghost-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)}";
|
|
262
|
+
const buttonCss = "@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}:root{--bcm-button-bg:var(--bcm-ui-color-background-primary-info-default);--bcm-button-bg-hover:var(--bcm-ui-color-background-primary-info-hover);--bcm-button-bg-active:var(--bcm-ui-color-background-primary-info-active);--bcm-button-text:var(--bcm-ui-color-text-base);--bcm-button-text-hover:var(--bcm-ui-color-text-base);--bcm-button-text-active:var(--bcm-ui-color-text-base);--bcm-button-border:var(--bcm-ui-color-background-primary-info-default);--bcm-button-border-hover:var(--bcm-ui-color-background-primary-info-hover);--bcm-button-border-active:var(--bcm-ui-color-background-primary-info-active);--bcm-button-radius:var(--bcm-ui-radius)}";
|
|
221
263
|
|
|
222
264
|
const BcmButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
223
265
|
constructor() {
|
|
224
266
|
super();
|
|
225
267
|
this.__registerHost();
|
|
268
|
+
this.bcmButtonClick = createEvent(this, "bcm-button-click", 7);
|
|
226
269
|
this.bcmClick = createEvent(this, "bcm-click", 7);
|
|
227
|
-
|
|
228
|
-
this.
|
|
270
|
+
// isLink returns true if the button should be rendered as a link
|
|
271
|
+
this.isLink = () => !!this.href;
|
|
229
272
|
this.type = Bcm.ButtonType.button;
|
|
273
|
+
this.form = undefined;
|
|
274
|
+
this.formAction = undefined;
|
|
275
|
+
this.formMethod = undefined;
|
|
276
|
+
this.formEnctype = undefined;
|
|
277
|
+
this.formTarget = undefined;
|
|
278
|
+
this.formNoValidate = undefined;
|
|
279
|
+
this.href = undefined;
|
|
280
|
+
this.target = Bcm.Target["_blank"];
|
|
281
|
+
this.rel = "noreferrer noopener";
|
|
282
|
+
this.download = undefined;
|
|
283
|
+
this._id = Generate.UID();
|
|
284
|
+
this.value = undefined;
|
|
285
|
+
this.name = undefined;
|
|
286
|
+
this.variant = undefined;
|
|
287
|
+
this.dataDismiss = false;
|
|
288
|
+
this.color = undefined;
|
|
289
|
+
this.checked = false;
|
|
230
290
|
this.size = Bcm.Size.medium;
|
|
231
291
|
this.disabled = false;
|
|
292
|
+
this.hidden = false;
|
|
232
293
|
this.kind = Bcm.Kind.solid;
|
|
233
294
|
this.outline = false;
|
|
295
|
+
this.filled = true;
|
|
234
296
|
this.icon = undefined;
|
|
235
|
-
this.href = undefined;
|
|
236
|
-
this.target = undefined;
|
|
237
|
-
this.value = undefined;
|
|
238
297
|
this.loading = false;
|
|
239
|
-
this.
|
|
240
|
-
this.dataDismiss = false;
|
|
298
|
+
this.text = undefined;
|
|
241
299
|
this.fullWidth = false;
|
|
242
300
|
this.iconPosition = Bcm.IconPosition.prefix;
|
|
243
|
-
this.color = undefined;
|
|
244
|
-
this.checked = false;
|
|
245
301
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const {
|
|
255
|
-
|
|
256
|
-
|
|
302
|
+
render() {
|
|
303
|
+
/* style definitions */
|
|
304
|
+
const { color, kind, size, variant, fullWidth, outline } = this;
|
|
305
|
+
/* Common Attributes */
|
|
306
|
+
const { value, name, dataDismiss, disabled, loading, icon, iconPosition, text } = this;
|
|
307
|
+
/* Button Attributes */
|
|
308
|
+
const { type, form, formAction, formMethod, formEnctype, formTarget, formNoValidate, checked } = this;
|
|
309
|
+
/* Link Attributes */
|
|
310
|
+
const { href, target, rel, download } = this;
|
|
311
|
+
/* Tag */
|
|
312
|
+
const Tag = this.isLink() ? "a" : "button";
|
|
313
|
+
const buttonKind = outline ? "ghost" : kind;
|
|
314
|
+
const variantExists = variant && variantOptions[variant];
|
|
315
|
+
const buttonText = text || value || (variantExists && variantOptions[variant].text);
|
|
316
|
+
const buttonIcon = icon || (variantExists && variantOptions[variant].icon);
|
|
317
|
+
const buttonIconPosition = iconPosition || (variantExists && variantOptions[variant].iconPosition);
|
|
318
|
+
/* if kind is ghost, color is overridden. */
|
|
319
|
+
const buttonAttributes = {
|
|
320
|
+
"type": type,
|
|
321
|
+
"form": form,
|
|
322
|
+
"formaction": formAction,
|
|
323
|
+
"formmethod": formMethod,
|
|
324
|
+
"formenctype": formEnctype,
|
|
325
|
+
"formtarget": formTarget,
|
|
326
|
+
"formnovalidate": formNoValidate,
|
|
327
|
+
"value": value,
|
|
328
|
+
"name": name,
|
|
329
|
+
"data-dismiss": dataDismiss,
|
|
330
|
+
"data-checked": checked,
|
|
331
|
+
};
|
|
332
|
+
const linkAttributes = {
|
|
333
|
+
href: href,
|
|
334
|
+
target: target,
|
|
335
|
+
rel: rel,
|
|
336
|
+
download: download,
|
|
337
|
+
};
|
|
338
|
+
const commonAttributes = Object.assign(Object.assign({ "aria-label": buttonText || "button" }, (!disabled && {
|
|
339
|
+
onClick: e => {
|
|
340
|
+
this.bcmButtonClick.emit(e);
|
|
341
|
+
this.bcmClick.emit(e);
|
|
342
|
+
},
|
|
343
|
+
})), (disabled && {
|
|
344
|
+
"disabled": true,
|
|
345
|
+
"aria-disabled": true,
|
|
346
|
+
"tabindex": -1,
|
|
347
|
+
"onClick": e => {
|
|
348
|
+
e.preventDefault();
|
|
349
|
+
e.stopPropagation();
|
|
350
|
+
},
|
|
351
|
+
}));
|
|
352
|
+
const { hostStyle, containerStyle, textStyle } = buttonStyle({
|
|
257
353
|
size,
|
|
258
|
-
|
|
259
|
-
kind,
|
|
260
|
-
icon,
|
|
261
|
-
iconPosition,
|
|
262
|
-
disabled,
|
|
263
|
-
outline,
|
|
264
|
-
href,
|
|
265
|
-
target,
|
|
266
|
-
loading,
|
|
267
|
-
variant,
|
|
354
|
+
kind: buttonKind,
|
|
268
355
|
fullWidth,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
isIconOnly: !!(this.isHaveChildNodes() && this.icon),
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
getStateData() {
|
|
275
|
-
return buttonState.getValue(this._id);
|
|
276
|
-
}
|
|
277
|
-
isHaveChildNodes() {
|
|
278
|
-
const childNodes = Array.from(this.el.childNodes);
|
|
279
|
-
return childNodes.find(node => node.nodeType === Node.TEXT_NODE) === undefined;
|
|
280
|
-
}
|
|
281
|
-
setColor(color = this.color) {
|
|
282
|
-
if (!color)
|
|
283
|
-
return;
|
|
284
|
-
const { kind } = this;
|
|
285
|
-
const prefix = `--bcm-button-${kind}`;
|
|
286
|
-
if (kind === 'solid') {
|
|
287
|
-
return {
|
|
288
|
-
[`${prefix}-color-default`]: ColorHelper.dsColor('white'),
|
|
289
|
-
[`${prefix}-color-hover`]: ColorHelper.dsColor('white'),
|
|
290
|
-
[`${prefix}-color-focus-visible`]: ColorHelper.dsColor('white'),
|
|
291
|
-
[`${prefix}-color-active`]: ColorHelper.dsColor('white'),
|
|
292
|
-
[`${prefix}-color-disabled`]: ColorHelper.dsColor('white'),
|
|
293
|
-
[`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-700'),
|
|
294
|
-
[`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-800'),
|
|
295
|
-
[`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-900'),
|
|
296
|
-
[`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-900'),
|
|
297
|
-
[`${prefix}-background-color-disabled`]: ColorHelper.dsColor('slate-400'),
|
|
298
|
-
[`${prefix}-border-default`]: ColorHelper.dsColor(color + '-700'),
|
|
299
|
-
[`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-800'),
|
|
300
|
-
[`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-900'),
|
|
301
|
-
[`${prefix}-border-active`]: ColorHelper.dsColor(color + '-900'),
|
|
302
|
-
[`${prefix}-border-disabled`]: ColorHelper.dsColor('slate-400')
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
else if (kind == 'link') {
|
|
306
|
-
return {
|
|
307
|
-
[`${prefix}-color-default`]: ColorHelper.dsColor(color + '-700'),
|
|
308
|
-
[`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-800'),
|
|
309
|
-
[`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-900'),
|
|
310
|
-
[`${prefix}-color-active`]: ColorHelper.dsColor(color + '-900'),
|
|
311
|
-
[`${prefix}-color-disabled`]: ColorHelper.dsColor('slate-400'),
|
|
312
|
-
[`${prefix}-background-color-default`]: ColorHelper.dsColor('transparent'),
|
|
313
|
-
[`${prefix}-background-color-hover`]: ColorHelper.dsColor('transparent'),
|
|
314
|
-
[`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
|
|
315
|
-
[`${prefix}-background-color-active`]: ColorHelper.dsColor('slate-50'),
|
|
316
|
-
[`${prefix}-background-color-disabled`]: ColorHelper.dsColor('transparent'),
|
|
317
|
-
[`${prefix}-border-default`]: ColorHelper.dsColor('transparent'),
|
|
318
|
-
[`${prefix}-border-hover`]: ColorHelper.dsColor('transparent'),
|
|
319
|
-
[`${prefix}-border-focus-visible`]: ColorHelper.dsColor('slate-50'),
|
|
320
|
-
[`${prefix}-border-active`]: ColorHelper.dsColor('slate-50'),
|
|
321
|
-
[`${prefix}-border-disabled`]: ColorHelper.dsColor('transparent')
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
else if (kind == 'ghost') {
|
|
325
|
-
return {
|
|
326
|
-
[`${prefix}-color-default`]: ColorHelper.dsColor(color + '-700'),
|
|
327
|
-
[`${prefix}-color-hover`]: ColorHelper.dsColor(color + '-800'),
|
|
328
|
-
[`${prefix}-color-focus-visible`]: ColorHelper.dsColor(color + '-600'),
|
|
329
|
-
[`${prefix}-color-active`]: ColorHelper.dsColor(color + '-600'),
|
|
330
|
-
[`${prefix}-color-disabled`]: ColorHelper.dsColor(color + '-300'),
|
|
331
|
-
[`${prefix}-background-color-default`]: ColorHelper.dsColor(color + '-100'),
|
|
332
|
-
[`${prefix}-background-color-hover`]: ColorHelper.dsColor(color + '-200'),
|
|
333
|
-
[`${prefix}-background-color-focus-visible`]: ColorHelper.dsColor(color + '-400'),
|
|
334
|
-
[`${prefix}-background-color-active`]: ColorHelper.dsColor(color + '-300'),
|
|
335
|
-
[`${prefix}-background-color-disabled`]: ColorHelper.dsColor(color + '-50'),
|
|
336
|
-
[`${prefix}-border-default`]: ColorHelper.dsColor(color + '-300'),
|
|
337
|
-
[`${prefix}-border-hover`]: ColorHelper.dsColor(color + '-400'),
|
|
338
|
-
[`${prefix}-border-focus-visible`]: ColorHelper.dsColor(color + '-600'),
|
|
339
|
-
[`${prefix}-border-active`]: ColorHelper.dsColor(color + '-500'),
|
|
340
|
-
[`${prefix}-border-disabled`]: ColorHelper.dsColor(color + '-200'),
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
render() {
|
|
346
|
-
const { size, kind, disabled, outline, type, href, target, loading, variantColor, fullWidth, hidden, icon, iconPosition, value, isIconOnly, iconSize } = this.getStateData();
|
|
347
|
-
const classPrefix = 'bcm-button';
|
|
348
|
-
let componentClass = classnames('bcm-button__container', `bcm-button__container-size-${size}`, `bcm-button__container-kind-${outline ? 'ghost' : kind}`, {
|
|
349
|
-
'full-width': fullWidth,
|
|
350
|
-
'checked': this.checked,
|
|
351
|
-
'disabled': disabled,
|
|
356
|
+
checked: this.checked,
|
|
357
|
+
disabled,
|
|
352
358
|
});
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
|
|
359
|
+
const tones = {
|
|
360
|
+
solid: {
|
|
361
|
+
"white": ["text", "text-hover", "text-active"],
|
|
362
|
+
"700": ["bg", "border"],
|
|
363
|
+
"800": ["bg-hover", "border-hover"],
|
|
364
|
+
"900": ["bg-active", "border-active"],
|
|
365
|
+
},
|
|
366
|
+
ghost: {
|
|
367
|
+
"700": ["text"],
|
|
368
|
+
"800": ["text-hover"],
|
|
369
|
+
"900": ["text-active"],
|
|
370
|
+
"100": ["bg"],
|
|
371
|
+
"200": ["bg-hover"],
|
|
372
|
+
"300": ["bg-active", "border"],
|
|
373
|
+
"400": ["border-hover"],
|
|
374
|
+
"500": ["border-active"],
|
|
375
|
+
},
|
|
376
|
+
link: {
|
|
377
|
+
"transparent": ["bg", "bg-hover", "bg-active", "border", "border-hover", "border-active"],
|
|
378
|
+
"700": ["text"],
|
|
379
|
+
"800": ["text-hover"],
|
|
380
|
+
"900": ["text-active"],
|
|
381
|
+
},
|
|
382
|
+
};
|
|
383
|
+
const buttonColor = {
|
|
384
|
+
solid: color || (variantExists && variantOptions[variant].color),
|
|
385
|
+
ghost: "slate",
|
|
386
|
+
link: color || (variantExists && variantOptions[variant].color) || "blue",
|
|
387
|
+
};
|
|
388
|
+
const dc = Generate.getTwColor({
|
|
389
|
+
color: buttonColor[buttonKind],
|
|
390
|
+
tones: tones[buttonKind],
|
|
391
|
+
variable: `--bcm-button`,
|
|
356
392
|
});
|
|
357
|
-
|
|
393
|
+
const style = Object.assign({}, dc);
|
|
394
|
+
return (h(Host, { class: hostStyle(), style: style }, h(Tag, Object.assign({ class: containerStyle() }, commonAttributes, (this.isLink() ? linkAttributes : buttonAttributes)), h("slot", { name: "prefix" }), buttonIcon && (h("span", { class: `${buttonIconPosition == "suffix" ? "tw-order-1" : "tw-order-0"} bcm-button__container-icon` }, h("i", { class: `${buttonIcon}` }))), h("span", { class: textStyle() }, h("slot", null, buttonText)), h("slot", { name: "suffix" }), loading && (h("div", { class: "tw-absolute tw-inset-0 tw-flex tw-items-center tw-justify-center tw-rounded-[--bcm-button-radius] tw-bg-inherit" }, h("i", { class: "far fa-spinner-third fa-spin" }))))));
|
|
358
395
|
}
|
|
359
396
|
get el() { return this; }
|
|
360
397
|
static get style() { return buttonCss; }
|
|
361
398
|
}, [4, "bcm-button", {
|
|
362
|
-
"
|
|
363
|
-
"
|
|
364
|
-
"
|
|
365
|
-
"
|
|
366
|
-
"
|
|
367
|
-
"
|
|
368
|
-
"
|
|
369
|
-
"
|
|
370
|
-
"
|
|
371
|
-
"
|
|
372
|
-
"
|
|
373
|
-
"
|
|
374
|
-
"
|
|
375
|
-
"
|
|
376
|
-
"
|
|
377
|
-
"
|
|
378
|
-
"color": [
|
|
379
|
-
"checked": [
|
|
380
|
-
|
|
399
|
+
"type": [1],
|
|
400
|
+
"form": [1],
|
|
401
|
+
"formAction": [1, "formaction"],
|
|
402
|
+
"formMethod": [1, "formmethod"],
|
|
403
|
+
"formEnctype": [1, "formenctype"],
|
|
404
|
+
"formTarget": [1, "formtarget"],
|
|
405
|
+
"formNoValidate": [4, "formnovalidate"],
|
|
406
|
+
"href": [1],
|
|
407
|
+
"target": [1],
|
|
408
|
+
"rel": [1],
|
|
409
|
+
"download": [1],
|
|
410
|
+
"_id": [513, "id"],
|
|
411
|
+
"value": [1],
|
|
412
|
+
"name": [1],
|
|
413
|
+
"variant": [1],
|
|
414
|
+
"dataDismiss": [4, "data-dismiss"],
|
|
415
|
+
"color": [8],
|
|
416
|
+
"checked": [4],
|
|
417
|
+
"size": [1],
|
|
418
|
+
"disabled": [4],
|
|
419
|
+
"hidden": [4],
|
|
420
|
+
"kind": [1],
|
|
421
|
+
"outline": [4],
|
|
422
|
+
"filled": [4],
|
|
423
|
+
"icon": [1],
|
|
424
|
+
"loading": [4],
|
|
425
|
+
"text": [1],
|
|
426
|
+
"fullWidth": [4, "full-width"],
|
|
427
|
+
"iconPosition": [1, "icon-position"]
|
|
428
|
+
}]);
|
|
381
429
|
function defineCustomElement() {
|
|
382
430
|
if (typeof customElements === "undefined") {
|
|
383
431
|
return;
|
|
@@ -10,18 +10,18 @@ const CaptionTemplate = ({ noCaption, captionType, caption, captionError, custom
|
|
|
10
10
|
maxLength, value, }) => {
|
|
11
11
|
size = size || "medium";
|
|
12
12
|
return ((noCaption == false || maxLength) && (h("div", { class: classnames("bcm-ui-element bcm-ui-feedback bcm-caption-area tw-mt-1 tw-min-h-[20px] tw-flex tw-flex-row tw-items-start tw-justify-between tw-font-normal", {
|
|
13
|
-
"tw-text-
|
|
14
|
-
"tw-text-
|
|
15
|
-
"tw-text-
|
|
16
|
-
"tw-text-
|
|
17
|
-
"tw-text-
|
|
13
|
+
"tw-text-color-caption": !captionType || captionType == "default",
|
|
14
|
+
"tw-text-color-primary": captionType == "info",
|
|
15
|
+
"tw-text-color-success": captionType == "success",
|
|
16
|
+
"tw-text-color-warning": captionType == "warning",
|
|
17
|
+
"tw-text-color-error": captionType == "error",
|
|
18
18
|
}, {
|
|
19
|
-
"tw-text-
|
|
20
|
-
"tw-text-
|
|
21
|
-
"tw-text-
|
|
19
|
+
"tw-text-size-3": size == "small",
|
|
20
|
+
"tw-text-size-4": size == "medium",
|
|
21
|
+
"tw-text-size-5": size == "large",
|
|
22
22
|
}, captionType && captionType != "default" && `bcm-caption-area__type-${captionType}`) },
|
|
23
23
|
h("div", { class: "bcm-caption-area__text" }, captionType == "error" ? customErrorMessage || captionError : caption),
|
|
24
|
-
maxLength && h("div", { class: "bcm-caption-area__text tw-text-
|
|
24
|
+
maxLength && h("div", { class: "bcm-caption-area__text tw-text-color-caption" },
|
|
25
25
|
" ",
|
|
26
26
|
`${(value === null || value === void 0 ? void 0 : value.length) || 0}/${maxLength}`,
|
|
27
27
|
" "))));
|