bromcom-ui 2.8.1 → 2.9.0-rc.0

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.
Files changed (172) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-4899fba4.entry.js → p-0906c9b4.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-e7028542.entry.js → p-0ee4e283.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-4dac52f8.entry.js → p-0fdbbbe8.entry.js} +1 -1
  5. package/dist/bromcom-ui/p-14378828.entry.js +5 -0
  6. package/dist/bromcom-ui/{p-251bfa4c.entry.js → p-15fa3329.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-9c9babdd.entry.js → p-1c5a2111.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-e0618f5d.entry.js → p-20ac20d4.entry.js} +1 -1
  9. package/dist/bromcom-ui/p-24aefda6.js +1 -1
  10. package/dist/bromcom-ui/p-2cb4a196.entry.js +5 -0
  11. package/dist/bromcom-ui/p-2ea24a6e.js +1 -1
  12. package/dist/bromcom-ui/{p-0ee1ff83.entry.js → p-344a4674.entry.js} +1 -1
  13. package/dist/bromcom-ui/p-3ad545f0.entry.js +5 -0
  14. package/dist/bromcom-ui/{p-90894817.entry.js → p-40a5e4fc.entry.js} +1 -1
  15. package/dist/bromcom-ui/p-440afdfa.entry.js +5 -0
  16. package/dist/bromcom-ui/{p-94293d46.entry.js → p-4b34b3f9.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-a3aa9b2a.entry.js → p-55001c80.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-625af6e2.entry.js → p-5f288af5.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-274465b7.entry.js → p-70b428e8.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-89b21290.entry.js +5 -0
  21. package/dist/bromcom-ui/p-8d0ca8c2.js +1 -1
  22. package/dist/bromcom-ui/{p-e82340a2.entry.js → p-9b10d955.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-47b69111.entry.js → p-9c7e9b5d.entry.js} +1 -1
  24. package/dist/bromcom-ui/p-a0a3fd94.entry.js +5 -0
  25. package/dist/bromcom-ui/{p-f4f4e410.entry.js → p-a2046742.entry.js} +1 -1
  26. package/dist/bromcom-ui/p-a429e85b.js +1 -1
  27. package/dist/bromcom-ui/p-a97ee69d.entry.js +19 -0
  28. package/dist/bromcom-ui/{p-2fc1ab9a.entry.js → p-ab55def1.entry.js} +1 -1
  29. package/dist/bromcom-ui/p-b60bcecf.js +1 -1
  30. package/dist/bromcom-ui/{p-a8a4460a.entry.js → p-c9b10de5.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-160ef457.entry.js → p-cad8f786.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-140b10d1.entry.js → p-e008411a.entry.js} +1 -1
  33. package/dist/bromcom-ui/p-e0f440b4.js +1 -1
  34. package/dist/bromcom-ui/{p-c15e0e77.entry.js → p-e3cafc0d.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-0d693b8b.entry.js → p-e606c42b.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-86b8672d.entry.js → p-e66821e5.entry.js} +1 -1
  37. package/dist/cjs/{bcm-634604e3.js → bcm-ab921827.js} +4 -4
  38. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  39. package/dist/cjs/{bcm-colorful_2.cjs.entry.js → bcm-avatar_15.cjs.entry.js} +6232 -149
  40. package/dist/cjs/bcm-button-group.cjs.entry.js +5 -5
  41. package/dist/cjs/bcm-card.cjs.entry.js +3 -3
  42. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +416 -0
  43. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +4 -4
  44. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +193 -0
  45. package/dist/cjs/bcm-color-input.cjs.entry.js +2 -2
  46. package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
  47. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +7 -7
  48. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
  49. package/dist/cjs/bcm-dropdown.cjs.entry.js +4 -4
  50. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
  51. package/dist/cjs/bcm-form-2.cjs.entry.js +4 -3
  52. package/dist/cjs/bcm-item.cjs.entry.js +2 -2
  53. package/dist/cjs/bcm-items.cjs.entry.js +2 -2
  54. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  55. package/dist/cjs/bcm-menu.cjs.entry.js +4 -4
  56. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +2 -2
  57. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +2 -2
  58. package/dist/cjs/bcm-modal-2.cjs.entry.js +3 -3
  59. package/dist/cjs/bcm-modal.cjs.entry.js +5 -5
  60. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +3 -3
  61. package/dist/cjs/bcm-popconfirm.cjs.entry.js +3 -3
  62. package/dist/cjs/bcm-popover.cjs.entry.js +5 -5
  63. package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
  64. package/dist/cjs/bcm-radio-group.cjs.entry.js +6 -6
  65. package/dist/cjs/bcm-radio.cjs.entry.js +9 -9
  66. package/dist/cjs/bcm-range.cjs.entry.js +4 -4
  67. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  68. package/dist/cjs/bcm-stepper.cjs.entry.js +4 -4
  69. package/dist/cjs/bcm-switch.cjs.entry.js +7 -7
  70. package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
  71. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +6 -6
  72. package/dist/cjs/bcm-tab-item.cjs.entry.js +2 -2
  73. package/dist/cjs/bcm-tag.cjs.entry.js +12 -12
  74. package/dist/cjs/bcm-text.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-textarea.cjs.entry.js +5 -5
  76. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  77. package/dist/cjs/bcm-toast.cjs.entry.js +9 -9
  78. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  79. package/dist/cjs/{floating-ui-74eb26d6.js → floating-ui-c9fc2202.js} +2 -2
  80. package/dist/cjs/{input-template-4617f909.js → input-template-1441e468.js} +5 -5
  81. package/dist/cjs/{label-template-cc69bc21.js → label-template-4d5f99a5.js} +3 -3
  82. package/dist/cjs/loader.cjs.js +1 -1
  83. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +4 -4
  84. package/dist/cjs/old-bcm-popover.cjs.entry.js +3 -3
  85. package/dist/cjs/{popover-placement-3c8f3a72.js → popover-placement-ccb40073.js} +1 -1
  86. package/dist/cjs/{slot-template-3e59d7d8.js → slot-template-d70ea082.js} +1 -1
  87. package/dist/cjs/{string-helper-45cffee0.js → string-helper-d681e5c7.js} +2 -2
  88. package/dist/cjs/{tooltip-helper-2e8b879b.js → tooltip-helper-235b26ea.js} +6 -6
  89. package/dist/collection/collection-manifest.json +1 -0
  90. package/dist/collection/components/atoms/chip/chip-group.js +292 -0
  91. package/dist/collection/components/atoms/chip/chip.js +107 -26
  92. package/dist/collection/components/organism/form/form.js +1 -0
  93. package/dist/collection/components/organism/form-2/bcm-form-components.js +1 -0
  94. package/dist/collection/components/organism/list/list.css +3 -0
  95. package/dist/components/bcm-chip-group.d.ts +11 -0
  96. package/dist/components/bcm-chip-group.js +174 -0
  97. package/dist/components/bcm-chip.js +1 -100
  98. package/dist/components/bcm-form-2.js +1 -0
  99. package/dist/components/bcm-form.js +1 -0
  100. package/dist/components/bcm-list.js +1 -1702
  101. package/dist/{esm/bcm-chip.entry.js → components/chip.js} +110 -33
  102. package/dist/components/index.d.ts +1 -0
  103. package/dist/components/index.js +1 -0
  104. package/dist/{esm/bcm-list.entry.js → components/list.js} +136 -31
  105. package/dist/esm/bcm-9f50af9c.js +1 -1
  106. package/dist/esm/{bcm-colorful_2.entry.js → bcm-avatar_15.entry.js} +6219 -149
  107. package/dist/esm/bcm-button-group.entry.js +1 -1
  108. package/dist/esm/bcm-checkbox-group.entry.js +412 -0
  109. package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
  110. package/dist/esm/bcm-checkbox_2.entry.js +188 -0
  111. package/dist/esm/bcm-date-picker.entry.js +1 -1
  112. package/dist/esm/bcm-datetime-picker.entry.js +1 -1
  113. package/dist/esm/bcm-drawer.entry.js +1 -1
  114. package/dist/esm/bcm-dropdown.entry.js +1 -1
  115. package/dist/esm/bcm-form-2.entry.js +2 -1
  116. package/dist/esm/bcm-item.entry.js +1 -1
  117. package/dist/esm/bcm-link.entry.js +1 -1
  118. package/dist/esm/bcm-modal-2.entry.js +1 -1
  119. package/dist/esm/bcm-modal.entry.js +1 -1
  120. package/dist/esm/bcm-popconfirm.entry.js +1 -1
  121. package/dist/esm/bcm-popover.entry.js +1 -1
  122. package/dist/esm/bcm-progress.entry.js +1 -1
  123. package/dist/esm/bcm-radio-group.entry.js +1 -1
  124. package/dist/esm/bcm-radio.entry.js +1 -1
  125. package/dist/esm/bcm-range.entry.js +1 -1
  126. package/dist/esm/bcm-stepper.entry.js +1 -1
  127. package/dist/esm/bcm-switch.entry.js +1 -1
  128. package/dist/esm/bcm-tab-group.entry.js +1 -1
  129. package/dist/esm/bcm-tab-item-header.entry.js +1 -1
  130. package/dist/esm/bcm-tag.entry.js +1 -1
  131. package/dist/esm/bcm-textarea.entry.js +1 -1
  132. package/dist/esm/bcm-time-picker.entry.js +1 -1
  133. package/dist/esm/bcm-toast.entry.js +1 -1
  134. package/dist/esm/bromcom-ui.js +1 -1
  135. package/dist/esm/floating-ui-e7341329.js +1 -1
  136. package/dist/esm/input-template-e1df6efd.js +1 -1
  137. package/dist/esm/label-template-d74fe788.js +1 -1
  138. package/dist/esm/loader.js +1 -1
  139. package/dist/esm/old-bcm-popover.entry.js +1 -1
  140. package/dist/esm/string-helper-6bd24967.js +1 -1
  141. package/dist/esm/tooltip-helper-10b64c23.js +1 -1
  142. package/dist/types/components/atoms/chip/chip-group.d.ts +22 -0
  143. package/dist/types/components/atoms/chip/chip.d.ts +18 -13
  144. package/dist/types/components.d.ts +47 -4
  145. package/package.json +1 -1
  146. package/dist/bromcom-ui/p-111c4b6a.entry.js +0 -5
  147. package/dist/bromcom-ui/p-121eca04.entry.js +0 -5
  148. package/dist/bromcom-ui/p-1eabd5dc.js +0 -10
  149. package/dist/bromcom-ui/p-55837df1.entry.js +0 -5
  150. package/dist/bromcom-ui/p-8c62e1ca.entry.js +0 -5
  151. package/dist/bromcom-ui/p-9d23288e.entry.js +0 -5
  152. package/dist/bromcom-ui/p-b4f40047.entry.js +0 -5
  153. package/dist/bromcom-ui/p-b5ba17a4.entry.js +0 -13
  154. package/dist/bromcom-ui/p-b85bdadc.entry.js +0 -5
  155. package/dist/bromcom-ui/p-cbb3c1f0.entry.js +0 -5
  156. package/dist/bromcom-ui/p-d155cf69.entry.js +0 -5
  157. package/dist/bromcom-ui/p-f3d550ed.entry.js +0 -5
  158. package/dist/bromcom-ui/p-fdc8effc.entry.js +0 -5
  159. package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -139
  160. package/dist/cjs/bcm-button_7.cjs.entry.js +0 -1521
  161. package/dist/cjs/bcm-chip.cjs.entry.js +0 -74
  162. package/dist/cjs/bcm-input.cjs.entry.js +0 -370
  163. package/dist/cjs/bcm-list.cjs.entry.js +0 -1607
  164. package/dist/cjs/bcm-rc-overflow_2.cjs.entry.js +0 -2443
  165. package/dist/cjs/bcm-typography.cjs.entry.js +0 -21
  166. package/dist/cjs/index-906fb4e5.js +0 -540
  167. package/dist/esm/bcm-avatar_2.entry.js +0 -134
  168. package/dist/esm/bcm-button_7.entry.js +0 -1511
  169. package/dist/esm/bcm-input.entry.js +0 -366
  170. package/dist/esm/bcm-rc-overflow_2.entry.js +0 -2438
  171. package/dist/esm/bcm-typography.entry.js +0 -17
  172. package/dist/esm/index-6310a048.js +0 -537
@@ -1,74 +0,0 @@
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-21143214.js');
11
- const index$1 = require('./index-fdbf5226.js');
12
- const colorHelper = require('./color-helper-d6d2028b.js');
13
- require('./colors-e1d142ad.js');
14
- require('./_commonjsHelpers-bd20f4c0.js');
15
- require('./colors-56282b00.js');
16
- require('./utils-fc077139.js');
17
-
18
- const chipCss = "@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-chip{--bcm-chip-color:var(--bcm-new-ds-color-slate-500);--bcm-chip-color-hover:var(--bcm-new-ds-color-slate-500);--bcm-chip-color-focus:var(--bcm-new-ds-color-slate-700);--bcm-chip-color-active:var(--bcm-new-ds-color-slate-700);--bcm-chip-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-chip-background-color:var(--bcm-new-ds-color-slate-200);--bcm-chip-background-color-hover:var(--bcm-new-ds-color-slate-300);--bcm-chip-background-color-focus:var(--bcm-new-ds-color-slate-300);--bcm-chip-background-color-active:var(--bcm-new-ds-color-slate-400);--bcm-chip-background-color-disabled:var(--bcm-new-ds-color-slate-100);display:inline-flex;justify-content:center;align-items:center;width:fit-content;height:fit-content;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;padding:0 8px;gap:4px;color:var(--bcm-chip-color);background-color:var(--bcm-chip-background-color);border-radius:100px;transition:background-color 0.1s ease-in-out;outline:none}.bcm-chip:not(.bcm-chip--disabled):hover{background-color:var(--bcm-chip-background-color-hover)}.bcm-chip:not(.bcm-chip--disabled):focus{background-color:var(--bcm-chip-background-color-focus);color:var(--bcm-chip-color-focus)}.bcm-chip:not(.bcm-chip--disabled):active{background-color:var(--bcm-chip-background-color-active);color:var(--bcm-chip-color-active)}.bcm-chip--disabled{color:var(--bcm-chip-color-disabled);background-color:var(--bcm-chip-background-color-disabled)}.bcm-chip--avatar{padding-left:2px}.bcm-chip__type-dismissable-icon:hover{cursor:pointer;color:var(--bcm-chip-color-active)}.bcm-chip__size-small{font-size:10px;line-height:calc(10px + 8px)}.bcm-chip__size-small .bcm-avatar{width:14px;height:14px}.bcm-chip__size-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-chip__size-medium .bcm-avatar{width:16px;height:16px}.bcm-chip__size-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-chip__size-large .bcm-avatar{width:18px;height:18px}";
19
-
20
- const BcmChip = class {
21
- constructor(hostRef) {
22
- index.registerInstance(this, hostRef);
23
- this.bcmChipDismiss = index.createEvent(this, "bcm-chip-dismiss", 7);
24
- this.bcmChipSelect = index.createEvent(this, "bcm-chip-select", 7);
25
- this.bcmChipAddable = index.createEvent(this, "bcm-chip-addable", 7);
26
- this._id = generate.Generate.UID();
27
- this.type = 'default';
28
- this.size = 'medium';
29
- this.avatar = undefined;
30
- this.icon = undefined;
31
- this.disabled = undefined;
32
- this.color = undefined;
33
- }
34
- // @ts-ignore
35
- setColor() {
36
- if (!this.color)
37
- return;
38
- const color = this.color;
39
- return {
40
- '--bcm-chip-color': colorHelper.ColorHelper.dsColor(color + '-500'),
41
- '--bcm-chip-color-hover': colorHelper.ColorHelper.dsColor(color + '-500'),
42
- '--bcm-chip-color-focus': colorHelper.ColorHelper.dsColor(color + '-600'),
43
- '--bcm-chip-color-active': colorHelper.ColorHelper.dsColor(color + '-700'),
44
- '--bcm-chip-color-disabled': colorHelper.ColorHelper.dsColor('slate' + '-300'),
45
- '--bcm-chip-background-color': colorHelper.ColorHelper.dsColor(color + '-100'),
46
- '--bcm-chip-background-color-hover': colorHelper.ColorHelper.dsColor(color + '-200'),
47
- '--bcm-chip-background-color-focus': colorHelper.ColorHelper.dsColor(color + '-300'),
48
- '--bcm-chip-background-color-active': colorHelper.ColorHelper.dsColor(color + '-200'),
49
- '--bcm-chip-background-color-disabled': colorHelper.ColorHelper.dsColor('slate' + '-100'),
50
- };
51
- }
52
- handleDismiss(e) {
53
- e.stopPropagation();
54
- e.preventDefault();
55
- this.bcmChipDismiss.emit(this.el);
56
- }
57
- handleAddable(e) {
58
- e.stopPropagation();
59
- e.preventDefault();
60
- this.bcmChipAddable.emit(this.el);
61
- }
62
- render() {
63
- const { type, size, avatar, disabled, color } = this;
64
- const hostClasses = index$1.classnames('bcm-chip', `bcm-chip__type-${type}`, `bcm-chip__size-${size}`, {
65
- 'bcm-chip--disabled': disabled,
66
- 'bcm-chip--avatar': avatar,
67
- });
68
- return (index.h(index.Host, { class: hostClasses, tabindex: "0", disabled: disabled, style: this.setColor(), onClick: e => this.bcmChipSelect.emit(e) }, avatar && index.h("bcm-avatar", Object.assign({ size: size }, (color && { color }), (avatar && { image: avatar }))), type === 'addable' && (index.h("span", { class: "bcm-chip__left" }, index.h("bcm-icon", { onClick: e => this.handleAddable(e), icon: "far fa-plus" }))), index.h("slot", null), type === 'dismissable' && (index.h("span", { class: "bcm-chip__type-dismissable-icon" }, index.h("bcm-icon", { onClick: e => this.handleDismiss(e), icon: "fal fa-times" })))));
69
- }
70
- get el() { return index.getElement(this); }
71
- };
72
- BcmChip.style = chipCss;
73
-
74
- exports.bcm_chip = BcmChip;
@@ -1,370 +0,0 @@
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-21143214.js');
11
- const numberHelper = require('./number-helper-08a7ff70.js');
12
- const stringHelper = require('./string-helper-45cffee0.js');
13
- const validators = require('./validators-6a0077a8.js');
14
- const bcm = require('./bcm-634604e3.js');
15
- const captionTemplate = require('./caption-template-8d099fd6.js');
16
- const inputTemplate = require('./input-template-4617f909.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.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.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.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.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.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;