bromcom-ui 2.3.57 → 2.3.58

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 (156) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +0 -0
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/index.esm.js +0 -0
  4. package/dist/bromcom-ui/{p-7b469915.entry.js → p-13d038f5.entry.js} +1 -1
  5. package/dist/bromcom-ui/p-1429a2b4.js +1 -0
  6. package/dist/bromcom-ui/{p-e02ea2a4.entry.js → p-20d03fa1.entry.js} +1 -1
  7. package/dist/bromcom-ui/p-37750343.entry.js +1 -0
  8. package/dist/bromcom-ui/{p-9bfd984c.entry.js → p-3f797656.entry.js} +1 -1
  9. package/dist/bromcom-ui/p-4a41ef80.entry.js +1 -0
  10. package/dist/bromcom-ui/p-53e9b679.entry.js +1 -0
  11. package/dist/bromcom-ui/p-8851e01e.entry.js +1 -0
  12. package/dist/bromcom-ui/p-9ffff762.entry.js +1 -0
  13. package/dist/bromcom-ui/p-af7e4741.entry.js +1 -0
  14. package/dist/bromcom-ui/{p-0d336381.entry.js → p-afb68492.entry.js} +1 -1
  15. package/dist/bromcom-ui/p-bbf99620.entry.js +1 -0
  16. package/dist/bromcom-ui/{p-b52eb625.entry.js → p-e21a8f2d.entry.js} +1 -1
  17. package/dist/bromcom-ui/p-e450ebda.entry.js +1 -0
  18. package/dist/bromcom-ui/p-f067821e.entry.js +1 -0
  19. package/dist/cjs/bcm-alert.cjs.entry.js +7 -26
  20. package/dist/cjs/{bcm-button_5.cjs.entry.js → bcm-button_11.cjs.entry.js} +1206 -2
  21. package/dist/cjs/{bcm-checkbox-lite_3.cjs.entry.js → bcm-checkbox-lite_4.cjs.entry.js} +64 -0
  22. package/dist/cjs/bcm-colorpicker.cjs.entry.js +1 -1
  23. package/dist/cjs/{bcm-datetime-picker_2.cjs.entry.js → bcm-datetime-picker.cjs.entry.js} +1 -135
  24. package/dist/cjs/bcm-list-select.cjs.entry.js +21 -6
  25. package/dist/cjs/bcm-list.cjs.entry.js +41 -4
  26. package/dist/cjs/{bcm-empty_6.cjs.entry.js → bcm-listbox_5.cjs.entry.js} +8 -75
  27. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
  28. package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
  29. package/dist/cjs/bcm-popover-box.cjs.entry.js +1 -1
  30. package/dist/cjs/bcm-popover.cjs.entry.js +1 -1
  31. package/dist/cjs/bcm-radio-group.cjs.entry.js +1 -1
  32. package/dist/cjs/bcm-select.cjs.entry.js +1 -1
  33. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  34. package/dist/cjs/loader.cjs.js +1 -1
  35. package/dist/cjs/types-37c8ced6.js +16 -0
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/atoms/label/label.css +70 -0
  38. package/dist/collection/components/atoms/label/label.js +203 -0
  39. package/dist/collection/components/molecules/checkbox/group.js +19 -6
  40. package/dist/collection/components/molecules/input/input.js +19 -6
  41. package/dist/collection/components/molecules/list/list-select.css +3 -7
  42. package/dist/collection/components/molecules/list/list-select.js +41 -12
  43. package/dist/collection/components/molecules/list/list.css +18 -0
  44. package/dist/collection/components/molecules/list/list.js +63 -11
  45. package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +1 -0
  46. package/dist/collection/components/molecules/popconfirm/popconfirm.css +1 -0
  47. package/dist/collection/components/molecules/popover/popover-box.css +1 -0
  48. package/dist/collection/components/molecules/popover/popover.css +1 -0
  49. package/dist/collection/components/molecules/radio/group.js +19 -6
  50. package/dist/collection/components/molecules/select/select.js +19 -6
  51. package/dist/collection/components/molecules/switch/switch.css +0 -1
  52. package/dist/collection/components/molecules/switch/switch.js +20 -7
  53. package/dist/collection/components/molecules/textarea/textarea.js +19 -6
  54. package/dist/collection/components/molecules/tooltip/tooltip-box.css +1 -0
  55. package/dist/collection/components/molecules/tooltip/tooltip.css +1 -0
  56. package/dist/collection/components/organism/colorpicker/colorpicker.js +19 -6
  57. package/dist/collection/components/organism/listbox/listbox.js +26 -16
  58. package/dist/collection/helper/color-helper.js +33 -0
  59. package/dist/collection/helper/generate.js +47 -0
  60. package/dist/collection/helper/number-helper.js +10 -0
  61. package/dist/collection/helper/string-helper.js +21 -0
  62. package/dist/collection/helper/validators.js +21 -0
  63. package/dist/collection/models/bcm-types.js +1 -0
  64. package/dist/collection/models/bcm.js +451 -0
  65. package/dist/collection/templates/caption-template.js +22 -0
  66. package/dist/collection/templates/label-template.js +16 -0
  67. package/dist/collection/templates/slot-template.js +6 -0
  68. package/dist/esm/bcm-alert.entry.js +1 -20
  69. package/dist/esm/{bcm-button_5.entry.js → bcm-button_11.entry.js} +1202 -4
  70. package/dist/esm/{bcm-checkbox-lite_3.entry.js → bcm-checkbox-lite_4.entry.js} +65 -2
  71. package/dist/esm/bcm-colorpicker.entry.js +1 -1
  72. package/dist/esm/{bcm-datetime-picker_2.entry.js → bcm-datetime-picker.entry.js} +2 -135
  73. package/dist/esm/bcm-list-select.entry.js +21 -6
  74. package/dist/esm/bcm-list.entry.js +41 -4
  75. package/dist/esm/{bcm-empty_6.entry.js → bcm-listbox_5.entry.js} +10 -76
  76. package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
  77. package/dist/esm/bcm-popconfirm.entry.js +1 -1
  78. package/dist/esm/bcm-popover-box.entry.js +1 -1
  79. package/dist/esm/bcm-popover.entry.js +1 -1
  80. package/dist/esm/bcm-radio-group.entry.js +1 -1
  81. package/dist/esm/bcm-select.entry.js +1 -1
  82. package/dist/esm/bromcom-ui.js +1 -1
  83. package/dist/esm/loader.js +1 -1
  84. package/dist/esm/polyfills/css-shim.js +0 -0
  85. package/dist/esm/types-911a8837.js +21 -0
  86. package/dist/types/assets/icons/index.d.ts +0 -0
  87. package/dist/types/assets/icons/index.example.d.ts +0 -0
  88. package/dist/types/components/atoms/avatar/avatar.d.ts +0 -0
  89. package/dist/types/components/atoms/badge/badge.d.ts +0 -0
  90. package/dist/types/components/atoms/button/button.d.ts +0 -0
  91. package/dist/types/components/atoms/divider/divider.d.ts +0 -0
  92. package/dist/types/components/atoms/icon/icon.d.ts +0 -0
  93. package/dist/types/components/atoms/icon/types.d.ts +0 -0
  94. package/dist/types/components/atoms/label/label.d.ts +16 -0
  95. package/dist/types/components/atoms/tag/tag.d.ts +0 -0
  96. package/dist/types/components/atoms/text/text.d.ts +0 -0
  97. package/dist/types/components/molecules/card/card-footer.d.ts +0 -0
  98. package/dist/types/components/molecules/card/card-header.d.ts +0 -0
  99. package/dist/types/components/molecules/card/card.d.ts +0 -0
  100. package/dist/types/components/molecules/checkbox/checkbox.d.ts +0 -0
  101. package/dist/types/components/molecules/checkbox/group.d.ts +1 -0
  102. package/dist/types/components/molecules/input/input.d.ts +1 -0
  103. package/dist/types/components/molecules/list/list-select.d.ts +6 -1
  104. package/dist/types/components/molecules/list/list.d.ts +1 -0
  105. package/dist/types/components/molecules/radio/group.d.ts +1 -0
  106. package/dist/types/components/molecules/radio/radio.d.ts +0 -0
  107. package/dist/types/components/molecules/select/group.d.ts +0 -0
  108. package/dist/types/components/molecules/select/option.d.ts +0 -0
  109. package/dist/types/components/molecules/select/select.d.ts +1 -0
  110. package/dist/types/components/molecules/switch/switch.d.ts +1 -0
  111. package/dist/types/components/molecules/textarea/textarea.d.ts +1 -0
  112. package/dist/types/components/organism/colorpicker/colorpicker.d.ts +1 -0
  113. package/dist/types/components/organism/listbox/listbox.d.ts +1 -0
  114. package/dist/types/components.d.ts +64 -3
  115. package/dist/types/global/variables/colors.d.ts +0 -0
  116. package/dist/types/helper/color-helper.d.ts +9 -0
  117. package/dist/types/helper/generate.d.ts +10 -0
  118. package/dist/types/helper/number-helper.d.ts +9 -0
  119. package/dist/types/helper/string-helper.d.ts +20 -0
  120. package/dist/types/helper/validators.d.ts +8 -0
  121. package/dist/types/index.d.ts +0 -0
  122. package/dist/types/models/bcm-types.d.ts +19 -0
  123. package/dist/types/models/bcm.d.ts +447 -0
  124. package/dist/types/stencil-public-runtime.d.ts +0 -0
  125. package/dist/types/templates/caption-template.d.ts +12 -0
  126. package/dist/types/templates/label-template.d.ts +12 -0
  127. package/dist/types/templates/slot-template.d.ts +8 -0
  128. package/dist/types/utils/utils.d.ts +0 -0
  129. package/loader/cdn.js +0 -0
  130. package/loader/index.cjs.js +0 -0
  131. package/loader/index.d.ts +0 -0
  132. package/loader/index.es2017.js +0 -0
  133. package/loader/index.js +0 -0
  134. package/loader/package.json +0 -0
  135. package/package.json +1 -1
  136. package/dist/bromcom-ui/p-013b6f5d.entry.js +0 -1
  137. package/dist/bromcom-ui/p-3a6625d7.entry.js +0 -1
  138. package/dist/bromcom-ui/p-3aef4844.entry.js +0 -1
  139. package/dist/bromcom-ui/p-5ff33d84.entry.js +0 -1
  140. package/dist/bromcom-ui/p-607bc9b3.entry.js +0 -1
  141. package/dist/bromcom-ui/p-6bd805f1.entry.js +0 -1
  142. package/dist/bromcom-ui/p-6ef403b0.entry.js +0 -1
  143. package/dist/bromcom-ui/p-865ccb94.entry.js +0 -1
  144. package/dist/bromcom-ui/p-9220ba9c.entry.js +0 -1
  145. package/dist/bromcom-ui/p-b81236b1.entry.js +0 -1
  146. package/dist/bromcom-ui/p-cdfd9ba0.entry.js +0 -1
  147. package/dist/bromcom-ui/p-cf6b0656.entry.js +0 -1
  148. package/dist/bromcom-ui/p-fc3e131c.entry.js +0 -1
  149. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -273
  150. package/dist/cjs/bcm-checkbox.cjs.entry.js +0 -143
  151. package/dist/cjs/bcm-switch.cjs.entry.js +0 -86
  152. package/dist/cjs/bcm-tooltip-box.cjs.entry.js +0 -36
  153. package/dist/esm/bcm-checkbox-group.entry.js +0 -269
  154. package/dist/esm/bcm-checkbox.entry.js +0 -139
  155. package/dist/esm/bcm-switch.entry.js +0 -82
  156. package/dist/esm/bcm-tooltip-box.entry.js +0 -32
