gd-bs 5.8.4 → 5.8.7

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/index.html CHANGED
@@ -978,10 +978,11 @@
978
978
  id: "offcanvas-demo",
979
979
  title: "Offcanvas Demo",
980
980
  body: "<h5>Hello Canvas</h5><input />",
981
- size: 5,
982
- type: 3,
981
+ size: 7,
982
+ type: 2,
983
983
  options: {
984
- backdrop: true
984
+ autoClose: false,
985
+ backdrop: false
985
986
  }
986
987
  });
987
988
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "5.8.4",
3
+ "version": "5.8.7",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -242,9 +242,6 @@ class _InputGroup extends Base<IInputGroupProps> implements IInputGroup {
242
242
 
243
243
  // File
244
244
  case InputGroupTypes.File:
245
- this.el.classList.add("form-file");
246
- input.classList.remove("form-control");
247
- input.classList.add("form-file-input");
248
245
  input.type = "file";
249
246
  break;
250
247
 
@@ -212,8 +212,23 @@ class _Modal extends Base<IModalProps> implements IModal {
212
212
 
213
213
  // Hides the modal
214
214
  hide() {
215
- // Toggle the modal
216
- this.isVisible ? this.toggle() : null;
215
+ // See if a transition is currently happening
216
+ if (this._tranisitioningFl) {
217
+ // Wait for the transition to complete
218
+ let id = setInterval(() => {
219
+ // See if the transition is complete
220
+ if (!this._tranisitioningFl) {
221
+ // Stop the loop
222
+ clearInterval(id);
223
+
224
+ // Toggle the modal
225
+ this.isVisible ? this.toggle() : null;
226
+ }
227
+ }, 250);
228
+ } else {
229
+ // Toggle the modal
230
+ this.isVisible ? this.toggle() : null;
231
+ }
217
232
  }
218
233
 
219
234
  // Returns true if the modal is visible
@@ -313,8 +328,23 @@ class _Modal extends Base<IModalProps> implements IModal {
313
328
 
314
329
  // Shows the modal
315
330
  show() {
316
- // Toggle the modal
317
- this.isVisible ? null : this.toggle();
331
+ // See if a transition is currently happening
332
+ if (this._tranisitioningFl) {
333
+ // Wait for the transition to complete
334
+ let id = setInterval(() => {
335
+ // See if the transition is complete
336
+ if (!this._tranisitioningFl) {
337
+ // Stop the loop
338
+ clearInterval(id);
339
+
340
+ // Toggle the modal
341
+ this.isVisible ? null : this.toggle();
342
+ }
343
+ }, 250);
344
+ } else {
345
+ // Toggle the modal
346
+ this.isVisible ? null : this.toggle();
347
+ }
318
348
  }
319
349
 
320
350
  // Toggles the modal
@@ -204,8 +204,23 @@ class _Offcanvas extends Base<IOffcanvasProps> implements IOffcanvas {
204
204
 
205
205
  // Hides the modal
206
206
  hide() {
207
- // Toggle the modal
208
- this.isVisible ? this.toggle() : null;
207
+ // See if a transition is currently happening
208
+ if (this._tranisitioningFl) {
209
+ // Wait for the transition to complete
210
+ let id = setInterval(() => {
211
+ // See if the transition is complete
212
+ if (!this._tranisitioningFl) {
213
+ // Stop the loop
214
+ clearInterval(id);
215
+
216
+ // Toggle the modal
217
+ this.isVisible ? this.toggle() : null;
218
+ }
219
+ }, 250);
220
+ } else {
221
+ // Toggle the modal
222
+ this.isVisible ? this.toggle() : null;
223
+ }
209
224
  }
210
225
 
211
226
  // Returns true if the modal is visible
@@ -248,8 +263,23 @@ class _Offcanvas extends Base<IOffcanvasProps> implements IOffcanvas {
248
263
 
249
264
  // Shows the modal
250
265
  show() {
251
- // Toggle the modal
252
- this.isVisible ? null : this.toggle();
266
+ // See if a transition is currently happening
267
+ if (this._tranisitioningFl) {
268
+ // Wait for the transition to complete
269
+ let id = setInterval(() => {
270
+ // See if the transition is complete
271
+ if (!this._tranisitioningFl) {
272
+ // Stop the loop
273
+ clearInterval(id);
274
+
275
+ // Toggle the modal
276
+ this.isVisible ? null : this.toggle();
277
+ }
278
+ }, 250);
279
+ } else {
280
+ // Toggle the modal
281
+ this.isVisible ? null : this.toggle();
282
+ }
253
283
  }
254
284
 
255
285
  // Toggles the modal
@@ -65,6 +65,11 @@
65
65
  */
66
66
  export const Offcanvas: (props: IOffcanvasProps, template?: string) => IOffcanvas;
67
67
 
68
+ /**
69
+ * Offcanvas Sizes
70
+ */
71
+ export const OffcanvasSize: IOffcanvasSize;
72
+
68
73
  /**
69
74
  * Offcanvas Types
70
75
  */