bromcom-ui 2.3.67 → 2.3.71
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/bcm-label.entry.js +6 -478
- package/dist/bromcom-ui/bcm-select-box.entry.js +3 -0
- package/dist/bromcom-ui/bcm-select.entry.js +36 -18
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{bcm-ad02f9c9.js → string-helper-1d51eff7.js} +23 -2
- package/dist/types/components/atoms/icon/icon.d.ts +1 -1
- package/dist/types/components/molecules/select/select-box.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/bcm-list-2-item.entry.js +0 -36
- package/dist/bromcom-ui/bcm-list-2.entry.js +0 -936
- package/dist/bromcom-ui/bcm-range.entry.js +0 -160
- package/dist/bromcom-ui/bcm-search-2.entry.js +0 -193
- package/dist/bromcom-ui/caption-template-2d4ffc88.js +0 -25
- package/dist/bromcom-ui/color-helper-19448077.js +0 -35
- package/dist/bromcom-ui/element-dragger-2a215f47.js +0 -273
- package/dist/bromcom-ui/generate-0a22e8df.js +0 -88
- package/dist/bromcom-ui/index-dbc63c66.js +0 -2818
- package/dist/bromcom-ui/index-dd5c1283.js +0 -187
- package/dist/bromcom-ui/input-template-2c402b1c.js +0 -91
- package/dist/bromcom-ui/input-template-3fef2084.js +0 -87
- package/dist/bromcom-ui/input-template-5d0fa41c.js +0 -89
- package/dist/bromcom-ui/input-template-5d288c2e.js +0 -90
- package/dist/bromcom-ui/input-template-63f2d73c.js +0 -83
- package/dist/bromcom-ui/input-template-91ff8813.js +0 -90
- package/dist/bromcom-ui/input-template-d4438c87.js +0 -86
- package/dist/bromcom-ui/input-template-d594af3b.js +0 -86
- package/dist/bromcom-ui/input-template-e0e652a9.js +0 -82
- package/dist/bromcom-ui/input-template-ece52adc.js +0 -85
- package/dist/bromcom-ui/input-template-f669289a.js +0 -93
- package/dist/bromcom-ui/json-parse-decarator-223ea680.js +0 -21
- package/dist/bromcom-ui/label-template-b0b70fde.js +0 -19
- package/dist/bromcom-ui/number-helper-fea1966f.js +0 -13
- package/dist/bromcom-ui/popover-placement-31e0e70f.js +0 -96
- package/dist/bromcom-ui/property-decorators-21b15487.js +0 -36
- package/dist/bromcom-ui/slot-template-5b8e1902.js +0 -9
- package/dist/bromcom-ui/snq.es5-946822b8.js +0 -14
- package/dist/bromcom-ui/string-helper-414d635d.js +0 -25
- package/dist/bromcom-ui/types-6b2a6629.js +0 -172
- package/dist/bromcom-ui/utils-333ded7f.js +0 -438
- package/dist/types/components/atoms/states/badge.states.d.ts +0 -7
- package/dist/types/components/atoms/states/button.states.d.ts +0 -7
- package/dist/types/components/molecules/breadcrumb/types.d.ts +0 -10
- package/dist/types/components/molecules/input/types.d.ts +0 -13
- package/dist/types/components/molecules/progress/types.d.ts +0 -24
- package/dist/types/components/molecules/range/range.d.ts +0 -36
- package/dist/types/components/molecules/search-2/search-2.d.ts +0 -26
- package/dist/types/components/molecules/states/alert.states.d.ts +0 -7
- package/dist/types/components/molecules/states/checkbox-group.states.d.ts +0 -53
- package/dist/types/components/molecules/states/message.states.d.ts +0 -7
- package/dist/types/components/molecules/states/notification.states.d.ts +0 -7
- package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -47
- package/dist/types/components/molecules/states/result.states.d.ts +0 -7
- package/dist/types/components/molecules/states/search.states.d.ts +0 -9
- package/dist/types/components/molecules/textarea/types.d.ts +0 -9
- package/dist/types/components/organism/list-2/list-2-item.d.ts +0 -11
- package/dist/types/components/organism/list-2/list-2.d.ts +0 -104
- package/dist/types/components/organism/states/bcm-list2.states.d.ts +0 -19
- package/dist/types/decorators/json-parse-decarator.d.ts +0 -4
- package/dist/types/decorators/property-decorators.d.ts +0 -6
- package/dist/types/helper/number-helper.d.ts +0 -9
- package/dist/types/models/states/Atoms/bcm-Atoms-state.d.ts +0 -34
- package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +0 -78
- package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +0 -69
- package/dist/types/templates/button-template.d.ts +0 -16
- package/dist/types/templates/checkbox-group-template.d.ts +0 -10
- package/dist/types/templates/checkbox-template.d.ts +0 -13
- package/dist/types/templates/info-footer-template.d.ts +0 -10
- package/dist/types/templates/input-template.d.ts +0 -30
- package/dist/types/templates/list-item-template.d.ts +0 -10
- package/dist/types/templates/list-template.d.ts +0 -21
- package/dist/types/templates/tag-template.d.ts +0 -17
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { h } from './index-dbc63c66.js';
|
|
2
|
-
import { c as classnames } from './index-43956e3c.js';
|
|
3
|
-
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
4
|
-
|
|
5
|
-
var defaultIcons;
|
|
6
|
-
(function (defaultIcons) {
|
|
7
|
-
defaultIcons["search"] = "search";
|
|
8
|
-
defaultIcons["email"] = "mail";
|
|
9
|
-
defaultIcons["tel"] = "phone";
|
|
10
|
-
defaultIcons["url"] = "link";
|
|
11
|
-
})(defaultIcons || (defaultIcons = {}));
|
|
12
|
-
var iconSizes;
|
|
13
|
-
(function (iconSizes) {
|
|
14
|
-
iconSizes[iconSizes["small"] = 14] = "small";
|
|
15
|
-
iconSizes[iconSizes["medium"] = 16] = "medium";
|
|
16
|
-
iconSizes[iconSizes["large"] = 18] = "large";
|
|
17
|
-
})(iconSizes || (iconSizes = {}));
|
|
18
|
-
|
|
19
|
-
const InputTemplate = ({ elementType,
|
|
20
|
-
//textarea
|
|
21
|
-
rows,
|
|
22
|
-
//props
|
|
23
|
-
id, internalId, type, placeholder, value, size,
|
|
24
|
-
//,
|
|
25
|
-
unit, unitPrefix, maxLength,
|
|
26
|
-
//boolean
|
|
27
|
-
disabled, clearable, focused, readonly, isPasswordVisible, passwordToggle, noDefaultIcon, inValid, captionType, resize,
|
|
28
|
-
// custom functions
|
|
29
|
-
changePasswordVisibility, handleClear, steps,
|
|
30
|
-
//event functions
|
|
31
|
-
ref, handleBlur, handleFocus, handleInput, handleChange, }) => {
|
|
32
|
-
const ElementTagType = Bcm.HtmlElementType[elementType] || Bcm.HtmlElementType.input;
|
|
33
|
-
type = (type === 'password' && isPasswordVisible) ? 'text' : type;
|
|
34
|
-
value = value || '';
|
|
35
|
-
value = !focused ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '') : value;
|
|
36
|
-
let clearableButton = false;
|
|
37
|
-
const templateHandleFocus = (e) => {
|
|
38
|
-
e.target.parentElement.classList.add('focused');
|
|
39
|
-
handleFocus(e);
|
|
40
|
-
};
|
|
41
|
-
const templateHandleBlur = (e) => {
|
|
42
|
-
e.target.parentElement.classList.remove('focused');
|
|
43
|
-
handleBlur(e);
|
|
44
|
-
};
|
|
45
|
-
const templateHandleInput = (e) => {
|
|
46
|
-
console.log(clearable);
|
|
47
|
-
console.log(e.target.value);
|
|
48
|
-
clearableButton = clearable && e.target.value.length > 0 ? true : false;
|
|
49
|
-
handleInput(e);
|
|
50
|
-
};
|
|
51
|
-
var containerClass = classnames('bcm-input__container', ElementTagType === Bcm.HtmlElementType.textarea && classnames('bcm-input__textarea', 'textarea-size-' + Bcm.Size[size], 'resize-' + resize, 'textarea-' + size), ElementTagType === Bcm.HtmlElementType.input && classnames('input-size-' + Bcm.Size[size]), {
|
|
52
|
-
'focused': focused,
|
|
53
|
-
'clearable': clearable,
|
|
54
|
-
disabled,
|
|
55
|
-
readonly,
|
|
56
|
-
'invalid': inValid,
|
|
57
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
58
|
-
// 'empty': value?.length < 1,
|
|
59
|
-
'error': captionType === 'error'
|
|
60
|
-
});
|
|
61
|
-
const caretContainer = classnames('caret-container', {
|
|
62
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
63
|
-
'disabled': disabled || readonly || inValid
|
|
64
|
-
});
|
|
65
|
-
const inputClass = size === 'large' ? 'size-3' : 'size-2';
|
|
66
|
-
const unitClass = classnames(inputClass, 'unit-prefix');
|
|
67
|
-
return (h("div", { class: containerClass },
|
|
68
|
-
h("span", { hidden: true },
|
|
69
|
-
h("slot", null)),
|
|
70
|
-
h("span", { class: "input-prefix" },
|
|
71
|
-
h("slot", { name: "prefix" }),
|
|
72
|
-
unitPrefix && h("span", { class: unitClass }, unitPrefix)),
|
|
73
|
-
h(ElementTagType, Object.assign({ tabindex: "1", id: id, "bcm-internal-id": internalId, class: 'bcm-input-element ' + inputClass }, ((ElementTagType === Bcm.HtmlElementType.input && { type: type })), ((ElementTagType === Bcm.HtmlElementType.textarea && { rows: rows })), { value: value, maxLength: maxLength, placeholder: placeholder, disabled: disabled, readOnly: readonly, ref: (el) => ref(el), onBlur: (e) => templateHandleBlur(e), onFocus: (e) => templateHandleFocus(e), onInput: (e) => templateHandleInput(e), onChange: (e) => handleChange(e) })),
|
|
74
|
-
(clearable && !disabled) &&
|
|
75
|
-
h("span", { class: "input-suffix input-suffix-button input-clear-button", onClick: (e) => handleClear(e) },
|
|
76
|
-
h("bcm-icon", { icon: "close-circle", type: "fill", size: iconSizes[size], color: "grey-7" })),
|
|
77
|
-
(type === 'password' && passwordToggle) && (h("span", { class: "input-suffix input-suffix-button", onClick: () => changePasswordVisibility() },
|
|
78
|
-
h("bcm-icon", { icon: isPasswordVisible ? "eye-invisible" : "eye", type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
79
|
-
(Object.keys(defaultIcons).includes(type) && !noDefaultIcon) && (h("span", { class: "input-suffix" },
|
|
80
|
-
h("bcm-icon", { icon: defaultIcons[type], type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
81
|
-
type === 'number' && (h("div", { class: caretContainer },
|
|
82
|
-
h("span", { class: "caret", onClick: () => steps('up') },
|
|
83
|
-
h("bcm-icon", { icon: "caret-up", type: "outlined", color: "grey-7", size: 8 })),
|
|
84
|
-
h("span", { class: "caret", onClick: () => steps('down') },
|
|
85
|
-
h("bcm-icon", { icon: "caret-down", type: "outlined", color: "grey-7", size: 8 })))),
|
|
86
|
-
type !== 'number' && (h("span", { class: "input-suffix" },
|
|
87
|
-
h("slot", { name: "suffix" })))));
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export { InputTemplate as I };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { h } from './index-dbc63c66.js';
|
|
2
|
-
import { c as classnames } from './index-43956e3c.js';
|
|
3
|
-
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
4
|
-
|
|
5
|
-
var defaultIcons;
|
|
6
|
-
(function (defaultIcons) {
|
|
7
|
-
defaultIcons["search"] = "search";
|
|
8
|
-
defaultIcons["email"] = "mail";
|
|
9
|
-
defaultIcons["tel"] = "phone";
|
|
10
|
-
defaultIcons["url"] = "link";
|
|
11
|
-
})(defaultIcons || (defaultIcons = {}));
|
|
12
|
-
var iconSizes;
|
|
13
|
-
(function (iconSizes) {
|
|
14
|
-
iconSizes[iconSizes["small"] = 14] = "small";
|
|
15
|
-
iconSizes[iconSizes["medium"] = 16] = "medium";
|
|
16
|
-
iconSizes[iconSizes["large"] = 18] = "large";
|
|
17
|
-
})(iconSizes || (iconSizes = {}));
|
|
18
|
-
|
|
19
|
-
const InputTemplate = ({ elementType,
|
|
20
|
-
//textarea
|
|
21
|
-
rows,
|
|
22
|
-
//props
|
|
23
|
-
id, internalId, type, placeholder, value, size,
|
|
24
|
-
//,
|
|
25
|
-
unit, unitPrefix, maxLength,
|
|
26
|
-
//boolean
|
|
27
|
-
disabled, clearable, focused, readonly, isPasswordVisible, passwordToggle, noDefaultIcon, inValid, captionType, resize,
|
|
28
|
-
// custom functions
|
|
29
|
-
changePasswordVisibility, handleClear, steps,
|
|
30
|
-
//event functions
|
|
31
|
-
ref, handleBlur, handleFocus, handleInput, handleChange, }) => {
|
|
32
|
-
const ElementTagType = Bcm.HtmlElementType[elementType] || Bcm.HtmlElementType.input;
|
|
33
|
-
type = (type === 'password' && isPasswordVisible) ? 'text' : type;
|
|
34
|
-
value = value || '';
|
|
35
|
-
value = !focused ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '') : value;
|
|
36
|
-
const templateHandleFocus = (e) => {
|
|
37
|
-
e.target.parentElement.classList.add('focused');
|
|
38
|
-
handleFocus(e);
|
|
39
|
-
};
|
|
40
|
-
const templateHandleBlur = (e) => {
|
|
41
|
-
e.target.parentElement.classList.remove('focused');
|
|
42
|
-
handleBlur(e);
|
|
43
|
-
};
|
|
44
|
-
const templateHandleInput = (e) => {
|
|
45
|
-
clearable = clearable && e.target.value.length > 0 ? true : false;
|
|
46
|
-
handleInput(e);
|
|
47
|
-
};
|
|
48
|
-
var containerClass = classnames('bcm-input__container', ElementTagType === Bcm.HtmlElementType.textarea && classnames('bcm-input__textarea', 'textarea-size-' + Bcm.Size[size], 'resize-' + resize, 'textarea-' + size), ElementTagType === Bcm.HtmlElementType.input && classnames('input-size-' + Bcm.Size[size]), {
|
|
49
|
-
'focused': focused,
|
|
50
|
-
disabled,
|
|
51
|
-
readonly,
|
|
52
|
-
'invalid': inValid,
|
|
53
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
54
|
-
// 'empty': value?.length < 1,
|
|
55
|
-
'error': captionType === 'error'
|
|
56
|
-
});
|
|
57
|
-
const caretContainer = classnames('caret-container', {
|
|
58
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
59
|
-
'disabled': disabled || readonly || inValid
|
|
60
|
-
});
|
|
61
|
-
const inputClass = size === 'large' ? 'size-3' : 'size-2';
|
|
62
|
-
const unitClass = classnames(inputClass, 'unit-prefix');
|
|
63
|
-
return (h("div", { class: containerClass },
|
|
64
|
-
h("span", { hidden: true },
|
|
65
|
-
h("slot", null)),
|
|
66
|
-
h("span", { class: "input-prefix" },
|
|
67
|
-
h("slot", { name: "prefix" }),
|
|
68
|
-
unitPrefix && h("span", { class: unitClass }, unitPrefix)),
|
|
69
|
-
h(ElementTagType, Object.assign({ tabindex: "1", id: id, "bcm-internal-id": internalId, class: 'bcm-input-element ' + inputClass }, ((ElementTagType === Bcm.HtmlElementType.input && { type: type })), ((ElementTagType === Bcm.HtmlElementType.textarea && { rows: rows })), { value: value, maxLength: maxLength, placeholder: placeholder, disabled: disabled, readOnly: readonly, ref: (el) => ref(el), onBlur: (e) => templateHandleBlur(e), onFocus: (e) => templateHandleFocus(e), onInput: (e) => templateHandleInput(e), onChange: (e) => handleChange(e) })),
|
|
70
|
-
(clearable && !disabled) &&
|
|
71
|
-
h("span", { class: "input-suffix input-suffix-button input-clear-button", onClick: (e) => handleClear(e) },
|
|
72
|
-
h("bcm-icon", { icon: "close-circle", type: "fill", size: iconSizes[size], color: "grey-7" })),
|
|
73
|
-
(type === 'password' && passwordToggle) && (h("span", { class: "input-suffix input-suffix-button", onClick: () => changePasswordVisibility() },
|
|
74
|
-
h("bcm-icon", { icon: isPasswordVisible ? "eye-invisible" : "eye", type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
75
|
-
(Object.keys(defaultIcons).includes(type) && !noDefaultIcon) && (h("span", { class: "input-suffix" },
|
|
76
|
-
h("bcm-icon", { icon: defaultIcons[type], type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
77
|
-
type === 'number' && (h("div", { class: caretContainer },
|
|
78
|
-
h("span", { class: "caret", onClick: () => steps('up') },
|
|
79
|
-
h("bcm-icon", { icon: "caret-up", type: "outlined", color: "grey-7", size: 8 })),
|
|
80
|
-
h("span", { class: "caret", onClick: () => steps('down') },
|
|
81
|
-
h("bcm-icon", { icon: "caret-down", type: "outlined", color: "grey-7", size: 8 })))),
|
|
82
|
-
type !== 'number' && (h("span", { class: "input-suffix" },
|
|
83
|
-
h("slot", { name: "suffix" })))));
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export { InputTemplate as I };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { h } from './index-dbc63c66.js';
|
|
2
|
-
import { c as classnames } from './index-43956e3c.js';
|
|
3
|
-
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
4
|
-
|
|
5
|
-
var defaultIcons;
|
|
6
|
-
(function (defaultIcons) {
|
|
7
|
-
defaultIcons["search"] = "search";
|
|
8
|
-
defaultIcons["email"] = "mail";
|
|
9
|
-
defaultIcons["tel"] = "phone";
|
|
10
|
-
defaultIcons["url"] = "link";
|
|
11
|
-
})(defaultIcons || (defaultIcons = {}));
|
|
12
|
-
var iconSizes;
|
|
13
|
-
(function (iconSizes) {
|
|
14
|
-
iconSizes[iconSizes["small"] = 14] = "small";
|
|
15
|
-
iconSizes[iconSizes["medium"] = 16] = "medium";
|
|
16
|
-
iconSizes[iconSizes["large"] = 18] = "large";
|
|
17
|
-
})(iconSizes || (iconSizes = {}));
|
|
18
|
-
|
|
19
|
-
const InputTemplate = ({ elementType,
|
|
20
|
-
//textarea
|
|
21
|
-
rows,
|
|
22
|
-
//props
|
|
23
|
-
id, internalId, type, placeholder, value, size,
|
|
24
|
-
//,
|
|
25
|
-
unit, unitPrefix, maxLength,
|
|
26
|
-
//boolean
|
|
27
|
-
disabled, clearable, focused, readonly, isPasswordVisible, passwordToggle, noDefaultIcon, inValid, captionType, resize,
|
|
28
|
-
// custom functions
|
|
29
|
-
changePasswordVisibility, handleClear, steps,
|
|
30
|
-
//event functions
|
|
31
|
-
ref, handleBlur, handleFocus, handleInput, handleChange, }) => {
|
|
32
|
-
const ElementTagType = Bcm.HtmlElementType[elementType] || Bcm.HtmlElementType.input;
|
|
33
|
-
type = (type === 'password' && isPasswordVisible) ? 'text' : type;
|
|
34
|
-
value = value || '';
|
|
35
|
-
value = !focused ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '') : value;
|
|
36
|
-
const templateHandleFocus = (e) => {
|
|
37
|
-
e.target.parentElement.classList.add('focused');
|
|
38
|
-
handleFocus(e);
|
|
39
|
-
};
|
|
40
|
-
const templateHandleBlur = (e) => {
|
|
41
|
-
e.target.parentElement.classList.remove('focused');
|
|
42
|
-
handleBlur(e);
|
|
43
|
-
};
|
|
44
|
-
const templateHandleInput = (e) => {
|
|
45
|
-
console.log(e.target.value);
|
|
46
|
-
handleInput(e);
|
|
47
|
-
};
|
|
48
|
-
var containerClass = classnames('bcm-input__container', ElementTagType === Bcm.HtmlElementType.textarea && classnames('bcm-input__textarea', 'textarea-size-' + Bcm.Size[size], 'resize-' + resize, 'textarea-' + size), ElementTagType === Bcm.HtmlElementType.input && classnames('input-size-' + Bcm.Size[size]), {
|
|
49
|
-
'focused': focused,
|
|
50
|
-
disabled,
|
|
51
|
-
readonly,
|
|
52
|
-
'invalid': inValid,
|
|
53
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
54
|
-
// 'empty': value?.length < 1,
|
|
55
|
-
'error': captionType === 'error'
|
|
56
|
-
});
|
|
57
|
-
const caretContainer = classnames('caret-container', {
|
|
58
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
59
|
-
'disabled': disabled || readonly || inValid
|
|
60
|
-
});
|
|
61
|
-
const inputClass = size === 'large' ? 'size-3' : 'size-2';
|
|
62
|
-
const unitClass = classnames(inputClass, 'unit-prefix');
|
|
63
|
-
return (h("div", { class: containerClass },
|
|
64
|
-
h("span", { hidden: true },
|
|
65
|
-
h("slot", null)),
|
|
66
|
-
h("span", { class: "input-prefix" },
|
|
67
|
-
h("slot", { name: "prefix" }),
|
|
68
|
-
unitPrefix && h("span", { class: unitClass }, unitPrefix)),
|
|
69
|
-
h(ElementTagType, Object.assign({ tabindex: "1", id: id, "bcm-internal-id": internalId, class: 'bcm-input-element ' + inputClass }, ((ElementTagType === Bcm.HtmlElementType.input && { type: type })), ((ElementTagType === Bcm.HtmlElementType.textarea && { rows: rows })), { value: value, maxLength: maxLength, placeholder: placeholder, disabled: disabled, readOnly: readonly, ref: (el) => ref(el), onBlur: (e) => templateHandleBlur(e), onFocus: (e) => templateHandleFocus(e), onInput: (e) => templateHandleInput(e), onChange: (e) => handleChange(e) })),
|
|
70
|
-
(clearable && !disabled) &&
|
|
71
|
-
h("span", { class: "input-suffix input-suffix-button input-clear-button", onClick: (e) => handleClear(e) },
|
|
72
|
-
h("bcm-icon", { icon: "close-circle", type: "fill", size: iconSizes[size], color: "grey-7" })),
|
|
73
|
-
(type === 'password' && passwordToggle) && (h("span", { class: "input-suffix input-suffix-button", onClick: () => changePasswordVisibility() },
|
|
74
|
-
h("bcm-icon", { icon: isPasswordVisible ? "eye-invisible" : "eye", type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
75
|
-
(Object.keys(defaultIcons).includes(type) && !noDefaultIcon) && (h("span", { class: "input-suffix" },
|
|
76
|
-
h("bcm-icon", { icon: defaultIcons[type], type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
77
|
-
type === 'number' && (h("div", { class: caretContainer },
|
|
78
|
-
h("span", { class: "caret", onClick: () => steps('up') },
|
|
79
|
-
h("bcm-icon", { icon: "caret-up", type: "outlined", color: "grey-7", size: 8 })),
|
|
80
|
-
h("span", { class: "caret", onClick: () => steps('down') },
|
|
81
|
-
h("bcm-icon", { icon: "caret-down", type: "outlined", color: "grey-7", size: 8 })))),
|
|
82
|
-
type !== 'number' && (h("span", { class: "input-suffix" },
|
|
83
|
-
h("slot", { name: "suffix" })))));
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export { InputTemplate as I };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { h } from './index-dbc63c66.js';
|
|
2
|
-
import { c as classnames } from './index-43956e3c.js';
|
|
3
|
-
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
4
|
-
|
|
5
|
-
var defaultIcons;
|
|
6
|
-
(function (defaultIcons) {
|
|
7
|
-
defaultIcons["search"] = "search";
|
|
8
|
-
defaultIcons["email"] = "mail";
|
|
9
|
-
defaultIcons["tel"] = "phone";
|
|
10
|
-
defaultIcons["url"] = "link";
|
|
11
|
-
})(defaultIcons || (defaultIcons = {}));
|
|
12
|
-
var iconSizes;
|
|
13
|
-
(function (iconSizes) {
|
|
14
|
-
iconSizes[iconSizes["small"] = 14] = "small";
|
|
15
|
-
iconSizes[iconSizes["medium"] = 16] = "medium";
|
|
16
|
-
iconSizes[iconSizes["large"] = 18] = "large";
|
|
17
|
-
})(iconSizes || (iconSizes = {}));
|
|
18
|
-
|
|
19
|
-
const InputTemplate = ({ elementType,
|
|
20
|
-
//textarea
|
|
21
|
-
rows,
|
|
22
|
-
//props
|
|
23
|
-
id, internalId, type, placeholder, value, size,
|
|
24
|
-
//,
|
|
25
|
-
unit, unitPrefix, maxLength,
|
|
26
|
-
//boolean
|
|
27
|
-
disabled, clearable, focused, readonly, isPasswordVisible, passwordToggle, noDefaultIcon, inValid, captionType, resize,
|
|
28
|
-
// custom functions
|
|
29
|
-
changePasswordVisibility, handleClear, steps,
|
|
30
|
-
//event functions
|
|
31
|
-
ref, handleBlur, handleFocus, handleInput, handleChange, }) => {
|
|
32
|
-
const ElementTagType = Bcm.HtmlElementType[elementType] || Bcm.HtmlElementType.input;
|
|
33
|
-
type = (type === 'password' && isPasswordVisible) ? 'text' : type;
|
|
34
|
-
value = value || '';
|
|
35
|
-
value = !focused ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '') : value;
|
|
36
|
-
const templateHandleFocus = (e) => {
|
|
37
|
-
e.target.parentElement.classList.add('focused');
|
|
38
|
-
handleFocus(e);
|
|
39
|
-
};
|
|
40
|
-
const templateHandleBlur = (e) => {
|
|
41
|
-
e.target.parentElement.classList.remove('focused');
|
|
42
|
-
handleBlur(e);
|
|
43
|
-
};
|
|
44
|
-
var containerClass = classnames('bcm-input__container', ElementTagType === Bcm.HtmlElementType.textarea && classnames('bcm-input__textarea', 'textarea-size-' + Bcm.Size[size], 'resize-' + resize, 'textarea-' + size), ElementTagType === Bcm.HtmlElementType.input && classnames('input-size-' + Bcm.Size[size]), {
|
|
45
|
-
'focused': focused,
|
|
46
|
-
disabled,
|
|
47
|
-
readonly,
|
|
48
|
-
'invalid': inValid,
|
|
49
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
50
|
-
// 'empty': value?.length < 1,
|
|
51
|
-
'error': captionType === 'error'
|
|
52
|
-
});
|
|
53
|
-
const caretContainer = classnames('caret-container', {
|
|
54
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
55
|
-
'disabled': disabled || readonly || inValid
|
|
56
|
-
});
|
|
57
|
-
const inputClass = size === 'large' ? 'size-3' : 'size-2';
|
|
58
|
-
const unitClass = classnames(inputClass, 'unit-prefix');
|
|
59
|
-
return (h("div", { class: containerClass },
|
|
60
|
-
h("span", { hidden: true },
|
|
61
|
-
h("slot", null)),
|
|
62
|
-
h("span", { class: "input-prefix" },
|
|
63
|
-
h("slot", { name: "prefix" }),
|
|
64
|
-
unitPrefix && h("span", { class: unitClass }, unitPrefix)),
|
|
65
|
-
h(ElementTagType, Object.assign({ tabindex: "1", id: id, "bcm-internal-id": internalId, class: 'bcm-input-element ' + inputClass }, ((ElementTagType === Bcm.HtmlElementType.input && { type: type })), ((ElementTagType === Bcm.HtmlElementType.textarea && { rows: rows })), { value: value, maxLength: maxLength, placeholder: placeholder, disabled: disabled, readOnly: readonly, ref: (el) => ref(el), onBlur: (e) => templateHandleBlur(e), onFocus: (e) => templateHandleFocus(e), onInput: (e) => handleInput(e), onChange: (e) => handleChange(e) })),
|
|
66
|
-
(clearable && !disabled) &&
|
|
67
|
-
h("span", { class: "input-suffix input-suffix-button input-clear-button", onClick: (e) => handleClear(e) },
|
|
68
|
-
h("bcm-icon", { icon: "close-circle", type: "fill", size: iconSizes[size], color: "grey-7" })),
|
|
69
|
-
(type === 'password' && passwordToggle) && (h("span", { class: "input-suffix input-suffix-button", onClick: () => changePasswordVisibility() },
|
|
70
|
-
h("bcm-icon", { icon: isPasswordVisible ? "eye-invisible" : "eye", type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
71
|
-
(Object.keys(defaultIcons).includes(type) && !noDefaultIcon) && (h("span", { class: "input-suffix" },
|
|
72
|
-
h("bcm-icon", { icon: defaultIcons[type], type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
73
|
-
type === 'number' && (h("div", { class: caretContainer },
|
|
74
|
-
h("span", { class: "caret", onClick: () => steps('up') },
|
|
75
|
-
h("bcm-icon", { icon: "caret-up", type: "outlined", color: "grey-7", size: 8 })),
|
|
76
|
-
h("span", { class: "caret", onClick: () => steps('down') },
|
|
77
|
-
h("bcm-icon", { icon: "caret-down", type: "outlined", color: "grey-7", size: 8 })))),
|
|
78
|
-
type !== 'number' && (h("span", { class: "input-suffix" },
|
|
79
|
-
h("slot", { name: "suffix" })))));
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export { InputTemplate as I };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { h } from './index-dbc63c66.js';
|
|
2
|
-
import { c as classnames } from './index-43956e3c.js';
|
|
3
|
-
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
4
|
-
|
|
5
|
-
var defaultIcons;
|
|
6
|
-
(function (defaultIcons) {
|
|
7
|
-
defaultIcons["search"] = "search";
|
|
8
|
-
defaultIcons["email"] = "mail";
|
|
9
|
-
defaultIcons["tel"] = "phone";
|
|
10
|
-
defaultIcons["url"] = "link";
|
|
11
|
-
})(defaultIcons || (defaultIcons = {}));
|
|
12
|
-
var iconSizes;
|
|
13
|
-
(function (iconSizes) {
|
|
14
|
-
iconSizes[iconSizes["small"] = 14] = "small";
|
|
15
|
-
iconSizes[iconSizes["medium"] = 16] = "medium";
|
|
16
|
-
iconSizes[iconSizes["large"] = 18] = "large";
|
|
17
|
-
})(iconSizes || (iconSizes = {}));
|
|
18
|
-
|
|
19
|
-
const InputTemplate = ({ elementType,
|
|
20
|
-
//textarea
|
|
21
|
-
rows,
|
|
22
|
-
//props
|
|
23
|
-
id, internalId, type, placeholder, value, size,
|
|
24
|
-
//,
|
|
25
|
-
unit, unitPrefix, maxLength,
|
|
26
|
-
//boolean
|
|
27
|
-
disabled, clearable, focused, readonly, isPasswordVisible, passwordToggle, noDefaultIcon, inValid, captionType, resize,
|
|
28
|
-
// custom functions
|
|
29
|
-
changePasswordVisibility, handleClear, steps,
|
|
30
|
-
//event functions
|
|
31
|
-
ref, handleBlur, handleFocus, handleInput, handleChange, }) => {
|
|
32
|
-
const ElementTagType = Bcm.HtmlElementType[elementType] || Bcm.HtmlElementType.input;
|
|
33
|
-
type = (type === 'password' && isPasswordVisible) ? 'text' : type;
|
|
34
|
-
value = value || '';
|
|
35
|
-
value = !focused ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '') : value;
|
|
36
|
-
const templateHandleFocus = (e) => {
|
|
37
|
-
e.target.parentElement.classList.add('focused');
|
|
38
|
-
handleFocus(e);
|
|
39
|
-
};
|
|
40
|
-
const templateHandleBlur = (e) => {
|
|
41
|
-
e.target.parentElement.classList.remove('focused');
|
|
42
|
-
handleBlur(e);
|
|
43
|
-
};
|
|
44
|
-
const templateHandleInput = (e) => {
|
|
45
|
-
handleInput(e);
|
|
46
|
-
};
|
|
47
|
-
var containerClass = classnames('bcm-input__container', ElementTagType === Bcm.HtmlElementType.textarea && classnames('bcm-input__textarea', 'textarea-size-' + Bcm.Size[size], 'resize-' + resize, 'textarea-' + size), ElementTagType === Bcm.HtmlElementType.input && classnames('input-size-' + Bcm.Size[size]), {
|
|
48
|
-
'focused': focused,
|
|
49
|
-
disabled,
|
|
50
|
-
readonly,
|
|
51
|
-
'invalid': inValid,
|
|
52
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
53
|
-
// 'empty': value?.length < 1,
|
|
54
|
-
'error': captionType === 'error'
|
|
55
|
-
});
|
|
56
|
-
const caretContainer = classnames('caret-container', {
|
|
57
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
58
|
-
'disabled': disabled || readonly || inValid
|
|
59
|
-
});
|
|
60
|
-
const inputClass = size === 'large' ? 'size-3' : 'size-2';
|
|
61
|
-
const unitClass = classnames(inputClass, 'unit-prefix');
|
|
62
|
-
return (h("div", { class: containerClass },
|
|
63
|
-
h("span", { hidden: true },
|
|
64
|
-
h("slot", null)),
|
|
65
|
-
h("span", { class: "input-prefix" },
|
|
66
|
-
h("slot", { name: "prefix" }),
|
|
67
|
-
unitPrefix && h("span", { class: unitClass }, unitPrefix)),
|
|
68
|
-
h(ElementTagType, Object.assign({ tabindex: "1", id: id, "bcm-internal-id": internalId, class: 'bcm-input-element ' + inputClass }, ((ElementTagType === Bcm.HtmlElementType.input && { type: type })), ((ElementTagType === Bcm.HtmlElementType.textarea && { rows: rows })), { value: value, maxLength: maxLength, placeholder: placeholder, disabled: disabled, readOnly: readonly, ref: (el) => ref(el), onBlur: (e) => templateHandleBlur(e), onFocus: (e) => templateHandleFocus(e), onInput: (e) => templateHandleInput(e), onChange: (e) => handleChange(e) })),
|
|
69
|
-
(clearable && !disabled) &&
|
|
70
|
-
h("span", { class: "input-suffix input-suffix-button input-clear-button", onClick: (e) => handleClear(e) },
|
|
71
|
-
h("bcm-icon", { icon: "close-circle", type: "fill", size: iconSizes[size], color: "grey-7" })),
|
|
72
|
-
(type === 'password' && passwordToggle) && (h("span", { class: "input-suffix input-suffix-button", onClick: () => changePasswordVisibility() },
|
|
73
|
-
h("bcm-icon", { icon: isPasswordVisible ? "eye-invisible" : "eye", type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
74
|
-
(Object.keys(defaultIcons).includes(type) && !noDefaultIcon) && (h("span", { class: "input-suffix" },
|
|
75
|
-
h("bcm-icon", { icon: defaultIcons[type], type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
76
|
-
type === 'number' && (h("div", { class: caretContainer },
|
|
77
|
-
h("span", { class: "caret", onClick: () => steps('up') },
|
|
78
|
-
h("bcm-icon", { icon: "caret-up", type: "outlined", color: "grey-7", size: 8 })),
|
|
79
|
-
h("span", { class: "caret", onClick: () => steps('down') },
|
|
80
|
-
h("bcm-icon", { icon: "caret-down", type: "outlined", color: "grey-7", size: 8 })))),
|
|
81
|
-
type !== 'number' && (h("span", { class: "input-suffix" },
|
|
82
|
-
h("slot", { name: "suffix" })))));
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export { InputTemplate as I };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { h } from './index-dbc63c66.js';
|
|
2
|
-
import { c as classnames } from './index-43956e3c.js';
|
|
3
|
-
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
4
|
-
|
|
5
|
-
var defaultIcons;
|
|
6
|
-
(function (defaultIcons) {
|
|
7
|
-
defaultIcons["search"] = "search";
|
|
8
|
-
defaultIcons["email"] = "mail";
|
|
9
|
-
defaultIcons["tel"] = "phone";
|
|
10
|
-
defaultIcons["url"] = "link";
|
|
11
|
-
})(defaultIcons || (defaultIcons = {}));
|
|
12
|
-
var iconSizes;
|
|
13
|
-
(function (iconSizes) {
|
|
14
|
-
iconSizes[iconSizes["small"] = 14] = "small";
|
|
15
|
-
iconSizes[iconSizes["medium"] = 16] = "medium";
|
|
16
|
-
iconSizes[iconSizes["large"] = 18] = "large";
|
|
17
|
-
})(iconSizes || (iconSizes = {}));
|
|
18
|
-
|
|
19
|
-
const InputTemplate = ({ elementType,
|
|
20
|
-
//textarea
|
|
21
|
-
rows,
|
|
22
|
-
//props
|
|
23
|
-
id, internalId, type, placeholder, value, size,
|
|
24
|
-
//,
|
|
25
|
-
unit, unitPrefix, maxLength,
|
|
26
|
-
//boolean
|
|
27
|
-
disabled, clearable, focused, readonly, isPasswordVisible, passwordToggle, noDefaultIcon, inValid, captionType, resize,
|
|
28
|
-
// custom functions
|
|
29
|
-
changePasswordVisibility, handleClear, steps,
|
|
30
|
-
//event functions
|
|
31
|
-
ref, handleBlur, handleFocus, handleInput, handleChange, componentShouldUpdate, }) => {
|
|
32
|
-
const ElementTagType = Bcm.HtmlElementType[elementType] || Bcm.HtmlElementType.input;
|
|
33
|
-
type = (type === 'password' && isPasswordVisible) ? 'text' : type;
|
|
34
|
-
value = value || '';
|
|
35
|
-
value = !focused ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '') : value;
|
|
36
|
-
let clearableButton = false;
|
|
37
|
-
const templateHandleFocus = (e) => {
|
|
38
|
-
e.target.parentElement.classList.add('focused');
|
|
39
|
-
handleFocus(e);
|
|
40
|
-
};
|
|
41
|
-
const templateHandleBlur = (e) => {
|
|
42
|
-
e.target.parentElement.classList.remove('focused');
|
|
43
|
-
handleBlur(e);
|
|
44
|
-
};
|
|
45
|
-
componentShouldUpdate = (newValue, oldValue) => {
|
|
46
|
-
console.log(newValue, oldValue);
|
|
47
|
-
};
|
|
48
|
-
const templateHandleInput = (e) => {
|
|
49
|
-
console.log(clearable);
|
|
50
|
-
console.log(e.target.value);
|
|
51
|
-
clearableButton = clearable && e.target.value.length > 0 ? true : false;
|
|
52
|
-
handleInput(e);
|
|
53
|
-
};
|
|
54
|
-
var containerClass = classnames('bcm-input__container', ElementTagType === Bcm.HtmlElementType.textarea && classnames('bcm-input__textarea', 'textarea-size-' + Bcm.Size[size], 'resize-' + resize, 'textarea-' + size), ElementTagType === Bcm.HtmlElementType.input && classnames('input-size-' + Bcm.Size[size]), {
|
|
55
|
-
'focused': focused,
|
|
56
|
-
'clearable': clearable,
|
|
57
|
-
disabled,
|
|
58
|
-
readonly,
|
|
59
|
-
'invalid': inValid,
|
|
60
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
61
|
-
// 'empty': value?.length < 1,
|
|
62
|
-
'error': captionType === 'error'
|
|
63
|
-
});
|
|
64
|
-
const caretContainer = classnames('caret-container', {
|
|
65
|
-
'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
66
|
-
'disabled': disabled || readonly || inValid
|
|
67
|
-
});
|
|
68
|
-
const inputClass = size === 'large' ? 'size-3' : 'size-2';
|
|
69
|
-
const unitClass = classnames(inputClass, 'unit-prefix');
|
|
70
|
-
return (h("div", { class: containerClass },
|
|
71
|
-
h("span", { hidden: true },
|
|
72
|
-
h("slot", null)),
|
|
73
|
-
h("span", { class: "input-prefix" },
|
|
74
|
-
h("slot", { name: "prefix" }),
|
|
75
|
-
unitPrefix && h("span", { class: unitClass }, unitPrefix)),
|
|
76
|
-
h(ElementTagType, Object.assign({ tabindex: "1", id: id, "bcm-internal-id": internalId, class: 'bcm-input-element ' + inputClass }, ((ElementTagType === Bcm.HtmlElementType.input && { type: type })), ((ElementTagType === Bcm.HtmlElementType.textarea && { rows: rows })), { value: value, maxLength: maxLength, placeholder: placeholder, disabled: disabled, readOnly: readonly, ref: (el) => ref(el), onBlur: (e) => templateHandleBlur(e), onFocus: (e) => templateHandleFocus(e), onInput: (e) => templateHandleInput(e), onChange: (e) => handleChange(e) })),
|
|
77
|
-
(clearableButton && !disabled) &&
|
|
78
|
-
h("span", { class: "input-suffix input-suffix-button input-clear-button", onClick: (e) => handleClear(e) },
|
|
79
|
-
h("bcm-icon", { icon: "close-circle", type: "fill", size: iconSizes[size], color: "grey-7" })),
|
|
80
|
-
(type === 'password' && passwordToggle) && (h("span", { class: "input-suffix input-suffix-button", onClick: () => changePasswordVisibility() },
|
|
81
|
-
h("bcm-icon", { icon: isPasswordVisible ? "eye-invisible" : "eye", type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
82
|
-
(Object.keys(defaultIcons).includes(type) && !noDefaultIcon) && (h("span", { class: "input-suffix" },
|
|
83
|
-
h("bcm-icon", { icon: defaultIcons[type], type: "outlined", size: iconSizes[size], color: "grey-7" }))),
|
|
84
|
-
type === 'number' && (h("div", { class: caretContainer },
|
|
85
|
-
h("span", { class: "caret", onClick: () => steps('up') },
|
|
86
|
-
h("bcm-icon", { icon: "caret-up", type: "outlined", color: "grey-7", size: 8 })),
|
|
87
|
-
h("span", { class: "caret", onClick: () => steps('down') },
|
|
88
|
-
h("bcm-icon", { icon: "caret-down", type: "outlined", color: "grey-7", size: 8 })))),
|
|
89
|
-
type !== 'number' && (h("span", { class: "input-suffix" },
|
|
90
|
-
h("slot", { name: "suffix" })))));
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export { InputTemplate as I };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { g as getElement } from './index-dbc63c66.js';
|
|
2
|
-
import { s as snq } from './snq.es5-946822b8.js';
|
|
3
|
-
|
|
4
|
-
function JsonParse(attribute) {
|
|
5
|
-
return (proto, propName) => {
|
|
6
|
-
const { connectedCallback } = proto;
|
|
7
|
-
proto.connectedCallback = function () {
|
|
8
|
-
const host = getElement(this);
|
|
9
|
-
if (host[propName]) {
|
|
10
|
-
const value = snq(() => host.hasAttribute(attribute) ? host.getAttribute(attribute).valueOf() : host[attribute].valueOf(), null);
|
|
11
|
-
if (value) {
|
|
12
|
-
this[propName] = snq(() => typeof value === 'string' ? JSON.parse(value) : value, []);
|
|
13
|
-
host.removeAttribute(attribute);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return connectedCallback && connectedCallback.call(this);
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { JsonParse as J };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { h } from './index-dbc63c66.js';
|
|
2
|
-
import { c as classnames } from './index-43956e3c.js';
|
|
3
|
-
import { B as Bcm } from './bcm-ad02f9c9.js';
|
|
4
|
-
import { S as SlotTemplate } from './slot-template-5b8e1902.js';
|
|
5
|
-
|
|
6
|
-
const LabelTemplate = ({ required, value, size, form, htmlFor, type }) => {
|
|
7
|
-
size = size || Bcm.FontSize['size-1'];
|
|
8
|
-
type = type || Bcm.Status.default;
|
|
9
|
-
const labelClasses = classnames('bcm-label__text', size, {
|
|
10
|
-
'bcm-label__text-error': type === Bcm.Status.error,
|
|
11
|
-
});
|
|
12
|
-
return (h("label", { form: form, htmlFor: htmlFor, class: labelClasses },
|
|
13
|
-
" ",
|
|
14
|
-
h(SlotTemplate, { value: value }),
|
|
15
|
-
" ",
|
|
16
|
-
required && ('*')));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { LabelTemplate as L };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { s as snq } from './snq.es5-946822b8.js';
|
|
2
|
-
|
|
3
|
-
class NumberHelper {
|
|
4
|
-
}
|
|
5
|
-
NumberHelper.isNumber = (str) => snq(() => /^[0-9]+$/i.test(str));
|
|
6
|
-
NumberHelper.convertToNumber = (str) => snq(() => Number(str));
|
|
7
|
-
NumberHelper.replaceNumber = (str) => snq(() => str.replace(/[^0-9]/g, ''));
|
|
8
|
-
NumberHelper.replaceFloat = (str) => snq(() => str.replace(/[^0-9.]/g, ''));
|
|
9
|
-
NumberHelper.toFixed = (num, fixed) => snq(() => num.toFixed(fixed));
|
|
10
|
-
NumberHelper.parseFloatFixed = (str, fixed) => snq(() => parseFloat(NumberHelper.replaceFloat(str)).toFixed(fixed));
|
|
11
|
-
NumberHelper.getDecimalLength = (str) => snq(() => str.split('.')[1] ? str.split('.')[1].length : 0);
|
|
12
|
-
|
|
13
|
-
export { NumberHelper as N };
|