@pacem/pacem-ui 1.0.0-abel → 1.0.0-ampere

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 (54) hide show
  1. package/dist/browser/pacem-ui.js +39 -23
  2. package/dist/browser/pacem-ui.js.map +1 -1
  3. package/dist/browser/pacem-ui.min.js +6 -1
  4. package/dist/browser/pacem-ui.min.js.map +1 -1
  5. package/dist/bundle/pacem-ui.min.mjs +6 -1
  6. package/dist/bundle/pacem-ui.mjs +37 -22
  7. package/dist/bundle/pacem-ui.mjs.map +2 -2
  8. package/dist/esm/adapter.js +5 -0
  9. package/dist/esm/anchor.js +5 -0
  10. package/dist/esm/balloon.js +5 -0
  11. package/dist/esm/binder.js +5 -0
  12. package/dist/esm/blade.js +5 -0
  13. package/dist/esm/bottom-sheet.js +5 -0
  14. package/dist/esm/button.js +5 -0
  15. package/dist/esm/buttonset.js +5 -0
  16. package/dist/esm/calendar.js +5 -0
  17. package/dist/esm/collapse.js +5 -0
  18. package/dist/esm/dialog-abstractions.js +5 -0
  19. package/dist/esm/dialog.js +5 -0
  20. package/dist/esm/divider.js +5 -0
  21. package/dist/esm/icon.js +5 -0
  22. package/dist/esm/image.js +5 -0
  23. package/dist/esm/index-components-ui.js +5 -0
  24. package/dist/esm/index-components.js +5 -0
  25. package/dist/esm/index-iife.js +5 -0
  26. package/dist/esm/index.js +5 -0
  27. package/dist/esm/infinite-scroller.js +5 -0
  28. package/dist/esm/iterative.js +5 -0
  29. package/dist/esm/lightbox-abstractions.js +5 -0
  30. package/dist/esm/lightbox.js +39 -23
  31. package/dist/esm/loader.js +5 -0
  32. package/dist/esm/markdown-svc.js +5 -0
  33. package/dist/esm/markdown.js +5 -0
  34. package/dist/esm/marquee.js +5 -0
  35. package/dist/esm/media-query.js +5 -0
  36. package/dist/esm/menu.js +5 -0
  37. package/dist/esm/pager.js +5 -0
  38. package/dist/esm/picture.js +5 -0
  39. package/dist/esm/progressbar.js +5 -0
  40. package/dist/esm/sidebar.js +5 -0
  41. package/dist/esm/slideshow.js +5 -0
  42. package/dist/esm/social-twitter.js +5 -0
  43. package/dist/esm/sticky-header.js +5 -0
  44. package/dist/esm/tabs.js +5 -0
  45. package/dist/esm/ticker.js +5 -0
  46. package/dist/esm/toast.js +5 -0
  47. package/dist/esm/toc.js +5 -0
  48. package/dist/esm/tuner.js +5 -0
  49. package/dist/esm/types.js +5 -0
  50. package/dist/esm/vibration.js +5 -0
  51. package/dist/esm/view.js +5 -0
  52. package/dist/esm/window.js +5 -0
  53. package/package.json +1 -1
  54. package/typings/index.d.ts +1 -0
@@ -1,3 +1,8 @@
1
+ /*!
2
+ * @pacem/pacem-ui v1.0.0-ampere (https://js.pacem.it)
3
+ * Pacem (https://pacem.it)
4
+ * Licensed under Apache-2.0
5
+ */
1
6
  (function (pacemFoundation, pacemCore) {
2
7
  'use strict';
3
8
 
@@ -3621,6 +3626,38 @@ css-class="{{ ['hour-start-'+ (^item.hour + 1), 'hour-end-'+ (^item.hour + ^item
3621
3626
  window.addEventListener('keyup', this._keyupHandler, false);
3622
3627
  this._resetLayout();
3623
3628
  this._slot.addEventListener('slotchange', this._slotchangeHandler, false);
3629
+ if (this.show) {
3630
+ this._toggle(true);
3631
+ }
3632
+ }
3633
+ _toggle(val) {
3634
+ const wrap = this._wrapperElement;
3635
+ const container = this._container;
3636
+ if (!!val) {
3637
+ this.inert = false;
3638
+ this.dispatchEvent(new Event('open', { bubbles: true, cancelable: false }));
3639
+ wrap.style.display = '';
3640
+ wrap.hidden = false;
3641
+ window.requestAnimationFrame(() => {
3642
+ pacemCore.Utils.addPart(wrap, 'lightbox-wrapper-shown');
3643
+ pacemCore.Utils.addPart(container, 'lightbox-shown');
3644
+ });
3645
+ var scroller = this.querySelector('.' + pacemCore.PCSS + '-scrollable');
3646
+ if (scroller) {
3647
+ window.requestAnimationFrame(() => scroller.scrollTop = 0);
3648
+ }
3649
+ }
3650
+ else {
3651
+ this.inert = true;
3652
+ this.dispatchEvent(new Event('close', { bubbles: true, cancelable: false }));
3653
+ //
3654
+ pacemCore.Utils.removePart(wrap, 'lightbox-wrapper-shown');
3655
+ pacemCore.Utils.removePart(container, 'lightbox-shown');
3656
+ pacemCore.Utils.addAnimationEndCallback(wrap, (e) => {
3657
+ e.hidden = true;
3658
+ e.style.display = 'none';
3659
+ }, 500);
3660
+ }
3624
3661
  }
3625
3662
  propertyChangedCallback(name, old, val, first) {
3626
3663
  super.propertyChangedCallback(name, old, val, first);
@@ -3629,32 +3666,11 @@ css-class="{{ ['hour-start-'+ (^item.hour + 1), 'hour-end-'+ (^item.hour + ^item
3629
3666
  }
3630
3667
  switch (name) {
3631
3668
  case 'show':
3632
- const wrap = this._wrapperElement;
3633
- const container = this._container;
3634
3669
  if (!!val) {
3635
- this.inert = false;
3636
- this.dispatchEvent(new Event('open', { bubbles: true, cancelable: false }));
3637
- wrap.style.display = '';
3638
- wrap.hidden = false;
3639
- window.requestAnimationFrame(() => {
3640
- pacemCore.Utils.addPart(wrap, 'lightbox-wrapper-shown');
3641
- pacemCore.Utils.addPart(container, 'lightbox-shown');
3642
- });
3643
- var scroller = this.querySelector('.' + pacemCore.PCSS + '-scrollable');
3644
- if (scroller) {
3645
- window.requestAnimationFrame(() => scroller.scrollTop = 0);
3646
- }
3670
+ this._toggle(true);
3647
3671
  }
3648
3672
  else if (!!old) {
3649
- this.inert = true;
3650
- this.dispatchEvent(new Event('close', { bubbles: true, cancelable: false }));
3651
- //
3652
- pacemCore.Utils.removePart(wrap, 'lightbox-wrapper-shown');
3653
- pacemCore.Utils.removePart(container, 'lightbox-shown');
3654
- pacemCore.Utils.addAnimationEndCallback(wrap, (e) => {
3655
- e.hidden = true;
3656
- e.style.display = 'none';
3657
- }, 500);
3673
+ this._toggle(false);
3658
3674
  }
3659
3675
  break;
3660
3676
  case 'modal':