bromcom-ui 2.3.66 → 2.3.70
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/{index-43956e3c.js → _commonjsHelpers-2088bffa.js} +1 -56
- package/dist/bromcom-ui/bcm-ad02f9c9.js +453 -0
- package/dist/bromcom-ui/bcm-alert.entry.js +53 -58
- package/dist/bromcom-ui/bcm-autocomplete.entry.js +4 -3
- package/dist/bromcom-ui/bcm-avatar.entry.js +27 -28
- package/dist/bromcom-ui/bcm-badge.entry.js +60 -31
- package/dist/bromcom-ui/bcm-breadcrumb.entry.js +26 -32
- package/dist/bromcom-ui/bcm-button.entry.js +92 -215
- package/dist/bromcom-ui/bcm-card-footer.entry.js +1 -1
- package/dist/bromcom-ui/bcm-card-header.entry.js +1 -1
- package/dist/bromcom-ui/bcm-card.entry.js +5 -4
- package/dist/bromcom-ui/bcm-checkbox-group.entry.js +253 -227
- package/dist/bromcom-ui/bcm-checkbox-lite.entry.js +29 -26
- package/dist/bromcom-ui/bcm-checkbox.entry.js +85 -89
- package/dist/bromcom-ui/bcm-collapse-group.entry.js +11 -16
- package/dist/bromcom-ui/bcm-collapse.entry.js +31 -18
- package/dist/bromcom-ui/bcm-colorpicker.entry.js +7 -6
- package/dist/bromcom-ui/bcm-comment-editor.entry.js +4 -3
- package/dist/bromcom-ui/bcm-comment-group.entry.js +4 -3
- package/dist/bromcom-ui/bcm-comment.entry.js +5 -4
- package/dist/bromcom-ui/bcm-date-picker.entry.js +31 -34
- package/dist/bromcom-ui/bcm-datetime-picker.entry.js +20 -46
- package/dist/bromcom-ui/bcm-divider.entry.js +11 -11
- package/dist/bromcom-ui/bcm-dropdown-button.entry.js +35 -61
- package/dist/bromcom-ui/bcm-dropdown-item.entry.js +66 -16
- package/dist/bromcom-ui/bcm-dropdown-list.entry.js +31 -49
- package/dist/bromcom-ui/bcm-dropdown.entry.js +17 -46
- package/dist/bromcom-ui/bcm-empty.entry.js +14 -45
- package/dist/bromcom-ui/bcm-error-layout.entry.js +20 -34
- package/dist/bromcom-ui/bcm-form-group.entry.js +3 -3
- package/dist/bromcom-ui/bcm-form.entry.js +31 -16
- package/dist/bromcom-ui/bcm-icon.entry.js +55 -35
- package/dist/bromcom-ui/bcm-input.entry.js +170 -276
- package/dist/bromcom-ui/bcm-label.entry.js +12 -549
- package/dist/bromcom-ui/bcm-link.entry.js +26 -5
- package/dist/bromcom-ui/bcm-list-2.entry.js +1063 -0
- package/dist/bromcom-ui/bcm-list-item.entry.js +4 -3
- package/dist/bromcom-ui/bcm-list-select.entry.js +14 -13
- package/dist/bromcom-ui/bcm-list.entry.js +10 -5
- package/dist/bromcom-ui/bcm-listbox-group.entry.js +5 -4
- package/dist/bromcom-ui/bcm-listbox-item.entry.js +5 -4
- package/dist/bromcom-ui/bcm-listbox.entry.js +17 -14
- package/dist/bromcom-ui/bcm-menu-group.entry.js +4 -3
- package/dist/bromcom-ui/bcm-menu-item.entry.js +4 -3
- package/dist/bromcom-ui/bcm-menu.entry.js +4 -3
- package/dist/bromcom-ui/bcm-message.entry.js +54 -50
- package/dist/bromcom-ui/bcm-modal.entry.js +47 -160
- package/dist/bromcom-ui/bcm-notification.entry.js +59 -47
- package/dist/bromcom-ui/bcm-popconfirm-box.entry.js +61 -21
- package/dist/bromcom-ui/bcm-popconfirm.entry.js +49 -93
- package/dist/bromcom-ui/bcm-popover-box.entry.js +44 -16
- package/dist/bromcom-ui/bcm-popover.entry.js +61 -101
- package/dist/bromcom-ui/bcm-progress.entry.js +77 -63
- package/dist/bromcom-ui/bcm-pulldown-group.entry.js +5 -4
- package/dist/bromcom-ui/bcm-pulldown-item.entry.js +4 -3
- package/dist/bromcom-ui/bcm-pulldown.entry.js +5 -4
- package/dist/bromcom-ui/bcm-radio-group.entry.js +183 -85
- package/dist/bromcom-ui/bcm-radio.entry.js +59 -79
- package/dist/bromcom-ui/bcm-range.entry.js +161 -0
- package/dist/bromcom-ui/bcm-result.entry.js +62 -38
- package/dist/bromcom-ui/bcm-search-2.entry.js +219 -0
- package/dist/bromcom-ui/bcm-search.entry.js +5 -4
- package/dist/bromcom-ui/bcm-select-box.entry.js +4 -3
- package/dist/bromcom-ui/bcm-select-group.entry.js +4 -3
- package/dist/bromcom-ui/bcm-select-option.entry.js +5 -4
- package/dist/bromcom-ui/bcm-select.entry.js +11 -12
- package/dist/bromcom-ui/bcm-selecto.entry.js +3 -2
- package/dist/bromcom-ui/bcm-slider.entry.js +4 -3
- package/dist/bromcom-ui/bcm-sub-comment.entry.js +5 -4
- package/dist/bromcom-ui/bcm-switch.entry.js +48 -37
- package/dist/bromcom-ui/bcm-tab-pane.entry.js +4 -3
- package/dist/bromcom-ui/bcm-tab.entry.js +8 -8
- package/dist/bromcom-ui/bcm-tabs-content.entry.js +5 -4
- package/dist/bromcom-ui/bcm-tabs.entry.js +6 -5
- package/dist/bromcom-ui/bcm-tag.entry.js +48 -44
- package/dist/bromcom-ui/bcm-text.entry.js +16 -10
- package/dist/bromcom-ui/bcm-textarea.entry.js +45 -68
- package/dist/bromcom-ui/bcm-time-picker.entry.js +4 -3
- package/dist/bromcom-ui/bcm-timeline-item.entry.js +10 -24
- package/dist/bromcom-ui/bcm-timeline.entry.js +11 -33
- package/dist/bromcom-ui/bcm-tooltip-box.entry.js +54 -16
- package/dist/bromcom-ui/bcm-tooltip.entry.js +48 -99
- package/dist/bromcom-ui/bcm-treeview-group.entry.js +1 -1
- package/dist/bromcom-ui/bcm-treeview-item.entry.js +5 -4
- package/dist/bromcom-ui/bcm-treeview.entry.js +6 -5
- package/dist/bromcom-ui/bcm-upload.entry.js +5 -4
- package/dist/bromcom-ui/bromcom-ui.css +40153 -35
- package/dist/bromcom-ui/bromcom-ui.esm.js +2 -2
- package/dist/bromcom-ui/caption-template-2d4ffc88.js +25 -0
- package/dist/bromcom-ui/color-helper-19448077.js +35 -0
- package/dist/bromcom-ui/{element-dragger-e40f0410.js → element-dragger-2a215f47.js} +1 -1
- package/dist/bromcom-ui/generate-8e440fc4.js +91 -0
- package/dist/bromcom-ui/index-55174f2a.js +58 -0
- package/dist/bromcom-ui/{index-9dbea026.js → index-dbc63c66.js} +2 -2
- package/dist/bromcom-ui/index-dd5c1283.js +187 -0
- package/dist/bromcom-ui/input-template-487d3243.js +83 -0
- package/dist/bromcom-ui/json-parse-decarator-223ea680.js +21 -0
- package/dist/bromcom-ui/label-template-501216fc.js +19 -0
- package/dist/bromcom-ui/number-helper-fea1966f.js +13 -0
- package/dist/bromcom-ui/{popover-placement-fb1f91e9.js → popover-placement-f7a6551c.js} +25 -17
- package/dist/bromcom-ui/property-decorators-21b15487.js +36 -0
- package/dist/bromcom-ui/slot-template-f79b82ee.js +9 -0
- package/dist/bromcom-ui/snq.es5-946822b8.js +14 -0
- package/dist/bromcom-ui/string-helper-35840f91.js +109 -0
- package/dist/bromcom-ui/types-6b2a6629.js +172 -0
- package/dist/bromcom-ui/{utils-1feb01eb.js → utils-333ded7f.js} +4 -1
- package/dist/types/components/atoms/avatar/avatar.d.ts +9 -5
- package/dist/types/components/atoms/badge/badge.d.ts +14 -9
- package/dist/types/components/atoms/button/button.d.ts +17 -10
- package/dist/types/components/atoms/button/types.d.ts +0 -22
- package/dist/types/components/atoms/divider/divider.d.ts +2 -2
- package/dist/types/components/atoms/icon/icon.d.ts +14 -9
- package/dist/types/components/atoms/label/label.d.ts +1 -2
- package/dist/types/components/atoms/link/link.d.ts +6 -1
- package/dist/types/components/atoms/states/badge.states.d.ts +7 -0
- package/dist/types/components/atoms/states/button.states.d.ts +7 -0
- package/dist/types/components/atoms/tag/tag.d.ts +14 -11
- package/dist/types/components/atoms/text/text.d.ts +4 -3
- package/dist/types/components/molecules/alert/alert.d.ts +15 -37
- package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +9 -22
- package/dist/types/components/molecules/breadcrumb/types.d.ts +10 -0
- package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +7 -22
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +26 -31
- package/dist/types/components/molecules/checkbox/group.d.ts +24 -83
- package/dist/types/components/molecules/collapse/collapse.d.ts +9 -6
- package/dist/types/components/molecules/collapse/group.d.ts +4 -2
- package/dist/types/components/molecules/dropdown/dropdown-button.d.ts +18 -31
- package/dist/types/components/molecules/dropdown/dropdown-item.d.ts +17 -16
- package/dist/types/components/molecules/dropdown/dropdown-list.d.ts +12 -35
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +5 -30
- package/dist/types/components/molecules/empty/empty.d.ts +7 -24
- package/dist/types/components/molecules/empty/types.d.ts +0 -15
- package/dist/types/components/molecules/error-layout/error-layout.d.ts +6 -18
- package/dist/types/components/molecules/input/input.d.ts +39 -45
- package/dist/types/components/molecules/input/types.d.ts +13 -0
- package/dist/types/components/molecules/list/list-select.d.ts +0 -1
- package/dist/types/components/molecules/list/list.d.ts +0 -1
- package/dist/types/components/molecules/message/message.d.ts +13 -25
- package/dist/types/components/molecules/modal/modal.d.ts +12 -65
- package/dist/types/components/molecules/notification/notification.d.ts +14 -21
- package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +14 -12
- package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +10 -14
- package/dist/types/components/molecules/popover/popover-box.d.ts +10 -10
- package/dist/types/components/molecules/popover/popover.d.ts +13 -19
- package/dist/types/components/molecules/progress/progress.d.ts +8 -6
- package/dist/types/components/molecules/progress/types.d.ts +24 -0
- package/dist/types/components/molecules/radio/group.d.ts +28 -22
- package/dist/types/components/molecules/radio/radio.d.ts +13 -17
- package/dist/types/components/molecules/range/range.d.ts +36 -0
- package/dist/types/components/molecules/result/result.d.ts +14 -8
- package/dist/types/components/molecules/search-2/search-2.d.ts +30 -0
- package/dist/types/components/molecules/select/select.d.ts +4 -5
- package/dist/types/components/molecules/states/alert.states.d.ts +7 -0
- package/dist/types/components/molecules/states/checkbox-group.states.d.ts +53 -0
- package/dist/types/components/molecules/states/message.states.d.ts +7 -0
- package/dist/types/components/molecules/states/notification.states.d.ts +7 -0
- package/dist/types/components/molecules/states/radio-group.states.d.ts +47 -0
- package/dist/types/components/molecules/states/result.states.d.ts +7 -0
- package/dist/types/components/molecules/states/search.states.d.ts +13 -0
- package/dist/types/components/molecules/switch/switch.d.ts +18 -15
- package/dist/types/components/molecules/textarea/textarea.d.ts +23 -23
- package/dist/types/components/molecules/textarea/types.d.ts +9 -0
- package/dist/types/components/molecules/timeline/timeline-item.d.ts +0 -12
- package/dist/types/components/molecules/timeline/timeline.d.ts +2 -19
- package/dist/types/components/molecules/tooltip/tooltip-box.d.ts +11 -8
- package/dist/types/components/molecules/tooltip/tooltip.d.ts +13 -17
- package/dist/types/components/organism/colorpicker/colorpicker.d.ts +1 -2
- package/dist/types/components/organism/date-picker/date-picker.d.ts +7 -11
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +4 -5
- package/dist/types/components/organism/form/form.d.ts +2 -1
- package/dist/types/components/organism/list-2/list-2.d.ts +109 -0
- package/dist/types/components/organism/listbox/listbox.d.ts +1 -2
- package/dist/types/components/organism/states/bcm-list2.states.d.ts +24 -0
- package/dist/types/components/organism/tabs/tab.d.ts +2 -1
- package/dist/types/components/organism/time-picker/time-picker.d.ts +1 -1
- package/dist/types/components.d.ts +554 -511
- package/dist/types/decorators/json-parse-decarator.d.ts +4 -0
- package/dist/types/decorators/property-decorators.d.ts +6 -0
- package/dist/types/global/variables/colors.d.ts +0 -1
- package/dist/types/helper/generate.d.ts +4 -1
- package/dist/types/helper/number-helper.d.ts +9 -0
- package/dist/types/helper/string-helper.d.ts +3 -0
- package/dist/types/models/bcm.d.ts +1 -1
- package/dist/types/models/states/Atoms/bcm-Atoms-state.d.ts +34 -0
- package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +78 -0
- package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +71 -0
- package/dist/types/templates/button-template.d.ts +16 -0
- package/dist/types/templates/checkbox-group-template.d.ts +10 -0
- package/dist/types/templates/checkbox-template.d.ts +13 -0
- package/dist/types/templates/info-footer-template.d.ts +10 -0
- package/dist/types/templates/input-template.d.ts +30 -0
- package/dist/types/templates/list-item-template.d.ts +11 -0
- package/dist/types/templates/list-template.d.ts +23 -0
- package/dist/types/templates/tag-template.d.ts +17 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/utils/popover-placement.d.ts +3 -3
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/bcm-content.entry.js +0 -15
- package/dist/bromcom-ui/bcm-dropdown-group.entry.js +0 -58
- package/dist/bromcom-ui/bcm-footer.entry.js +0 -15
- package/dist/bromcom-ui/bcm-header.entry.js +0 -15
- package/dist/bromcom-ui/datetime-helper-c373f888.js +0 -5
- package/dist/bromcom-ui/types-0e4b533d.js +0 -14
- package/dist/bromcom-ui/types-911a8837.js +0 -21
- package/dist/types/components/atoms/badge/types.d.ts +0 -4
- package/dist/types/components/molecules/checkbox/types.d.ts +0 -29
- package/dist/types/components/molecules/dropdown/dropdown-group.d.ts +0 -28
- package/dist/types/components/molecules/dropdown/types.d.ts +0 -20
- package/dist/types/components/molecules/error-layout/types.d.ts +0 -4
- package/dist/types/components/molecules/message/types.d.ts +0 -13
- package/dist/types/components/molecules/modal/modal-content.d.ts +0 -4
- package/dist/types/components/molecules/modal/modal-header.d.ts +0 -4
- package/dist/types/components/molecules/modal/model-footer.d.ts +0 -4
- package/dist/types/components/molecules/modal/types.d.ts +0 -41
- package/dist/types/components/molecules/notification/types.d.ts +0 -14
- package/dist/types/components/molecules/result/types.d.ts +0 -19
- package/dist/types/helper/datetime-helper.d.ts +0 -3
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import { r as registerInstance, e as createEvent, h, f as Host
|
|
2
|
-
import {
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host } from './index-dbc63c66.js';
|
|
2
|
+
import { G as Generate } from './generate-8e440fc4.js';
|
|
3
|
+
import './_commonjsHelpers-2088bffa.js';
|
|
4
|
+
import { c as classnames } from './index-55174f2a.js';
|
|
5
|
+
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
6
|
+
import { C as CaptionTemplate } from './caption-template-2d4ffc88.js';
|
|
7
|
+
import { I as InputTemplate } from './input-template-487d3243.js';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
var ResizeType;
|
|
10
|
+
(function (ResizeType) {
|
|
11
|
+
ResizeType["none"] = "none";
|
|
12
|
+
ResizeType["both"] = "both";
|
|
13
|
+
ResizeType["horizontal"] = "horizontal";
|
|
14
|
+
ResizeType["vertical"] = "vertical";
|
|
15
|
+
ResizeType["initial"] = "initial";
|
|
16
|
+
ResizeType["inherit"] = "inherit";
|
|
17
|
+
})(ResizeType || (ResizeType = {}));
|
|
5
18
|
|
|
6
|
-
let id = 0;
|
|
7
19
|
const BcmTextarea = class {
|
|
8
20
|
constructor(hostRef) {
|
|
9
21
|
registerInstance(this, hostRef);
|
|
@@ -12,25 +24,32 @@ const BcmTextarea = class {
|
|
|
12
24
|
this.clear = createEvent(this, "bcm-clear", 7);
|
|
13
25
|
this.change = createEvent(this, "bcm-change", 7);
|
|
14
26
|
this.input = createEvent(this, "bcm-input", 7);
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.captionType = 'default';
|
|
19
|
-
this.rows = 1;
|
|
20
|
-
this.size = 'medium';
|
|
21
|
-
this.resize = 'vertical';
|
|
27
|
+
/** Props **/
|
|
28
|
+
this._id = Generate.UID();
|
|
29
|
+
this._internal_id = Generate.UID();
|
|
22
30
|
this.hidden = false;
|
|
23
31
|
this.required = false;
|
|
24
|
-
this.
|
|
32
|
+
this.noCaption = false;
|
|
33
|
+
this.captionType = Bcm.Status.default;
|
|
34
|
+
this.rows = 1;
|
|
35
|
+
this.size = Bcm.Size.medium;
|
|
36
|
+
this.readonly = false;
|
|
37
|
+
this.resize = ResizeType.vertical;
|
|
38
|
+
this.fullWidth = false;
|
|
39
|
+
this.focused = false;
|
|
40
|
+
}
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
this.captionCache = this.caption;
|
|
43
|
+
this.captionTypeCache = this.captionType;
|
|
25
44
|
}
|
|
26
|
-
async
|
|
45
|
+
async onBcmFocus() {
|
|
27
46
|
this.textarea.focus();
|
|
28
47
|
}
|
|
29
|
-
async
|
|
48
|
+
async onBcmBlur() {
|
|
30
49
|
this.textarea.blur();
|
|
31
50
|
}
|
|
32
|
-
async
|
|
33
|
-
|
|
51
|
+
async onBcmSelect() {
|
|
52
|
+
this.textarea.select();
|
|
34
53
|
}
|
|
35
54
|
async setValue(value) {
|
|
36
55
|
this.textarea.value = value;
|
|
@@ -50,85 +69,43 @@ const BcmTextarea = class {
|
|
|
50
69
|
async getValue() {
|
|
51
70
|
return this.value;
|
|
52
71
|
}
|
|
72
|
+
watchValue() {
|
|
73
|
+
this.handleChange();
|
|
74
|
+
}
|
|
53
75
|
handleFocus() {
|
|
54
|
-
this.
|
|
76
|
+
this.focused = true;
|
|
55
77
|
this.focus.emit();
|
|
56
78
|
}
|
|
57
79
|
handleBlur() {
|
|
58
|
-
this.
|
|
80
|
+
this.focused = false;
|
|
59
81
|
this.blur.emit();
|
|
60
82
|
}
|
|
61
83
|
handleChange() {
|
|
62
84
|
this.value = this.textarea.value;
|
|
63
85
|
this.change.emit(this.value);
|
|
64
86
|
}
|
|
65
|
-
watchValue() {
|
|
66
|
-
this.handleChange();
|
|
67
|
-
}
|
|
68
87
|
handleInput() {
|
|
69
88
|
this.value = this.textarea.value;
|
|
70
|
-
this.setTextareaHeight();
|
|
71
89
|
this.input.emit(this.value);
|
|
72
90
|
}
|
|
73
91
|
handleClear(e) {
|
|
92
|
+
this.textarea.value = '';
|
|
74
93
|
this.value = '';
|
|
75
94
|
this.clear.emit();
|
|
76
95
|
this.textarea.focus();
|
|
77
96
|
e.stopPropagation();
|
|
78
97
|
}
|
|
79
|
-
setTextareaHeight() {
|
|
80
|
-
if (this.resize === 'auto') {
|
|
81
|
-
this.textarea.style.height = 'auto';
|
|
82
|
-
this.textarea.style.height = (this.textarea.scrollHeight + 2) + 'px';
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
this.textarea.style.height = undefined;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
connectedCallback() {
|
|
89
|
-
this.handleChange = this.handleChange.bind(this);
|
|
90
|
-
this.handleBlur = this.handleBlur.bind(this);
|
|
91
|
-
this.handleFocus = this.handleFocus.bind(this);
|
|
92
|
-
this.handleInput = this.handleInput.bind(this);
|
|
93
|
-
this.handleClear = this.handleClear.bind(this);
|
|
94
|
-
this.setTextareaHeight = this.setTextareaHeight.bind(this);
|
|
95
|
-
this.captionCache = this.caption;
|
|
96
|
-
this.captionTypeCache = this.captionType;
|
|
97
|
-
}
|
|
98
|
-
componentWillRender() {
|
|
99
|
-
this.valueLength = this.value ? this.value.length : 0;
|
|
100
|
-
// this.fullWidth
|
|
101
|
-
// ? this.el.style.width = '100%'
|
|
102
|
-
// : this.el.style.width = 'initial'
|
|
103
|
-
}
|
|
104
98
|
render() {
|
|
105
|
-
const { fullWidth, size, rows, disabled, clearable, label,
|
|
106
|
-
const
|
|
99
|
+
const { _id, hidden, readonly, fullWidth, size, rows, disabled, clearable, label, focused, noCaption, caption, captionError, captionType, value, resize, maxLength, placeholder, required } = this;
|
|
100
|
+
const hostClasses = classnames('bcm-input', {
|
|
101
|
+
hidden,
|
|
107
102
|
'full-width': fullWidth,
|
|
108
|
-
'error': captionType == 'error' ? true : false
|
|
109
|
-
});
|
|
110
|
-
const contanerClasses = classnames('textarea-container', 'resize-' + resize, 'textarea-' + size, {
|
|
111
|
-
'empty': (value === null || value === void 0 ? void 0 : value.length) < 1,
|
|
112
|
-
'focused': hasFocus,
|
|
113
|
-
'disabled': disabled,
|
|
114
|
-
});
|
|
115
|
-
const captionClasses = classnames('size-1', 'input-caption', 'caption-' + captionType);
|
|
116
|
-
const countClasses = classnames('size-1', 'input-caption', 'caption-default');
|
|
117
|
-
const textareaClasses = classnames('size-' + size, {
|
|
118
|
-
'size-3': size === 'large',
|
|
119
|
-
'size-2': size === 'small' || size === 'medium',
|
|
120
|
-
'clearable': clearable
|
|
121
103
|
});
|
|
122
|
-
|
|
123
|
-
return (h(Host, { class: hostClasses }, h("div", { class: wrapperClasses }, label && h("div", null, h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required, htmlFor: this.textareaId })), h("div", { class: contanerClasses }, h("textarea", { ref: el => (this.textarea = el), onInput: this.handleInput, onFocus: this.handleFocus, onChange: this.handleChange, onBlur: this.handleBlur, class: textareaClasses, id: this.textareaId, value: value, rows: rows, disabled: disabled, maxlength: maxLength, placeholder: placeholder }), clearable && (h("button", { class: "clear-button", onClick: this.handleClear }, h("bcm-icon", { icon: "close-circle", type: "fill", size: 18, color: "grey-7" })))), !noCaption || maxLength ? (h("div", { class: "caption-area" }, h("span", null, captionType == "error"
|
|
124
|
-
? h("span", { class: captionClasses }, " ", captionError, " ")
|
|
125
|
-
: caption && h("span", { class: captionClasses }, " ", caption, " ")), maxLength && h("span", { class: countClasses }, " ", `${valueLength}/${maxLength}`, " "))) : null)));
|
|
104
|
+
return (h(Host, { class: hostClasses }, label && h("bcm-label", { type: captionType, value: label, required: required, htmlFor: _id }), h(InputTemplate, { elementType: Bcm.HtmlElementType.textarea, id: _id, value: value, rows: rows, disabled: disabled, maxLength: maxLength, placeholder: placeholder, clearable: clearable, resize: resize, readonly: readonly, size: size, focused: focused, handleFocus: () => this.handleFocus(), handleBlur: () => this.handleBlur(), handleChange: () => this.handleChange(), handleInput: () => this.handleInput(), handleClear: (e) => this.handleClear(e), ref: (el) => this.textarea = el }), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption, value: value, maxLength: maxLength })));
|
|
126
105
|
}
|
|
127
|
-
get el() { return getElement(this); }
|
|
128
106
|
static get watchers() { return {
|
|
129
107
|
"value": ["watchValue"]
|
|
130
108
|
}; }
|
|
131
109
|
};
|
|
132
|
-
BcmTextarea.style = textareaCss;
|
|
133
110
|
|
|
134
111
|
export { BcmTextarea as bcm_textarea };
|