@@ -1,273 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ce8878ec.js');
6
- const index$1 = require('./index-2f62bdaf.js');
7
-
8
- const groupCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.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}:host{display:block;width:100%}:host(.hidden){display:none}:host(.error) .label{color:var(--bcm-color-red-6) !important}.group-container{display:flex;gap:24px}.group-container.vertical{gap:unset;flex-direction:column}.group-container.button{gap:unset}.group-container.full-width{max-width:100%}.indeterminate{padding:0 0 16px 0;margin-bottom:16px;border-bottom:1px solid #efefef;}.indeterminate input{display:none}.indeterminate label{display:flex;align-items:center;font-size:14px;color:var(--bcm-color-grey-8);cursor:pointer}.indeterminate label .icon-checked{display:none}.indeterminate span{position:relative;display:flex;align-items:center;justify-content:center;width:16px;height:16px;border:1px solid #D9D9D9;margin-right:8px;border-radius:2px}.indeterminate span:after{content:\"\";position:absolute;top:50%;left:50%;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:0}.indeterminate bcm-icon{filter:brightness(0) invert(1)}.indeterminate input[disabled]+label{cursor:not-allowed}.indeterminate input[disabled]+label span{background-color:var(--bcm-color-grey-3);border-color:var(--bcm-color-grey-5)}.indeterminate input[disabled]+label span:after{background-color:var(--bcm-color-grey-6)}.indeterminate input[disabled]+label bcm-icon{filter:brightness(0);opacity:0.3}.indeterminate input:not([disabled])+label:hover span{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.indeterminate.bcm-uncheck label span{background-color:#ffffff}.indeterminate.bcm-determinate bcm-icon{display:block}.indeterminate.bcm-determinate label span{background-color:var(--bcm-color-prime-blue-6);border-color:transparent}.indeterminate.bcm-determinate label span:after{opacity:0}.indeterminate.bcm-indeterminate bcm-icon{display:none !important}.indeterminate.bcm-indeterminate label span{background-color:#ffffff}.indeterminate.bcm-indeterminate label span:after{opacity:1}.label{display:flex;flex-direction:column;color:var(--bcm-color-grey-9);margin-bottom:8px}";
9
-
10
- const BcmCheckboxGroup = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.groupChange = index.createEvent(this, "bcm-group-change", 7);
14
- this.groupCheckedList = index.createEvent(this, "bcm-group-checked-list", 7);
15
- /**
16
- * Private variables
17
- */
18
- this.checkboxes = [];
19
- /**
20
- * Component Properties
21
- */
22
- this.direction = 'horizontal';
23
- this.items = [];
24
- this.indeterminate = false;
25
- this.disabled = false;
26
- this.hidden = false;
27
- this.required = false;
28
- this.label = null;
29
- this.gap = null;
30
- this.fullWidth = "false";
31
- this.optionType = 'default';
32
- this.buttonStyle = 'solid';
33
- this.size = 'medium';
34
- this.noCaption = false;
35
- this.captionType = 'default';
36
- /**
37
- * Component State Variables
38
- */
39
- this.indeterminateState = 'uncheck';
40
- this.checkboxesProp = [];
41
- }
42
- /**
43
- * @ComponentMethod
44
- */
45
- componentWillLoad() {
46
- this.parseItems(this.items);
47
- this.parseOptions();
48
- }
49
- /**
50
- * @ComponentMethod
51
- */
52
- connectedCallback() { }
53
- componentDidLoad() {
54
- let checkboxesInit = [];
55
- checkboxesInit = this.getAllInputs();
56
- checkboxesInit.map(checkbox => {
57
- if (this.fullWidth != "false") {
58
- if (this.fullWidth === "flex") {
59
- checkbox.style.flex = "auto";
60
- }
61
- else {
62
- checkbox.style.width = "100%";
63
- }
64
- }
65
- this.optionType && (checkbox.optionType = this.optionType);
66
- this.buttonStyle && (checkbox.buttonStyle = this.buttonStyle);
67
- this.size && (checkbox.size = this.size);
68
- // this.required == true && checkbox.required == true && (
69
- // checkbox.required = true
70
- // )
71
- this.disabled == true && (checkbox.disabled = true);
72
- });
73
- this.groupChecked().then(values => this.value = values);
74
- }
75
- async setClear() {
76
- const checkboxesInit = this.getAllInputs();
77
- checkboxesInit.map(checkbox => {
78
- checkbox.setClear();
79
- checkbox.noCaption = this.noCaption;
80
- });
81
- }
82
- async resetCaption() {
83
- const checkboxesInit = this.getAllInputs();
84
- checkboxesInit.map(checkbox => {
85
- checkbox.resetCaption();
86
- checkbox.noCaption = this.noCaption;
87
- });
88
- }
89
- /**
90
- * @ComponentMethod
91
- */
92
- componentDidRender() {
93
- let slotElements;
94
- slotElements = this.el.shadowRoot.querySelector('slot').assignedElements();
95
- this.checkboxes = [];
96
- // Get only bcm-checkbox elements from
97
- // slot childs
98
- slotElements.map(element => {
99
- String(element.tagName).toLowerCase() == 'bcm-checkbox'
100
- && this.checkboxes.push(element);
101
- });
102
- this.setIndeterminateState();
103
- if (this.items.length > 0) {
104
- let checkboxesInit = [];
105
- checkboxesInit = this.getAllInputs();
106
- checkboxesInit.map(checkbox => {
107
- this.defaultValueState && (this.defaultValueState.find(e => e === checkbox.name) && checkbox.check(checkbox.name));
108
- });
109
- }
110
- }
111
- componentDidUpdate() {
112
- this.handleChange();
113
- }
114
- /**
115
- * @desc
116
- */
117
- inputChange() {
118
- this.groupChecked().then(values => this.value = values);
119
- this.setIndeterminateState();
120
- }
121
- /**
122
- * @desc Returns merged slot and prop
123
- * checkbox items
124
- * @returns {Array<BcmCheckbox>}
125
- */
126
- getAllInputs() {
127
- return [
128
- ...this.checkboxes,
129
- ...this.el.shadowRoot.querySelectorAll('bcm-checkbox')
130
- ];
131
- }
132
- /**
133
- * @desc
134
- * @returns {void}
135
- */
136
- setIndeterminateState() {
137
- let state = 'uncheck';
138
- let allChecked = true;
139
- let allUnchecked = true;
140
- this.getAllInputs().map((checkbox) => {
141
- checkbox.checked && (allUnchecked = false);
142
- !checkbox.checked && (allChecked = false);
143
- });
144
- !allChecked && !allUnchecked
145
- ? state = 'indeterminate'
146
- : allChecked
147
- ? state = 'determinate'
148
- : state = 'uncheck';
149
- this.indeterminateState = state;
150
- }
151
- /**
152
- * @desc
153
- * @param event
154
- */
155
- indeterminateClick() {
156
- if (this.disabled == false) {
157
- let checkAll = true;
158
- if (this.indeterminateState == 'determinate') {
159
- checkAll = false;
160
- }
161
- this.getAllInputs().map((checkbox) => {
162
- checkbox.check(checkAll);
163
- });
164
- }
165
- }
166
- parseOptions() {
167
- if (this.defaultValue) {
168
- this.defaultValueState = JSON.parse(this.defaultValue);
169
- }
170
- }
171
- /**
172
- * @desc
173
- * @param newValue
174
- * @returns {void}
175
- */
176
- parseItems(newValue) {
177
- if (newValue) {
178
- typeof newValue == 'string'
179
- ? this.checkboxesProp = JSON.parse(newValue)
180
- : this.checkboxesProp = newValue;
181
- }
182
- }
183
- /**
184
- * @desc
185
- * @param name -
186
- * @returns {boolean | Array<any>}
187
- */
188
- async check(options) {
189
- if (options) {
190
- typeof options == 'string'
191
- ? options = JSON.parse(options)
192
- : options = options;
193
- }
194
- let checkboxes = [];
195
- checkboxes = this.getAllInputs();
196
- const inBoth = (list1, list2) => list1.filter(a => true === list2.some(b => a.name === b.name));
197
- let optionsArray = options;
198
- inBoth(checkboxes, options).map(item => {
199
- item.check(optionsArray.find(x => x.name === item.name).checked);
200
- });
201
- }
202
- /**
203
- * @desc
204
- * @param name -
205
- * @returns {boolean | Array<any>}
206
- */
207
- async groupChecked(name) {
208
- let retVal = null;
209
- let checkeds = {};
210
- let checkboxes = [];
211
- if (typeof retVal != 'boolean' && !retVal) {
212
- retVal = checkeds;
213
- }
214
- // Merge slotted items with prop items
215
- // #
216
- checkboxes = this.getAllInputs();
217
- checkboxes.map(checkbox => {
218
- checkbox.checked && (checkeds[checkbox.name] = {
219
- value: true,
220
- name: checkbox.name
221
- });
222
- !checkbox.checked && (checkeds[checkbox.name] = {
223
- value: false,
224
- name: checkbox.name
225
- });
226
- if (checkbox.name === name) {
227
- retVal = checkbox.checked;
228
- }
229
- });
230
- return retVal;
231
- }
232
- handleChange() {
233
- let checkeds = {};
234
- let changes = {};
235
- let checkboxes = [];
236
- checkboxes = this.getAllInputs();
237
- checkboxes.map(checkbox => {
238
- checkbox.checked && (checkeds[checkbox.name] = {
239
- value: true,
240
- name: checkbox.name
241
- });
242
- changes[checkbox.name] = {
243
- value: checkbox.checked ? true : false,
244
- name: checkbox.name
245
- };
246
- });
247
- this.groupChange.emit(changes);
248
- this.groupCheckedList.emit(checkeds);
249
- }
250
- render() {
251
- const { checkboxesProp, indeterminate, disabled, label, required, captionType } = this;
252
- const groupContainerClasses = index$1.classnames('group-container', this.direction, this.optionType, this.fullWidth, {
253
- 'full-width': this.fullWidth
254
- });
255
- const indeterminateClasses = index$1.classnames('indeterminate', 'bcm-' + this.indeterminateState, {
256
- 'disabled': disabled
257
- });
258
- const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null, {
259
- 'error': captionType == 'error' ? true : false
260
- });
261
- var customStyle = {};
262
- this.gap && (customStyle = { 'gap': this.gap });
263
- return (index.h(index.Host, { class: hostClasses, "on-bcm-change": () => this.inputChange() }, label && index.h("label", { class: "label size-1" }, " ", label, " ", required && ('*'), " "), indeterminate && (index.h("div", { class: indeterminateClasses }, index.h("input", { id: "bcm-indeterminate-element", type: "checkbox", disabled: disabled }), index.h("label", { htmlFor: "bcm-indeterminate-element", "on-click": () => this.indeterminateClick() }, index.h("span", null, index.h("bcm-icon", { class: "icon-checked", icon: "component-check", size: "small", type: "default" })), "Check All"))), index.h("div", { class: groupContainerClasses, style: customStyle }, checkboxesProp && this.checkboxesProp.map((checkbox) => index.h("bcm-checkbox", { name: checkbox.name, checked: checkbox.checked, disabled: checkbox.disabled, required: this.required === true && checkbox.required === true && (true), noCaption: this.noCaption, optionType: this.optionType, buttonStyle: this.buttonStyle, size: this.size, "full-width": this.fullWidth }, checkbox.label)), index.h("slot", null))));
264
- }
265
- get el() { return index.getElement(this); }
266
- static get watchers() { return {
267
- "defaultValue": ["parseOptions"],
268
- "items": ["parseItems"]
269
- }; }
270
- };
271
- BcmCheckboxGroup.style = groupCss;
272
-
273
- exports.bcm_checkbox_group = BcmCheckboxGroup;
@@ -1,143 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ce8878ec.js');
6
- const index$1 = require('./index-2f62bdaf.js');
7
- const colors = require('./colors-7fb8d76f.js');
8
- const utils = require('./utils-60414768.js');
9
-
10
- /**
11
- * 'color' prop predefined values
12
- */
13
- var ColorProps;
14
- (function (ColorProps) {
15
- ColorProps["black"] = "black";
16
- ColorProps["white"] = "white";
17
- ColorProps["prime-blue"] = "prime-blue";
18
- ColorProps["grey"] = "grey";
19
- ColorProps["blue"] = "blue";
20
- ColorProps["warmyellow"] = "warmyellow";
21
- ColorProps["yellow"] = "yellow";
22
- ColorProps["limegreen"] = "limegreen";
23
- ColorProps["red"] = "red";
24
- ColorProps["darkorange"] = "darkorange";
25
- ColorProps["orange"] = "orange";
26
- ColorProps["green"] = "green";
27
- ColorProps["turquosie"] = "turquosie";
28
- ColorProps["cobaltblue"] = "cobaltblue";
29
- ColorProps["magenta"] = "magenta";
30
- ColorProps["purple"] = "purple";
31
- ColorProps["bc-red"] = "bc-red";
32
- ColorProps["bc-blue"] = "bc-blue";
33
- ColorProps["bc-green"] = "bc-green";
34
- ColorProps["bc-orange"] = "bc-orange";
35
- })(ColorProps || (ColorProps = {}));
36
-
37
- const checkboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.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}.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}:host{display:inline-block}:host(.hidden){display:none}input{display:none}.svg-icon{filter:brightness(0) invert(1);width:12px;height:12px}label{display:flex;align-items:flex-start;font-size:14px;color:var(--bcm-color-grey-8);cursor:pointer}label span.icon{display:flex;align-items:center;justify-content:center;min-width:16px;min-height:16px;border:1px solid #D9D9D9;margin-right:8px;border-radius:2px;margin-top:2px;background-color:var(--bcm-color-grey-1)}:host(.indeterminate) label span.icon{position:relative}:host(.indeterminate) label span.icon::after{content:\"\";position:absolute;top:50%;left:8px;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:1;z-index:1}:host(.indeterminate) label span.icon::before{content:\"\";position:absolute;top:-1px;left:-1px;width:16px;height:100%;border-radius:2px;background-color:var(--bcm-color-grey-1);border:1px solid var(--bcm-color-grey-5);opacity:1;z-index:1}:host(.indeterminate) label span.icon:hover:not(.disabled):before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}input:checked+label span.icon{background-color:var(--bcm-color-prime-blue-6);border-color:transparent}input:checked+label .icon-checked{display:block}bcm-icon{filter:brightness(0) invert(1)}input[disabled]+label{cursor:not-allowed}input[disabled]+label span.icon{background-color:var(--bcm-color-grey-3);border-color:var(--bcm-color-grey-5)}input[disabled]+label bcm-icon{filter:brightness(0);opacity:0.3}input:not([disabled])+label:hover span.icon{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}:host(.error) input:not([disabled])+label span.icon{border-color:var(--bcm-color-red-6)}.caption-area{margin-bottom:8px;min-height:20px;display:block}.input-caption{display:block}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}.radio-button{background-color:var(--bcm-color-grey-1);color:var(--bcm-color-grey-8);border:1px solid var(--bcm-color-grey-5);padding:0 16px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.radio-button>span.icon{display:none}.radio-button>span.slot{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;user-select:none}.radio-button:hover:not(.disabled){color:var(--bcm-color-prime-blue-5)}.radio-button:active:not(.disabled){color:var(--bcm-color-prime-blue-7)}.radio-button.disabled{background-color:var(--bcm-color-grey-3);color:var(--bcm-color-grey-6);cursor:not-allowed}.radio-button.checked.disabled{background-color:var(--bcm-color-grey-4);color:var(--bcm-color-grey-1);border-color:var(--bcm-color-grey-5)}.radio-button.checked.solid{color:var(--bcm-color-grey-1);background-color:var(--bcm-color-prime-blue-6);border-color:var(--bcm-color-prime-blue-6)}.radio-button.checked.solid:hover{background-color:var(--bcm-color-prime-blue-5);border-color:var(--bcm-color-prime-blue-5)}.radio-button.checked.solid:active{background-color:var(--bcm-color-prime-blue-7);border-color:var(--bcm-color-prime-blue-7)}.radio-button.checked.outline{background-color:var(--bcm-color-grey-1);color:var(--bcm-color-prime-blue-6);border-color:var(--bcm-color-prime-blue-6)}.radio-button.checked.outline:hover{color:var(--bcm-color-prime-blue-5);border-color:var(--bcm-color-prime-blue-5)}.radio-button.checked.outline:active{color:var(--bcm-color-prime-blue-7);border-color:var(--bcm-color-prime-blue-7)}.radio-button.large{height:40px}.radio-button.medium{height:32px}.radio-button.small{height:24px}";
38
-
39
- const BcmCheckbox = class {
40
- constructor(hostRef) {
41
- index.registerInstance(this, hostRef);
42
- this.blur = index.createEvent(this, "bcm-blur", 7);
43
- this.focus = index.createEvent(this, "bcm-focus", 7);
44
- this.change = index.createEvent(this, "bcm-change", 7);
45
- /**
46
- * Component Properties
47
- */
48
- this.value = '';
49
- this.name = 'checkbox';
50
- this.checked = false;
51
- this.disabled = false;
52
- this.readOnly = false;
53
- this.hidden = false;
54
- this.required = false;
55
- this.optionType = 'default';
56
- this.buttonStyle = 'solid';
57
- this.size = 'medium';
58
- this.noCaption = false;
59
- this.captionType = 'default';
60
- }
61
- /**
62
- * @ComponentMethod
63
- */
64
- connectedCallback() {
65
- this.handleChange = this.handleChange.bind(this);
66
- this.captionCache = this.caption;
67
- this.captionTypeCache = this.captionType;
68
- }
69
- async setClear() {
70
- if (this.inputElement.checked == true) {
71
- this.inputElement.checked = false;
72
- this.handleChange();
73
- }
74
- }
75
- async resetCaption() {
76
- this.caption = this.captionCache;
77
- this.captionType = this.captionTypeCache;
78
- this.captionError = null;
79
- }
80
- componentDidLoad() {
81
- this.value = this.inputElement.checked;
82
- this.checked = this.value;
83
- }
84
- /**
85
- * @desc
86
- * @param event
87
- * @returns
88
- */
89
- handleChange() {
90
- this.value = this.inputElement.checked;
91
- this.checked = this.value;
92
- this.change.emit({
93
- name: this.name,
94
- value: this.value
95
- });
96
- }
97
- handleFocus() {
98
- this.focus.emit();
99
- }
100
- handleBlur() {
101
- this.blur.emit();
102
- }
103
- /**
104
- * @desc
105
- * @param name -
106
- * @returns {void}
107
- */
108
- async check(uncheck) {
109
- this.inputElement.checked = uncheck;
110
- this.handleChange();
111
- }
112
- getColor(color) {
113
- if (this.color !== 'default' && this.optionType == 'button' && this.checked)
114
- return {
115
- // color: extractColor(ColorPalette, ColorProps[color] + '-6'),
116
- borderColor: utils.extractColor(colors.ColorPalette, ColorProps[color] + '-5'),
117
- backgroundColor: utils.extractColor(colors.ColorPalette, ColorProps[color] + '-5')
118
- };
119
- }
120
- render() {
121
- const { disabled, checked, readOnly, name, handleChange, required, caption, captionError, captionType, noCaption, buttonStyle, size, optionType } = this;
122
- const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null, {
123
- 'error': captionType == 'error' ? true : false
124
- });
125
- const captionClasses = index$1.classnames('size-1', 'input-caption', 'caption-' + captionType);
126
- const defaultClasses = index$1.classnames();
127
- const buttonClasses = index$1.classnames('radio-button', buttonStyle, size, {
128
- 'size-2': size === 'small' || size === 'medium',
129
- 'size-3': size === 'large',
130
- 'checked': checked,
131
- 'disabled': disabled,
132
- });
133
- var fontColor = utils.extractColor(colors.ColorPalette, ColorProps[this.color] + '-6');
134
- var style = "<style>.radio-button:not(.checked):hover{color: " + fontColor + "} </style>";
135
- return (index.h(index.Host, { class: hostClasses, onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }, index.h("input", { id: name, type: "checkbox", checked: checked, disabled: disabled, required: required, readOnly: readOnly, onChange: handleChange, ref: el => (this.inputElement = el) }), optionType == 'button' && (index.h("span", { innerHTML: style })), index.h("label", { title: optionType == 'button' ? this.el.innerHTML : null, htmlFor: name, class: optionType == 'default' ? defaultClasses : buttonClasses, style: this.getColor(this.color) }, index.h("span", { class: "icon" }, index.h("bcm-icon", { class: "icon-checked", icon: "component-check", size: "small", type: "default" })), index.h("span", { class: "slot" }, index.h("slot", null))), !noCaption && (index.h("div", { class: "caption-area" }, captionType == "error"
136
- ? index.h("span", { class: captionClasses }, " ", captionError, " ")
137
- : caption && index.h("span", { class: captionClasses }, " ", caption, " ")))));
138
- }
139
- get el() { return index.getElement(this); }
140
- };
141
- BcmCheckbox.style = checkboxCss;
142
-
143
- exports.bcm_checkbox = BcmCheckbox;
@@ -1,86 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ce8878ec.js');
6
- const index$1 = require('./index-2f62bdaf.js');
7
-
8
- const switchCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.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}:host{display:inline-block;width:100%;margin:0 0 8px 0}:host(.hidden){display:none}*{box-sizing:border-box}.wrapper{display:inline-flex;padding-top:0px;padding-bottom:5px}.wrapper .active-text{color:var(--bcm-color-prime-blue-6);margin-left:4px}.wrapper .inactive-text{color:var(--bcm-color-grey-6);margin-right:4px}.container{display:flex;justify-content:space-between;align-items:center;border-radius:16px;background-color:var(--bcm-color-grey-6);position:relative}.container .handle{padding:1px;position:absolute;background-color:var(--bcm-color-grey-1);display:inline-flex;align-items:center;justify-content:center;border-radius:16px;transition:all 0.2s ease-in-out;box-shadow:0px 2px 2px rgba(0, 0, 0, 0.1), 0px 3px 1px rgba(0, 0, 0, 0.05), 0px 1px 5px rgba(0, 0, 0, 0.1)}.container .icon-active{opacity:0}.container .icon-inactive{opacity:1}.container.small{width:28px;min-width:28px;height:16px;padding:4px}.container.small .handle{width:12px;height:12px;left:4px}.container.small.switch-checked .handle{left:12px}.container.small:active:not(.disabled) .handle{width:16px}.container.small:active.switch-checked:not(.disabled) .handle{left:8px}.container.small .spinner{box-sizing:border-box;display:inline-flex;width:9px;height:9px;border-radius:50%;border:1px solid var(--bcm-color-grey-1);border-top-color:var(--bcm-color-grey-6);animation:spinner 1.5s linear infinite}.container.medium{width:44px;min-width:44px;height:22px;padding:4px}.container.medium .handle{width:16px;height:16px;left:4px}.container.medium.switch-checked .handle{left:24px}.container.medium:active:not(.disabled) .handle{width:22px}.container.medium:active.switch-checked:not(.disabled) .handle{left:18px}.container.medium .spinner{box-sizing:border-box;display:inline-flex;width:13px;height:13px;border-radius:50%;border:1px solid var(--bcm-color-grey-1);border-top-color:var(--bcm-color-grey-6);animation:spinner 1.5s linear infinite}.container.switch-checked{background-color:var(--bcm-color-prime-blue-6)}.container.switch-checked .icon-active{color:var(--bcm-color-grey-1);opacity:1}.container.switch-checked .icon-inactive{opacity:0}.container.switch-checked .spinner{border-top-color:var(--bcm-color-prime-blue-6)}.wrapper.disabled{opacity:40%;cursor:not-allowed}@keyframes spinner{to{transform:rotate(360deg)}}input[type=checkbox]{position:absolute;width:0;height:0;opacity:0}.label{display:flex;flex-direction:column;color:var(--bcm-color-grey-9);padding-right:4px;margin-right:8px;margin-bottom:8px}.caption-area{min-height:20px}.input-caption{display:block}:host(.error) .label{color:var(--bcm-color-red-6) !important}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}";
9
-
10
- const BcmSwitch = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.change = index.createEvent(this, "bcm-change", 7);
14
- this.focus = index.createEvent(this, "bcm-focus", 7);
15
- this.blur = index.createEvent(this, "bcm-blur", 7);
16
- this.checked = false;
17
- this.size = 'medium';
18
- this.pending = false;
19
- this.disabled = false;
20
- this.hidden = false;
21
- this.value = '';
22
- this.label = null;
23
- this.required = false;
24
- this.noCaption = false;
25
- this.captionType = 'default';
26
- }
27
- connectedCallback() {
28
- this.captionCache = this.caption;
29
- this.captionTypeCache = this.captionType;
30
- }
31
- handleClick() {
32
- this.checked = this.input.checked;
33
- this.value = this.checked;
34
- this.change.emit(this.checked);
35
- }
36
- componentDidLoad() {
37
- this.value = this.checked;
38
- }
39
- handleFocus() {
40
- this.focus.emit();
41
- }
42
- handleBlur() {
43
- this.blur.emit();
44
- }
45
- componentWillRender() {
46
- if (this.pending) {
47
- this.disabled = true;
48
- }
49
- }
50
- async setClear() {
51
- if (this.input.checked == true) {
52
- this.input.checked = false;
53
- this.checked = this.input.checked;
54
- this.value = this.checked;
55
- this.change.emit(this.checked);
56
- }
57
- }
58
- async resetCaption() {
59
- this.caption = this.captionCache;
60
- this.captionType = this.captionTypeCache;
61
- this.captionError = null;
62
- }
63
- render() {
64
- const { checked, size, activeIcon, inactiveIcon, activeText, inactiveText, pending, disabled, label, required, noCaption, captionType, captionError, caption } = this;
65
- const classes = index$1.classnames('container', size, {
66
- 'switch-checked': checked,
67
- 'disabled': disabled
68
- });
69
- const wrapperClass = index$1.classnames('wrapper', {
70
- 'checked': checked,
71
- 'disabled': disabled
72
- });
73
- const captionClasses = index$1.classnames('size-1', 'input-caption', 'caption-' + captionType);
74
- const isPermitted = (condition) => {
75
- return (condition && size === 'medium');
76
- };
77
- const isMedium = size === 'medium';
78
- const hostClasses = index$1.classnames('switch', this.hidden ? 'hidden' : null);
79
- return (index.h(index.Host, { class: hostClasses }, label && index.h("label", { class: "label size-1" }, " ", label, " ", required && ('*'), " "), index.h("label", { class: wrapperClass }, isPermitted(inactiveText) && index.h("span", { class: "inactive-text size-1" }, inactiveText), index.h("div", { class: classes }, isMedium && index.h("bcm-icon", { icon: activeIcon, size: 14, class: "icon-active" }), index.h("span", { class: "handle" }, pending && index.h("span", { class: "spinner" })), isMedium && index.h("bcm-icon", { icon: inactiveIcon, size: 14, class: "icon-inactive" })), index.h("input", { onClick: () => this.handleClick(), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur(), ref: el => (this.input = el), checked: checked, type: "checkbox", class: "switch", disabled: disabled }), isPermitted(activeText) && index.h("span", { class: "active-text size-1" }, activeText)), !noCaption && (index.h("div", { class: "caption-area" }, captionType == "error"
80
- ? index.h("span", { class: captionClasses }, " ", captionError, " ")
81
- : caption && index.h("span", { class: captionClasses }, " ", caption, " ")))));
82
- }
83
- };
84
- BcmSwitch.style = switchCss;
85
-
86
- exports.bcm_switch = BcmSwitch;
@@ -1,36 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-ce8878ec.js');
6
- const index$1 = require('./index-2f62bdaf.js');
7
-
8
- const tooltipBoxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.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}:host{display:inline-flex}:host(.hidden){display:none}:host(:focus){outline:none}.tooltip-box{position:relative;}.tooltip-box .box{position:absolute;display:none;box-sizing:border-box;background-color:#262626;border:1px solid #262626;border-radius:2px;z-index:10700;width:max-content;padding:4px 8px;color:var(--bcm-color-grey-1)}.tooltip-box::after{content:\"\";position:absolute;display:none;border:6px solid;z-index:10700}.tooltip-box.open .box,.tooltip-box.open::after{display:block}.tooltip-box.top .box{bottom:100%;margin-bottom:8px}.tooltip-box.top::after{bottom:100%;margin-bottom:-4px;border-color:#262626 transparent transparent transparent}.tooltip-box.bottom .box{top:100%;margin-top:8px}.tooltip-box.bottom::after{top:100%;margin-top:-4px;border-color:transparent transparent #262626 transparent}.tooltip-box.left .box{right:100%;margin-right:8px}.tooltip-box.left::after{right:100%;margin-right:-4px;border-color:transparent transparent transparent #262626}.tooltip-box.right .box{left:100%;margin-left:8px}.tooltip-box.right::after{left:100%;margin-left:-4px;border-color:transparent #262626 transparent transparent}.tooltip-box.top.center .box,.tooltip-box.bottom.center .box{left:50%;transform:translateX(-50%)}.tooltip-box.top.center::after,.tooltip-box.bottom.center::after{left:50%;transform:translateX(-50%)}.tooltip-box.top.start .box,.tooltip-box.bottom.start .box{left:0}.tooltip-box.top.start::after,.tooltip-box.bottom.start::after{left:8px}.tooltip-box.top.end .box,.tooltip-box.bottom.end .box{right:0}.tooltip-box.top.end::after,.tooltip-box.bottom.end::after{right:8px}.tooltip-box.left.center .box,.tooltip-box.right.center .box{top:50%;transform:translateY(-50%)}.tooltip-box.left.center::after,.tooltip-box.right.center::after{top:50%;transform:translateY(-50%)}.tooltip-box.left.start .box,.tooltip-box.right.start .box{top:0}.tooltip-box.left.start::after,.tooltip-box.right.start::after{top:4px}.tooltip-box.left.end .box,.tooltip-box.right.end .box{bottom:0}.tooltip-box.left.end::after,.tooltip-box.right.end::after{bottom:4px}.tooltip-box a{color:var(--bcm-color-grey-1)}";
9
-
10
- const BcmTooltipBox = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.hidden = false;
14
- }
15
- connectedCallback() { }
16
- disconnectedCallback() { }
17
- componentWillLoad() { }
18
- componentDidLoad() { }
19
- componentWillRender() { }
20
- componentDidRender() { }
21
- componentWillUpdate() { }
22
- componentDidUpdate() { }
23
- async openBox(open) {
24
- this.open = open;
25
- }
26
- render() {
27
- const classes = index$1.classnames('tooltip-box', this.open, this.placement);
28
- const boxClasses = index$1.classnames('box');
29
- const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
30
- return (index.h(index.Host, { class: hostClasses }, index.h("div", { class: classes }, index.h("div", { class: boxClasses, innerHTML: this.message }))));
31
- }
32
- get el() { return index.getElement(this); }
33
- };
34
- BcmTooltipBox.style = tooltipBoxCss;
35
-
36
- exports.bcm_tooltip_box = BcmTooltipBox;