bromcom-ui 2.9.0-rc.3 → 2.9.0-rc.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-0543a86f.js +5 -0
- package/dist/bromcom-ui/p-0a528362.entry.js +5 -0
- package/dist/bromcom-ui/{p-04410e89.entry.js → p-0c549bd0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-161864f8.entry.js → p-0d4372c9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8c9d109c.entry.js → p-15758356.entry.js} +1 -1
- package/dist/bromcom-ui/{p-259ede50.entry.js → p-179af180.entry.js} +1 -1
- package/dist/bromcom-ui/p-1a04159f.entry.js +5 -0
- package/dist/bromcom-ui/{p-9e64286c.entry.js → p-1a405289.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5648b456.entry.js → p-1b1f4b44.entry.js} +1 -1
- package/dist/bromcom-ui/p-1eabd5dc.js +10 -0
- package/dist/bromcom-ui/p-24cffc16.entry.js +13 -0
- package/dist/bromcom-ui/{p-2db9415f.entry.js → p-25f9928a.entry.js} +1 -1
- package/dist/bromcom-ui/p-285722ad.entry.js +5 -0
- package/dist/bromcom-ui/{p-d9dfbdae.entry.js → p-29a12785.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cfddaef7.entry.js → p-2a02b473.entry.js} +1 -1
- package/dist/bromcom-ui/p-2fc584c4.js +5 -0
- package/dist/bromcom-ui/{p-dfb4b928.entry.js → p-365eec45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-73dc124b.js → p-38972c46.js} +1 -1
- package/dist/bromcom-ui/{p-8c018ae0.js → p-3c7a0345.js} +1 -1
- package/dist/bromcom-ui/{p-159e5357.js → p-53448351.js} +1 -1
- package/dist/bromcom-ui/{p-276638cd.entry.js → p-546f5f82.entry.js} +1 -1
- package/dist/bromcom-ui/{p-13d9bcdb.entry.js → p-5855b125.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7e44e6b5.js → p-5ae0a59b.js} +1 -1
- package/dist/bromcom-ui/{p-4cd8a7c8.entry.js → p-5c3e9ac9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c0a97e15.entry.js → p-61172e12.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e74a2576.entry.js → p-65318f25.entry.js} +1 -1
- package/dist/bromcom-ui/p-663766cf.entry.js +5 -0
- package/dist/bromcom-ui/{p-30788121.entry.js → p-6c3e9e10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a471cdb2.entry.js → p-721e0cb5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-02ee5833.entry.js → p-7bff7371.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b198b3d5.entry.js → p-8260eda6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1647559e.entry.js → p-8bcfe3b3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4a8c583d.entry.js → p-8e2e77ca.entry.js} +1 -1
- package/dist/bromcom-ui/p-90e5c655.js +5 -0
- package/dist/bromcom-ui/p-947c78e3.js +5 -0
- package/dist/bromcom-ui/{p-4876c706.entry.js → p-96614f57.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2989694b.entry.js → p-9d98d32d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b45a0db2.entry.js → p-9e05f845.entry.js} +1 -1
- package/dist/bromcom-ui/{p-baa25b34.entry.js → p-a02c333f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9e1fa716.entry.js → p-a1335bd5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-400dcae2.entry.js → p-a3b54a22.entry.js} +1 -1
- package/dist/bromcom-ui/{p-454b49ef.entry.js → p-a4731c71.entry.js} +1 -1
- package/dist/bromcom-ui/p-a5953ecd.entry.js +5 -0
- package/dist/bromcom-ui/{p-3d5631ec.js → p-a8aaa382.js} +1 -1
- package/dist/bromcom-ui/{p-30a3320f.entry.js → p-b1c83bb8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dea8dd34.entry.js → p-ba89e3c7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ee3c724a.entry.js → p-c1de1367.entry.js} +1 -1
- package/dist/bromcom-ui/{p-feb06aca.entry.js → p-ca32c1b9.entry.js} +1 -1
- package/dist/bromcom-ui/p-cf0ab7f0.entry.js +5 -0
- package/dist/bromcom-ui/p-d37379d4.entry.js +5 -0
- package/dist/bromcom-ui/{p-61092688.entry.js → p-d58107e2.entry.js} +1 -1
- package/dist/bromcom-ui/p-dd422dd1.js +5 -0
- package/dist/bromcom-ui/{p-750ae53a.entry.js → p-e92d9879.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7a1e7141.entry.js → p-e9c963b3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dc9466d6.entry.js → p-ebee9f45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-178b60e4.entry.js → p-ef8bbaf3.entry.js} +1 -1
- package/dist/bromcom-ui/p-f0350c0c.entry.js +5 -0
- package/dist/bromcom-ui/p-f302cbdf.entry.js +5 -0
- package/dist/bromcom-ui/{p-68abefd2.entry.js → p-f331e009.entry.js} +1 -1
- package/dist/bromcom-ui/{p-290645b8.entry.js → p-f3b546c6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ef14e4b5.entry.js → p-f532862e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-342bc96d.entry.js → p-f889d1b6.entry.js} +1 -1
- package/dist/bromcom-ui/p-f8bf531f.entry.js +5 -0
- package/dist/bromcom-ui/{p-d18f5ae5.entry.js → p-f8cbdade.entry.js} +1 -1
- package/dist/bromcom-ui/{p-139ee01e.entry.js → p-fb22bc06.entry.js} +1 -1
- package/dist/bromcom-ui/p-fceaf172.entry.js +5 -0
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js +126 -0
- package/dist/cjs/bcm-badge_15.cjs.entry.js +1738 -0
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-card.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +17 -17
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/{bcm-checkbox_2.cjs.entry.js → bcm-checkbox.cjs.entry.js} +2 -13
- package/dist/cjs/bcm-chip-group.cjs.entry.js +128 -0
- package/dist/cjs/bcm-chip.cjs.entry.js +90 -0
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
- package/dist/cjs/{bcm-avatar_15.cjs.entry.js → bcm-colorful.cjs.entry.js} +3 -6320
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form.cjs.entry.js +488 -0
- package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +370 -0
- package/dist/cjs/bcm-label.cjs.entry.js +44 -0
- package/dist/cjs/bcm-list_3.cjs.entry.js +4025 -0
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bcm-step.cjs.entry.js +2 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
- package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{color-helper-d6d2028b.js → color-helper-7ab15732.js} +27 -1
- package/dist/cjs/{generate-28ac852f.js → generate-d0470117.js} +55 -5
- package/dist/cjs/index-906fb4e5.js +540 -0
- package/dist/cjs/index-b08b037a.js +52 -0
- package/dist/cjs/{input-template-bcaa86c5.js → input-template-e1d297ed.js} +1 -1
- package/dist/cjs/{json-parse-decarator-0b5727ab.js → json-parse-decarator-026354f1.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-2fafa94f.js → number-helper-b3d57233.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/{stepper-states-66d5d6c4.js → stepper-states-09cd4bed.js} +1 -1
- package/dist/cjs/{validators-b22310ad.js → validators-39ca1c93.js} +1 -1
- package/dist/collection/components/atoms/avatar/avatar.js +95 -80
- package/dist/collection/components/atoms/avatar/avatar.style.js +39 -0
- package/dist/collection/components/atoms/badge/badge.js +29 -90
- package/dist/collection/components/atoms/badge/badge.style.js +39 -0
- package/dist/collection/components/molecules/items/items.js +1 -1
- package/dist/collection/components/molecules/linked/linked.js +12 -0
- package/dist/collection/components/molecules/menu/menu.js +1 -0
- package/dist/collection/components/molecules/popover/popover.js +1 -1
- package/dist/collection/components/molecules/tab-group/tab-group.js +5 -1
- package/dist/collection/components/molecules/tab-group/tab-item-header.js +11 -26
- package/dist/collection/components/molecules/tooltip/tooltip.js +1 -1
- package/dist/collection/components/other/typography/typography.js +1 -1
- package/dist/collection/helper/color-helper.js +27 -1
- package/dist/collection/helper/generate.js +54 -4
- package/dist/collection/helper/popover-helper.js +13 -9
- package/dist/collection/helper/tooltip-helper.js +12 -4
- package/dist/components/avatar.js +91 -52
- package/dist/components/badge.js +109 -46
- package/dist/components/bcm-items.js +1 -1
- package/dist/components/bcm-popover.js +14 -10
- package/dist/components/bcm-tab-group.js +5 -1
- package/dist/components/bcm-tab-item-header.js +11 -26
- package/dist/components/color-helper.js +27 -1
- package/dist/components/generate.js +55 -5
- package/dist/components/linked.js +12 -0
- package/dist/components/menu.js +1 -0
- package/dist/components/tooltip-helper.js +12 -4
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +1 -1
- package/dist/esm/bcm-avatar.entry.js +122 -0
- package/dist/esm/bcm-badge_15.entry.js +1720 -0
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-card.entry.js +3 -3
- package/dist/esm/bcm-checkbox-group.entry.js +8 -8
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/{bcm-checkbox_2.entry.js → bcm-checkbox.entry.js} +4 -14
- package/dist/esm/bcm-chip-group.entry.js +124 -0
- package/dist/esm/bcm-chip.entry.js +86 -0
- package/dist/esm/bcm-collapse-group.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-color-input.entry.js +6 -6
- package/dist/esm/{bcm-avatar_15.entry.js → bcm-colorful.entry.js} +4 -6307
- package/dist/esm/bcm-colorpicker.entry.js +2 -2
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-datetime-picker.entry.js +3 -3
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +6 -6
- package/dist/esm/bcm-expansion-panel.entry.js +3 -3
- package/dist/esm/bcm-form-2.entry.js +1 -1
- package/dist/esm/bcm-form.entry.js +484 -0
- package/dist/esm/bcm-input-custom.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +366 -0
- package/dist/esm/bcm-label.entry.js +40 -0
- package/dist/esm/bcm-list_3.entry.js +4019 -0
- 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-modal.entry.js +1 -1
- package/dist/esm/bcm-old-input.entry.js +1 -1
- package/dist/esm/bcm-old-tag_2.entry.js +1 -1
- package/dist/esm/bcm-popconfirm-box.entry.js +3 -3
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-progress.entry.js +3 -3
- package/dist/esm/bcm-radio-group.entry.js +6 -6
- package/dist/esm/bcm-radio.entry.js +6 -6
- package/dist/esm/bcm-range.entry.js +2 -2
- package/dist/esm/bcm-select.entry.js +1 -1
- package/dist/esm/bcm-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +7 -7
- package/dist/esm/bcm-switch.entry.js +2 -2
- package/dist/esm/bcm-table.entry.js +1 -1
- package/dist/esm/bcm-tabs-content.entry.js +1 -1
- package/dist/esm/bcm-tabs.entry.js +1 -1
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{color-helper-e8ce23d7.js → color-helper-116755ed.js} +28 -2
- package/dist/esm/{element-dragger-89bb52fd.js → element-dragger-7ea06c76.js} +1 -1
- package/dist/esm/{generate-ce54344e.js → generate-abec36e5.js} +55 -5
- package/dist/esm/index-6310a048.js +537 -0
- package/dist/esm/index-962dec74.js +50 -0
- package/dist/esm/{input-template-c94b6b1f.js → input-template-a02d00ff.js} +1 -1
- package/dist/esm/{json-parse-decarator-1ef87c07.js → json-parse-decarator-268fe3de.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-ec5c12ef.js → number-helper-cf26accd.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +4 -4
- package/dist/esm/old-bcm-popover.entry.js +1 -1
- package/dist/esm/{stepper-states-cbe1d076.js → stepper-states-cf443480.js} +1 -1
- package/dist/esm/{utils-57652744.js → utils-b3338faf.js} +1 -1
- package/dist/esm/{validators-c4976054.js → validators-63753298.js} +1 -1
- package/dist/types/components/atoms/avatar/avatar.d.ts +8 -10
- package/dist/types/components/atoms/avatar/avatar.style.d.ts +5 -0
- package/dist/types/components/atoms/badge/badge.d.ts +3 -7
- package/dist/types/components/atoms/badge/badge.style.d.ts +4 -0
- package/dist/types/components/molecules/linked/linked.d.ts +1 -0
- package/dist/types/components.d.ts +11 -13
- package/dist/types/helper/color-helper.d.ts +22 -2
- package/dist/types/helper/generate.d.ts +21 -1
- package/dist/types/helper/popover-helper.d.ts +0 -5
- package/dist/types/helper/tooltip-helper.d.ts +0 -1
- package/package.json +7 -4
- package/dist/bromcom-ui/p-294186b9.js +0 -5
- package/dist/bromcom-ui/p-327138ea.entry.js +0 -5
- package/dist/bromcom-ui/p-36a1427f.entry.js +0 -5
- package/dist/bromcom-ui/p-4a3ce7f3.entry.js +0 -5
- package/dist/bromcom-ui/p-5f63beda.js +0 -5
- package/dist/bromcom-ui/p-62e84379.js +0 -5
- package/dist/bromcom-ui/p-843905c8.js +0 -5
- package/dist/bromcom-ui/p-8a162271.entry.js +0 -5
- package/dist/bromcom-ui/p-8e66297f.entry.js +0 -5
- package/dist/bromcom-ui/p-96eeadc0.entry.js +0 -5
- package/dist/bromcom-ui/p-9c90a235.entry.js +0 -19
- package/dist/bromcom-ui/p-c165837c.entry.js +0 -5
- package/dist/bromcom-ui/p-c30f52d8.entry.js +0 -5
- package/dist/bromcom-ui/p-c7f37d7a.entry.js +0 -5
- package/dist/bromcom-ui/p-ccc60ce1.js +0 -5
- package/dist/bromcom-ui/p-d230907f.entry.js +0 -5
- package/dist/bromcom-ui/p-d832cf50.entry.js +0 -5
- package/dist/bromcom-ui/p-e9aaa98b.entry.js +0 -5
- package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -118
- package/dist/cjs/bcm-item.cjs.entry.js +0 -71
- package/dist/cjs/bcm-items.cjs.entry.js +0 -48
- package/dist/cjs/bcm-menu.cjs.entry.js +0 -149
- package/dist/cjs/bcm-popover.cjs.entry.js +0 -225
- package/dist/cjs/bcm-tab-group.cjs.entry.js +0 -205
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +0 -73
- package/dist/cjs/bcm-tab-item.cjs.entry.js +0 -90
- package/dist/cjs/bcm-text.cjs.entry.js +0 -49
- package/dist/cjs/tooltip-helper-9fc8df71.js +0 -150
- package/dist/collection/components/atoms/avatar/avatar.css +0 -198
- package/dist/collection/components/atoms/badge/badge.css +0 -231
- package/dist/esm/bcm-dropdown.entry.js +0 -114
- package/dist/esm/bcm-item.entry.js +0 -67
- package/dist/esm/bcm-items.entry.js +0 -44
- package/dist/esm/bcm-menu.entry.js +0 -145
- package/dist/esm/bcm-popover.entry.js +0 -221
- package/dist/esm/bcm-tab-group.entry.js +0 -201
- package/dist/esm/bcm-tab-item-header.entry.js +0 -69
- package/dist/esm/bcm-tab-item.entry.js +0 -86
- package/dist/esm/bcm-text.entry.js +0 -45
- package/dist/esm/tooltip-helper-92eb0102.js +0 -148
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
+
|
|
9
|
+
const index = require('./index-ddfd6d8f.js');
|
|
10
|
+
const generate = require('./generate-d0470117.js');
|
|
11
|
+
const numberHelper = require('./number-helper-b3d57233.js');
|
|
12
|
+
const stringHelper = require('./string-helper-d681e5c7.js');
|
|
13
|
+
const validators = require('./validators-39ca1c93.js');
|
|
14
|
+
const bcm = require('./bcm-ab921827.js');
|
|
15
|
+
const captionTemplate = require('./caption-template-8d099fd6.js');
|
|
16
|
+
const inputTemplate = require('./input-template-e1d297ed.js');
|
|
17
|
+
const index$1 = require('./index-fdbf5226.js');
|
|
18
|
+
const utils = require('./utils-fc077139.js');
|
|
19
|
+
const isLoadDecorator = require('./is-load-decorator-137dded1.js');
|
|
20
|
+
require('./colors-e1d142ad.js');
|
|
21
|
+
require('./_commonjsHelpers-bd20f4c0.js');
|
|
22
|
+
require('./types-cc4adee7.js');
|
|
23
|
+
|
|
24
|
+
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\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 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;overflow:hidden;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}";
|
|
25
|
+
|
|
26
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
27
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
28
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
29
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
30
|
+
else
|
|
31
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
32
|
+
if (d = decorators[i])
|
|
33
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
34
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
35
|
+
};
|
|
36
|
+
const BcmInput = class {
|
|
37
|
+
constructor(hostRef) {
|
|
38
|
+
index.registerInstance(this, hostRef);
|
|
39
|
+
this.focus = index.createEvent(this, "bcm-focus", 7);
|
|
40
|
+
this.blur = index.createEvent(this, "bcm-blur", 7);
|
|
41
|
+
this.clear = index.createEvent(this, "bcm-clear", 7);
|
|
42
|
+
this.change = index.createEvent(this, "bcm-change", 7);
|
|
43
|
+
this.input = index.createEvent(this, "bcm-input", 7);
|
|
44
|
+
this.isBlur = false;
|
|
45
|
+
this._id = generate.Generate.UID();
|
|
46
|
+
this._internal_id = generate.Generate.UID();
|
|
47
|
+
this.value = '';
|
|
48
|
+
this.size = bcm.Bcm$1.Size.medium;
|
|
49
|
+
this.label = undefined;
|
|
50
|
+
this.pattern = undefined;
|
|
51
|
+
this.tooltip = undefined;
|
|
52
|
+
this.placeholder = undefined;
|
|
53
|
+
this.disabled = false;
|
|
54
|
+
this.readonly = false;
|
|
55
|
+
this.clearable = false;
|
|
56
|
+
this.autocomplete = false;
|
|
57
|
+
this.name = undefined;
|
|
58
|
+
this.type = bcm.Bcm$1.InputType.text;
|
|
59
|
+
this.hidden = false;
|
|
60
|
+
this.required = false;
|
|
61
|
+
this.fullWidth = false;
|
|
62
|
+
this.noDefaultIcon = undefined;
|
|
63
|
+
this.disableWatchValue = false // datetimepicker
|
|
64
|
+
;
|
|
65
|
+
this.passwordToggle = false // type password
|
|
66
|
+
;
|
|
67
|
+
this.maxLength = null;
|
|
68
|
+
this.unitPrefix = null;
|
|
69
|
+
this.unit = undefined;
|
|
70
|
+
this.decimal = true;
|
|
71
|
+
this.min = undefined;
|
|
72
|
+
this.max = undefined;
|
|
73
|
+
this.step = undefined;
|
|
74
|
+
this.caption = undefined;
|
|
75
|
+
this.noCaption = false;
|
|
76
|
+
this.captionType = bcm.Bcm$1.Status.default;
|
|
77
|
+
this.captionError = undefined;
|
|
78
|
+
this.customErrorMessage = undefined;
|
|
79
|
+
this._prefix = undefined;
|
|
80
|
+
this._suffix = undefined;
|
|
81
|
+
this.captionCache = undefined;
|
|
82
|
+
this.captionTypeCache = undefined;
|
|
83
|
+
this.inValid = false;
|
|
84
|
+
this.valueCache = '';
|
|
85
|
+
this.focused = false;
|
|
86
|
+
this.isPasswordVisible = false;
|
|
87
|
+
}
|
|
88
|
+
connectedCallback() {
|
|
89
|
+
this.valueCache = this.value;
|
|
90
|
+
this.captionCache = this.caption;
|
|
91
|
+
this.captionTypeCache = this.captionType;
|
|
92
|
+
}
|
|
93
|
+
componentWillRender() {
|
|
94
|
+
const { type, isBlur, value } = this;
|
|
95
|
+
if (value) {
|
|
96
|
+
this.value.length > 0 && (this.checkPattern());
|
|
97
|
+
switch (type) {
|
|
98
|
+
case "number":
|
|
99
|
+
{
|
|
100
|
+
!this.checkValid("number") && (this.validationRange());
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
case "email":
|
|
104
|
+
{
|
|
105
|
+
isBlur && (this.checkValid("email"));
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
case "tel":
|
|
109
|
+
{
|
|
110
|
+
isBlur && (this.checkValid("phone"));
|
|
111
|
+
}
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
!this.required && (this.resetCaption());
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async onBcmFocus() {
|
|
120
|
+
this.inputElement.focus();
|
|
121
|
+
}
|
|
122
|
+
async onBcmBlur() {
|
|
123
|
+
this.inputElement.blur();
|
|
124
|
+
}
|
|
125
|
+
async onBcmSelect() {
|
|
126
|
+
this.inputElement.select();
|
|
127
|
+
}
|
|
128
|
+
async set(data) {
|
|
129
|
+
await this.setValue(data);
|
|
130
|
+
}
|
|
131
|
+
async get() {
|
|
132
|
+
return this.value || null;
|
|
133
|
+
}
|
|
134
|
+
async setValue(value) {
|
|
135
|
+
this.inputElement.value = value;
|
|
136
|
+
this.handleChange();
|
|
137
|
+
return value;
|
|
138
|
+
}
|
|
139
|
+
async setClear() {
|
|
140
|
+
this.inputElement.value = '';
|
|
141
|
+
this.value = '';
|
|
142
|
+
await utils.delay(10);
|
|
143
|
+
return Promise.resolve();
|
|
144
|
+
}
|
|
145
|
+
async resetCaption() {
|
|
146
|
+
await utils.delay(10);
|
|
147
|
+
this.caption = this.captionCache;
|
|
148
|
+
this.captionType = this.captionTypeCache;
|
|
149
|
+
this.captionError = null;
|
|
150
|
+
this.inValid = false;
|
|
151
|
+
await utils.delay(10);
|
|
152
|
+
return Promise.resolve();
|
|
153
|
+
}
|
|
154
|
+
async getValue() {
|
|
155
|
+
return this.value;
|
|
156
|
+
}
|
|
157
|
+
watchValue(newValue) {
|
|
158
|
+
this.inputElement.value = newValue;
|
|
159
|
+
if (!this.disableWatchValue && this.type != "number") {
|
|
160
|
+
this.handleChange();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
listenKeyDown(e) {
|
|
164
|
+
if (!this.disabled && !this.readonly) {
|
|
165
|
+
this.onBcmFocus();
|
|
166
|
+
if (this.type == "number") {
|
|
167
|
+
var which = e.which || 0;
|
|
168
|
+
var key = e.key;
|
|
169
|
+
if (which == 38) { // up arrow
|
|
170
|
+
e.preventDefault(),
|
|
171
|
+
this.stepUpOrDown('up');
|
|
172
|
+
}
|
|
173
|
+
if (which == 40) { // down arrow
|
|
174
|
+
e.preventDefault(),
|
|
175
|
+
this.stepUpOrDown('down');
|
|
176
|
+
}
|
|
177
|
+
if ((which == 190 || which == 110 || key == ".") && this.value.indexOf(".") > -1) { //.
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
}
|
|
180
|
+
if ((which == 189 || which == 109 || key == "-")) { //-
|
|
181
|
+
if (this.value.charAt(0) == '-' || this.value.indexOf("-") > -1) {
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
handleFocus() {
|
|
189
|
+
this.focused = true;
|
|
190
|
+
this.focus.emit();
|
|
191
|
+
this.whatchHasFocus();
|
|
192
|
+
}
|
|
193
|
+
handleBlur() {
|
|
194
|
+
this.focused = false;
|
|
195
|
+
this.isBlur = true;
|
|
196
|
+
this.whatchHasFocus();
|
|
197
|
+
this.blur.emit();
|
|
198
|
+
}
|
|
199
|
+
handleChange() {
|
|
200
|
+
this.valueSync();
|
|
201
|
+
}
|
|
202
|
+
handleInput() {
|
|
203
|
+
if (this.type == "number" && this.maxLength) {
|
|
204
|
+
const inputValue = this.inputElement.value;
|
|
205
|
+
if (inputValue && inputValue.length > 0 && inputValue.length > this.maxLength) {
|
|
206
|
+
this.inputElement.value = inputValue.substring(0, this.maxLength);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
this.valueSync();
|
|
210
|
+
}
|
|
211
|
+
valueSync() {
|
|
212
|
+
if (this.value != this.inputElement.value) {
|
|
213
|
+
this.value = this.inputElement.value;
|
|
214
|
+
this.change.emit(this.value);
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
this.input.emit(this.value);
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
handleClear(e) {
|
|
221
|
+
this.inputElement.value = '';
|
|
222
|
+
this.value = '';
|
|
223
|
+
this.inputElement.focus();
|
|
224
|
+
this.clear.emit(e);
|
|
225
|
+
this.change.emit(this.value);
|
|
226
|
+
e.stopPropagation();
|
|
227
|
+
}
|
|
228
|
+
changePasswordVisibility() {
|
|
229
|
+
this.isPasswordVisible = !this.isPasswordVisible;
|
|
230
|
+
}
|
|
231
|
+
setCaption(caption = null, captionType = null) {
|
|
232
|
+
this.caption = caption || this.captionCache;
|
|
233
|
+
this.captionType = captionType || this.captionTypeCache;
|
|
234
|
+
this.captionError = captionType == "error" ? caption : null;
|
|
235
|
+
}
|
|
236
|
+
stepUpOrDown(type) {
|
|
237
|
+
if (!this.inValid && !this.disabled && !this.readonly) {
|
|
238
|
+
let step = +(this.step) || 1;
|
|
239
|
+
let val = +(this.value);
|
|
240
|
+
if (type == 'up') {
|
|
241
|
+
val = +(val + step);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
val = +(val - step);
|
|
245
|
+
}
|
|
246
|
+
this.value = val.toString();
|
|
247
|
+
this.change.emit(this.value);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
validationRange() {
|
|
251
|
+
const { min, max, value } = this;
|
|
252
|
+
if (value) {
|
|
253
|
+
if (min && max) {
|
|
254
|
+
if (value < min || value > max) {
|
|
255
|
+
this.setCaption(stringHelper.StringHelper.getMessage('between', [min, max]), "error");
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
else if (min) {
|
|
260
|
+
if (value < min) {
|
|
261
|
+
this.setCaption(stringHelper.StringHelper.getMessage('min', [min]), "error");
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
else if (max) {
|
|
266
|
+
if (value > max) {
|
|
267
|
+
this.setCaption(stringHelper.StringHelper.getMessage('max', [max]), "error");
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
this.setCaption();
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
checkPattern() {
|
|
276
|
+
const { pattern, value } = this;
|
|
277
|
+
if (pattern) {
|
|
278
|
+
if (validators.Validators.pattern(value, pattern)) {
|
|
279
|
+
this.setCaption();
|
|
280
|
+
this.inValid = false;
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
this.setCaption(stringHelper.StringHelper.getMessage('pattern'), "error");
|
|
284
|
+
this.inValid = true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
checkValid(type) {
|
|
289
|
+
const { value } = this;
|
|
290
|
+
if (validators.Validators.isValidate(value, type)) {
|
|
291
|
+
this.setCaption();
|
|
292
|
+
this.inValid = false;
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
this.setCaption(stringHelper.StringHelper.getMessage(type), "error");
|
|
296
|
+
this.inValid = true;
|
|
297
|
+
}
|
|
298
|
+
return this.inValid;
|
|
299
|
+
}
|
|
300
|
+
whatchHasFocus() {
|
|
301
|
+
const { type, focused, valueCache, inValid } = this;
|
|
302
|
+
if (type == bcm.Bcm$1.InputType.number && inValid) {
|
|
303
|
+
console.log("whatchHasFocus");
|
|
304
|
+
if (focused) {
|
|
305
|
+
this.value = '';
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
if (!stringHelper.StringHelper.isNullOrEmpty(this.value)) {
|
|
309
|
+
this.value = this.value ? this.fixToNumber(this.value) : '';
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
this.value = valueCache;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
fixToNumber(val) {
|
|
318
|
+
if (val) {
|
|
319
|
+
const decLen = numberHelper.NumberHelper.getDecimalLength(this.step);
|
|
320
|
+
return decLen > 0 ? numberHelper.NumberHelper.parseFloatFixed(val, decLen) : val;
|
|
321
|
+
}
|
|
322
|
+
return val;
|
|
323
|
+
}
|
|
324
|
+
eyeDropper() {
|
|
325
|
+
const eyeDropper = new window.EyeDropper();
|
|
326
|
+
eyeDropper
|
|
327
|
+
.open()
|
|
328
|
+
.then((color) => {
|
|
329
|
+
console.log("color: ", color.sRGBHex);
|
|
330
|
+
this.setValue(color.sRGBHex);
|
|
331
|
+
})
|
|
332
|
+
.catch((error) => {
|
|
333
|
+
if (error.name === "NotAllowedError") {
|
|
334
|
+
console.log("Permission to access sensor was denied.");
|
|
335
|
+
}
|
|
336
|
+
else if (error.name === "NotSupportedError") {
|
|
337
|
+
console.log("Sensor not supported.");
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
isEyeDropperSupported() {
|
|
342
|
+
return typeof window !== "undefined" && "EyeDropper" in window;
|
|
343
|
+
}
|
|
344
|
+
toggleLinked() {
|
|
345
|
+
const linkedElement = document.getElementById(`${this._id}-linked`);
|
|
346
|
+
if (linkedElement) {
|
|
347
|
+
linkedElement.toggle();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
render() {
|
|
351
|
+
const { value, size, label, type, captionType, caption, captionError, placeholder, fullWidth, disabled, readonly, clearable, passwordToggle, isPasswordVisible, noDefaultIcon, unit, inValid, focused, unitPrefix, noCaption, required, hidden, _id, autocomplete } = this;
|
|
352
|
+
const isActiveClearable = (value === null || value === void 0 ? void 0 : value.length) > 0 && clearable;
|
|
353
|
+
const hostClasses = index$1.classnames('bcm-input', `bcm-input__container--${size}`, {
|
|
354
|
+
hidden,
|
|
355
|
+
// 'no-margin': noMargin,
|
|
356
|
+
'full-width': fullWidth
|
|
357
|
+
});
|
|
358
|
+
return (index.h(index.Host, { onfocus: () => this.onBcmFocus(), class: hostClasses, onClick: () => this.onBcmFocus() }, label && index.h("bcm-label", { onClick: () => this.toggleLinked(), tooltip: this.tooltip, type: captionType, value: label, required: required, htmlFor: _id }), index.h(inputTemplate.InputTemplate, { id: _id, type: type, value: value, pattern: this.pattern, placeholder: placeholder, disabled: disabled, readonly: readonly, clearable: isActiveClearable, passwordToggle: passwordToggle, isPasswordVisible: isPasswordVisible, noDefaultIcon: noDefaultIcon, focused: focused, inValid: inValid, unitPrefix: unitPrefix, maxLength: this.maxLength, internalId: this._internal_id, captionType: captionType, unit: unit, size: size, handleFocus: () => this.handleFocus(), handleBlur: () => this.handleBlur(), handleChange: () => this.handleChange(), handleInput: () => this.handleInput(), steps: (e) => this.stepUpOrDown(e), changePasswordVisibility: () => this.changePasswordVisibility(), handleClear: (e) => this.handleClear(e), eyeDropper: () => this.eyeDropper(), isEyeDropperSupported: () => this.isEyeDropperSupported(), ref: (el) => this.inputElement = el, _suffix: this._suffix, _prefix: this._prefix, autocomplete: autocomplete }), index.h(captionTemplate.CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption, customErrorMessage: this.customErrorMessage }), type == bcm.Bcm$1.InputType.color &&
|
|
359
|
+
index.h("bcm-linked", { targetId: this._id + "-container", id: this._id + "-linked" }, index.h("bcm-colorful", { id: this._id + "-picker", color: this.value, onBcmChange: e => this.setValue(e.detail) }))));
|
|
360
|
+
}
|
|
361
|
+
static get watchers() { return {
|
|
362
|
+
"value": ["watchValue"]
|
|
363
|
+
}; }
|
|
364
|
+
};
|
|
365
|
+
__decorate([
|
|
366
|
+
isLoadDecorator.IsLoad()
|
|
367
|
+
], BcmInput.prototype, "inputElement", void 0);
|
|
368
|
+
BcmInput.style = inputCss;
|
|
369
|
+
|
|
370
|
+
exports.bcm_input = BcmInput;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
+
|
|
9
|
+
const index = require('./index-ddfd6d8f.js');
|
|
10
|
+
const index$1 = require('./index-fdbf5226.js');
|
|
11
|
+
const generate = require('./generate-d0470117.js');
|
|
12
|
+
const bcm = require('./bcm-ab921827.js');
|
|
13
|
+
const labelTemplate = require('./label-template-4d5f99a5.js');
|
|
14
|
+
require('./_commonjsHelpers-bd20f4c0.js');
|
|
15
|
+
require('./colors-e1d142ad.js');
|
|
16
|
+
require('./slot-template-d70ea082.js');
|
|
17
|
+
require('./string-helper-d681e5c7.js');
|
|
18
|
+
|
|
19
|
+
const labelCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}";
|
|
20
|
+
|
|
21
|
+
const BcmLabel = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
index.registerInstance(this, hostRef);
|
|
24
|
+
this._id = generate.Generate.UID();
|
|
25
|
+
this.required = false;
|
|
26
|
+
this.value = undefined;
|
|
27
|
+
this.size = "medium";
|
|
28
|
+
this.form = undefined;
|
|
29
|
+
this.htmlFor = undefined;
|
|
30
|
+
this.hidden = false;
|
|
31
|
+
this.type = bcm.Bcm$1.Status.default;
|
|
32
|
+
this.tooltip = undefined;
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
const { required, value, size, form, htmlFor, hidden, type, tooltip } = this;
|
|
36
|
+
const hostClasses = index$1.classnames('bcm-label', { hidden });
|
|
37
|
+
const Label = (index.h(labelTemplate.LabelTemplate, { form: form, htmlFor: htmlFor, value: value, size: size, type: type, required: required }));
|
|
38
|
+
return (index.h(index.Host, { class: hostClasses }, Label, tooltip && (index.h("bcm-tooltip", { message: tooltip, placement: 'top', trigger: 'hover' }, index.h("bcm-icon", { icon: "far fa-question-circle" })))));
|
|
39
|
+
}
|
|
40
|
+
get el() { return index.getElement(this); }
|
|
41
|
+
};
|
|
42
|
+
BcmLabel.style = labelCss;
|
|
43
|
+
|
|
44
|
+
exports.bcm_label = BcmLabel;
|