bromcom-ui 2.3.54 → 2.3.58
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 +0 -0
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/index.esm.js +0 -0
- package/dist/bromcom-ui/p-12493dbc.entry.js +1 -0
- package/dist/bromcom-ui/{p-a18a0cc4.entry.js → p-13d038f5.entry.js} +1 -1
- package/dist/bromcom-ui/p-1429a2b4.js +1 -0
- package/dist/bromcom-ui/{p-4b7f14ed.entry.js → p-20d03fa1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-774ff4d9.entry.js → p-30c1cd7f.entry.js} +1 -1
- package/dist/bromcom-ui/p-37750343.entry.js +1 -0
- package/dist/bromcom-ui/p-3f797656.entry.js +1 -0
- package/dist/bromcom-ui/{p-4396ee3b.entry.js → p-4092f5f1.entry.js} +1 -1
- package/dist/bromcom-ui/p-4a41ef80.entry.js +1 -0
- package/dist/bromcom-ui/p-4cb268d2.js +1 -0
- package/dist/bromcom-ui/p-53e9b679.entry.js +1 -0
- package/dist/bromcom-ui/{p-09753e05.js → p-554d326a.js} +1 -1
- package/dist/bromcom-ui/p-68ff64de.js +1 -0
- package/dist/bromcom-ui/p-7238d22f.entry.js +1 -0
- package/dist/bromcom-ui/p-7f1cd976.entry.js +1 -0
- package/dist/bromcom-ui/p-811c24d7.entry.js +1 -0
- package/dist/bromcom-ui/p-8851e01e.entry.js +1 -0
- package/dist/bromcom-ui/{p-1a2724a0.entry.js → p-92e3e240.entry.js} +1 -1
- package/dist/bromcom-ui/p-9ffff762.entry.js +1 -0
- package/dist/bromcom-ui/p-a6ef098a.entry.js +1 -0
- package/dist/bromcom-ui/p-af7e4741.entry.js +1 -0
- package/dist/bromcom-ui/{p-0d336381.entry.js → p-afb68492.entry.js} +1 -1
- package/dist/bromcom-ui/p-bbf99620.entry.js +1 -0
- package/dist/bromcom-ui/p-bc50aa86.entry.js +1 -0
- package/dist/bromcom-ui/p-e21a8f2d.entry.js +1 -0
- package/dist/bromcom-ui/p-e450ebda.entry.js +1 -0
- package/dist/bromcom-ui/p-e8307da9.entry.js +1 -0
- package/dist/bromcom-ui/{p-26b3d5d0.entry.js → p-e8771d32.entry.js} +1 -1
- package/dist/bromcom-ui/p-f067821e.entry.js +1 -0
- package/dist/bromcom-ui/p-f12743d8.entry.js +1 -0
- package/dist/bromcom-ui/p-ff5e57d3.entry.js +1 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +7 -26
- package/dist/cjs/bcm-badge.cjs.entry.js +50 -0
- package/dist/cjs/{bcm-badge_20.cjs.entry.js → bcm-button_11.cjs.entry.js} +1209 -2835
- package/dist/cjs/bcm-checkbox-lite_4.cjs.entry.js +291 -0
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +3 -3
- package/dist/cjs/{bcm-datetime-picker_2.cjs.entry.js → bcm-datetime-picker.cjs.entry.js} +3 -137
- package/dist/cjs/bcm-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/bcm-list-item_2.cjs.entry.js +197 -0
- package/dist/cjs/bcm-list-select.cjs.entry.js +658 -0
- package/dist/cjs/bcm-list.cjs.entry.js +1204 -0
- package/dist/cjs/{bcm-empty_6.cjs.entry.js → bcm-listbox_5.cjs.entry.js} +10 -77
- package/dist/cjs/bcm-modal.cjs.entry.js +197 -0
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popover-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +2 -2
- package/dist/cjs/bcm-pulldown-group_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-pulldown.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +124 -0
- package/dist/cjs/bcm-radio.cjs.entry.js +104 -0
- package/dist/cjs/bcm-select.cjs.entry.js +68 -8
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +51 -0
- package/dist/cjs/bcm-tab.cjs.entry.js +72 -0
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +43 -0
- package/dist/cjs/bcm-tabs.cjs.entry.js +361 -0
- package/dist/cjs/bcm-text.cjs.entry.js +28 -0
- package/dist/cjs/bcm-upload.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{element-dragger-36fcb296.js → element-dragger-4a91c708.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/types-37c8ced6.js +16 -0
- package/dist/cjs/types-f53bc841.js +19 -0
- package/dist/cjs/{utils-43fda566.js → utils-60414768.js} +25 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/label/label.css +70 -0
- package/dist/collection/components/atoms/label/label.js +203 -0
- package/dist/collection/components/molecules/checkbox/group.js +19 -6
- package/dist/collection/components/molecules/input/input.js +39 -7
- package/dist/collection/components/molecules/list/list-item.css +1 -0
- package/dist/collection/components/molecules/list/list-select.css +10 -5
- package/dist/collection/components/molecules/list/list-select.js +232 -34
- package/dist/collection/components/molecules/list/list.css +24 -2
- package/dist/collection/components/molecules/list/list.js +391 -119
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +1 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm.css +1 -0
- package/dist/collection/components/molecules/popover/popover-box.css +1 -0
- package/dist/collection/components/molecules/popover/popover.css +1 -0
- package/dist/collection/components/molecules/radio/group.js +19 -6
- package/dist/collection/components/molecules/search/search.js +2 -2
- package/dist/collection/components/molecules/select/select.js +85 -12
- package/dist/collection/components/molecules/switch/switch.css +0 -1
- package/dist/collection/components/molecules/switch/switch.js +20 -7
- package/dist/collection/components/molecules/textarea/textarea.css +4 -1
- package/dist/collection/components/molecules/textarea/textarea.js +33 -17
- package/dist/collection/components/molecules/tooltip/tooltip-box.css +1 -0
- package/dist/collection/components/molecules/tooltip/tooltip.css +1 -0
- package/dist/collection/components/organism/colorpicker/colorpicker.js +19 -6
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +1 -1
- package/dist/collection/components/organism/form/form.js +5 -4
- package/dist/collection/components/organism/listbox/listbox.js +27 -17
- package/dist/collection/helper/color-helper.js +33 -0
- package/dist/collection/helper/generate.js +47 -0
- package/dist/collection/helper/number-helper.js +10 -0
- package/dist/collection/helper/string-helper.js +21 -0
- package/dist/collection/helper/validators.js +21 -0
- package/dist/collection/models/bcm-types.js +1 -0
- package/dist/collection/models/bcm.js +451 -0
- package/dist/collection/templates/caption-template.js +22 -0
- package/dist/collection/templates/label-template.js +16 -0
- package/dist/collection/templates/slot-template.js +6 -0
- package/dist/collection/utils/utils.js +24 -0
- package/dist/esm/bcm-alert.entry.js +1 -20
- package/dist/esm/bcm-badge.entry.js +46 -0
- package/dist/esm/{bcm-badge_20.entry.js → bcm-button_11.entry.js} +1204 -2821
- package/dist/esm/bcm-checkbox-lite_4.entry.js +284 -0
- package/dist/esm/bcm-colorpicker.entry.js +3 -3
- package/dist/esm/{bcm-datetime-picker_2.entry.js → bcm-datetime-picker.entry.js} +4 -137
- package/dist/esm/bcm-dropdown.entry.js +1 -1
- package/dist/esm/bcm-list-item_2.entry.js +192 -0
- package/dist/esm/bcm-list-select.entry.js +654 -0
- package/dist/esm/bcm-list.entry.js +1200 -0
- package/dist/esm/{bcm-empty_6.entry.js → bcm-listbox_5.entry.js} +12 -78
- package/dist/esm/bcm-modal.entry.js +193 -0
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +2 -2
- package/dist/esm/bcm-popover-box.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +2 -2
- package/dist/esm/bcm-pulldown-group_2.entry.js +1 -1
- package/dist/esm/bcm-pulldown.entry.js +1 -1
- package/dist/esm/bcm-radio-group.entry.js +120 -0
- package/dist/esm/bcm-radio.entry.js +100 -0
- package/dist/esm/bcm-select.entry.js +68 -8
- package/dist/esm/bcm-tab-pane.entry.js +47 -0
- package/dist/esm/bcm-tab.entry.js +68 -0
- package/dist/esm/bcm-tabs-content.entry.js +39 -0
- package/dist/esm/bcm-tabs.entry.js +357 -0
- package/dist/esm/bcm-text.entry.js +24 -0
- package/dist/esm/bcm-upload.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{element-dragger-03ac2a5e.js → element-dragger-97a8f373.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/css-shim.js +0 -0
- package/dist/esm/types-4b11eac9.js +28 -0
- package/dist/esm/types-911a8837.js +21 -0
- package/dist/esm/{utils-b7fba7c4.js → utils-de9aee67.js} +25 -1
- package/dist/types/assets/icons/index.d.ts +0 -0
- package/dist/types/assets/icons/index.example.d.ts +0 -0
- package/dist/types/components/atoms/avatar/avatar.d.ts +0 -0
- package/dist/types/components/atoms/badge/badge.d.ts +0 -0
- package/dist/types/components/atoms/button/button.d.ts +0 -0
- package/dist/types/components/atoms/divider/divider.d.ts +0 -0
- package/dist/types/components/atoms/icon/icon.d.ts +0 -0
- package/dist/types/components/atoms/icon/types.d.ts +0 -0
- package/dist/types/components/atoms/label/label.d.ts +16 -0
- package/dist/types/components/atoms/tag/tag.d.ts +0 -0
- package/dist/types/components/atoms/text/text.d.ts +0 -0
- package/dist/types/components/molecules/card/card-footer.d.ts +0 -0
- package/dist/types/components/molecules/card/card-header.d.ts +0 -0
- package/dist/types/components/molecules/card/card.d.ts +0 -0
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +0 -0
- package/dist/types/components/molecules/checkbox/group.d.ts +1 -0
- package/dist/types/components/molecules/input/input.d.ts +2 -0
- package/dist/types/components/molecules/list/list-select.d.ts +24 -4
- package/dist/types/components/molecules/list/list.d.ts +13 -3
- package/dist/types/components/molecules/radio/group.d.ts +1 -0
- package/dist/types/components/molecules/radio/radio.d.ts +0 -0
- package/dist/types/components/molecules/select/group.d.ts +0 -0
- package/dist/types/components/molecules/select/option.d.ts +0 -0
- package/dist/types/components/molecules/select/select.d.ts +1 -0
- package/dist/types/components/molecules/switch/switch.d.ts +1 -0
- package/dist/types/components/molecules/textarea/textarea.d.ts +3 -2
- package/dist/types/components/organism/colorpicker/colorpicker.d.ts +1 -0
- package/dist/types/components/organism/listbox/listbox.d.ts +1 -0
- package/dist/types/components.d.ts +95 -12
- package/dist/types/global/variables/colors.d.ts +0 -0
- package/dist/types/helper/color-helper.d.ts +9 -0
- package/dist/types/helper/generate.d.ts +10 -0
- package/dist/types/helper/number-helper.d.ts +9 -0
- package/dist/types/helper/string-helper.d.ts +20 -0
- package/dist/types/helper/validators.d.ts +8 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/models/bcm-types.d.ts +19 -0
- package/dist/types/models/bcm.d.ts +447 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -0
- package/dist/types/templates/caption-template.d.ts +12 -0
- package/dist/types/templates/label-template.d.ts +12 -0
- package/dist/types/templates/slot-template.d.ts +8 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +0 -0
- package/loader/index.cjs.js +0 -0
- package/loader/index.d.ts +0 -0
- package/loader/index.es2017.js +0 -0
- package/loader/index.js +0 -0
- package/loader/package.json +0 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-013b6f5d.entry.js +0 -1
- package/dist/bromcom-ui/p-0532e299.entry.js +0 -1
- package/dist/bromcom-ui/p-0aa53bdb.entry.js +0 -1
- package/dist/bromcom-ui/p-2c1ee381.entry.js +0 -1
- package/dist/bromcom-ui/p-607bc9b3.entry.js +0 -1
- package/dist/bromcom-ui/p-6355c903.entry.js +0 -1
- package/dist/bromcom-ui/p-6bd805f1.entry.js +0 -1
- package/dist/bromcom-ui/p-77a480ff.entry.js +0 -1
- package/dist/bromcom-ui/p-a88256f2.entry.js +0 -1
- package/dist/bromcom-ui/p-b92324e7.js +0 -1
- package/dist/bromcom-ui/p-ba219861.entry.js +0 -1
- package/dist/bromcom-ui/p-cdfd9ba0.entry.js +0 -1
- package/dist/bromcom-ui/p-cf6b0656.entry.js +0 -1
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -273
- package/dist/cjs/bcm-checkbox.cjs.entry.js +0 -143
- package/dist/cjs/bcm-switch.cjs.entry.js +0 -86
- package/dist/cjs/bcm-textarea.cjs.entry.js +0 -136
- package/dist/cjs/bcm-tooltip-box.cjs.entry.js +0 -36
- package/dist/esm/bcm-checkbox-group.entry.js +0 -269
- package/dist/esm/bcm-checkbox.entry.js +0 -139
- package/dist/esm/bcm-switch.entry.js +0 -82
- package/dist/esm/bcm-textarea.entry.js +0 -132
- package/dist/esm/bcm-tooltip-box.entry.js +0 -32
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, a as getAssetPath, c as createEvent } from './index-8fe7aea4.js';
|
|
2
|
+
import { c as classnames } from './index-e58a2d48.js';
|
|
3
|
+
|
|
4
|
+
const checkboxCss = "@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}.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}:host{display:inline-block}:host(.hidden){display:none}input{display:none}.svg-icon{filter:brightness(0) invert(1);width:12px;height:12px}label{display:flex;align-items:flex-start;font-size:14px;color:var(--bcm-color-grey-8);cursor:pointer}label span.icon{display:flex;align-items:center;justify-content:center;min-width:16px;min-height:16px;border:1px solid #D9D9D9;margin-right:8px;border-radius:2px;margin-top:2px;background-color:var(--bcm-color-grey-1)}:host(.indeterminate) label span.icon{position:relative}:host(.indeterminate) label span.icon::after{content:\"\";position:absolute;top:50%;left:8px;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:1;z-index:1}:host(.indeterminate) label span.icon::before{content:\"\";position:absolute;top:-1px;left:-1px;width:16px;height:100%;border-radius:2px;background-color:var(--bcm-color-grey-1);border:1px solid var(--bcm-color-grey-5);opacity:1;z-index:1}:host(.indeterminate) label span.icon:hover:not(.disabled):before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}input:checked+label span.icon{background-color:var(--bcm-color-prime-blue-6);border-color:transparent}input:checked+label .icon-checked{display:block}bcm-icon{filter:brightness(0) invert(1)}input[disabled]+label{cursor:not-allowed}input[disabled]+label span.icon{background-color:var(--bcm-color-grey-3);border-color:var(--bcm-color-grey-5)}input[disabled]+label bcm-icon{filter:brightness(0);opacity:0.3}input:not([disabled])+label:hover span.icon{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}:host(.error) input:not([disabled])+label span.icon{border-color:var(--bcm-color-red-6)}.caption-area{margin-bottom:8px;min-height:20px;display:block}.input-caption{display:block}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}.radio-button{background-color:var(--bcm-color-grey-1);color:var(--bcm-color-grey-8);border:1px solid var(--bcm-color-grey-5);padding:0 16px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.radio-button>span.icon{display:none}.radio-button>span.slot{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;user-select:none}.radio-button:hover:not(.disabled){color:var(--bcm-color-prime-blue-5)}.radio-button:active:not(.disabled){color:var(--bcm-color-prime-blue-7)}.radio-button.disabled{background-color:var(--bcm-color-grey-3);color:var(--bcm-color-grey-6);cursor:not-allowed}.radio-button.checked.disabled{background-color:var(--bcm-color-grey-4);color:var(--bcm-color-grey-1);border-color:var(--bcm-color-grey-5)}.radio-button.checked.solid{color:var(--bcm-color-grey-1);background-color:var(--bcm-color-prime-blue-6);border-color:var(--bcm-color-prime-blue-6)}.radio-button.checked.solid:hover{background-color:var(--bcm-color-prime-blue-5);border-color:var(--bcm-color-prime-blue-5)}.radio-button.checked.solid:active{background-color:var(--bcm-color-prime-blue-7);border-color:var(--bcm-color-prime-blue-7)}.radio-button.checked.outline{background-color:var(--bcm-color-grey-1);color:var(--bcm-color-prime-blue-6);border-color:var(--bcm-color-prime-blue-6)}.radio-button.checked.outline:hover{color:var(--bcm-color-prime-blue-5);border-color:var(--bcm-color-prime-blue-5)}.radio-button.checked.outline:active{color:var(--bcm-color-prime-blue-7);border-color:var(--bcm-color-prime-blue-7)}.radio-button.large{height:40px}.radio-button.medium{height:32px}.radio-button.small{height:24px}";
|
|
5
|
+
|
|
6
|
+
const BcmCheckboxLite = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
/**
|
|
10
|
+
* Component Properties
|
|
11
|
+
*/
|
|
12
|
+
this.value = '';
|
|
13
|
+
this.name = 'checkbox';
|
|
14
|
+
this.checked = false;
|
|
15
|
+
this.indeterminate = false;
|
|
16
|
+
this.disabled = false;
|
|
17
|
+
this.readOnly = false;
|
|
18
|
+
this.hidden = false;
|
|
19
|
+
this.required = false;
|
|
20
|
+
this.noCaption = false;
|
|
21
|
+
this.captionType = 'default';
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() { }
|
|
24
|
+
disconnectedCallback() { }
|
|
25
|
+
componentWillLoad() { }
|
|
26
|
+
componentDidLoad() { }
|
|
27
|
+
componentWillRender() { }
|
|
28
|
+
componentDidRender() { }
|
|
29
|
+
componentWillUpdate() { }
|
|
30
|
+
componentDidUpdate() { }
|
|
31
|
+
render() {
|
|
32
|
+
const { disabled, checked, readOnly, name, required } = this;
|
|
33
|
+
const hostClasses = classnames(this.hidden ? 'hidden' : null, {
|
|
34
|
+
'indeterminate': this.indeterminate
|
|
35
|
+
});
|
|
36
|
+
const iconClasses = classnames('icon');
|
|
37
|
+
return (h(Host, { class: hostClasses }, h("input", { id: name, type: "checkbox", checked: checked, disabled: disabled, required: required, readOnly: readOnly }), h("label", { htmlFor: name }, h("span", { class: iconClasses }, h("svg", { class: "svg-icon icon-checked", width: "11", height: "9", viewBox: "0 0 11 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1.91308 4.03516H1.91326C1.99256 4.03525 2.07081 4.05331 2.14213 4.08798C2.21341 4.12262 2.27591 4.17295 2.32497 4.2352L1.91308 4.03516ZM1.91308 4.03516H1.09394C0.890308 4.03516 0.776602 4.26975 0.902321 4.4292L0.902371 4.42927L4.11214 8.49567L4.11218 8.49573C4.32247 8.76188 4.72568 8.76114 4.93667 8.49617L4.93708 8.49566L10.6597 1.24398C10.6598 1.24378 10.66 1.24358 10.6602 1.24338C10.7884 1.08295 10.6699 0.85 10.4689 0.85H9.6498C9.48941 0.85 9.33668 0.9235 9.2376 1.05044C9.23751 1.05055 9.23742 1.05066 9.23734 1.05077L4.52403 7.02157M1.91308 4.03516L4.52403 7.02157M4.52403 7.02157L2.32506 4.23531L4.52403 7.02157Z", fill: "#BFBFBF", stroke: "#BFBFBF", "stroke-width": "0.3" }))))));
|
|
38
|
+
}
|
|
39
|
+
get el() { return getElement(this); }
|
|
40
|
+
};
|
|
41
|
+
BcmCheckboxLite.style = checkboxCss;
|
|
42
|
+
|
|
43
|
+
const dividerCss = "@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}:host{display:flex;justify-content:center}:host(.hidden){display:none}.divider{background-color:var(--bcm-color-grey-5)}.divider.horizontal{height:1px;margin:4px 0}.divider.vertical{height:100%;width:1px;margin:0 4px}";
|
|
44
|
+
|
|
45
|
+
const BcmBadge = class {
|
|
46
|
+
constructor(hostRef) {
|
|
47
|
+
registerInstance(this, hostRef);
|
|
48
|
+
this.direction = 'horizontal';
|
|
49
|
+
this.width = '100';
|
|
50
|
+
this.hidden = false;
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const classes = classnames('divider', this.direction);
|
|
54
|
+
const styles = {
|
|
55
|
+
width: this.width + '%'
|
|
56
|
+
};
|
|
57
|
+
const hostClasses = classnames(this.hidden ? 'hidden' : null);
|
|
58
|
+
return (h(Host, { class: hostClasses }, h("div", { class: classes, style: this.direction === 'horizontal' && styles })));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
BcmBadge.style = dividerCss;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 'image' prop predefined values
|
|
65
|
+
*/
|
|
66
|
+
var ImageProps;
|
|
67
|
+
(function (ImageProps) {
|
|
68
|
+
ImageProps["default"] = "default.svg";
|
|
69
|
+
ImageProps["simple"] = "simple.svg";
|
|
70
|
+
})(ImageProps || (ImageProps = {}));
|
|
71
|
+
/**
|
|
72
|
+
* 'size' prop predefined values
|
|
73
|
+
*/
|
|
74
|
+
var SizeProps;
|
|
75
|
+
(function (SizeProps) {
|
|
76
|
+
SizeProps["small"] = "small";
|
|
77
|
+
SizeProps["medium"] = "medium";
|
|
78
|
+
SizeProps["big"] = "big";
|
|
79
|
+
})(SizeProps || (SizeProps = {}));
|
|
80
|
+
|
|
81
|
+
const emptyCss = "@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}:host{display:block}:host(.hidden){display:none}.empty.small{max-width:100px}.empty.medium{max-width:140px}.empty.big{max-width:200px}.text{font-size:14px;color:var(--bcm-color-grey-8)}.content{text-align:center}img{max-width:100%}";
|
|
82
|
+
|
|
83
|
+
const BcmEmpty = class {
|
|
84
|
+
constructor(hostRef) {
|
|
85
|
+
registerInstance(this, hostRef);
|
|
86
|
+
/**
|
|
87
|
+
* Component Properties
|
|
88
|
+
*/
|
|
89
|
+
this._image = ImageProps.default;
|
|
90
|
+
this.size = SizeProps.medium;
|
|
91
|
+
this.hidden = false;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @ComponentMethod
|
|
95
|
+
*/
|
|
96
|
+
componentWillLoad() {
|
|
97
|
+
this.parseImage(this._image);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @desc
|
|
101
|
+
* @param newValue
|
|
102
|
+
* @returns {void}
|
|
103
|
+
*/
|
|
104
|
+
parseImage(newValue) {
|
|
105
|
+
if (newValue) {
|
|
106
|
+
newValue in ImageProps
|
|
107
|
+
? this.image = ImageProps[newValue]
|
|
108
|
+
: this.image = ImageProps.default;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
render() {
|
|
112
|
+
const classes = classnames('empty', {
|
|
113
|
+
[this.size]: this.size
|
|
114
|
+
});
|
|
115
|
+
const hostClasses = classnames(this.hidden ? 'hidden' : null);
|
|
116
|
+
return (h(Host, { class: hostClasses }, h("div", { class: classes }, h("img", { src: getAssetPath(`./static/${this.image}`) }), h("div", { class: "content" }, this.text && (h("span", { class: "text" }, this.text)), h("slot", null)))));
|
|
117
|
+
}
|
|
118
|
+
static get assetsDirs() { return ["static"]; }
|
|
119
|
+
get el() { return getElement(this); }
|
|
120
|
+
static get watchers() { return {
|
|
121
|
+
"_image": ["parseImage"]
|
|
122
|
+
}; }
|
|
123
|
+
};
|
|
124
|
+
BcmEmpty.style = emptyCss;
|
|
125
|
+
|
|
126
|
+
const searchCss = "@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}:host{display:block}:host(.hidden){display:none}";
|
|
127
|
+
|
|
128
|
+
const lowercase = (str) => str.toLowerCase();
|
|
129
|
+
const BcmSearch = class {
|
|
130
|
+
constructor(hostRef) {
|
|
131
|
+
registerInstance(this, hostRef);
|
|
132
|
+
this.bcmOnSearch = createEvent(this, "bcm-on-search", 7);
|
|
133
|
+
this.bcmOnSearchValue = createEvent(this, "bcm-on-search-value", 7);
|
|
134
|
+
this.data = [];
|
|
135
|
+
this.searchFields = ['text', 'value' /*, ...*/];
|
|
136
|
+
this.returnField = 'idx';
|
|
137
|
+
this.searchSub = null;
|
|
138
|
+
this.hidden = false;
|
|
139
|
+
this.onlyChild = false;
|
|
140
|
+
this.clearable = false;
|
|
141
|
+
this.searchValue = '';
|
|
142
|
+
this.searchPlaceholder = 'Search';
|
|
143
|
+
this.disabled = false;
|
|
144
|
+
this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
|
|
145
|
+
this.results = [];
|
|
146
|
+
}
|
|
147
|
+
componentDidLoad() {
|
|
148
|
+
this.el.shadowRoot.querySelector('bcm-input').clearable = this.clearable;
|
|
149
|
+
}
|
|
150
|
+
listenBcmChange(e) {
|
|
151
|
+
e.stopPropagation();
|
|
152
|
+
}
|
|
153
|
+
async setValue(value) {
|
|
154
|
+
const input = this.el.shadowRoot.querySelector('bcm-input');
|
|
155
|
+
await input.setValue(value);
|
|
156
|
+
return value;
|
|
157
|
+
}
|
|
158
|
+
async select() {
|
|
159
|
+
const input = this.el.shadowRoot.querySelector('bcm-input');
|
|
160
|
+
await input.select();
|
|
161
|
+
this.bcmOnSearch.emit(true);
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
async setClear() {
|
|
165
|
+
const input = this.el.shadowRoot.querySelector('bcm-input');
|
|
166
|
+
await input.setClear();
|
|
167
|
+
this.bcmOnSearch.emit(true);
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
async searchArray(value, idFields = null) {
|
|
171
|
+
// console.log(this.data)
|
|
172
|
+
let cacheSearchFields = this.searchFields;
|
|
173
|
+
let arrayResult = [];
|
|
174
|
+
if (idFields) {
|
|
175
|
+
this.searchFields = [idFields];
|
|
176
|
+
}
|
|
177
|
+
value.forEach(item => {
|
|
178
|
+
// item = {[idFields]:item}
|
|
179
|
+
this.results = [];
|
|
180
|
+
// console.log(this.data)
|
|
181
|
+
this.nestedSearch(this.data, item, true);
|
|
182
|
+
arrayResult.push(...this.results);
|
|
183
|
+
});
|
|
184
|
+
this.searchFields = cacheSearchFields;
|
|
185
|
+
return arrayResult;
|
|
186
|
+
// const input = this.el.shadowRoot.querySelector("bcm-input");
|
|
187
|
+
// await input.setValue( value )
|
|
188
|
+
// return value
|
|
189
|
+
}
|
|
190
|
+
nestedSearch(items, value, equal = false) {
|
|
191
|
+
var result;
|
|
192
|
+
items && (items.map((item) => {
|
|
193
|
+
this.searchFields.map(searchField => {
|
|
194
|
+
if (searchField in item) {
|
|
195
|
+
// debugger;
|
|
196
|
+
item[searchField] = lowercase(String(item[searchField]));
|
|
197
|
+
if (this.onlyChild) {
|
|
198
|
+
if (item[this.searchSub]) {
|
|
199
|
+
var temp = this.nestedSearch(item[this.searchSub], value, equal);
|
|
200
|
+
if (temp) {
|
|
201
|
+
this.results.push((result = String(item[this.returnField])));
|
|
202
|
+
this.results.push(temp);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
if (equal) {
|
|
207
|
+
// console.log(value)
|
|
208
|
+
if (item[searchField] == lowercase(String(value))) {
|
|
209
|
+
// if (item == lowercase(value)) {
|
|
210
|
+
this.results.push((result = String(item[this.returnField])));
|
|
211
|
+
// this.results.push (result = String(item))
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
if (item[searchField].indexOf(lowercase(value)) !== -1) {
|
|
216
|
+
this.results.push((result = String(item[this.returnField])));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
if (item[this.searchSub]) {
|
|
223
|
+
var temp = this.nestedSearch(item[this.searchSub], value, equal);
|
|
224
|
+
if (temp) {
|
|
225
|
+
this.results.push((result = String(item[this.returnField])));
|
|
226
|
+
this.results.push(temp);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (equal) {
|
|
230
|
+
// console.log(value)
|
|
231
|
+
if (item[searchField] == lowercase(String(value))) {
|
|
232
|
+
// if (item == lowercase(value)) {
|
|
233
|
+
this.results.push((result = String(item[this.returnField])));
|
|
234
|
+
// this.results.push (result = String(item))
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
if (item[searchField].indexOf(lowercase(value)) !== -1) {
|
|
239
|
+
this.results.push((result = String(item[this.returnField])));
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}));
|
|
246
|
+
return result;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* @desc
|
|
250
|
+
* @param value
|
|
251
|
+
*/
|
|
252
|
+
inputChange(value) {
|
|
253
|
+
this.results = [];
|
|
254
|
+
// data prop'unda arama yapılacak (searchFields prop'u içerisindeki alanlar ile)
|
|
255
|
+
// arama sonucunda eşleyen itemların 'idx', index
|
|
256
|
+
// değerleri, array şeklinde root component'e
|
|
257
|
+
// event ile gönderilecek
|
|
258
|
+
// Örneğin value == 'to' olduğunda aşağıdaki
|
|
259
|
+
// sonuçlar filtrelenmeli
|
|
260
|
+
// -->
|
|
261
|
+
//{ text: 'Mateusz Eaton', idx: 2 },
|
|
262
|
+
//{ text: 'Tony Vickers', idx: 3 },
|
|
263
|
+
// result array'i eşleşen itemların
|
|
264
|
+
// index numaralarını tutacak
|
|
265
|
+
// results = [2, 3]
|
|
266
|
+
// Örnek arama
|
|
267
|
+
// #
|
|
268
|
+
this.nestedSearch(this.data, value);
|
|
269
|
+
this.results = Array.from(new Set(this.results));
|
|
270
|
+
(value && ((this.results.length > 0 && this.bcmOnSearch.emit(this.results)) || this.bcmOnSearch.emit([-1]))) || this.bcmOnSearch.emit(true);
|
|
271
|
+
this.bcmOnSearchValue.emit(value);
|
|
272
|
+
}
|
|
273
|
+
render() {
|
|
274
|
+
const hostClasses = classnames(this.hidden ? 'hidden' : null);
|
|
275
|
+
return (h(Host, { class: hostClasses }, h("bcm-input", { placeholder: this.searchPlaceholder, "no-caption": true, "no-margin": true, "full-width": true, disabled: this.disabled, type: "search", "on-bcm-change": e => this.inputChange(e.detail), value: this.searchValue })));
|
|
276
|
+
}
|
|
277
|
+
get el() { return getElement(this); }
|
|
278
|
+
static get watchers() { return {
|
|
279
|
+
"searchValue": ["inputChange"]
|
|
280
|
+
}; }
|
|
281
|
+
};
|
|
282
|
+
BcmSearch.style = searchCss;
|
|
283
|
+
|
|
284
|
+
export { BcmCheckboxLite as bcm_checkbox_lite, BcmBadge as bcm_divider, BcmEmpty as bcm_empty, BcmSearch as bcm_search };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getAssetPath, H as Host, g as getElement } from './index-8fe7aea4.js';
|
|
2
2
|
import { c as classnames } from './index-e58a2d48.js';
|
|
3
|
-
import './utils-
|
|
4
|
-
import { E as ElementDragger, D as DragDirections } from './element-dragger-
|
|
3
|
+
import './utils-de9aee67.js';
|
|
4
|
+
import { E as ElementDragger, D as DragDirections } from './element-dragger-97a8f373.js';
|
|
5
5
|
|
|
6
6
|
const colorpickerCss = "@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}:host{position:relative;margin:0 0 8px 0}.color-picker{position:relative;width:200px}.color-picker.open .picker{opacity:1;visibility:visible;transform:scale(1) translateY(56px)}.picker{width:300px;position:absolute;top:0;z-index:1;background-color:#ffffff;border:1px solid #F6F6F6;box-shadow:0px 3px 3.6px 0.4px rgba(0, 0, 0, 0.15);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px)}.label{display:flex;flex-direction:column;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.input{display:flex;cursor:pointer;border:1px solid var(--bcm-color-grey-5);border-radius:2px}.color{position:relative;width:100%;height:166px;user-select:none}.color img{width:100%;height:100%;user-select:none;pointer-events:none}.color-indicator{position:absolute;top:0;left:0;width:17px;height:17px;border:1px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.25);transform:translate(0, 0);border-radius:100%;user-select:none;box-sizing:border-box;pointer-events:none}.colors{position:relative;width:100%;height:16px;margin-top:8px}.colors img{width:100%;user-select:none;pointer-events:none}.colors-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;user-select:none}.colors-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100%;user-select:none;box-sizing:border-box;pointer-events:none}.transparency{position:relative;width:100%;height:16px;margin-top:8px}.transparency-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;background:transparent none repeat center center/20px}.transparency-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100%;user-select:none;box-sizing:border-box}.colors-transparency{padding:16px}.active-color{display:flex;align-items:center;width:100%;height:30px}.active-color .color-thumb{width:100%;height:100%;background-color:transparent;border-radius:1px 0 0 1px}.active-color .color-text{font-size:14px;color:#656565;margin-left:8px}.icon{display:flex;align-items:center;justify-content:center;cursor:pointer;width:30px;color:var(--bcm-color-grey-6)}.color-input{border:none;width:100%;padding:10px;outline:none;-webkit-tap-highlight-color:transparent}";
|
|
7
7
|
|
|
@@ -395,7 +395,7 @@ const BcmColorPicker = class {
|
|
|
395
395
|
open: this.open
|
|
396
396
|
});
|
|
397
397
|
const captionClasses = classnames('size-1', 'input-caption', 'caption-' + captionType);
|
|
398
|
-
return (h(Host, null, h("div", { class: classes, onClick: () => this.handleClick() }, label && h("
|
|
398
|
+
return (h(Host, null, h("div", { class: classes, onClick: () => this.handleClick() }, label && h("div", null, h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })), h("div", { class: "input" }, h("div", { class: "active-color" }, h("div", { class: "color-thumb", style: { backgroundColor: this.value } })), h("span", { class: "icon", slot: "suffix" }, h("bcm-icon", { icon: "bg-colors" }))), !noCaption && (h("div", { class: "caption-area" }, captionType == "error"
|
|
399
399
|
? h("span", { class: captionClasses }, " ", captionError, " ")
|
|
400
400
|
: caption && h("span", { class: captionClasses }, " ", caption, " "))), h("div", { class: "picker" }, h("div", { class: "input" }, h("input", { type: "text", class: "color-input", maxlength: "7", ref: el => (this.inputElement = el), onKeyUp: (e) => this.handleColorInputKeyUp(e) })), h("div", { class: "color", onMouseDown: () => this.mouseState = 'down', style: { backgroundColor: this.hsvtorgb({ h: this.h, s: this.s, v: this.v }).hex }, ref: el => (this.colorElement = el) }, h("img", { src: getAssetPath('./static/color.svg') }), h("div", { class: "color-indicator", ref: el => (this.colorIndicatorElement = el) })), h("div", { class: "colors-transparency" }, h("div", { class: "colors", onMouseDown: () => this.mouseState = 'down', ref: el => (this.colorsElement = el) }, h("div", { class: "colors-holder" }, h("img", { src: getAssetPath('./static/colors.svg') })), h("div", { class: "colors-indicator", ref: el => (this.colorsIndicatorElement = el) })))))));
|
|
401
401
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-8fe7aea4.js';
|
|
2
2
|
import { c as classnames } from './index-e58a2d48.js';
|
|
3
|
-
import
|
|
4
|
-
import { D as DragDirections, E as ElementDragger } from './element-dragger-
|
|
5
|
-
import { p as popoverPlacement, a as popoverBoxPlacement } from './popover-placement-a4ab1587.js';
|
|
3
|
+
import './utils-de9aee67.js';
|
|
4
|
+
import { D as DragDirections, E as ElementDragger } from './element-dragger-97a8f373.js';
|
|
6
5
|
|
|
7
6
|
var Months;
|
|
8
7
|
(function (Months) {
|
|
@@ -167,7 +166,7 @@ const BcmDatetimePicker = class {
|
|
|
167
166
|
const errorObject1 = { isValid: false, value: this.valueText };
|
|
168
167
|
const errorObject2 = { isValid: false, value: this.inputElement.value };
|
|
169
168
|
if (!newValue) {
|
|
170
|
-
this.change.emit(
|
|
169
|
+
this.change.emit();
|
|
171
170
|
return;
|
|
172
171
|
}
|
|
173
172
|
if (this.type !== Types.range && this.error) {
|
|
@@ -1227,136 +1226,4 @@ const BcmDatetimePicker = class {
|
|
|
1227
1226
|
};
|
|
1228
1227
|
BcmDatetimePicker.style = datetimePickerCss;
|
|
1229
1228
|
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
const BcmTooltip = class {
|
|
1233
|
-
constructor(hostRef) {
|
|
1234
|
-
registerInstance(this, hostRef);
|
|
1235
|
-
this.onShow = createEvent(this, "bcm-show", 7);
|
|
1236
|
-
this.onHide = createEvent(this, "bcm-hide", 7);
|
|
1237
|
-
this.placement = 'top';
|
|
1238
|
-
this.trigger = 'hover';
|
|
1239
|
-
this.hidden = false;
|
|
1240
|
-
this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
|
|
1241
|
-
}
|
|
1242
|
-
async show() {
|
|
1243
|
-
// Prevent subsequent calls
|
|
1244
|
-
if (this.open) {
|
|
1245
|
-
return;
|
|
1246
|
-
}
|
|
1247
|
-
this.open = true;
|
|
1248
|
-
this.onShow.emit();
|
|
1249
|
-
}
|
|
1250
|
-
async hide() {
|
|
1251
|
-
// Prevent subsequent calls
|
|
1252
|
-
if (!this.open) {
|
|
1253
|
-
return;
|
|
1254
|
-
}
|
|
1255
|
-
this.open = false;
|
|
1256
|
-
this.onHide.emit();
|
|
1257
|
-
}
|
|
1258
|
-
handleClickOutside(e) {
|
|
1259
|
-
if (!this.host.contains(e.target)) {
|
|
1260
|
-
if (this.open) {
|
|
1261
|
-
this.open = false;
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
async handleOpen() {
|
|
1266
|
-
await this.createElement();
|
|
1267
|
-
var tooltipBox = document.getElementById("box" + this._internal_id).shadowRoot.querySelector(".tooltip-box");
|
|
1268
|
-
if (tooltipBox && tooltipBox.querySelector(".box")) {
|
|
1269
|
-
var tooltipBoxIn = tooltipBox.querySelector(".box");
|
|
1270
|
-
popoverPlacement(tooltipBoxIn, this.host, this.placement, (place) => this.placement = place);
|
|
1271
|
-
tooltipBox.classList.toggle("open");
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
async createElement() {
|
|
1275
|
-
var target = this.host.getBoundingClientRect();
|
|
1276
|
-
var placementString = String([...this.getPlacement()]).replace(',', ' ');
|
|
1277
|
-
var element;
|
|
1278
|
-
if (!document.getElementById("box" + this._internal_id)) {
|
|
1279
|
-
element = document.createElement("bcm-tooltip-box");
|
|
1280
|
-
element.setAttribute("id", "box" + this._internal_id);
|
|
1281
|
-
}
|
|
1282
|
-
else {
|
|
1283
|
-
element = document.getElementById("box" + this._internal_id);
|
|
1284
|
-
}
|
|
1285
|
-
element.setAttribute("message", this.message);
|
|
1286
|
-
// element.setAttribute("placement", placementString)
|
|
1287
|
-
element.style.position = "absolute";
|
|
1288
|
-
// element.style.top = target.top + "px"
|
|
1289
|
-
// element.style.left = (target.left + (target.width / 2)) + "px"
|
|
1290
|
-
element.setAttribute("placement", placementString);
|
|
1291
|
-
// element.style.zIndex = "999999999"
|
|
1292
|
-
document.body.appendChild(element);
|
|
1293
|
-
await delay(50);
|
|
1294
|
-
var tooltipBox = document.getElementById("box" + this._internal_id).shadowRoot.querySelector(".tooltip-box");
|
|
1295
|
-
if (tooltipBox && tooltipBox.querySelector(".box")) {
|
|
1296
|
-
var tooltipBoxIn = tooltipBox.querySelector(".box");
|
|
1297
|
-
popoverPlacement(tooltipBoxIn, this.host, this.placement, (place) => this.placement = place);
|
|
1298
|
-
}
|
|
1299
|
-
element.style.top = popoverBoxPlacement(this.placement, target)[0] + "px";
|
|
1300
|
-
element.style.left = popoverBoxPlacement(this.placement, target)[1] + "px";
|
|
1301
|
-
}
|
|
1302
|
-
hasTrigger(trigger) {
|
|
1303
|
-
return this.trigger === trigger;
|
|
1304
|
-
}
|
|
1305
|
-
getPlacement() {
|
|
1306
|
-
const placements = this.placement.split('-');
|
|
1307
|
-
if (placements.length === 1) {
|
|
1308
|
-
placements.push('center');
|
|
1309
|
-
}
|
|
1310
|
-
return placements;
|
|
1311
|
-
}
|
|
1312
|
-
/*
|
|
1313
|
-
Trigger Functions
|
|
1314
|
-
*/
|
|
1315
|
-
handleMouseOver() {
|
|
1316
|
-
if (this.hasTrigger('hover')) {
|
|
1317
|
-
this.show();
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
handleMouseOut() {
|
|
1321
|
-
if (this.hasTrigger('hover')) {
|
|
1322
|
-
this.hide();
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
handleClick() {
|
|
1326
|
-
if (this.hasTrigger('click')) {
|
|
1327
|
-
this.open ? this.hide() : this.show();
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
handleFocus() {
|
|
1331
|
-
if (this.hasTrigger('focus')) {
|
|
1332
|
-
this.show();
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
handleBlur() {
|
|
1336
|
-
if (this.hasTrigger('focus')) {
|
|
1337
|
-
this.hide();
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
async componentDidRender() {
|
|
1341
|
-
await this.createElement();
|
|
1342
|
-
var tooltipBox = document.getElementById("box" + this._internal_id).shadowRoot.querySelector(".tooltip-box");
|
|
1343
|
-
if (tooltipBox && tooltipBox.querySelector(".box")) {
|
|
1344
|
-
var tooltipBoxIn = tooltipBox.querySelector(".box");
|
|
1345
|
-
popoverPlacement(tooltipBoxIn, this.host, this.placement, (place) => this.placement = place);
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
render() {
|
|
1349
|
-
const classes = classnames('tooltip', ...this.getPlacement(), {
|
|
1350
|
-
// 'open': this.open
|
|
1351
|
-
});
|
|
1352
|
-
const hostClasses = classnames(this.hidden ? 'hidden' : null);
|
|
1353
|
-
return (h(Host, { class: hostClasses, onClick: () => this.handleClick(), onMouseOver: () => this.handleMouseOver(), onMouseOut: () => this.handleMouseOut(), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur(), tabindex: 0 }, h("span", { class: classes }, h("span", { class: "box size-2" }, this.message), h("slot", null))));
|
|
1354
|
-
}
|
|
1355
|
-
get host() { return getElement(this); }
|
|
1356
|
-
static get watchers() { return {
|
|
1357
|
-
"open": ["handleOpen"]
|
|
1358
|
-
}; }
|
|
1359
|
-
};
|
|
1360
|
-
BcmTooltip.style = tooltipCss;
|
|
1361
|
-
|
|
1362
|
-
export { BcmDatetimePicker as bcm_datetime_picker, BcmTooltip as bcm_tooltip };
|
|
1229
|
+
export { BcmDatetimePicker as bcm_datetime_picker };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-8fe7aea4.js';
|
|
2
2
|
import { c as classnames } from './index-e58a2d48.js';
|
|
3
|
-
import { g as getChilds } from './utils-
|
|
3
|
+
import { g as getChilds } from './utils-de9aee67.js';
|
|
4
4
|
|
|
5
5
|
const dropdownCss = "@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}:host{display:inline-block;width:fit-content}:host(.hidden){display:none}*{box-sizing:border-box}::-webkit-details-marker{display:none}summary{display:inline-block}.items-container{--group-shadow:0px 4px 4px rgba(0, 0, 0, 0.25)}details{position:relative}.items-container{min-width:150px;transition:height 0.3s ease;position:absolute;left:0;transition:height 0.3s ease;background-color:#ffffff;border-radius:2px;box-shadow:var(--group-shadow);z-index:10000}";
|
|
6
6
|
|