bromcom-ui 2.11.1-rc.9-3 → 2.11.1-rc.9-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-ede82918.js → p-0745c696.js} +1 -1
- package/dist/bromcom-ui/{p-dc607ae4.entry.js → p-0e3e8cc2.entry.js} +1 -1
- package/dist/bromcom-ui/p-0fa6d3a8.entry.js +5 -0
- package/dist/bromcom-ui/{p-14ed8029.entry.js → p-160fba10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3361f6c9.entry.js → p-201b04e8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-627c7769.entry.js → p-29263575.entry.js} +1 -1
- package/dist/bromcom-ui/p-2b42d77e.entry.js +5 -0
- package/dist/bromcom-ui/{p-e497cf5d.entry.js → p-2d9b633e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5bf1657b.entry.js → p-2e9c0070.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ebeb9689.entry.js → p-33f3c5c5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-abd2f9ff.entry.js → p-4342cdf8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bca0ff0a.entry.js → p-4b44c0ea.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a018f340.entry.js → p-51ba5764.entry.js} +1 -1
- package/dist/bromcom-ui/{p-35c215f2.entry.js → p-57678987.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fba1682e.entry.js → p-59327403.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c10b07cc.entry.js → p-5bd4ba44.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9589f69c.entry.js → p-5d670fd7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-adcb30bc.entry.js → p-5dcc28c3.entry.js} +1 -1
- package/dist/bromcom-ui/p-5f345ad2.entry.js +5 -0
- package/dist/bromcom-ui/{p-70253803.entry.js → p-62d2c650.entry.js} +1 -1
- package/dist/bromcom-ui/{p-61753299.js → p-6bea284a.js} +1 -1
- package/dist/bromcom-ui/{p-178fa936.entry.js → p-6ddd9d7e.entry.js} +1 -1
- package/dist/bromcom-ui/p-788d1fb1.entry.js +5 -0
- package/dist/bromcom-ui/{p-0eacfbb2.entry.js → p-856dac72.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8b31581f.js → p-8bb0fe5d.js} +1 -1
- package/dist/bromcom-ui/{p-3cdfd8eb.entry.js → p-8e972c24.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a4b675ef.entry.js → p-93c016f1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-930f3618.js → p-9586997f.js} +1 -1
- package/dist/bromcom-ui/{p-6f37a4d7.entry.js → p-9b2e26f6.entry.js} +1 -1
- package/dist/bromcom-ui/p-9b8fcf49.entry.js +16 -0
- package/dist/bromcom-ui/{p-db15dca3.entry.js → p-a1d44a10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e93d6619.js → p-a2864264.js} +1 -1
- package/dist/bromcom-ui/p-aeb4be41.js +5 -0
- package/dist/bromcom-ui/{p-7fd22a35.entry.js → p-b0dc804a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5a391fcd.js → p-b51e5b06.js} +1 -1
- package/dist/bromcom-ui/p-c75b2352.entry.js +5 -0
- package/dist/bromcom-ui/p-c77541f4.js +10 -0
- package/dist/bromcom-ui/{p-5a22b74b.entry.js → p-cb56a1d9.entry.js} +1 -1
- package/dist/bromcom-ui/p-d1298c40.js +5 -0
- package/dist/bromcom-ui/{p-90223f9f.entry.js → p-d3b38aff.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f9b59bcc.entry.js → p-d6cee6ba.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e10780ed.entry.js → p-dce99e4d.entry.js} +1 -1
- package/dist/cjs/{bcm-accordion_46.cjs.entry.js → bcm-accordion_47.cjs.entry.js} +8764 -8633
- package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
- package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +6 -6
- package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/bcm-caption.cjs.entry.js +6 -6
- package/dist/cjs/bcm-card.cjs.entry.js +4 -4
- package/dist/cjs/bcm-checkbox-lite_8.cjs.entry.js +3 -3
- package/dist/cjs/bcm-chip-group.cjs.entry.js +6 -6
- package/dist/cjs/bcm-collapse.cjs.entry.js +3 -3
- package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-default.cjs.entry.js +3 -3
- package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
- package/dist/cjs/bcm-input-2.cjs.entry.js +153 -0
- package/dist/cjs/bcm-input-custom.cjs.entry.js +3 -3
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
- package/dist/cjs/bcm-number-input.cjs.entry.js +260 -72
- package/dist/cjs/bcm-overlay_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +6 -6
- package/dist/cjs/bcm-range.cjs.entry.js +3 -3
- package/dist/cjs/bcm-react-number.cjs.entry.js +1230 -0
- package/dist/cjs/bcm-select.cjs.entry.js +1 -1
- package/dist/cjs/bcm-skeleton.cjs.entry.js +6 -6
- package/dist/cjs/bcm-table.cjs.entry.js +6 -6
- package/dist/cjs/bcm-tag.cjs.entry.js +4 -4
- package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-toast.cjs.entry.js +3 -3
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{color-helper-c3a819ea.js → color-helper-dc98a2ca.js} +1 -1
- package/dist/cjs/{colors-078851ec.js → colors-250d0982.js} +13 -7
- package/dist/cjs/{generate-f73a098d.js → generate-e4106db0.js} +2 -2
- package/dist/cjs/{global-baf04c81.js → global-c0174398.js} +1 -1
- package/dist/cjs/index-e05a7c6f.js +545 -0
- package/dist/cjs/input.style-b5676e6a.js +122 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{number-helper-0543a62e.js → number-helper-0846aefe.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +4 -4
- package/dist/cjs/old-bcm-popover.cjs.entry.js +3 -3
- package/dist/cjs/{package-e717a31f.js → package-822a0e3f.js} +1 -1
- package/dist/cjs/{validators-77768582.js → validators-0fadce56.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/atoms/link/link.css +9 -3
- package/dist/collection/components/molecules/input/input.style.js +117 -0
- package/dist/collection/components/molecules/input/input2.js +918 -0
- package/dist/collection/components/molecules/number-input/number-input.js +777 -96
- package/dist/collection/components/molecules/number-input/react-input.js +96 -0
- package/dist/collection/components/molecules/radio/radio.js +1 -1
- package/dist/collection/components/organism/form/form.js +2 -2
- package/dist/collection/components/organism/form-2/bcm-form-components.js +2 -1
- package/dist/collection/components/organism/list/list.css +0 -1
- package/dist/collection/components/other_deprecated/select/select.css +1 -1
- package/dist/collection/components/third-parts/rc-picker/date.js +1 -1
- package/dist/collection/components/third-parts/rc-picker/rc-picker.css +40 -5
- package/dist/collection/components/third-parts/rc-picker/rc-picker.js +11 -2
- package/dist/components/{raf.js → Overflow.js} +692 -69
- package/dist/components/bcm-date.js +1 -1
- package/dist/components/bcm-form-2.js +2 -1
- package/dist/components/bcm-input-2.d.ts +11 -0
- package/dist/components/bcm-input-2.js +225 -0
- package/dist/components/bcm-number-input.js +295 -79
- package/dist/components/bcm-react-number.d.ts +11 -0
- package/dist/components/bcm-react-number.js +10 -0
- package/dist/components/bcm-select.js +1 -1
- package/dist/components/colors2.js +13 -7
- package/dist/components/form.js +2 -2
- package/dist/components/generate.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/input.style.js +120 -0
- package/dist/components/link.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/rc-overflow.js +1 -593
- package/dist/components/rc-picker.js +8620 -8025
- package/dist/components/react-input.js +1242 -0
- package/dist/esm/{bcm-accordion_46.entry.js → bcm-accordion_47.entry.js} +8656 -8526
- package/dist/esm/bcm-alert.entry.js +3 -3
- package/dist/esm/bcm-attendance-actions-comment.entry.js +6 -6
- package/dist/esm/bcm-attendance-actions-dropdown.entry.js +6 -6
- package/dist/esm/bcm-breadcrumb.entry.js +3 -3
- package/dist/esm/bcm-caption.entry.js +6 -6
- package/dist/esm/bcm-card.entry.js +4 -4
- package/dist/esm/bcm-checkbox-lite_8.entry.js +3 -3
- package/dist/esm/bcm-chip-group.entry.js +6 -6
- package/dist/esm/bcm-collapse.entry.js +3 -3
- package/dist/esm/bcm-date-picker.entry.js +3 -3
- package/dist/esm/bcm-datetime-picker.entry.js +3 -3
- package/dist/esm/bcm-default.entry.js +3 -3
- package/dist/esm/bcm-form-2.entry.js +5 -4
- package/dist/esm/bcm-input-2.entry.js +149 -0
- package/dist/esm/bcm-input-custom.entry.js +3 -3
- package/dist/esm/bcm-input-dropdown.entry.js +6 -6
- package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
- package/dist/esm/bcm-modal-2-header.entry.js +6 -6
- package/dist/esm/bcm-modal-2.entry.js +6 -6
- package/dist/esm/bcm-number-input.entry.js +259 -71
- package/dist/esm/bcm-overlay_2.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +6 -6
- package/dist/esm/bcm-range.entry.js +3 -3
- package/dist/esm/bcm-react-number.entry.js +1226 -0
- package/dist/esm/bcm-select.entry.js +1 -1
- package/dist/esm/bcm-skeleton.entry.js +6 -6
- package/dist/esm/bcm-table.entry.js +6 -6
- package/dist/esm/bcm-tag.entry.js +4 -4
- package/dist/esm/bcm-time-picker.entry.js +3 -3
- package/dist/esm/bcm-toast.entry.js +3 -3
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{color-helper-3b528349.js → color-helper-74614f24.js} +1 -1
- package/dist/esm/{colors-c530a5b8.js → colors-dd598eea.js} +13 -7
- package/dist/esm/{generate-c2c0b02e.js → generate-dbe68f53.js} +2 -2
- package/dist/esm/{global-2473677b.js → global-0bea93f1.js} +1 -1
- package/dist/esm/index-036974d7.js +541 -0
- package/dist/esm/input.style-e855c0f3.js +120 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{number-helper-75447fa6.js → number-helper-4a35e676.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +4 -4
- package/dist/esm/old-bcm-popover.entry.js +3 -3
- package/dist/esm/{package-28dc6847.js → package-c9093920.js} +1 -1
- package/dist/esm/{validators-5a383988.js → validators-0d9bab98.js} +1 -1
- package/dist/types/components/molecules/input/input.style.d.ts +576 -0
- package/dist/types/components/molecules/input/input2.d.ts +64 -0
- package/dist/types/components/molecules/number-input/number-input.d.ts +66 -17
- package/dist/types/components/molecules/number-input/react-input.d.ts +16 -0
- package/dist/types/components.d.ts +203 -19
- package/package.json +4 -3
- package/dist/bromcom-ui/p-350dbff0.entry.js +0 -5
- package/dist/bromcom-ui/p-3a43bf45.js +0 -5
- package/dist/bromcom-ui/p-64f21481.entry.js +0 -20
- package/dist/bromcom-ui/p-bb46d881.entry.js +0 -5
- package/dist/bromcom-ui/p-c7030364.entry.js +0 -5
- package/dist/bromcom-ui/p-de0b0192.entry.js +0 -5
- package/dist/cjs/bcm-link.cjs.entry.js +0 -51
- package/dist/collection/components/molecules/number-input/number-input.css +0 -137
- package/dist/collection/components/molecules/number-input/number-input.style.js +0 -45
- package/dist/esm/bcm-link.entry.js +0 -47
- package/dist/types/components/molecules/number-input/number-input.style.d.ts +0 -200
|
@@ -72,7 +72,7 @@ const BcmDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
this.getRangeValueObject = (value) => {
|
|
75
|
-
const [start, end] = value
|
|
75
|
+
const [start, end] = value || [null, null];
|
|
76
76
|
const startObject = this.createValueObject(start);
|
|
77
77
|
const endObject = this.createValueObject(end);
|
|
78
78
|
return Object.assign({ isValid: startObject.isValid && endObject.isValid, start: startObject, end: endObject, date: [startObject.date, endObject.date], timestamp: [startObject.timestamp, endObject.timestamp], value: `${startObject.value} - ${endObject.value}` }, (this.type === "time" && {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BcmInput2 extends Components.BcmInput2, HTMLElement {}
|
|
4
|
+
export const BcmInput2: {
|
|
5
|
+
prototype: BcmInput2;
|
|
6
|
+
new (): BcmInput2;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
6
|
+
import { c as classnames } from './index2.js';
|
|
7
|
+
import { I as IsLoad } from './is-load-decorator.js';
|
|
8
|
+
import { G as Generate } from './generate.js';
|
|
9
|
+
import { a as Bcm } from './bcm.js';
|
|
10
|
+
import { C as CaptionTemplate } from './caption-template.js';
|
|
11
|
+
import { i as inputStyle } from './input.style.js';
|
|
12
|
+
import { d as defineCustomElement$4 } from './icon.js';
|
|
13
|
+
import { d as defineCustomElement$3 } from './label.js';
|
|
14
|
+
import { d as defineCustomElement$2 } from './tooltip.js';
|
|
15
|
+
|
|
16
|
+
const inputCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:\"Inter\", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:\"Inter\", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}";
|
|
17
|
+
|
|
18
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
21
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
22
|
+
else
|
|
23
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
24
|
+
if (d = decorators[i])
|
|
25
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
|
+
};
|
|
28
|
+
const BcmInput2$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
this.__registerHost();
|
|
32
|
+
this.focus = createEvent(this, "bcm-focus", 7);
|
|
33
|
+
this.blur = createEvent(this, "bcm-blur", 7);
|
|
34
|
+
this.clear = createEvent(this, "bcm-clear", 7);
|
|
35
|
+
this.change = createEvent(this, "bcm-change", 7);
|
|
36
|
+
this.input = createEvent(this, "bcm-input", 7);
|
|
37
|
+
this._id = Generate.UID();
|
|
38
|
+
this._internal_id = Generate.UID();
|
|
39
|
+
this.value = "";
|
|
40
|
+
this.size = Bcm.Size.medium;
|
|
41
|
+
this.label = undefined;
|
|
42
|
+
this.pattern = undefined;
|
|
43
|
+
this.tooltip = undefined;
|
|
44
|
+
this.placeholder = undefined;
|
|
45
|
+
this.disabled = false;
|
|
46
|
+
this.readonly = false;
|
|
47
|
+
this.clearable = false;
|
|
48
|
+
this.autocomplete = false;
|
|
49
|
+
this.name = undefined;
|
|
50
|
+
this.type = Bcm.InputType.text;
|
|
51
|
+
this.hidden = false;
|
|
52
|
+
this.required = false;
|
|
53
|
+
this.fullWidth = false;
|
|
54
|
+
this.noDefaultIcon = undefined;
|
|
55
|
+
this.disableWatchValue = false;
|
|
56
|
+
this.passwordToggle = false;
|
|
57
|
+
this.maxLength = null;
|
|
58
|
+
this.minLength = null;
|
|
59
|
+
this.unitPrefix = null;
|
|
60
|
+
this.unit = undefined;
|
|
61
|
+
this.decimal = true;
|
|
62
|
+
this.min = undefined;
|
|
63
|
+
this.max = undefined;
|
|
64
|
+
this.step = undefined;
|
|
65
|
+
this.caption = undefined;
|
|
66
|
+
this.noCaption = false;
|
|
67
|
+
this.captionType = Bcm.Status.default;
|
|
68
|
+
this.captionError = undefined;
|
|
69
|
+
this.customErrorMessage = undefined;
|
|
70
|
+
this._prefix = undefined;
|
|
71
|
+
this._suffix = undefined;
|
|
72
|
+
this.captionCache = undefined;
|
|
73
|
+
this.captionTypeCache = undefined;
|
|
74
|
+
this.inValid = false;
|
|
75
|
+
this.valueCache = "";
|
|
76
|
+
this.focused = false;
|
|
77
|
+
this.isPasswordVisible = false;
|
|
78
|
+
}
|
|
79
|
+
async onBcmFocus() {
|
|
80
|
+
this.inputElement.focus();
|
|
81
|
+
}
|
|
82
|
+
async onBcmBlur() {
|
|
83
|
+
this.inputElement.blur();
|
|
84
|
+
}
|
|
85
|
+
async onBcmSelect() {
|
|
86
|
+
this.inputElement.select();
|
|
87
|
+
}
|
|
88
|
+
handleClear(e) {
|
|
89
|
+
this.inputElement.value = "";
|
|
90
|
+
this.value = "";
|
|
91
|
+
this.inputElement.focus();
|
|
92
|
+
this.clear.emit(e);
|
|
93
|
+
this.change.emit(this.value);
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
}
|
|
96
|
+
handleInput(_e) {
|
|
97
|
+
this.value = this.inputElement.value;
|
|
98
|
+
this.input.emit(this.value);
|
|
99
|
+
this.change.emit(this.value);
|
|
100
|
+
}
|
|
101
|
+
handleChange(_e) {
|
|
102
|
+
this.value = this.inputElement.value;
|
|
103
|
+
this.change.emit(this.value);
|
|
104
|
+
}
|
|
105
|
+
handleFocus(e) {
|
|
106
|
+
this.focused = true;
|
|
107
|
+
this.focus.emit(e);
|
|
108
|
+
}
|
|
109
|
+
handleBlur(e) {
|
|
110
|
+
this.focused = false;
|
|
111
|
+
this.blur.emit(e);
|
|
112
|
+
}
|
|
113
|
+
handleKeyUp(e) {
|
|
114
|
+
if (e.key === "Enter") {
|
|
115
|
+
this.blur.emit(e);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
render() {
|
|
119
|
+
const { value, size, label, type, captionType, caption, captionError, placeholder, fullWidth, disabled, readonly, clearable,
|
|
120
|
+
// passwordToggle,
|
|
121
|
+
// isPasswordVisible,
|
|
122
|
+
// noDefaultIcon,
|
|
123
|
+
unit, inValid, focused,
|
|
124
|
+
// unitPrefix,
|
|
125
|
+
noCaption, required, hidden, _id, autocomplete, _prefix, _suffix, } = this;
|
|
126
|
+
const isActiveClearable = (value === null || value === void 0 ? void 0 : value.length) > 0 && clearable;
|
|
127
|
+
const { host, inputContainer, input, slotClass, clearButton, controls, controlsBtn, controlsBtnDown, controlsBtnUp, controlsDivider } = inputStyle({
|
|
128
|
+
size,
|
|
129
|
+
fullWidth,
|
|
130
|
+
// şüpheli kısımlar
|
|
131
|
+
focused: focused,
|
|
132
|
+
clearable: isActiveClearable,
|
|
133
|
+
disabled,
|
|
134
|
+
readonly,
|
|
135
|
+
invalid: inValid,
|
|
136
|
+
unit: (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
|
|
137
|
+
// 'empty': value?.length < 1,
|
|
138
|
+
error: captionType === "error",
|
|
139
|
+
hidden,
|
|
140
|
+
});
|
|
141
|
+
return (h(Host, { class: host(), onClick: () => this.onBcmFocus() }, label && h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required, htmlFor: _id }), h("div", { class: inputContainer() }, h("div", { class: slotClass() }, h("slot", { name: "prefix" }, _prefix && _prefix.length > 0 && h("span", { innerHTML: _prefix }))), h("input", { class: input(), id: _id, type: type, value: value, pattern: this.pattern, placeholder: placeholder, disabled: disabled, readonly: readonly, ref: el => (this.inputElement = el), onInput: event => this.handleInput(event), onChange: event => this.handleChange(event), onFocus: event => this.handleFocus(event), onBlur: event => this.handleBlur(event), onKeyUp: event => this.handleKeyUp(event), autoComplete: autocomplete ? "on" : "off", required: required }), h("div", { class: slotClass() }, isActiveClearable && (h("button", { type: "button", class: clearButton(), onClick: event => this.handleClear(event) }, h("i", { class: "far fa-times" }))), h("slot", { name: "suffix" }, _suffix && _suffix.length > 0 && h("span", { innerHTML: _suffix })), type === "number" && (h("div", { class: controls() }, h("button", { type: "button", onClick: () => this.onBcmFocus(), class: classnames(controlsBtn(), controlsBtnUp()) }, h("i", { class: "fas fa-caret-up" })), h("div", { class: controlsDivider() }), h("button", { type: "button", onClick: () => this.onBcmFocus(), class: classnames(controlsBtn(), controlsBtnDown()) }, h("i", { class: "fas fa-caret-down" })))))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption, customErrorMessage: this.customErrorMessage })));
|
|
142
|
+
}
|
|
143
|
+
static get style() { return inputCss; }
|
|
144
|
+
}, [4, "bcm-input-2", {
|
|
145
|
+
"_id": [513, "id"],
|
|
146
|
+
"_internal_id": [1],
|
|
147
|
+
"value": [8],
|
|
148
|
+
"size": [1],
|
|
149
|
+
"label": [1],
|
|
150
|
+
"pattern": [1],
|
|
151
|
+
"tooltip": [1],
|
|
152
|
+
"placeholder": [1],
|
|
153
|
+
"disabled": [4],
|
|
154
|
+
"readonly": [4],
|
|
155
|
+
"clearable": [4],
|
|
156
|
+
"autocomplete": [4],
|
|
157
|
+
"name": [1],
|
|
158
|
+
"type": [1],
|
|
159
|
+
"hidden": [4],
|
|
160
|
+
"required": [4],
|
|
161
|
+
"fullWidth": [4, "full-width"],
|
|
162
|
+
"noDefaultIcon": [4, "no-default-icon"],
|
|
163
|
+
"disableWatchValue": [4, "disable-watch-value"],
|
|
164
|
+
"passwordToggle": [4, "password-toggle"],
|
|
165
|
+
"maxLength": [2, "max-length"],
|
|
166
|
+
"minLength": [2, "min-length"],
|
|
167
|
+
"unitPrefix": [1, "unit-prefix"],
|
|
168
|
+
"unit": [1],
|
|
169
|
+
"decimal": [4],
|
|
170
|
+
"min": [2],
|
|
171
|
+
"max": [2],
|
|
172
|
+
"step": [8],
|
|
173
|
+
"caption": [1],
|
|
174
|
+
"noCaption": [4, "no-caption"],
|
|
175
|
+
"captionType": [1, "caption-type"],
|
|
176
|
+
"captionError": [1, "caption-error"],
|
|
177
|
+
"customErrorMessage": [1, "custom-error-message"],
|
|
178
|
+
"_prefix": [1, "prefix"],
|
|
179
|
+
"_suffix": [1, "suffix"],
|
|
180
|
+
"captionCache": [32],
|
|
181
|
+
"captionTypeCache": [32],
|
|
182
|
+
"inValid": [32],
|
|
183
|
+
"valueCache": [32],
|
|
184
|
+
"focused": [32],
|
|
185
|
+
"isPasswordVisible": [32],
|
|
186
|
+
"onBcmFocus": [64],
|
|
187
|
+
"onBcmBlur": [64],
|
|
188
|
+
"onBcmSelect": [64]
|
|
189
|
+
}]);
|
|
190
|
+
__decorate([
|
|
191
|
+
IsLoad()
|
|
192
|
+
], BcmInput2$1.prototype, "inputElement", void 0);
|
|
193
|
+
function defineCustomElement$1() {
|
|
194
|
+
if (typeof customElements === "undefined") {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const components = ["bcm-input-2", "bcm-icon", "bcm-label", "bcm-tooltip"];
|
|
198
|
+
components.forEach(tagName => { switch (tagName) {
|
|
199
|
+
case "bcm-input-2":
|
|
200
|
+
if (!customElements.get(tagName)) {
|
|
201
|
+
customElements.define(tagName, BcmInput2$1);
|
|
202
|
+
}
|
|
203
|
+
break;
|
|
204
|
+
case "bcm-icon":
|
|
205
|
+
if (!customElements.get(tagName)) {
|
|
206
|
+
defineCustomElement$4();
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
case "bcm-label":
|
|
210
|
+
if (!customElements.get(tagName)) {
|
|
211
|
+
defineCustomElement$3();
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "bcm-tooltip":
|
|
215
|
+
if (!customElements.get(tagName)) {
|
|
216
|
+
defineCustomElement$2();
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
} });
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const BcmInput2 = BcmInput2$1;
|
|
223
|
+
const defineCustomElement = defineCustomElement$1;
|
|
224
|
+
|
|
225
|
+
export { BcmInput2, defineCustomElement };
|