gd-bs 5.6.2 → 5.6.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/build/bs.js +1 -1
- package/build/components/checkboxGroup/item.js +2 -1
- package/build/components/form/control.js +13 -0
- package/build/components/inputGroup/index.js +4 -2
- package/dist/gd-bs-icons.js +4 -4
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +3 -0
- package/dist/gd-bs.js +4 -4
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/bs.scss +0 -13
- package/src/components/checkboxGroup/item.ts +2 -1
- package/src/components/checkboxGroup/types.d.ts +1 -0
- package/src/components/form/control.ts +13 -0
- package/src/components/form/controlTypes.d.ts +1 -0
- package/src/components/inputGroup/index.ts +4 -2
- package/src/components/inputGroup/types.d.ts +1 -0
package/package.json
CHANGED
package/src/bs.scss
CHANGED
|
@@ -426,19 +426,6 @@
|
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
/* Color match the selected flatpickr calendar control */
|
|
430
|
-
.flatpickr-day.selected {
|
|
431
|
-
background-color: #0078d4;
|
|
432
|
-
border-color: #0078d4;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/* Fix styling for the flatpickr calendar control */
|
|
436
|
-
.flatpickr-input[readonly] {
|
|
437
|
-
color: #212529 !important;
|
|
438
|
-
background-color: #fff !important;
|
|
439
|
-
border-color: #6c757d !important;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
429
|
/** Modal background - Shouldn't be under the .bs class */
|
|
443
430
|
|
|
444
431
|
.modal-backdrop {
|
|
@@ -35,7 +35,8 @@ export class CheckboxItem {
|
|
|
35
35
|
// Set the attributes
|
|
36
36
|
this._elCheckbox = this._el.querySelector("input");
|
|
37
37
|
if (this._elCheckbox) {
|
|
38
|
-
this._elCheckbox.disabled = this._parent.
|
|
38
|
+
this._elCheckbox.disabled = this._parent.isDisabled ? true : false;
|
|
39
|
+
this._elCheckbox.readOnly = this._parent.isReadonly ? true : false;
|
|
39
40
|
|
|
40
41
|
// Default the title property for the checkbox
|
|
41
42
|
this._elCheckbox.title = this.props.label || this._parent.title || "";
|
|
@@ -113,6 +113,7 @@ export class FormControl implements IFormControl {
|
|
|
113
113
|
colSize: cbProps.colSize,
|
|
114
114
|
hideLabel: true,
|
|
115
115
|
isInline: cbProps.isInline,
|
|
116
|
+
isDisabled: this._props.isDisabled,
|
|
116
117
|
isReadonly: this._props.isReadonly,
|
|
117
118
|
items: cbProps.items,
|
|
118
119
|
onChange: cbProps.onChange,
|
|
@@ -127,6 +128,7 @@ export class FormControl implements IFormControl {
|
|
|
127
128
|
this._tb = InputGroup({
|
|
128
129
|
className,
|
|
129
130
|
id: this._props.id,
|
|
131
|
+
isDisabled: this._props.isDisabled,
|
|
130
132
|
isReadonly: this._props.isReadonly,
|
|
131
133
|
onChange: (this._props as IFormControlPropsTextField).onChange,
|
|
132
134
|
placeholder: (this._props as IFormControlPropsTextField).placeholder,
|
|
@@ -171,6 +173,7 @@ export class FormControl implements IFormControl {
|
|
|
171
173
|
this._tb = InputGroup({
|
|
172
174
|
className,
|
|
173
175
|
id: this._props.id,
|
|
176
|
+
isDisabled: this._props.isDisabled,
|
|
174
177
|
isReadonly: this._props.isReadonly,
|
|
175
178
|
onChange: (this._props as IFormControlPropsTextField).onChange,
|
|
176
179
|
placeholder: (this._props as IFormControlPropsTextField).placeholder,
|
|
@@ -185,6 +188,7 @@ export class FormControl implements IFormControl {
|
|
|
185
188
|
this._tb = InputGroup({
|
|
186
189
|
className,
|
|
187
190
|
id: this._props.id,
|
|
191
|
+
isDisabled: this._props.isDisabled,
|
|
188
192
|
isReadonly: this._props.isReadonly,
|
|
189
193
|
onChange: (this._props as IFormControlPropsTextField).onChange,
|
|
190
194
|
placeholder: (this._props as IFormControlPropsTextField).placeholder,
|
|
@@ -214,6 +218,7 @@ export class FormControl implements IFormControl {
|
|
|
214
218
|
className,
|
|
215
219
|
colSize: cbMultiProps.colSize,
|
|
216
220
|
hideLabel: true,
|
|
221
|
+
isDisabled: this._props.isDisabled,
|
|
217
222
|
isInline: cbMultiProps.isInline,
|
|
218
223
|
isReadonly: this._props.isReadonly,
|
|
219
224
|
items: cbMultiProps.items,
|
|
@@ -260,6 +265,7 @@ export class FormControl implements IFormControl {
|
|
|
260
265
|
className,
|
|
261
266
|
colSize: (this._props as IFormControlPropsMultiCheckbox).colSize,
|
|
262
267
|
hideLabel: true,
|
|
268
|
+
isDisabled: this._props.isDisabled,
|
|
263
269
|
isReadonly: this._props.isReadonly,
|
|
264
270
|
items: (this._props as IFormControlPropsMultiCheckbox).items,
|
|
265
271
|
multi: true,
|
|
@@ -276,6 +282,7 @@ export class FormControl implements IFormControl {
|
|
|
276
282
|
className,
|
|
277
283
|
colSize: (this._props as IFormControlPropsMultiCheckbox).colSize,
|
|
278
284
|
hideLabel: true,
|
|
285
|
+
isDisabled: this._props.isDisabled,
|
|
279
286
|
isReadonly: this._props.isReadonly,
|
|
280
287
|
items: (this._props as IFormControlPropsMultiCheckbox).items,
|
|
281
288
|
multi: true,
|
|
@@ -291,6 +298,7 @@ export class FormControl implements IFormControl {
|
|
|
291
298
|
this._tb = InputGroup({
|
|
292
299
|
className,
|
|
293
300
|
id: this._props.id,
|
|
301
|
+
isDisabled: this._props.isDisabled,
|
|
294
302
|
isReadonly: this._props.isReadonly,
|
|
295
303
|
onChange: (this._props as IFormControlPropsTextField).onChange,
|
|
296
304
|
placeholder: (this._props as IFormControlPropsTextField).placeholder,
|
|
@@ -306,6 +314,7 @@ export class FormControl implements IFormControl {
|
|
|
306
314
|
className,
|
|
307
315
|
colSize: (this._props as IFormControlPropsCheckbox).colSize,
|
|
308
316
|
hideLabel: true,
|
|
317
|
+
isDisabled: this._props.isDisabled,
|
|
309
318
|
isReadonly: this._props.isReadonly,
|
|
310
319
|
items: (this._props as IFormControlPropsCheckbox).items,
|
|
311
320
|
onChange: (this._props as IFormControlPropsCheckbox).onChange,
|
|
@@ -320,6 +329,7 @@ export class FormControl implements IFormControl {
|
|
|
320
329
|
this._tb = InputGroup({
|
|
321
330
|
className,
|
|
322
331
|
id: this._props.id,
|
|
332
|
+
isDisabled: this._props.isDisabled,
|
|
323
333
|
isReadonly: this._props.isReadonly,
|
|
324
334
|
min: (this._props as IFormControlPropsRange).min || 0,
|
|
325
335
|
max: (this._props as IFormControlPropsRange).max || 100,
|
|
@@ -352,6 +362,7 @@ export class FormControl implements IFormControl {
|
|
|
352
362
|
className,
|
|
353
363
|
colSize: (this._props as IFormControlPropsCheckbox).colSize,
|
|
354
364
|
hideLabel: true,
|
|
365
|
+
isDisabled: this._props.isDisabled,
|
|
355
366
|
isReadonly: this._props.isReadonly,
|
|
356
367
|
items: (this._props as IFormControlPropsCheckbox).items,
|
|
357
368
|
onChange: (this._props as IFormControlPropsCheckbox).onChange,
|
|
@@ -366,6 +377,7 @@ export class FormControl implements IFormControl {
|
|
|
366
377
|
this._tb = InputGroup({
|
|
367
378
|
className,
|
|
368
379
|
id: this._props.id,
|
|
380
|
+
isDisabled: this._props.isDisabled,
|
|
369
381
|
isReadonly: this._props.isReadonly,
|
|
370
382
|
onChange: (this._props as IFormControlPropsTextField).onChange,
|
|
371
383
|
placeholder: (this._props as IFormControlPropsTextField).placeholder,
|
|
@@ -381,6 +393,7 @@ export class FormControl implements IFormControl {
|
|
|
381
393
|
this._tb = InputGroup({
|
|
382
394
|
className,
|
|
383
395
|
id: this._props.id,
|
|
396
|
+
isDisabled: this._props.isDisabled,
|
|
384
397
|
isReadonly: this._props.isReadonly,
|
|
385
398
|
onChange: (this._props as IFormControlPropsTextField).onChange,
|
|
386
399
|
placeholder: (this._props as IFormControlPropsTextField).placeholder,
|
|
@@ -205,7 +205,8 @@ class _InputGroup extends Base<IInputGroupProps> implements IInputGroup {
|
|
|
205
205
|
// Update the textbox
|
|
206
206
|
this.props.id ? textarea.id = this.props.id : null;
|
|
207
207
|
this.props.placeholder ? textarea.placeholder = this.props.placeholder : null;
|
|
208
|
-
textarea.
|
|
208
|
+
textarea.disabled = this.props.isDisabled ? true : false;
|
|
209
|
+
textarea.readOnly = this.props.isReadonly ? true : false;
|
|
209
210
|
textarea.rows = this.props.rows;
|
|
210
211
|
this.props.title ? textarea.title = this.props.title : null;
|
|
211
212
|
}
|
|
@@ -218,7 +219,8 @@ class _InputGroup extends Base<IInputGroupProps> implements IInputGroup {
|
|
|
218
219
|
// Update the textbox
|
|
219
220
|
this.props.id ? input.id = this.props.id : null;
|
|
220
221
|
this.props.placeholder ? input.placeholder = this.props.placeholder : null;
|
|
221
|
-
input.
|
|
222
|
+
input.disabled = this.props.isDisabled ? true : false;
|
|
223
|
+
input.readOnly = this.props.isReadonly ? true : false;
|
|
222
224
|
this.props.title ? input.title = this.props.title : null;
|
|
223
225
|
typeof (this.props.min) === "number" ? input.min = this.props.min + "" : null;
|
|
224
226
|
typeof (this.props.max) === "number" ? input.max = this.props.max + "" : null;
|