@ptcwebops/ptcw-design 0.4.2 → 0.4.4

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 (129) hide show
  1. package/dist/cjs/_commonjsHelpers-119ffc74.js +17 -0
  2. package/dist/cjs/icon-asset_5.cjs.entry.js +988 -0
  3. package/dist/cjs/{index-e39de343.js → index-3adcf9f4.js} +7 -0
  4. package/dist/cjs/interfaces-0ecd8027.js +15 -0
  5. package/dist/cjs/list-item.cjs.entry.js +29 -0
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/lottie-player.cjs.entry.js +3 -16
  8. package/dist/cjs/my-component.cjs.entry.js +1 -1
  9. package/dist/cjs/ptc-breadcrumb.cjs.entry.js +23 -0
  10. package/dist/cjs/ptc-button.cjs.entry.js +76 -0
  11. package/dist/cjs/ptc-card-bottom.cjs.entry.js +42 -0
  12. package/dist/cjs/ptc-card-content.cjs.entry.js +42 -0
  13. package/dist/cjs/ptc-card-plm.cjs.entry.js +27 -0
  14. package/dist/cjs/ptc-card.cjs.entry.js +1 -1
  15. package/dist/cjs/ptc-countdown.cjs.entry.js +1 -1
  16. package/dist/cjs/ptc-date.cjs.entry.js +1 -1
  17. package/dist/cjs/ptc-footer.cjs.entry.js +1 -1
  18. package/dist/cjs/ptc-form.cjs.entry.js +1 -1
  19. package/dist/cjs/ptc-hero.cjs.entry.js +29 -0
  20. package/dist/cjs/ptc-img_2.cjs.entry.js +185 -0
  21. package/dist/cjs/ptc-input.cjs.entry.js +1 -1
  22. package/dist/cjs/ptc-link.cjs.entry.js +53 -0
  23. package/dist/cjs/ptc-list.cjs.entry.js +1 -1
  24. package/dist/cjs/ptc-lottie.cjs.entry.js +1 -1
  25. package/dist/cjs/ptc-modal.cjs.entry.js +1 -1
  26. package/dist/cjs/ptc-nav-item.cjs.entry.js +1 -1
  27. package/dist/cjs/ptc-nav.cjs.entry.js +1 -1
  28. package/dist/cjs/ptc-para.cjs.entry.js +50 -0
  29. package/dist/cjs/ptc-picture.cjs.entry.js +169 -0
  30. package/dist/cjs/ptc-select.cjs.entry.js +1 -1
  31. package/dist/cjs/ptc-social-share.cjs.entry.js +1 -1
  32. package/dist/cjs/ptc-spacer.cjs.entry.js +46 -0
  33. package/dist/cjs/ptc-span.cjs.entry.js +34 -0
  34. package/dist/cjs/ptc-title.cjs.entry.js +55 -0
  35. package/dist/cjs/ptcw-design.cjs.js +2 -2
  36. package/dist/collection/collection-manifest.json +2 -0
  37. package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.css +199 -0
  38. package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.js +149 -0
  39. package/dist/collection/components/ptc-responsive-wrapper/ptc-responsive-wrapper.css +3 -0
  40. package/dist/collection/components/ptc-responsive-wrapper/ptc-responsive-wrapper.js +62 -0
  41. package/dist/collection/components/ptc-svg-btn/ptc-svg-btn.css +8 -0
  42. package/dist/custom-elements/index.d.ts +12 -0
  43. package/dist/custom-elements/index.js +818 -2
  44. package/dist/esm/_commonjsHelpers-8b28c6fa.js +15 -0
  45. package/dist/esm/icon-asset_5.entry.js +980 -0
  46. package/dist/esm/{index-9e77d90e.js → index-357497dc.js} +7 -0
  47. package/dist/esm/interfaces-c1c73092.js +12 -0
  48. package/dist/esm/list-item.entry.js +25 -0
  49. package/dist/esm/loader.js +2 -2
  50. package/dist/esm/lottie-player.entry.js +2 -15
  51. package/dist/esm/my-component.entry.js +1 -1
  52. package/dist/esm/ptc-breadcrumb.entry.js +19 -0
  53. package/dist/esm/ptc-button.entry.js +72 -0
  54. package/dist/esm/ptc-card-bottom.entry.js +38 -0
  55. package/dist/esm/ptc-card-content.entry.js +38 -0
  56. package/dist/esm/ptc-card-plm.entry.js +23 -0
  57. package/dist/esm/ptc-card.entry.js +1 -1
  58. package/dist/esm/ptc-countdown.entry.js +1 -1
  59. package/dist/esm/ptc-date.entry.js +1 -1
  60. package/dist/esm/ptc-footer.entry.js +1 -1
  61. package/dist/esm/ptc-form.entry.js +1 -1
  62. package/dist/esm/ptc-hero.entry.js +25 -0
  63. package/dist/esm/ptc-img_2.entry.js +180 -0
  64. package/dist/esm/ptc-input.entry.js +1 -1
  65. package/dist/esm/ptc-link.entry.js +49 -0
  66. package/dist/esm/ptc-list.entry.js +1 -1
  67. package/dist/esm/ptc-lottie.entry.js +1 -1
  68. package/dist/esm/ptc-modal.entry.js +1 -1
  69. package/dist/esm/ptc-nav-item.entry.js +1 -1
  70. package/dist/esm/ptc-nav.entry.js +1 -1
  71. package/dist/esm/ptc-para.entry.js +46 -0
  72. package/dist/esm/ptc-picture.entry.js +165 -0
  73. package/dist/esm/ptc-select.entry.js +1 -1
  74. package/dist/esm/ptc-social-share.entry.js +1 -1
  75. package/dist/esm/ptc-spacer.entry.js +42 -0
  76. package/dist/esm/ptc-span.entry.js +30 -0
  77. package/dist/esm/ptc-title.entry.js +51 -0
  78. package/dist/esm/ptcw-design.js +2 -2
  79. package/dist/ptcw-design/{p-19f001a4.js → p-0e571387.js} +1 -1
  80. package/dist/ptcw-design/p-1e39bc14.entry.js +1 -0
  81. package/dist/ptcw-design/p-27538cac.entry.js +1 -0
  82. package/dist/ptcw-design/{p-abb97d21.entry.js → p-2f78af32.entry.js} +1 -1
  83. package/dist/ptcw-design/{p-3050845e.entry.js → p-3a174881.entry.js} +1 -1
  84. package/dist/ptcw-design/{p-b542c708.entry.js → p-4ba0046d.entry.js} +1 -1
  85. package/dist/ptcw-design/p-4bacc49a.entry.js +7 -0
  86. package/dist/ptcw-design/p-50e52c88.js +1 -0
  87. package/dist/ptcw-design/{p-65b30c15.entry.js → p-525faf32.entry.js} +1 -1
  88. package/dist/ptcw-design/p-5672aca0.entry.js +1 -0
  89. package/dist/ptcw-design/p-59a5663a.entry.js +1 -0
  90. package/dist/ptcw-design/{p-b798ca9c.entry.js → p-6106d579.entry.js} +1 -1
  91. package/dist/ptcw-design/p-6402cb6d.entry.js +1 -0
  92. package/dist/ptcw-design/p-64c98ea6.entry.js +1 -0
  93. package/dist/ptcw-design/{p-b803e2da.entry.js → p-66912e75.entry.js} +1 -1
  94. package/dist/ptcw-design/p-68bcb24d.entry.js +1 -0
  95. package/dist/ptcw-design/p-74a72a40.entry.js +1 -0
  96. package/dist/ptcw-design/{p-8a6de852.entry.js → p-75cc322d.entry.js} +1 -1
  97. package/dist/ptcw-design/{p-c140717c.entry.js → p-7b60638a.entry.js} +1 -1
  98. package/dist/ptcw-design/{p-b3e145f3.entry.js → p-7cea01d0.entry.js} +1 -1
  99. package/dist/ptcw-design/p-80c03571.entry.js +1 -0
  100. package/dist/ptcw-design/{p-762a6628.entry.js → p-87bc2b6f.entry.js} +1 -1
  101. package/dist/ptcw-design/{p-feed36fa.entry.js → p-9367272c.entry.js} +1 -1
  102. package/dist/ptcw-design/{p-8f9df770.entry.js → p-9b5a3528.entry.js} +1 -1
  103. package/dist/ptcw-design/p-a4300906.entry.js +1 -0
  104. package/dist/ptcw-design/{p-fe25f590.entry.js → p-aa4f80c6.entry.js} +1 -1
  105. package/dist/ptcw-design/p-b26e2c72.entry.js +1 -0
  106. package/dist/ptcw-design/p-b6757552.entry.js +1 -0
  107. package/dist/ptcw-design/p-b68038b5.js +1 -0
  108. package/dist/ptcw-design/p-bb7e7943.entry.js +1 -0
  109. package/dist/ptcw-design/p-bfe3ac5b.entry.js +1 -0
  110. package/dist/ptcw-design/p-c47b4ebf.entry.js +1 -0
  111. package/dist/ptcw-design/p-ce2134e1.entry.js +1 -0
  112. package/dist/ptcw-design/ptcw-design.css +1 -1
  113. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  114. package/dist/types/components/ptc-mobile-select/ptc-mobile-select.d.ts +28 -0
  115. package/dist/types/components/ptc-responsive-wrapper/ptc-responsive-wrapper.d.ts +8 -0
  116. package/dist/types/components.d.ts +74 -0
  117. package/package.json +6 -2
  118. package/readme.md +1 -1
  119. package/dist/cjs/icon-asset_16.cjs.entry.js +0 -849
  120. package/dist/cjs/ptc-announcement.cjs.entry.js +0 -43
  121. package/dist/cjs/ptc-svg-btn.cjs.entry.js +0 -81
  122. package/dist/esm/icon-asset_16.entry.js +0 -830
  123. package/dist/esm/ptc-announcement.entry.js +0 -39
  124. package/dist/esm/ptc-svg-btn.entry.js +0 -77
  125. package/dist/ptcw-design/p-57fcfb62.entry.js +0 -1
  126. package/dist/ptcw-design/p-5afee3b6.entry.js +0 -1
  127. package/dist/ptcw-design/p-96e30287.entry.js +0 -1
  128. package/dist/ptcw-design/p-97152565.entry.js +0 -1
  129. package/dist/ptcw-design/p-f98b4bdd.entry.js +0 -1
@@ -14369,6 +14369,758 @@ let PtcLottie$1 = class extends HTMLElement$1 {
14369
14369
  static get style() { return ptcLottieCss; }
14370
14370
  };
14371
14371
 
14372
+ var mobileSelect = createCommonjsModule(function (module, exports) {
14373
+ /*!
14374
+ * mobileSelect.js
14375
+ * (c) 2017-present onlyhom
14376
+ * Released under the MIT License.
14377
+ */
14378
+
14379
+ (function() {
14380
+
14381
+ function getClass(dom,string) {
14382
+ return dom.getElementsByClassName(string);
14383
+ }
14384
+ //构造器
14385
+ function MobileSelect(config) {
14386
+ this.wheelsData = config.wheels;
14387
+ this.jsonType = false;
14388
+ this.cascadeJsonData = [];
14389
+ this.displayJson = [];
14390
+ this.curValue = [];
14391
+ this.curIndexArr = [];
14392
+ this.cascade = false;
14393
+ this.offset = 0;
14394
+ this.offsetSum = 0;
14395
+ this.curDistance = [];
14396
+ this.clickStatus = false;
14397
+ this.isPC = true;
14398
+ this.init(config);
14399
+ }
14400
+ MobileSelect.prototype = {
14401
+ constructor: MobileSelect,
14402
+ init: function(config){
14403
+ var _this = this;
14404
+ if(config.wheels[0].data.length==0){
14405
+ console.error('mobileSelect has been successfully installed, but the data is empty and cannot be initialized.');
14406
+ return false;
14407
+ }
14408
+ _this.keyMap = config.keyMap ? config.keyMap : {id:'id', value:'value', childs:'childs'};
14409
+ _this.checkDataType();
14410
+ _this.renderWheels(_this.wheelsData, config.cancelBtnText, config.ensureBtnText);
14411
+ _this.trigger = document.querySelector(config.trigger);
14412
+ if(!_this.trigger){
14413
+ console.error('mobileSelect has been successfully installed, but no trigger found on your page.');
14414
+ return false;
14415
+ }
14416
+ _this.wheel = getClass(_this.mobileSelect,'wheel');
14417
+ _this.slider = getClass(_this.mobileSelect,'selectContainer');
14418
+ _this.wheels = _this.mobileSelect.querySelector('.wheels');
14419
+ _this.liHeight = _this.mobileSelect.querySelector('li').offsetHeight;
14420
+ _this.ensureBtn = _this.mobileSelect.querySelector('.ensure');
14421
+ _this.cancelBtn = _this.mobileSelect.querySelector('.cancel');
14422
+ _this.grayLayer = _this.mobileSelect.querySelector('.grayLayer');
14423
+ _this.popUp = _this.mobileSelect.querySelector('.content');
14424
+ _this.callback = config.callback || function(){};
14425
+ _this.cancel = config.cancel || function(){};
14426
+ _this.transitionEnd = config.transitionEnd || function(){};
14427
+ _this.onShow = config.onShow || function(){};
14428
+ _this.onHide = config.onHide || function(){};
14429
+ _this.initPosition = config.position || [];
14430
+ _this.titleText = config.title || '';
14431
+ _this.connector = config.connector || ' ';
14432
+ _this.triggerDisplayData = !(typeof(config.triggerDisplayData)=='undefined') ? config.triggerDisplayData : true;
14433
+ _this.trigger.style.cursor='pointer';
14434
+ _this.setStyle(config);
14435
+ _this.setTitle(_this.titleText);
14436
+ _this.checkIsPC();
14437
+ _this.checkCascade();
14438
+ _this.addListenerAll();
14439
+
14440
+ if (_this.cascade) {
14441
+ _this.initCascade();
14442
+ }
14443
+ //定位 初始位置
14444
+ if(_this.initPosition.length < _this.slider.length){
14445
+ var diff = _this.slider.length - _this.initPosition.length;
14446
+ for(var i=0; i<diff; i++){
14447
+ _this.initPosition.push(0);
14448
+ }
14449
+ }
14450
+
14451
+ _this.setCurDistance(_this.initPosition);
14452
+
14453
+
14454
+ //按钮监听
14455
+ _this.cancelBtn.addEventListener('click',function(){
14456
+ _this.hide();
14457
+ _this.cancel(_this.curIndexArr, _this.curValue);
14458
+ });
14459
+
14460
+ _this.ensureBtn.addEventListener('click',function(){
14461
+ _this.hide();
14462
+ if(!_this.liHeight) {
14463
+ _this.liHeight = _this.mobileSelect.querySelector('li').offsetHeight;
14464
+ }
14465
+ var tempValue ='';
14466
+ for(var i=0; i<_this.wheel.length; i++){
14467
+ i==_this.wheel.length-1 ? tempValue += _this.getInnerHtml(i) : tempValue += _this.getInnerHtml(i) + _this.connector;
14468
+ }
14469
+ if(_this.triggerDisplayData){
14470
+ _this.trigger.innerHTML = tempValue;
14471
+ }
14472
+ _this.curIndexArr = _this.getIndexArr();
14473
+ _this.curValue = _this.getCurValue();
14474
+ _this.callback(_this.curIndexArr, _this.curValue);
14475
+ });
14476
+
14477
+ _this.trigger.addEventListener('click',function(){
14478
+ _this.show();
14479
+ });
14480
+ _this.grayLayer.addEventListener('click',function(){
14481
+ _this.hide();
14482
+ _this.cancel(_this.curIndexArr, _this.curValue);
14483
+ });
14484
+ _this.popUp.addEventListener('click',function(){
14485
+ event.stopPropagation();
14486
+ });
14487
+
14488
+ _this.fixRowStyle(); //修正列数
14489
+ },
14490
+
14491
+ setTitle: function(string){
14492
+ var _this = this;
14493
+ _this.titleText = string;
14494
+ _this.mobileSelect.querySelector('.title').innerHTML = _this.titleText;
14495
+ },
14496
+
14497
+ setStyle: function(config){
14498
+ var _this = this;
14499
+ if(config.ensureBtnColor){
14500
+ _this.ensureBtn.style.color = config.ensureBtnColor;
14501
+ }
14502
+ if(config.cancelBtnColor){
14503
+ _this.cancelBtn.style.color = config.cancelBtnColor;
14504
+ }
14505
+ if(config.titleColor){
14506
+ _this.title = _this.mobileSelect.querySelector('.title');
14507
+ _this.title.style.color = config.titleColor;
14508
+ }
14509
+ if(config.textColor){
14510
+ _this.panel = _this.mobileSelect.querySelector('.panel');
14511
+ _this.panel.style.color = config.textColor;
14512
+ }
14513
+ if(config.titleBgColor){
14514
+ _this.btnBar = _this.mobileSelect.querySelector('.btnBar');
14515
+ _this.btnBar.style.backgroundColor = config.titleBgColor;
14516
+ }
14517
+ if(config.bgColor){
14518
+ _this.panel = _this.mobileSelect.querySelector('.panel');
14519
+ _this.shadowMask = _this.mobileSelect.querySelector('.shadowMask');
14520
+ _this.panel.style.backgroundColor = config.bgColor;
14521
+ _this.shadowMask.style.background = 'linear-gradient(to bottom, '+ config.bgColor + ', rgba(255, 255, 255, 0), '+ config.bgColor + ')';
14522
+ }
14523
+ if(!isNaN(config.maskOpacity)){
14524
+ _this.grayMask = _this.mobileSelect.querySelector('.grayLayer');
14525
+ _this.grayMask.style.background = 'rgba(0, 0, 0, '+ config.maskOpacity +')';
14526
+ }
14527
+ },
14528
+
14529
+ checkIsPC: function(){
14530
+ var _this = this;
14531
+ var sUserAgent = navigator.userAgent.toLowerCase();
14532
+ var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
14533
+ var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
14534
+ var bIsMidp = sUserAgent.match(/midp/i) == "midp";
14535
+ var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
14536
+ var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
14537
+ var bIsAndroid = sUserAgent.match(/android/i) == "android";
14538
+ var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
14539
+ var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
14540
+ if ((bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
14541
+ _this.isPC = false;
14542
+ }
14543
+ },
14544
+
14545
+ show: function(){
14546
+ this.mobileSelect.classList.add('mobileSelect-show');
14547
+ if (typeof this.onShow === 'function') {
14548
+ this.onShow(this);
14549
+ }
14550
+ },
14551
+
14552
+ hide: function() {
14553
+ this.mobileSelect.classList.remove('mobileSelect-show');
14554
+ if (typeof this.onHide === 'function') {
14555
+ this.onHide(this);
14556
+ }
14557
+ },
14558
+
14559
+ renderWheels: function(wheelsData, cancelBtnText, ensureBtnText){
14560
+ var _this = this;
14561
+ var cancelText = cancelBtnText ? cancelBtnText : '取消';
14562
+ var ensureText = ensureBtnText ? ensureBtnText : '确认';
14563
+ _this.mobileSelect = document.createElement("div");
14564
+ _this.mobileSelect.className = "mobileSelect";
14565
+ _this.mobileSelect.innerHTML =
14566
+ '<div class="grayLayer"></div>'+
14567
+ '<div class="content">'+
14568
+ '<div class="btnBar">'+
14569
+ '<div class="fixWidth">'+
14570
+ '<div class="cancel">'+ cancelText +'</div>'+
14571
+ '<div class="title"></div>'+
14572
+ '<div class="ensure">'+ ensureText +'</div>'+
14573
+ '</div>'+
14574
+ '</div>'+
14575
+ '<div class="panel">'+
14576
+ '<div class="fixWidth">'+
14577
+ '<div class="wheels">'+
14578
+ '</div>'+
14579
+ '<div class="selectLine"></div>'+
14580
+ '<div class="shadowMask"></div>'+
14581
+ '</div>'+
14582
+ '</div>'+
14583
+ '</div>';
14584
+ document.body.appendChild(_this.mobileSelect);
14585
+
14586
+ //根据数据长度来渲染
14587
+
14588
+ var tempHTML='';
14589
+ for(var i=0; i<wheelsData.length; i++){
14590
+ //列
14591
+ tempHTML += '<div class="wheel"><ul class="selectContainer">';
14592
+ if(_this.jsonType){
14593
+ for(var j=0; j<wheelsData[i].data.length; j++){
14594
+ //行
14595
+ tempHTML += '<li data-id="'+wheelsData[i].data[j][_this.keyMap.id]+'">'+wheelsData[i].data[j][_this.keyMap.value]+'</li>';
14596
+ }
14597
+ }else {
14598
+ for(var j=0; j<wheelsData[i].data.length; j++){
14599
+ //行
14600
+ tempHTML += '<li>'+wheelsData[i].data[j]+'</li>';
14601
+ }
14602
+ }
14603
+ tempHTML += '</ul></div>';
14604
+ }
14605
+ _this.mobileSelect.querySelector('.wheels').innerHTML = tempHTML;
14606
+ },
14607
+
14608
+ addListenerAll: function(){
14609
+ var _this = this;
14610
+ for(var i=0; i<_this.slider.length; i++){
14611
+ //手势监听
14612
+ (function (i) {
14613
+ _this.addListenerWheel(_this.wheel[i], i);
14614
+ })(i);
14615
+ }
14616
+ },
14617
+
14618
+ addListenerWheel: function(theWheel, index){
14619
+ var _this = this;
14620
+ theWheel.addEventListener('touchstart', function () {
14621
+ _this.touch(event, this.firstChild, index);
14622
+ },false);
14623
+ theWheel.addEventListener('touchend', function () {
14624
+ _this.touch(event, this.firstChild, index);
14625
+ },false);
14626
+ theWheel.addEventListener('touchmove', function () {
14627
+ _this.touch(event, this.firstChild, index);
14628
+ },false);
14629
+
14630
+ if(_this.isPC){
14631
+ //如果是PC端则再增加拖拽监听 方便调试
14632
+ theWheel.addEventListener('mousedown', function () {
14633
+ _this.dragClick(event, this.firstChild, index);
14634
+ },false);
14635
+ theWheel.addEventListener('mousemove', function () {
14636
+ _this.dragClick(event, this.firstChild, index);
14637
+ },false);
14638
+ theWheel.addEventListener('mouseup', function () {
14639
+ _this.dragClick(event, this.firstChild, index);
14640
+ },true);
14641
+ }
14642
+ },
14643
+
14644
+ checkDataType: function(){
14645
+ var _this = this;
14646
+ if(typeof(_this.wheelsData[0].data[0])=='object'){
14647
+ _this.jsonType = true;
14648
+ }
14649
+ },
14650
+
14651
+ checkCascade: function(){
14652
+ var _this = this;
14653
+ if(_this.jsonType){
14654
+ var node = _this.wheelsData[0].data;
14655
+ for(var i=0; i<node.length; i++){
14656
+ if(_this.keyMap.childs in node[i] && node[i][_this.keyMap.childs].length > 0){
14657
+ _this.cascade = true;
14658
+ _this.cascadeJsonData = _this.wheelsData[0].data;
14659
+ break;
14660
+ }
14661
+ }
14662
+ }else {
14663
+ _this.cascade = false;
14664
+ }
14665
+ },
14666
+
14667
+ generateArrData: function (targetArr) {
14668
+ var tempArr = [];
14669
+ var keyMap_id = this.keyMap.id;
14670
+ var keyMap_value = this.keyMap.value;
14671
+ for(var i=0; i<targetArr.length; i++){
14672
+ var tempObj = {};
14673
+ tempObj[keyMap_id] = targetArr[i][this.keyMap.id];
14674
+ tempObj[keyMap_value] = targetArr[i][this.keyMap.value];
14675
+ tempArr.push(tempObj);
14676
+ }
14677
+ return tempArr;
14678
+ },
14679
+
14680
+ initCascade: function(){
14681
+ var _this = this;
14682
+ _this.displayJson.push(_this.generateArrData(_this.cascadeJsonData));
14683
+ if(_this.initPosition.length>0){
14684
+ _this.initDeepCount = 0;
14685
+ _this.initCheckArrDeep(_this.cascadeJsonData[_this.initPosition[0]]);
14686
+ }else {
14687
+ _this.checkArrDeep(_this.cascadeJsonData[0]);
14688
+ }
14689
+ _this.reRenderWheels();
14690
+ },
14691
+
14692
+ initCheckArrDeep: function (parent) {
14693
+ var _this = this;
14694
+ if(parent){
14695
+ if (_this.keyMap.childs in parent && parent[_this.keyMap.childs].length > 0) {
14696
+ _this.displayJson.push(_this.generateArrData(parent[_this.keyMap.childs]));
14697
+ _this.initDeepCount++;
14698
+ var nextNode = parent[_this.keyMap.childs][_this.initPosition[_this.initDeepCount]];
14699
+ if(nextNode){
14700
+ _this.initCheckArrDeep(nextNode);
14701
+ }else {
14702
+ _this.checkArrDeep(parent[_this.keyMap.childs][0]);
14703
+ }
14704
+ }
14705
+ }
14706
+ },
14707
+
14708
+ checkArrDeep: function (parent) {
14709
+ //检测子节点深度 修改 displayJson
14710
+ var _this = this;
14711
+ if(parent){
14712
+ if (_this.keyMap.childs in parent && parent[_this.keyMap.childs].length > 0) {
14713
+ _this.displayJson.push(_this.generateArrData(parent[_this.keyMap.childs])); //生成子节点数组
14714
+ _this.checkArrDeep(parent[_this.keyMap.childs][0]);//检测下一个子节点
14715
+ }
14716
+ }
14717
+ },
14718
+
14719
+ checkRange: function(index, posIndexArr){
14720
+ var _this = this;
14721
+ var deleteNum = _this.displayJson.length-1-index;
14722
+ for(var i=0; i<deleteNum; i++){
14723
+ _this.displayJson.pop(); //修改 displayJson
14724
+ }
14725
+ var resultNode;
14726
+ for (var i = 0; i <= index; i++){
14727
+ if (i == 0)
14728
+ resultNode = _this.cascadeJsonData[posIndexArr[0]];
14729
+ else {
14730
+ resultNode = resultNode[_this.keyMap.childs][posIndexArr[i]];
14731
+ }
14732
+ }
14733
+ _this.checkArrDeep(resultNode);
14734
+ //console.log(_this.displayJson);
14735
+ _this.reRenderWheels();
14736
+ _this.fixRowStyle();
14737
+ _this.setCurDistance(_this.resetPosition(index, posIndexArr));
14738
+ },
14739
+
14740
+ resetPosition: function(index, posIndexArr){
14741
+ var _this = this;
14742
+ var tempPosArr = posIndexArr;
14743
+ var tempCount;
14744
+ if(_this.slider.length > posIndexArr.length){
14745
+ tempCount = _this.slider.length - posIndexArr.length;
14746
+ for(var i=0; i<tempCount; i++){
14747
+ tempPosArr.push(0);
14748
+ }
14749
+ }else if(_this.slider.length < posIndexArr.length){
14750
+ tempCount = posIndexArr.length - _this.slider.length;
14751
+ for(var i=0; i<tempCount; i++){
14752
+ tempPosArr.pop();
14753
+ }
14754
+ }
14755
+ for(var i=index+1; i< tempPosArr.length; i++){
14756
+ tempPosArr[i] = 0;
14757
+ }
14758
+ return tempPosArr;
14759
+ },
14760
+ reRenderWheels: function(){
14761
+ var _this = this;
14762
+ //删除多余的wheel
14763
+ if(_this.wheel.length > _this.displayJson.length){
14764
+ var count = _this.wheel.length - _this.displayJson.length;
14765
+ for(var i=0; i<count; i++){
14766
+ _this.wheels.removeChild(_this.wheel[_this.wheel.length-1]);
14767
+ }
14768
+ }
14769
+ for(var i=0; i<_this.displayJson.length; i++){
14770
+ //列
14771
+ (function (i) {
14772
+ var tempHTML='';
14773
+ if(_this.wheel[i]){
14774
+ //console.log('插入Li');
14775
+ for(var j=0; j<_this.displayJson[i].length; j++){
14776
+ //行
14777
+ tempHTML += '<li data-id="'+_this.displayJson[i][j][_this.keyMap.id]+'">'+_this.displayJson[i][j][_this.keyMap.value]+'</li>';
14778
+ }
14779
+ _this.slider[i].innerHTML = tempHTML;
14780
+
14781
+ }else {
14782
+ var tempWheel = document.createElement("div");
14783
+ tempWheel.className = "wheel";
14784
+ tempHTML = '<ul class="selectContainer">';
14785
+ for(var j=0; j<_this.displayJson[i].length; j++){
14786
+ //行
14787
+ tempHTML += '<li data-id="'+_this.displayJson[i][j][_this.keyMap.id]+'">'+_this.displayJson[i][j][_this.keyMap.value]+'</li>';
14788
+ }
14789
+ tempHTML += '</ul>';
14790
+ tempWheel.innerHTML = tempHTML;
14791
+
14792
+ _this.addListenerWheel(tempWheel, i);
14793
+ _this.wheels.appendChild(tempWheel);
14794
+ }
14795
+ //_this.·(i);
14796
+ })(i);
14797
+ }
14798
+ },
14799
+
14800
+ updateWheels:function(data){
14801
+ var _this = this;
14802
+ if(_this.cascade){
14803
+ _this.cascadeJsonData = data;
14804
+ _this.displayJson = [];
14805
+ _this.initCascade();
14806
+ if(_this.initPosition.length < _this.slider.length){
14807
+ var diff = _this.slider.length - _this.initPosition.length;
14808
+ for(var i=0; i<diff; i++){
14809
+ _this.initPosition.push(0);
14810
+ }
14811
+ }
14812
+ _this.setCurDistance(_this.initPosition);
14813
+ _this.fixRowStyle();
14814
+ }
14815
+ },
14816
+
14817
+ updateWheel: function(sliderIndex, data){
14818
+ var _this = this;
14819
+ var tempHTML='';
14820
+ if(_this.cascade){
14821
+ console.error('级联格式不支持updateWheel(),请使用updateWheels()更新整个数据源');
14822
+ return false;
14823
+ }
14824
+ else if(_this.jsonType){
14825
+ for(var j=0; j<data.length; j++){
14826
+ tempHTML += '<li data-id="'+data[j][_this.keyMap.id]+'">'+data[j][_this.keyMap.value]+'</li>';
14827
+ }
14828
+ _this.wheelsData[sliderIndex] = {data: data};
14829
+ }else {
14830
+ for(var j=0; j<data.length; j++){
14831
+ tempHTML += '<li>'+data[j]+'</li>';
14832
+ }
14833
+ _this.wheelsData[sliderIndex] = data;
14834
+ }
14835
+ _this.slider[sliderIndex].innerHTML = tempHTML;
14836
+ },
14837
+
14838
+ fixRowStyle: function(){
14839
+ var _this = this;
14840
+ var width = (100/_this.wheel.length).toFixed(2);
14841
+ for(var i=0; i<_this.wheel.length; i++){
14842
+ _this.wheel[i].style.width = width+'%';
14843
+ }
14844
+ },
14845
+
14846
+ getIndex: function(distance){
14847
+ return Math.round((2*this.liHeight-distance)/this.liHeight);
14848
+ },
14849
+
14850
+ getIndexArr: function(){
14851
+ var _this = this;
14852
+ var temp = [];
14853
+ for(var i=0; i<_this.curDistance.length; i++){
14854
+ temp.push(_this.getIndex(_this.curDistance[i]));
14855
+ }
14856
+ return temp;
14857
+ },
14858
+
14859
+ getCurValue: function(){
14860
+ var _this = this;
14861
+ var temp = [];
14862
+ var positionArr = _this.getIndexArr();
14863
+ if(_this.cascade){
14864
+ for(var i=0; i<_this.wheel.length; i++){
14865
+ temp.push(_this.displayJson[i][positionArr[i]]);
14866
+ }
14867
+ }
14868
+ else if(_this.jsonType){
14869
+ for(var i=0; i<_this.curDistance.length; i++){
14870
+ temp.push(_this.wheelsData[i].data[_this.getIndex(_this.curDistance[i])]);
14871
+ }
14872
+ }else {
14873
+ for(var i=0; i<_this.curDistance.length; i++){
14874
+ temp.push(_this.getInnerHtml(i));
14875
+ }
14876
+ }
14877
+ return temp;
14878
+ },
14879
+
14880
+ getValue: function(){
14881
+ return this.curValue;
14882
+ },
14883
+
14884
+ calcDistance: function(index){
14885
+ return 2*this.liHeight-index*this.liHeight;
14886
+ },
14887
+
14888
+ setCurDistance: function(indexArr){
14889
+ var _this = this;
14890
+ var temp = [];
14891
+ for(var i=0; i<_this.slider.length; i++){
14892
+ temp.push(_this.calcDistance(indexArr[i]));
14893
+ _this.movePosition(_this.slider[i],temp[i]);
14894
+ }
14895
+ _this.curDistance = temp;
14896
+ },
14897
+
14898
+ fixPosition: function(distance){
14899
+ return -(this.getIndex(distance)-2)*this.liHeight;
14900
+ },
14901
+
14902
+ movePosition: function(theSlider, distance){
14903
+ theSlider.style.webkitTransform = 'translate3d(0,' + distance + 'px, 0)';
14904
+ theSlider.style.transform = 'translate3d(0,' + distance + 'px, 0)';
14905
+ },
14906
+
14907
+ locatePosition: function(index, posIndex){
14908
+ var _this = this;
14909
+ this.curDistance[index] = this.calcDistance(posIndex);
14910
+ this.movePosition(this.slider[index],this.curDistance[index]);
14911
+ if(_this.cascade){
14912
+ _this.checkRange(index, _this.getIndexArr());
14913
+ }
14914
+ },
14915
+
14916
+ updateCurDistance: function(theSlider, index){
14917
+ if(theSlider.style.transform){
14918
+ this.curDistance[index] = parseInt(theSlider.style.transform.split(',')[1]);
14919
+ }else {
14920
+ this.curDistance[index] = parseInt(theSlider.style.webkitTransform.split(',')[1]);
14921
+ }
14922
+ },
14923
+
14924
+ getDistance:function(theSlider){
14925
+ if(theSlider.style.transform){
14926
+ return parseInt(theSlider.style.transform.split(',')[1]);
14927
+ }else {
14928
+ return parseInt(theSlider.style.webkitTransform.split(',')[1]);
14929
+ }
14930
+ },
14931
+
14932
+ getInnerHtml: function(sliderIndex){
14933
+ var _this = this;
14934
+ var index = _this.getIndex(_this.curDistance[sliderIndex]);
14935
+ return _this.slider[sliderIndex].getElementsByTagName('li')[index].innerHTML;
14936
+ },
14937
+
14938
+ touch: function(event, theSlider, index){
14939
+ var _this = this;
14940
+ event = event || window.event;
14941
+ switch(event.type){
14942
+ case "touchstart":
14943
+ _this.startY = event.touches[0].clientY;
14944
+ _this.startY = parseInt(_this.startY);
14945
+ _this.oldMoveY = _this.startY;
14946
+ break;
14947
+
14948
+ case "touchend":
14949
+
14950
+ _this.moveEndY = parseInt(event.changedTouches[0].clientY);
14951
+ _this.offsetSum = _this.moveEndY - _this.startY;
14952
+ _this.oversizeBorder = -(theSlider.getElementsByTagName('li').length-3)*_this.liHeight;
14953
+
14954
+ if(_this.offsetSum == 0){
14955
+ //offsetSum为0,相当于点击事件
14956
+ // 0 1 [2] 3 4
14957
+ var clickOffetNum = parseInt((document.documentElement.clientHeight - _this.moveEndY)/40);
14958
+ if(clickOffetNum!=2){
14959
+ var offset = clickOffetNum - 2;
14960
+ var newDistance = _this.curDistance[index] + (offset*_this.liHeight);
14961
+ if((newDistance <= 2*_this.liHeight) && (newDistance >= _this.oversizeBorder) ){
14962
+ _this.curDistance[index] = newDistance;
14963
+ _this.movePosition(theSlider, _this.curDistance[index]);
14964
+ _this.transitionEnd(_this.getIndexArr(),_this.getCurValue());
14965
+ }
14966
+ }
14967
+ }else {
14968
+ //修正位置
14969
+ _this.updateCurDistance(theSlider, index);
14970
+ _this.curDistance[index] = _this.fixPosition(_this.curDistance[index]);
14971
+ _this.movePosition(theSlider, _this.curDistance[index]);
14972
+
14973
+ //反弹
14974
+ if(_this.curDistance[index] + _this.offsetSum > 2*_this.liHeight){
14975
+ _this.curDistance[index] = 2*_this.liHeight;
14976
+ setTimeout(function(){
14977
+ _this.movePosition(theSlider, _this.curDistance[index]);
14978
+ }, 100);
14979
+
14980
+ }else if(_this.curDistance[index] + _this.offsetSum < _this.oversizeBorder){
14981
+ _this.curDistance[index] = _this.oversizeBorder;
14982
+ setTimeout(function(){
14983
+ _this.movePosition(theSlider, _this.curDistance[index]);
14984
+ }, 100);
14985
+ }
14986
+ _this.transitionEnd(_this.getIndexArr(),_this.getCurValue());
14987
+ }
14988
+
14989
+ if(_this.cascade){
14990
+ _this.checkRange(index, _this.getIndexArr());
14991
+ }
14992
+
14993
+ break;
14994
+
14995
+ case "touchmove":
14996
+ event.preventDefault();
14997
+ _this.moveY = event.touches[0].clientY;
14998
+ _this.offset = _this.moveY - _this.oldMoveY;
14999
+
15000
+ _this.updateCurDistance(theSlider, index);
15001
+ _this.curDistance[index] = _this.curDistance[index] + _this.offset;
15002
+ _this.movePosition(theSlider, _this.curDistance[index]);
15003
+ _this.oldMoveY = _this.moveY;
15004
+ break;
15005
+ }
15006
+ },
15007
+
15008
+ dragClick: function(event, theSlider, index){
15009
+ var _this = this;
15010
+ event = event || window.event;
15011
+ switch(event.type){
15012
+ case "mousedown":
15013
+ _this.startY = event.clientY;
15014
+ _this.oldMoveY = _this.startY;
15015
+ _this.clickStatus = true;
15016
+ break;
15017
+
15018
+ case "mouseup":
15019
+
15020
+ _this.moveEndY = event.clientY;
15021
+ _this.offsetSum = _this.moveEndY - _this.startY;
15022
+ _this.oversizeBorder = -(theSlider.getElementsByTagName('li').length-3)*_this.liHeight;
15023
+
15024
+ if(_this.offsetSum == 0){
15025
+ var clickOffetNum = parseInt((document.documentElement.clientHeight - _this.moveEndY)/40);
15026
+ if(clickOffetNum!=2){
15027
+ var offset = clickOffetNum - 2;
15028
+ var newDistance = _this.curDistance[index] + (offset*_this.liHeight);
15029
+ if((newDistance <= 2*_this.liHeight) && (newDistance >= _this.oversizeBorder) ){
15030
+ _this.curDistance[index] = newDistance;
15031
+ _this.movePosition(theSlider, _this.curDistance[index]);
15032
+ _this.transitionEnd(_this.getIndexArr(),_this.getCurValue());
15033
+ }
15034
+ }
15035
+ }else {
15036
+ //修正位置
15037
+ _this.updateCurDistance(theSlider, index);
15038
+ _this.curDistance[index] = _this.fixPosition(_this.curDistance[index]);
15039
+ _this.movePosition(theSlider, _this.curDistance[index]);
15040
+
15041
+ //反弹
15042
+ if(_this.curDistance[index] + _this.offsetSum > 2*_this.liHeight){
15043
+ _this.curDistance[index] = 2*_this.liHeight;
15044
+ setTimeout(function(){
15045
+ _this.movePosition(theSlider, _this.curDistance[index]);
15046
+ }, 100);
15047
+
15048
+ }else if(_this.curDistance[index] + _this.offsetSum < _this.oversizeBorder){
15049
+ _this.curDistance[index] = _this.oversizeBorder;
15050
+ setTimeout(function(){
15051
+ _this.movePosition(theSlider, _this.curDistance[index]);
15052
+ }, 100);
15053
+ }
15054
+ _this.transitionEnd(_this.getIndexArr(),_this.getCurValue());
15055
+
15056
+ }
15057
+
15058
+ _this.clickStatus = false;
15059
+ if(_this.cascade){
15060
+ _this.checkRange(index, _this.getIndexArr());
15061
+ }
15062
+ break;
15063
+
15064
+ case "mousemove":
15065
+ event.preventDefault();
15066
+ if(_this.clickStatus){
15067
+ _this.moveY = event.clientY;
15068
+ _this.offset = _this.moveY - _this.oldMoveY;
15069
+ _this.updateCurDistance(theSlider, index);
15070
+ _this.curDistance[index] = _this.curDistance[index] + _this.offset;
15071
+ _this.movePosition(theSlider, _this.curDistance[index]);
15072
+ _this.oldMoveY = _this.moveY;
15073
+ }
15074
+ break;
15075
+ }
15076
+ }
15077
+
15078
+ };
15079
+
15080
+ {
15081
+ module.exports = MobileSelect;
15082
+ }
15083
+ })();
15084
+ });
15085
+
15086
+ const ptcMobileSelectCss = ".mobileSelect{position:relative;z-index:0;opacity:0;visibility:hidden;-webkit-transition:opacity 0.4s, z-index 0.4s;transition:opacity 0.4s, z-index 0.4s}.mobileSelect *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.mobileSelect .grayLayer{position:fixed;top:0;left:0;bottom:0;right:0;background:#eee;background:rgba(0, 0, 0, 0.7);z-index:888;display:block}.mobileSelect .content{width:100%;display:block;position:fixed;z-index:889;color:black;-webkit-transition:all 0.4s;transition:all 0.4s;bottom:-350px;left:0;background:white}.mobileSelect .content .fixWidth{width:90%;margin:0 auto;position:relative}.mobileSelect .content .fixWidth:after{content:\".\";display:block;height:0;clear:both;visibility:hidden}.mobileSelect .content .btnBar{border-bottom:1px solid #DCDCDC;font-size:15px;height:45px;position:relative;text-align:center;line-height:45px}.mobileSelect .content .btnBar .cancel,.mobileSelect .content .btnBar .ensure{height:45px;width:55px;cursor:pointer;position:absolute;top:0}.mobileSelect .content .btnBar .cancel{left:0;color:#666}.mobileSelect .content .btnBar .ensure{right:0;color:#1e83d3}.mobileSelect .content .btnBar .title{font-size:15px;padding:0 15%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mobileSelect .content .panel:after{content:\".\";display:block;height:0;clear:both;visibility:hidden}.mobileSelect .content .panel .wheels{width:100%;height:200px;overflow:hidden}.mobileSelect .content .panel .wheel{position:relative;z-index:0;float:left;width:50%;height:200px;overflow:hidden;-webkit-transition:width 0.3s ease;transition:width 0.3s ease}.mobileSelect .content .panel .wheel .selectContainer{display:block;text-align:center;-webkit-transition:-webkit-transform 0.18s ease-out;transition:-webkit-transform 0.18s ease-out;transition:transform 0.18s ease-out;transition:transform 0.18s ease-out, -webkit-transform 0.18s ease-out}.mobileSelect .content .panel .wheel .selectContainer li{font-size:15px;display:block;height:40px;line-height:40px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mobileSelect .content .panel .selectLine{height:40px;width:100%;position:absolute;top:80px;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #DCDCDC;border-bottom:1px solid #DCDCDC}.mobileSelect .content .panel .shadowMask{position:absolute;top:0;width:100%;height:200px;background:-webkit-gradient(linear, left top, left bottom, from(#ffffff), color-stop(rgba(255, 255, 255, 0)), to(#ffffff));background:-webkit-linear-gradient(top, #ffffff, rgba(255, 255, 255, 0), #ffffff);background:linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0), #ffffff);opacity:0.9;pointer-events:none}.mobileSelect-show{opacity:1;z-index:10000;visibility:visible}.mobileSelect-show .content{bottom:0}.mobile-select-wrapper{display:block}.mobile-select-wrapper div{display:inline;margin-right:10px;width:100%;font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-regular);font-size:var(--ptc-font-size-15);line-height:var(--ptc-line-height-18);color:var(--color-white);height:var(--ptc-line-height-18)}.mobileSelect .content{top:auto}.mobileSelect .content .btnBar{border-color:var(--color-gray-10)}.mobileSelect .content .btnBar .cancel,.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .title{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-medium);line-height:var(--ptc-line-height-19)}.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .cancel{transform:translateY(12.5px)}.mobileSelect .content .panel .wheel .selectContainer li{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-medium);line-height:var(--ptc-line-height-19);height:45px}ptc-responsive-wrapper.xsmall .mobile-select-wrapper,ptc-responsive-wrapper.small .mobile-select-wrapper{display:block}ptc-responsive-wrapper.medium .mobile-select-wrapper,ptc-responsive-wrapper.large .mobile-select-wrapper,ptc-responsive-wrapper.xlarge .mobile-select-wrapper,ptc-responsive-wrapper.xxlarge .mobile-select-wrapper,ptc-responsive-wrapper.large2k .mobile-select-wrapper,ptc-responsive-wrapper.large4k .mobile-select-wrapper{display:none}";
15087
+
15088
+ let PtcMobileSelect$1 = class extends HTMLElement$1 {
15089
+ constructor() {
15090
+ super();
15091
+ this.__registerHost();
15092
+ /**
15093
+ * Confirm Text
15094
+ */
15095
+ this.ensureBtnText = 'Confirm';
15096
+ /**
15097
+ * Cancel Text
15098
+ */
15099
+ this.cancelBtnText = 'Cancel';
15100
+ /**
15101
+ * Mobile select list title (Optional)
15102
+ */
15103
+ this.listTitle = undefined;
15104
+ }
15105
+ render() {
15106
+ return (h("ptc-responsive-wrapper", null, h("div", { class: "mobile-select-wrapper" }, h("div", { id: this.triggerName }, this.linkText), h("icon-asset", { type: "ptc", size: "x-small", name: "chevron-down", color: "white" }))));
15107
+ }
15108
+ componentDidRender() {
15109
+ new mobileSelect({
15110
+ trigger: `#${this.triggerName}`,
15111
+ title: `${this.listTitle ? this.listTitle : ''}`,
15112
+ wheels: this.wheelData ? [{ data: this.wheelData }] : [{ data: ["test1", 'test2'] }],
15113
+ position: [0],
15114
+ ensureBtnText: this.ensureBtnText,
15115
+ cancelBtnText: this.cancelBtnText,
15116
+ ensureBtnColor: 'var(--color-gray-12)',
15117
+ cancelBtnColor: 'var(--color-gray-12)',
15118
+ titleColor: 'var(--color-gray-12)',
15119
+ });
15120
+ }
15121
+ static get style() { return ptcMobileSelectCss; }
15122
+ };
15123
+
14372
15124
  const ptcModalCss = ":host{display:block}.wrapper{position:absolute;width:100vw;height:100%;top:0;left:0;z-index:3000;display:none}.wrapper .modal-popup{margin:7.5rem auto 1rem;background-color:var(--color-white);box-shadow:0px 8px 12px rgba(0, 0, 0, 0.36);max-width:22.5625rem;width:80%;display:flex;flex-direction:column;align-items:flex-end;align-content:flex-end;z-index:3020;transform:translateY(-100%)}@media screen and (min-width: 992px){.wrapper .modal-popup{max-width:29.125rem}}.wrapper .modal-popup.md{max-width:44.125rem}.wrapper .modal-popup.lg{max-width:56.25rem}.wrapper .modal-popup.xl{max-width:64.0625rem}.wrapper .modal-popup .modal-body{width:100%}.wrapper .modal-popup .modal-body iframe{opacity:0;overflow:hidden;width:100%;border:0;transition:opacity ease-out 250ms}.wrapper .modal-popup .modal-body iframe.ready{opacity:1}.wrapper .modal-popup .modal-body.frame{overflow:hidden}.wrapper .modal-popup .modal-body.html{overflow:hidden}.wrapper .modal-popup .close{margin-right:0.75rem;margin-top:0.75rem}.wrapper.show{display:flex;align-items:flex-start}.wrapper.show .modal-popup{transform:translateY(0)}.overlay{width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:3010;display:block;background-color:rgba(0, 0, 0, 0.6)}";
14373
15125
 
14374
15126
  let PtcModal$1 = class extends HTMLElement$1 {
@@ -14815,6 +15567,66 @@ let PtcPicture$1 = class extends HTMLElement$1 {
14815
15567
  static get style() { return ptcPictureCss; }
14816
15568
  };
14817
15569
 
15570
+ const ptcResponsiveWrapperCss = ":host{display:block}";
15571
+
15572
+ let PtcResponsiveWrapper$1 = class extends HTMLElement$1 {
15573
+ constructor() {
15574
+ super();
15575
+ this.__registerHost();
15576
+ this.__attachShadow();
15577
+ }
15578
+ componentDidLoad() {
15579
+ this.ro = new ResizeObserver(entries => {
15580
+ for (const entry of entries) {
15581
+ this.applySizeClasses(entry.contentRect.width);
15582
+ }
15583
+ });
15584
+ this.ro.observe(this.element);
15585
+ }
15586
+ disconnectedCallback() {
15587
+ this.ro.disconnect();
15588
+ }
15589
+ applySizeClasses(size) {
15590
+ let xsmall = false;
15591
+ let small = false;
15592
+ let medium = false;
15593
+ let large = false;
15594
+ let xlarge = false;
15595
+ let xxlarge = false;
15596
+ let large2k = false;
15597
+ let large4k = false;
15598
+ if (size >= 2600)
15599
+ large4k = true;
15600
+ else if (size >= 1980)
15601
+ large2k = true;
15602
+ else if (size >= 1600)
15603
+ xxlarge = true;
15604
+ else if (size >= 1440)
15605
+ xlarge = true;
15606
+ else if (size >= 1200)
15607
+ large = true;
15608
+ else if (size >= 992)
15609
+ medium = true;
15610
+ else if (size >= 768)
15611
+ small = true;
15612
+ else
15613
+ xsmall = true;
15614
+ this.element.classList.toggle("xsmall", xsmall);
15615
+ this.element.classList.toggle("small", small);
15616
+ this.element.classList.toggle("medium", medium);
15617
+ this.element.classList.toggle("large", large);
15618
+ this.element.classList.toggle("xlarge", xlarge);
15619
+ this.element.classList.toggle("xxlarge", xxlarge);
15620
+ this.element.classList.toggle("large2k", large2k);
15621
+ this.element.classList.toggle("large4k", large4k);
15622
+ }
15623
+ render() {
15624
+ return (h("div", null, h("slot", null)));
15625
+ }
15626
+ get element() { return this; }
15627
+ static get style() { return ptcResponsiveWrapperCss; }
15628
+ };
15629
+
14818
15630
  const ptcSelectCss = ".sc-ptc-select-h{display:block}.ptc-select.sc-ptc-select{display:block;width:100%;padding:6px 12px;border:none;border-bottom:1px solid #3b4550;padding-left:20px;-webkit-box-shadow:1px 1px 25px 0 rgba(0, 0, 0, 0.16);box-shadow:1px 1px 25px 0 rgba(0, 0, 0, 0.16);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:0;border-bottom-right-radius:0;font-size:16px;color:#707070;padding-top:14px;background:#fff}";
14819
15631
 
14820
15632
  let PtcSelect$1 = class extends HTMLElement$1 {
@@ -15036,7 +15848,7 @@ const arrowSvgRight = `<svg width="48" height="48" viewBox="0 0 48 48" fill="non
15036
15848
  </svg>
15037
15849
  `;
15038
15850
 
15039
- const ptcSvgBtnCss = ":host{cursor:pointer}:host(.block){display:block}:host(.inline){display:inline}:host(.inline-block){display:inline-block}:host(.flex){display:flex}.svg-close svg .cls-1,.svg-close svg .cls-2{fill:none;stroke-width:2px}.svg-close svg .cls-1{stroke:#40434A;stroke-linecap:square}.svg-close svg .cls-2{stroke:#40434A}.svg-close svg path{-webkit-transition:all 0.25s ease-in-out;-o-transition:all ease-in-out 0.25s;transition:all 0.25s ease-in-out}.svg-close svg .cls-1:first-child{-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close svg .cls-1:nth-child(2){-webkit-transform:translate(175.5px, 174.985px);-ms-transform:translate(175.5px, 174.985px);transform:translate(175.5px, 174.985px)}.svg-close svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 141.393px);-ms-transform:translate(215.5px, 141.393px);transform:translate(215.5px, 141.393px)}.svg-close svg .cls-1:nth-child(4){-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close:hover svg .cls-1:first-child{-webkit-transform:translate(175.5px, 162px);-ms-transform:translate(175.5px, 162px);transform:translate(175.5px, 162px)}.svg-close:hover svg .cls-1:nth-child(2){-webkit-transform:translate(149px, 174.985px);-ms-transform:translate(149px, 174.985px);transform:translate(149px, 174.985px)}.svg-close:hover svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 174px);-ms-transform:translate(215.5px, 174px);transform:translate(215.5px, 174px)}.svg-close:hover svg .cls-1:nth-child(4){-webkit-transform:translate(152.5px, 135.5px);-ms-transform:translate(152.5px, 135.5px);transform:translate(152.5px, 135.5px)}.svg-close.svg-close-white .cls-1{stroke:#fff}.slider-left,.slider-right{transition:all var(--ptc-transition-medium) var(--ptc-standard-ease)}.slider-left svg .arrow,.slider-right svg .arrow{fill:var(--color-primary-grey)}.slider-left:hover svg .arrow,.slider-right:hover svg .arrow{fill:var(--color-green-06)}";
15851
+ const ptcSvgBtnCss = ":host{cursor:pointer}:host(.block){display:block}:host(.inline){display:inline}:host(.inline-block){display:inline-block}:host(.flex){display:flex}:host(:focus-visible){outline:none}:focus-visible{outline:none}.svg-close svg .cls-1,.svg-close svg .cls-2{fill:none;stroke-width:2px}.svg-close svg .cls-1{stroke:#40434A;stroke-linecap:square}.svg-close svg .cls-2{stroke:#40434A}.svg-close svg path{-webkit-transition:all 0.25s ease-in-out;-o-transition:all ease-in-out 0.25s;transition:all 0.25s ease-in-out}.svg-close svg .cls-1:first-child{-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close svg .cls-1:nth-child(2){-webkit-transform:translate(175.5px, 174.985px);-ms-transform:translate(175.5px, 174.985px);transform:translate(175.5px, 174.985px)}.svg-close svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 141.393px);-ms-transform:translate(215.5px, 141.393px);transform:translate(215.5px, 141.393px)}.svg-close svg .cls-1:nth-child(4){-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close:hover svg .cls-1:first-child{-webkit-transform:translate(175.5px, 162px);-ms-transform:translate(175.5px, 162px);transform:translate(175.5px, 162px)}.svg-close:hover svg .cls-1:nth-child(2){-webkit-transform:translate(149px, 174.985px);-ms-transform:translate(149px, 174.985px);transform:translate(149px, 174.985px)}.svg-close:hover svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 174px);-ms-transform:translate(215.5px, 174px);transform:translate(215.5px, 174px)}.svg-close:hover svg .cls-1:nth-child(4){-webkit-transform:translate(152.5px, 135.5px);-ms-transform:translate(152.5px, 135.5px);transform:translate(152.5px, 135.5px)}.svg-close.svg-close-white .cls-1{stroke:#fff}.slider-left,.slider-right{transition:all var(--ptc-transition-medium) var(--ptc-standard-ease)}.slider-left svg .arrow,.slider-right svg .arrow{fill:var(--color-primary-grey)}.slider-left:hover svg .arrow,.slider-right:hover svg .arrow{fill:var(--color-green-06)}";
15040
15852
 
15041
15853
  let PtcSvgBtn$1 = class extends HTMLElement$1 {
15042
15854
  constructor() {
@@ -15130,12 +15942,14 @@ const PtcInput = /*@__PURE__*/proxyCustomElement(PtcInput$1, [6,"ptc-input",{"ty
15130
15942
  const PtcLink = /*@__PURE__*/proxyCustomElement(PtcLink$1, [1,"ptc-link",{"disabled":[516],"external":[516],"href":[1],"target":[1],"linkTitle":[1,"link-title"],"theme":[1],"uppercase":[4],"fontSize":[1,"font-size"]}]);
15131
15943
  const PtcList = /*@__PURE__*/proxyCustomElement(PtcList$1, [2,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]);
15132
15944
  const PtcLottie = /*@__PURE__*/proxyCustomElement(PtcLottie$1, [1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]);
15945
+ const PtcMobileSelect = /*@__PURE__*/proxyCustomElement(PtcMobileSelect$1, [0,"ptc-mobile-select",{"triggerName":[1,"trigger-name"],"linkText":[1,"link-text"],"ensureBtnText":[1,"ensure-btn-text"],"cancelBtnText":[1,"cancel-btn-text"],"listTitle":[1,"list-title"],"wheelData":[1040]}]);
15133
15946
  const PtcModal = /*@__PURE__*/proxyCustomElement(PtcModal$1, [1,"ptc-modal",{"iframeUrl":[1025,"iframe-url"],"size":[1025],"show":[1028],"overlay":[1028],"closeOnBlur":[1028,"close-on-blur"],"overlayHeight":[32],"bodyOverflowSetting":[32]}]);
15134
15947
  const PtcNav = /*@__PURE__*/proxyCustomElement(PtcNav$1, [1,"ptc-nav"]);
15135
15948
  const PtcNavItem = /*@__PURE__*/proxyCustomElement(PtcNavItem$1, [1,"ptc-nav-item",{"url":[1025],"label":[1025],"ariaExpanded":[1028,"aria-expanded"],"depth":[1538],"hasChildren":[1028,"has-children"],"parentExpanded":[1540,"parent-expanded"],"navType":[1,"nav-type"]},[[0,"handleClick","handleClick"],[9,"resize","handleResize"]]]);
15136
15949
  const PtcOverlay = /*@__PURE__*/proxyCustomElement(PtcOverlay$1, [1,"ptc-overlay",{"filterColor":[1,"filter-color"],"borderRadius":[1,"border-radius"],"overlayZIndex":[1,"overlay-z-index"],"styles":[1]}]);
15137
15950
  const PtcPara = /*@__PURE__*/proxyCustomElement(PtcPara$1, [1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraColor":[1,"para-color"],"paraLineH":[1,"para-line-h"],"paraMargin":[1,"para-margin"]}]);
15138
15951
  const PtcPicture = /*@__PURE__*/proxyCustomElement(PtcPicture$1, [1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imagePosition":[1,"image-position"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"isFullHeight":[4,"is-full-height"],"isFullWidth":[4,"is-full-width"],"styles":[1],"oldSrc":[32]},[[9,"resize","WindowResize"]]]);
15952
+ const PtcResponsiveWrapper = /*@__PURE__*/proxyCustomElement(PtcResponsiveWrapper$1, [1,"ptc-responsive-wrapper"]);
15139
15953
  const PtcSelect = /*@__PURE__*/proxyCustomElement(PtcSelect$1, [6,"ptc-select",{"dataEloquaName":[1,"data-eloqua-name"],"selectId":[1,"select-id"],"name":[1],"valueOptions":[1040]}]);
15140
15954
  const PtcSocialShare = /*@__PURE__*/proxyCustomElement(PtcSocialShare$1, [1,"ptc-social-share",{"display":[1],"shareType":[1,"share-type"],"shareTitle":[1,"share-title"],"text":[1],"url":[1],"source":[1],"recipient":[1],"isHover":[32]}]);
15141
15955
  const PtcSpacer = /*@__PURE__*/proxyCustomElement(PtcSpacer$1, [1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]);
@@ -15166,12 +15980,14 @@ const defineCustomElements = (opts) => {
15166
15980
  PtcLink,
15167
15981
  PtcList,
15168
15982
  PtcLottie,
15983
+ PtcMobileSelect,
15169
15984
  PtcModal,
15170
15985
  PtcNav,
15171
15986
  PtcNavItem,
15172
15987
  PtcOverlay,
15173
15988
  PtcPara,
15174
15989
  PtcPicture,
15990
+ PtcResponsiveWrapper,
15175
15991
  PtcSelect,
15176
15992
  PtcSocialShare,
15177
15993
  PtcSpacer,
@@ -15186,4 +16002,4 @@ const defineCustomElements = (opts) => {
15186
16002
  }
15187
16003
  };
15188
16004
 
15189
- export { IconAsset, ListItem, LottiePlayer, MyComponent, PtcAnnouncement, PtcBreadcrumb, PtcButton, PtcCard, PtcCardBottom, PtcCardContent, PtcCardPlm, PtcCountdown, PtcDate, PtcFooter, PtcForm, PtcHero, PtcImg, PtcInput, PtcLink, PtcList, PtcLottie, PtcModal, PtcNav, PtcNavItem, PtcOverlay, PtcPara, PtcPicture, PtcSelect, PtcSocialShare, PtcSpacer, PtcSpan, PtcSvgBtn, PtcTitle, defineCustomElements };
16005
+ export { IconAsset, ListItem, LottiePlayer, MyComponent, PtcAnnouncement, PtcBreadcrumb, PtcButton, PtcCard, PtcCardBottom, PtcCardContent, PtcCardPlm, PtcCountdown, PtcDate, PtcFooter, PtcForm, PtcHero, PtcImg, PtcInput, PtcLink, PtcList, PtcLottie, PtcMobileSelect, PtcModal, PtcNav, PtcNavItem, PtcOverlay, PtcPara, PtcPicture, PtcResponsiveWrapper, PtcSelect, PtcSocialShare, PtcSpacer, PtcSpan, PtcSvgBtn, PtcTitle, defineCustomElements };