@pairbo/ui-kit 0.2.4 → 0.2.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/dist/pairbo.es.js CHANGED
@@ -627,7 +627,7 @@ function r$2(r3) {
627
627
  return (this.renderRoot ?? (e$4 ?? (e$4 = document.createDocumentFragment()))).querySelectorAll(r3);
628
628
  } });
629
629
  }
630
- const styles$j = i$7`
630
+ const styles$l = i$7`
631
631
  :host {
632
632
  display: block;
633
633
  font-family: Arial, sans-serif;
@@ -640,9 +640,9 @@ const styles$j = i$7`
640
640
  color: black;
641
641
  }
642
642
  `;
643
- var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
644
- var __decorateClass$k = (decorators, target, key, kind) => {
645
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
643
+ var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
644
+ var __decorateClass$m = (decorators, target, key, kind) => {
645
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
646
646
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
647
647
  if (decorator = decorators[i3])
648
648
  result = decorator(result) || result;
@@ -748,7 +748,7 @@ let PairboMessageSelector = class extends r$5 {
748
748
  }
749
749
  };
750
750
  PairboMessageSelector.styles = [
751
- styles$j,
751
+ styles$l,
752
752
  i$7`
753
753
  .message-selector {
754
754
  text-align: left;
@@ -781,7 +781,7 @@ PairboMessageSelector.properties = {
781
781
  premiumSelected: { type: Boolean },
782
782
  freeMessageSelected: { type: Boolean }
783
783
  };
784
- PairboMessageSelector = __decorateClass$k([
784
+ PairboMessageSelector = __decorateClass$m([
785
785
  t$3("pairbo-message-selector")
786
786
  ], PairboMessageSelector);
787
787
  function t$2(t2, e3, s2) {
@@ -7495,7 +7495,7 @@ const componentStyles = i$7`
7495
7495
  display: none !important;
7496
7496
  }
7497
7497
  `;
7498
- const styles$i = i$7`
7498
+ const styles$k = i$7`
7499
7499
  :host {
7500
7500
  display: block;
7501
7501
  }
@@ -7518,14 +7518,14 @@ const styles$i = i$7`
7518
7518
  object-fit: contain;
7519
7519
  }
7520
7520
  `;
7521
- var __defProp$j = Object.defineProperty;
7522
- var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
7523
- var __decorateClass$j = (decorators, target, key, kind) => {
7524
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
7521
+ var __defProp$k = Object.defineProperty;
7522
+ var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
7523
+ var __decorateClass$l = (decorators, target, key, kind) => {
7524
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
7525
7525
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
7526
7526
  if (decorator = decorators[i3])
7527
7527
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7528
- if (kind && result) __defProp$j(target, key, result);
7528
+ if (kind && result) __defProp$k(target, key, result);
7529
7529
  return result;
7530
7530
  };
7531
7531
  let FabricExample = class extends r$5 {
@@ -7753,68 +7753,68 @@ let FabricExample = class extends r$5 {
7753
7753
  </div>`;
7754
7754
  }
7755
7755
  };
7756
- FabricExample.styles = [componentStyles, styles$i];
7757
- __decorateClass$j([
7756
+ FabricExample.styles = [componentStyles, styles$k];
7757
+ __decorateClass$l([
7758
7758
  n$3()
7759
7759
  ], FabricExample.prototype, "backgroundUrl", 2);
7760
- __decorateClass$j([
7760
+ __decorateClass$l([
7761
7761
  n$3()
7762
7762
  ], FabricExample.prototype, "message", 2);
7763
- __decorateClass$j([
7763
+ __decorateClass$l([
7764
7764
  n$3({ type: String, reflect: true })
7765
7765
  ], FabricExample.prototype, "alignment", 2);
7766
- __decorateClass$j([
7766
+ __decorateClass$l([
7767
7767
  n$3({ type: String })
7768
7768
  ], FabricExample.prototype, "fontFamily", 2);
7769
- __decorateClass$j([
7769
+ __decorateClass$l([
7770
7770
  n$3({ type: String })
7771
7771
  ], FabricExample.prototype, "color", 2);
7772
- __decorateClass$j([
7772
+ __decorateClass$l([
7773
7773
  e$5(".fabric-container")
7774
7774
  ], FabricExample.prototype, "_fabricContainer", 2);
7775
- __decorateClass$j([
7775
+ __decorateClass$l([
7776
7776
  r$3()
7777
7777
  ], FabricExample.prototype, "_canvas", 2);
7778
- __decorateClass$j([
7778
+ __decorateClass$l([
7779
7779
  r$3()
7780
7780
  ], FabricExample.prototype, "_canvasElement", 2);
7781
- __decorateClass$j([
7781
+ __decorateClass$l([
7782
7782
  r$3()
7783
7783
  ], FabricExample.prototype, "_textbox", 2);
7784
- __decorateClass$j([
7784
+ __decorateClass$l([
7785
7785
  r$3()
7786
7786
  ], FabricExample.prototype, "_backgroundImg", 2);
7787
- __decorateClass$j([
7787
+ __decorateClass$l([
7788
7788
  r$3()
7789
7789
  ], FabricExample.prototype, "_natureSize", 2);
7790
- __decorateClass$j([
7790
+ __decorateClass$l([
7791
7791
  r$3()
7792
7792
  ], FabricExample.prototype, "_scale", 2);
7793
- __decorateClass$j([
7793
+ __decorateClass$l([
7794
7794
  r$3()
7795
7795
  ], FabricExample.prototype, "_lineHeight", 2);
7796
- __decorateClass$j([
7796
+ __decorateClass$l([
7797
7797
  r$3()
7798
7798
  ], FabricExample.prototype, "_fontSize", 2);
7799
- __decorateClass$j([
7799
+ __decorateClass$l([
7800
7800
  r$3()
7801
7801
  ], FabricExample.prototype, "_rect", 2);
7802
- __decorateClass$j([
7802
+ __decorateClass$l([
7803
7803
  watch("message")
7804
7804
  ], FabricExample.prototype, "handleMessageChange", 1);
7805
- __decorateClass$j([
7805
+ __decorateClass$l([
7806
7806
  watch("alignment")
7807
7807
  ], FabricExample.prototype, "handleAlignmentChange", 1);
7808
- __decorateClass$j([
7808
+ __decorateClass$l([
7809
7809
  watch("fontFamily")
7810
7810
  ], FabricExample.prototype, "handleFontFamilyChange", 1);
7811
- __decorateClass$j([
7811
+ __decorateClass$l([
7812
7812
  watch("color")
7813
7813
  ], FabricExample.prototype, "handleColorChange", 1);
7814
- FabricExample = __decorateClass$j([
7814
+ FabricExample = __decorateClass$l([
7815
7815
  t$3("fabric-example")
7816
7816
  ], FabricExample);
7817
- const styles$h = i$7`
7817
+ const styles$j = i$7`
7818
7818
  :host {
7819
7819
  display: block;
7820
7820
  }
@@ -12811,14 +12811,14 @@ const formControlStyles = i$7`
12811
12811
  margin-top: var(--pbo-spacing-2x);
12812
12812
  }
12813
12813
  `;
12814
- var __defProp$i = Object.defineProperty;
12815
- var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
12816
- var __decorateClass$i = (decorators, target, key, kind) => {
12817
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
12814
+ var __defProp$j = Object.defineProperty;
12815
+ var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
12816
+ var __decorateClass$k = (decorators, target, key, kind) => {
12817
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
12818
12818
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
12819
12819
  if (decorator = decorators[i3])
12820
12820
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12821
- if (kind && result) __defProp$i(target, key, result);
12821
+ if (kind && result) __defProp$j(target, key, result);
12822
12822
  return result;
12823
12823
  };
12824
12824
  let PboSelector = class extends r$5 {
@@ -12831,6 +12831,7 @@ let PboSelector = class extends r$5 {
12831
12831
  { value: "arial", label: "📜 Arial", font: "'Arial', sans-serif" },
12832
12832
  { value: "mono", label: "💻 Monospace", font: "'Courier New', monospace" }
12833
12833
  ];
12834
+ this.disabled = false;
12834
12835
  this.size = "medium";
12835
12836
  this.label = "";
12836
12837
  }
@@ -12838,8 +12839,17 @@ let PboSelector = class extends r$5 {
12838
12839
  var _a2;
12839
12840
  return (_a2 = this._choices) == null ? void 0 : _a2.getValue().value;
12840
12841
  }
12842
+ handleDisabledChanged() {
12843
+ var _a2;
12844
+ if (this._choices && this.disabled) {
12845
+ this._choices.disable();
12846
+ } else {
12847
+ (_a2 = this._choices) == null ? void 0 : _a2.enable();
12848
+ }
12849
+ }
12841
12850
  firstUpdated() {
12842
12851
  this._initializeChoices();
12852
+ this.handleDisabledChanged();
12843
12853
  }
12844
12854
  // @ts-ignore
12845
12855
  _initializeChoices() {
@@ -12870,9 +12880,15 @@ let PboSelector = class extends r$5 {
12870
12880
  getClassNames2(data.highlighted ? classNames.highlightedState : classNames.itemSelectable).join(" ")
12871
12881
  ].join(" ");
12872
12882
  return template(`
12873
- <div class="${templateClassNames}"
12874
- data-item data-id="${data.id}" data-value="${escapeForTemplate2(data.value)}" ${data.active ? 'aria-selected="true"' : ""} ${data.disabled ? 'aria-disabled="true"' : ""}
12875
- style="font-family: ${((_a3 = data.customProperties) == null ? void 0 : _a3.font) || "inherit"}">
12883
+ <div
12884
+ class="${templateClassNames}"
12885
+ data-item
12886
+ data-id="${data.id}"
12887
+ data-value="${escapeForTemplate2(data.value)}"
12888
+ ${data.active ? 'aria-selected="true"' : ""}
12889
+ ${data.disabled ? 'aria-disabled="true"' : ""}
12890
+ style="font-family: ${((_a3 = data.customProperties) == null ? void 0 : _a3.font) || "inherit"}"
12891
+ >
12876
12892
  ${data.label}
12877
12893
  </div>
12878
12894
  `);
@@ -12886,8 +12902,13 @@ let PboSelector = class extends r$5 {
12886
12902
  ].join(" ");
12887
12903
  return template(`
12888
12904
  <div class="${templateClassNames}"
12889
- data-select-text="${this.config.itemSelectText}" data-choice ${data.disabled ? 'data-choice-disabled aria-disabled="true"' : "data-choice-selectable"} data-id="${data.id}" data-value="${escapeForTemplate2(data.value)}" ${data.groupId > 0 ? 'role="treeitem"' : 'role="option"'}
12890
- style="font-family: ${((_a3 = data.customProperties) == null ? void 0 : _a3.font) || "inherit"}">
12905
+ data-select-text="${this.config.itemSelectText}"
12906
+ data-choice ${data.disabled ? 'data-choice-disabled aria-disabled="true"' : "data-choice-selectable"}
12907
+ data-id="${data.id}"
12908
+ data-value="${escapeForTemplate2(data.value)}"
12909
+ ${data.groupId > 0 ? 'role="treeitem"' : 'role="option"'}
12910
+ style="font-family: ${((_a3 = data.customProperties) == null ? void 0 : _a3.font) || "inherit"}"
12911
+ >
12891
12912
  ${data.label}
12892
12913
  </div>
12893
12914
  `);
@@ -12931,20 +12952,26 @@ let PboSelector = class extends r$5 {
12931
12952
  <select part="base" class="js-choice"></select>`;
12932
12953
  }
12933
12954
  };
12934
- PboSelector.styles = [componentStyles, styles$h, formControlStyles, r$8(choicesStyles)];
12935
- __decorateClass$i([
12955
+ PboSelector.styles = [componentStyles, styles$j, formControlStyles, r$8(choicesStyles)];
12956
+ __decorateClass$k([
12936
12957
  n$3({ type: Array })
12937
12958
  ], PboSelector.prototype, "fonts", 2);
12938
- __decorateClass$i([
12959
+ __decorateClass$k([
12960
+ n$3({ type: Boolean, reflect: true })
12961
+ ], PboSelector.prototype, "disabled", 2);
12962
+ __decorateClass$k([
12939
12963
  n$3()
12940
12964
  ], PboSelector.prototype, "size", 2);
12941
- __decorateClass$i([
12965
+ __decorateClass$k([
12942
12966
  n$3()
12943
12967
  ], PboSelector.prototype, "label", 2);
12944
- __decorateClass$i([
12968
+ __decorateClass$k([
12945
12969
  e$5(".js-choice")
12946
12970
  ], PboSelector.prototype, "choiceEl", 2);
12947
- PboSelector = __decorateClass$i([
12971
+ __decorateClass$k([
12972
+ watch("disabled", { waitUntilFirstUpdate: true })
12973
+ ], PboSelector.prototype, "handleDisabledChanged", 1);
12974
+ PboSelector = __decorateClass$k([
12948
12975
  t$3("pbo-selector")
12949
12976
  ], PboSelector);
12950
12977
  const buttonStyles = i$7`
@@ -13423,12 +13450,21 @@ const buttonStyles = i$7`
13423
13450
  .button--loading .button__caret {
13424
13451
  visibility: hidden;
13425
13452
  }
13453
+ .button--loading pbo-spinner {
13454
+ --indicator-color: currentColor;
13455
+ position: absolute;
13456
+ font-size: 1em;
13457
+ height: 1em;
13458
+ width: 1em;
13459
+ top: calc(50% - 0.5em);
13460
+ left: calc(50% - 0.5em);
13461
+ }
13426
13462
 
13427
13463
  /*
13428
13464
  * Badges
13429
13465
  */
13430
13466
 
13431
- .button ::slotted(sl-badge) {
13467
+ .button ::slotted(pbo-badge) {
13432
13468
  position: absolute;
13433
13469
  top: 0;
13434
13470
  right: 0;
@@ -13436,7 +13472,7 @@ const buttonStyles = i$7`
13436
13472
  pointer-events: none;
13437
13473
  }
13438
13474
 
13439
- .button--rtl ::slotted(sl-badge) {
13475
+ .button--rtl ::slotted(pbo-badge) {
13440
13476
  right: auto;
13441
13477
  left: 0;
13442
13478
  translate: -50% -50%;
@@ -13913,14 +13949,94 @@ const customErrorValidityState = Object.freeze({
13913
13949
  * SPDX-License-Identifier: BSD-3-Clause
13914
13950
  */
13915
13951
  const o$2 = (o2) => o2 ?? E$1;
13916
- var __defProp$h = Object.defineProperty;
13917
- var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
13918
- var __decorateClass$h = (decorators, target, key, kind) => {
13919
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
13952
+ const styles$i = i$7`
13953
+ :host {
13954
+ --track-width: 2px;
13955
+ --track-color: rgb(128 128 128 / 25%);
13956
+ --indicator-color: var(--pbo-color-primary-600);
13957
+ --speed: 2s;
13958
+
13959
+ display: inline-flex;
13960
+ width: 1em;
13961
+ height: 1em;
13962
+ flex: none;
13963
+ }
13964
+
13965
+ .spinner {
13966
+ flex: 1 1 auto;
13967
+ height: 100%;
13968
+ width: 100%;
13969
+ }
13970
+
13971
+ .spinner__track,
13972
+ .spinner__indicator {
13973
+ fill: none;
13974
+ stroke-width: var(--track-width);
13975
+ r: calc(0.5em - var(--track-width) / 2);
13976
+ cx: 0.5em;
13977
+ cy: 0.5em;
13978
+ transform-origin: 50% 50%;
13979
+ }
13980
+
13981
+ .spinner__track {
13982
+ stroke: var(--track-color);
13983
+ transform-origin: 0% 0%;
13984
+ }
13985
+
13986
+ .spinner__indicator {
13987
+ stroke: var(--indicator-color);
13988
+ stroke-linecap: round;
13989
+ stroke-dasharray: 150% 75%;
13990
+ animation: spin var(--speed) linear infinite;
13991
+ }
13992
+
13993
+ @keyframes spin {
13994
+ 0% {
13995
+ transform: rotate(0deg);
13996
+ stroke-dasharray: 0.05em, 3em;
13997
+ }
13998
+
13999
+ 50% {
14000
+ transform: rotate(450deg);
14001
+ stroke-dasharray: 1.375em, 1.375em;
14002
+ }
14003
+
14004
+ 100% {
14005
+ transform: rotate(1080deg);
14006
+ stroke-dasharray: 0.05em, 3em;
14007
+ }
14008
+ }
14009
+ `;
14010
+ var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
14011
+ var __decorateClass$j = (decorators, target, key, kind) => {
14012
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
14013
+ for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
14014
+ if (decorator = decorators[i3])
14015
+ result = decorator(result) || result;
14016
+ return result;
14017
+ };
14018
+ let PboSpinner$1 = class PboSpinner extends PairboElement {
14019
+ render() {
14020
+ return x$1`
14021
+ <svg part="base" class="spinner" role="progressbar" aria-label="loading">
14022
+ <circle class="spinner__track"></circle>
14023
+ <circle class="spinner__indicator"></circle>
14024
+ </svg>
14025
+ `;
14026
+ }
14027
+ };
14028
+ PboSpinner$1.styles = [componentStyles, styles$i];
14029
+ PboSpinner$1 = __decorateClass$j([
14030
+ t$3("pbo-spinner")
14031
+ ], PboSpinner$1);
14032
+ var __defProp$i = Object.defineProperty;
14033
+ var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
14034
+ var __decorateClass$i = (decorators, target, key, kind) => {
14035
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
13920
14036
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
13921
14037
  if (decorator = decorators[i3])
13922
14038
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13923
- if (kind && result) __defProp$h(target, key, result);
14039
+ if (kind && result) __defProp$i(target, key, result);
13924
14040
  return result;
13925
14041
  };
13926
14042
  let PboButton$1 = class PboButton extends PairboElement {
@@ -13940,6 +14056,7 @@ let PboButton$1 = class PboButton extends PairboElement {
13940
14056
  this.circle = false;
13941
14057
  this.type = "button";
13942
14058
  this.colorBlock = false;
14059
+ this.loading = false;
13943
14060
  this.isIconButton = false;
13944
14061
  this.hasFocus = false;
13945
14062
  }
@@ -14030,71 +14147,83 @@ let PboButton$1 = class PboButton extends PairboElement {
14030
14147
  "button--standard": !this.outline,
14031
14148
  "button--outline": this.outline,
14032
14149
  "button--focused": this.hasFocus,
14150
+ "button--loading": this.loading,
14033
14151
  "button--has-label": this.hasSlotController.test("[default]"),
14034
14152
  "button--has-prefix": this.hasSlotController.test("prefix"),
14035
14153
  "button--has-suffix": this.hasSlotController.test("suffix"),
14036
14154
  "button--circle": this.circle,
14037
14155
  "button--disabled": this.disabled
14038
14156
  })}
14157
+ ?disabled=${o$2(isLink ? void 0 : this.disabled)}
14039
14158
  tabindex=${this.disabled ? "-1" : "0"}
14040
14159
  href="${this.href}"
14041
14160
  name=${o$2(isLink ? void 0 : this.name)}
14042
14161
  @blur=${this.handleBlur}
14043
14162
  @focus=${this.handleFocus}
14044
- @invalud=${this.isButton() ? this.handleInvalid : null}
14163
+ @invalid=${this.isButton() ? this.handleInvalid : null}
14045
14164
  @click=${this.handleClick}
14046
14165
  >
14047
14166
  <slot name="prefix" part="prefix" class="button__prefix"></slot>
14048
14167
  <slot part="label" class="button__label"></slot>
14049
14168
  <slot name="suffix" part="suffix" class="button__suffix"></slot>
14169
+ ${this.loading ? u$1`<pbo-spinner part="spinner"></pbo-spinner>` : ""}
14050
14170
  </${tag}>`;
14051
14171
  }
14052
14172
  };
14053
14173
  PboButton$1.styles = [componentStyles, buttonStyles];
14054
- __decorateClass$h([
14174
+ PboButton$1.dependencies = {
14175
+ "pbo-spinner": PboSpinner$1
14176
+ };
14177
+ __decorateClass$i([
14055
14178
  e$5(".button")
14056
14179
  ], PboButton$1.prototype, "button", 2);
14057
- __decorateClass$h([
14180
+ __decorateClass$i([
14181
+ e$5(".button--loading pbo-spinner")
14182
+ ], PboButton$1.prototype, "spinner", 2);
14183
+ __decorateClass$i([
14058
14184
  n$3({ type: Boolean, reflect: true })
14059
14185
  ], PboButton$1.prototype, "disabled", 2);
14060
- __decorateClass$h([
14186
+ __decorateClass$i([
14061
14187
  n$3()
14062
14188
  ], PboButton$1.prototype, "href", 2);
14063
- __decorateClass$h([
14189
+ __decorateClass$i([
14064
14190
  n$3()
14065
14191
  ], PboButton$1.prototype, "name", 2);
14066
- __decorateClass$h([
14192
+ __decorateClass$i([
14067
14193
  n$3()
14068
14194
  ], PboButton$1.prototype, "value", 2);
14069
- __decorateClass$h([
14195
+ __decorateClass$i([
14070
14196
  n$3({ reflect: true })
14071
14197
  ], PboButton$1.prototype, "variant", 2);
14072
- __decorateClass$h([
14198
+ __decorateClass$i([
14073
14199
  n$3({ type: Boolean, reflect: true })
14074
14200
  ], PboButton$1.prototype, "outline", 2);
14075
- __decorateClass$h([
14201
+ __decorateClass$i([
14076
14202
  n$3({ reflect: true })
14077
14203
  ], PboButton$1.prototype, "size", 2);
14078
- __decorateClass$h([
14204
+ __decorateClass$i([
14079
14205
  n$3({ type: Boolean, reflect: true })
14080
14206
  ], PboButton$1.prototype, "circle", 2);
14081
- __decorateClass$h([
14207
+ __decorateClass$i([
14082
14208
  n$3({ reflect: true })
14083
14209
  ], PboButton$1.prototype, "type", 2);
14084
- __decorateClass$h([
14210
+ __decorateClass$i([
14085
14211
  n$3({ type: Boolean, reflect: true, attribute: "color-block" })
14086
14212
  ], PboButton$1.prototype, "colorBlock", 2);
14087
- __decorateClass$h([
14213
+ __decorateClass$i([
14214
+ n$3({ type: Boolean, reflect: true })
14215
+ ], PboButton$1.prototype, "loading", 2);
14216
+ __decorateClass$i([
14088
14217
  r$3()
14089
14218
  ], PboButton$1.prototype, "isIconButton", 2);
14090
- __decorateClass$h([
14219
+ __decorateClass$i([
14091
14220
  r$3()
14092
14221
  ], PboButton$1.prototype, "hasFocus", 2);
14093
- PboButton$1 = __decorateClass$h([
14222
+ PboButton$1 = __decorateClass$i([
14094
14223
  t$3("pbo-button")
14095
14224
  ], PboButton$1);
14096
14225
  const PboButton2 = PboButton$1;
14097
- const styles$g = i$7`
14226
+ const styles$h = i$7`
14098
14227
  :host {
14099
14228
  display: inline-block;
14100
14229
  }
@@ -14104,14 +14233,14 @@ const styles$g = i$7`
14104
14233
  /* flex-wrap: nowrap; */
14105
14234
  }
14106
14235
  `;
14107
- var __defProp$g = Object.defineProperty;
14108
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
14109
- var __decorateClass$g = (decorators, target, key, kind) => {
14110
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
14236
+ var __defProp$h = Object.defineProperty;
14237
+ var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
14238
+ var __decorateClass$h = (decorators, target, key, kind) => {
14239
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
14111
14240
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
14112
14241
  if (decorator = decorators[i3])
14113
14242
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
14114
- if (kind && result) __defProp$g(target, key, result);
14243
+ if (kind && result) __defProp$h(target, key, result);
14115
14244
  return result;
14116
14245
  };
14117
14246
  let PboButtonGroup$1 = class PboButtonGroup extends PairboElement {
@@ -14172,17 +14301,17 @@ let PboButtonGroup$1 = class PboButtonGroup extends PairboElement {
14172
14301
  `;
14173
14302
  }
14174
14303
  };
14175
- PboButtonGroup$1.styles = [componentStyles, styles$g];
14176
- __decorateClass$g([
14304
+ PboButtonGroup$1.styles = [componentStyles, styles$h];
14305
+ __decorateClass$h([
14177
14306
  e$5("slot")
14178
14307
  ], PboButtonGroup$1.prototype, "defaultSlot", 2);
14179
- __decorateClass$g([
14308
+ __decorateClass$h([
14180
14309
  r$3()
14181
14310
  ], PboButtonGroup$1.prototype, "disableRole", 2);
14182
- __decorateClass$g([
14311
+ __decorateClass$h([
14183
14312
  n$3()
14184
14313
  ], PboButtonGroup$1.prototype, "label", 2);
14185
- PboButtonGroup$1 = __decorateClass$g([
14314
+ PboButtonGroup$1 = __decorateClass$h([
14186
14315
  t$3("pbo-button-group")
14187
14316
  ], PboButtonGroup$1);
14188
14317
  function findButton(el) {
@@ -14190,7 +14319,7 @@ function findButton(el) {
14190
14319
  return el.closest(selector) ?? el.querySelector(selector);
14191
14320
  }
14192
14321
  const PboButtonGroup2 = PboButtonGroup$1;
14193
- const styles$f = i$7`
14322
+ const styles$g = i$7`
14194
14323
  ${buttonStyles}
14195
14324
 
14196
14325
  .button__prefix,
@@ -14239,14 +14368,14 @@ const n3 = "important", i2 = " !" + n3, o$1 = e$2(class extends i$2 {
14239
14368
  return T$1;
14240
14369
  }
14241
14370
  });
14242
- var __defProp$f = Object.defineProperty;
14243
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
14244
- var __decorateClass$f = (decorators, target, key, kind) => {
14245
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
14371
+ var __defProp$g = Object.defineProperty;
14372
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
14373
+ var __decorateClass$g = (decorators, target, key, kind) => {
14374
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
14246
14375
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
14247
14376
  if (decorator = decorators[i3])
14248
14377
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
14249
- if (kind && result) __defProp$f(target, key, result);
14378
+ if (kind && result) __defProp$g(target, key, result);
14250
14379
  return result;
14251
14380
  };
14252
14381
  let PboRadioButton$1 = class PboRadioButton extends PairboElement {
@@ -14333,39 +14462,39 @@ let PboRadioButton$1 = class PboRadioButton extends PairboElement {
14333
14462
  `;
14334
14463
  }
14335
14464
  };
14336
- PboRadioButton$1.styles = [componentStyles, styles$f];
14337
- __decorateClass$f([
14465
+ PboRadioButton$1.styles = [componentStyles, styles$g];
14466
+ __decorateClass$g([
14338
14467
  e$5(".button")
14339
14468
  ], PboRadioButton$1.prototype, "input", 2);
14340
- __decorateClass$f([
14469
+ __decorateClass$g([
14341
14470
  e$5(".hidden-input")
14342
14471
  ], PboRadioButton$1.prototype, "hiddenInput", 2);
14343
- __decorateClass$f([
14472
+ __decorateClass$g([
14344
14473
  n$3({ type: Boolean, reflect: true })
14345
14474
  ], PboRadioButton$1.prototype, "checked", 2);
14346
- __decorateClass$f([
14475
+ __decorateClass$g([
14347
14476
  n$3()
14348
14477
  ], PboRadioButton$1.prototype, "value", 2);
14349
- __decorateClass$f([
14478
+ __decorateClass$g([
14350
14479
  n$3({ type: Boolean, reflect: true })
14351
14480
  ], PboRadioButton$1.prototype, "disabled", 2);
14352
- __decorateClass$f([
14481
+ __decorateClass$g([
14353
14482
  n$3({ reflect: true })
14354
14483
  ], PboRadioButton$1.prototype, "size", 2);
14355
- __decorateClass$f([
14484
+ __decorateClass$g([
14356
14485
  n$3({ type: Boolean, reflect: true })
14357
14486
  ], PboRadioButton$1.prototype, "circle", 2);
14358
- __decorateClass$f([
14487
+ __decorateClass$g([
14359
14488
  n$3({ type: Boolean, reflect: true, attribute: "icon-only" })
14360
14489
  ], PboRadioButton$1.prototype, "iconOnly", 2);
14361
- __decorateClass$f([
14490
+ __decorateClass$g([
14362
14491
  r$3()
14363
14492
  ], PboRadioButton$1.prototype, "hasFocus", 2);
14364
- PboRadioButton$1 = __decorateClass$f([
14493
+ PboRadioButton$1 = __decorateClass$g([
14365
14494
  t$3("pbo-radio-button")
14366
14495
  ], PboRadioButton$1);
14367
14496
  const PboRadioButton2 = PboRadioButton$1;
14368
- const styles$e = i$7`
14497
+ const styles$f = i$7`
14369
14498
  :host {
14370
14499
  display: block;
14371
14500
  }
@@ -14398,14 +14527,14 @@ const styles$e = i$7`
14398
14527
  border-radius: 1rem;
14399
14528
  }
14400
14529
  `;
14401
- var __defProp$e = Object.defineProperty;
14402
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
14403
- var __decorateClass$e = (decorators, target, key, kind) => {
14404
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
14530
+ var __defProp$f = Object.defineProperty;
14531
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
14532
+ var __decorateClass$f = (decorators, target, key, kind) => {
14533
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
14405
14534
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
14406
14535
  if (decorator = decorators[i3])
14407
14536
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
14408
- if (kind && result) __defProp$e(target, key, result);
14537
+ if (kind && result) __defProp$f(target, key, result);
14409
14538
  return result;
14410
14539
  };
14411
14540
  let PboRadioGroup$1 = class PboRadioGroup extends PairboElement {
@@ -14628,58 +14757,58 @@ let PboRadioGroup$1 = class PboRadioGroup extends PairboElement {
14628
14757
  `;
14629
14758
  }
14630
14759
  };
14631
- PboRadioGroup$1.styles = [componentStyles, styles$e, formControlStyles];
14760
+ PboRadioGroup$1.styles = [componentStyles, styles$f, formControlStyles];
14632
14761
  PboRadioGroup$1.dependencies = { "pbo-button-group": PboButtonGroup$1 };
14633
- __decorateClass$e([
14762
+ __decorateClass$f([
14634
14763
  e$5("slot:not([name])")
14635
14764
  ], PboRadioGroup$1.prototype, "defaultSlot", 2);
14636
- __decorateClass$e([
14765
+ __decorateClass$f([
14637
14766
  e$5(".radio-group__validation-input")
14638
14767
  ], PboRadioGroup$1.prototype, "validationInput", 2);
14639
- __decorateClass$e([
14768
+ __decorateClass$f([
14640
14769
  r$3()
14641
14770
  ], PboRadioGroup$1.prototype, "hasButtonGroup", 2);
14642
- __decorateClass$e([
14771
+ __decorateClass$f([
14643
14772
  r$3()
14644
14773
  ], PboRadioGroup$1.prototype, "errorMessage", 2);
14645
- __decorateClass$e([
14774
+ __decorateClass$f([
14646
14775
  r$3()
14647
14776
  ], PboRadioGroup$1.prototype, "defaultValue", 2);
14648
- __decorateClass$e([
14777
+ __decorateClass$f([
14649
14778
  n$3({ type: Boolean, reflect: true })
14650
14779
  ], PboRadioGroup$1.prototype, "required", 2);
14651
- __decorateClass$e([
14780
+ __decorateClass$f([
14652
14781
  n$3()
14653
14782
  ], PboRadioGroup$1.prototype, "name", 2);
14654
- __decorateClass$e([
14783
+ __decorateClass$f([
14655
14784
  n$3({ reflect: true })
14656
14785
  ], PboRadioGroup$1.prototype, "value", 2);
14657
- __decorateClass$e([
14786
+ __decorateClass$f([
14658
14787
  n$3({ attribute: "help-text" })
14659
14788
  ], PboRadioGroup$1.prototype, "helpText", 2);
14660
- __decorateClass$e([
14789
+ __decorateClass$f([
14661
14790
  n$3()
14662
14791
  ], PboRadioGroup$1.prototype, "label", 2);
14663
- __decorateClass$e([
14792
+ __decorateClass$f([
14664
14793
  n$3({ type: Boolean, reflect: true, attribute: "icon-group" })
14665
14794
  ], PboRadioGroup$1.prototype, "iconGroup", 2);
14666
- __decorateClass$e([
14795
+ __decorateClass$f([
14667
14796
  n$3()
14668
14797
  ], PboRadioGroup$1.prototype, "size", 2);
14669
- __decorateClass$e([
14798
+ __decorateClass$f([
14670
14799
  n$3({ type: Boolean, reflect: true })
14671
14800
  ], PboRadioGroup$1.prototype, "disabled", 2);
14672
- __decorateClass$e([
14801
+ __decorateClass$f([
14673
14802
  n$3({ reflect: true })
14674
14803
  ], PboRadioGroup$1.prototype, "form", 2);
14675
- __decorateClass$e([
14804
+ __decorateClass$f([
14676
14805
  watch("value")
14677
14806
  ], PboRadioGroup$1.prototype, "handleValueChange", 1);
14678
- PboRadioGroup$1 = __decorateClass$e([
14807
+ PboRadioGroup$1 = __decorateClass$f([
14679
14808
  t$3("pbo-radio-group")
14680
14809
  ], PboRadioGroup$1);
14681
14810
  const PboRadioGroup2 = PboRadioGroup$1;
14682
- const styles$d = i$7`
14811
+ const styles$e = i$7`
14683
14812
  :host {
14684
14813
  display: block;
14685
14814
  position: relative;
@@ -14921,14 +15050,14 @@ const l2 = e$2(class extends i$2 {
14921
15050
  return m(i3), t2;
14922
15051
  }
14923
15052
  });
14924
- var __defProp$d = Object.defineProperty;
14925
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
14926
- var __decorateClass$d = (decorators, target, key, kind) => {
14927
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
15053
+ var __defProp$e = Object.defineProperty;
15054
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
15055
+ var __decorateClass$e = (decorators, target, key, kind) => {
15056
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
14928
15057
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
14929
15058
  if (decorator = decorators[i3])
14930
15059
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
14931
- if (kind && result) __defProp$d(target, key, result);
15060
+ if (kind && result) __defProp$e(target, key, result);
14932
15061
  return result;
14933
15062
  };
14934
15063
  let PboTextarea$1 = class PboTextarea extends PairboElement {
@@ -15103,63 +15232,63 @@ let PboTextarea$1 = class PboTextarea extends PairboElement {
15103
15232
  </div>`;
15104
15233
  }
15105
15234
  };
15106
- PboTextarea$1.styles = [componentStyles, styles$d, formControlStyles];
15107
- __decorateClass$d([
15235
+ PboTextarea$1.styles = [componentStyles, styles$e, formControlStyles];
15236
+ __decorateClass$e([
15108
15237
  e$5(".textarea__control")
15109
15238
  ], PboTextarea$1.prototype, "input", 2);
15110
- __decorateClass$d([
15239
+ __decorateClass$e([
15111
15240
  e$5(".textarea__size-adjuster")
15112
15241
  ], PboTextarea$1.prototype, "sizeAdjuster", 2);
15113
- __decorateClass$d([
15242
+ __decorateClass$e([
15114
15243
  r$3()
15115
15244
  ], PboTextarea$1.prototype, "hasFocus", 2);
15116
- __decorateClass$d([
15245
+ __decorateClass$e([
15117
15246
  n$3()
15118
15247
  ], PboTextarea$1.prototype, "name", 2);
15119
- __decorateClass$d([
15248
+ __decorateClass$e([
15120
15249
  n$3()
15121
15250
  ], PboTextarea$1.prototype, "value", 2);
15122
- __decorateClass$d([
15251
+ __decorateClass$e([
15123
15252
  n$3({ reflect: true })
15124
15253
  ], PboTextarea$1.prototype, "size", 2);
15125
- __decorateClass$d([
15254
+ __decorateClass$e([
15126
15255
  n$3({ type: Boolean, reflect: true })
15127
15256
  ], PboTextarea$1.prototype, "filled", 2);
15128
- __decorateClass$d([
15257
+ __decorateClass$e([
15129
15258
  n$3()
15130
15259
  ], PboTextarea$1.prototype, "placeholder", 2);
15131
- __decorateClass$d([
15260
+ __decorateClass$e([
15132
15261
  n$3({ type: Number })
15133
15262
  ], PboTextarea$1.prototype, "rows", 2);
15134
- __decorateClass$d([
15263
+ __decorateClass$e([
15135
15264
  n$3()
15136
15265
  ], PboTextarea$1.prototype, "resize", 2);
15137
- __decorateClass$d([
15266
+ __decorateClass$e([
15138
15267
  n$3({ type: Boolean, reflect: true })
15139
15268
  ], PboTextarea$1.prototype, "disabled", 2);
15140
- __decorateClass$d([
15269
+ __decorateClass$e([
15141
15270
  n$3({ type: Boolean, reflect: true })
15142
15271
  ], PboTextarea$1.prototype, "readonly", 2);
15143
- __decorateClass$d([
15272
+ __decorateClass$e([
15144
15273
  n$3({ reflect: true })
15145
15274
  ], PboTextarea$1.prototype, "form", 2);
15146
- __decorateClass$d([
15275
+ __decorateClass$e([
15147
15276
  n$3({ type: Boolean, reflect: true })
15148
15277
  ], PboTextarea$1.prototype, "required", 2);
15149
- __decorateClass$d([
15278
+ __decorateClass$e([
15150
15279
  n$3({ type: Number })
15151
15280
  ], PboTextarea$1.prototype, "minlength", 2);
15152
- __decorateClass$d([
15281
+ __decorateClass$e([
15153
15282
  n$3({ type: Number })
15154
15283
  ], PboTextarea$1.prototype, "maxlength", 2);
15155
- __decorateClass$d([
15284
+ __decorateClass$e([
15156
15285
  n$3({ attribute: "help-text" })
15157
15286
  ], PboTextarea$1.prototype, "helpText", 2);
15158
- PboTextarea$1 = __decorateClass$d([
15287
+ PboTextarea$1 = __decorateClass$e([
15159
15288
  t$3("pbo-textarea")
15160
15289
  ], PboTextarea$1);
15161
15290
  const PboTextarea2 = PboTextarea$1;
15162
- const styles$c = i$7`
15291
+ const styles$d = i$7`
15163
15292
  :host {
15164
15293
  display: block;
15165
15294
  width: 100%;
@@ -15223,7 +15352,7 @@ const styles$c = i$7`
15223
15352
  }
15224
15353
  }
15225
15354
  `;
15226
- const styles$b = i$7`
15355
+ const styles$c = i$7`
15227
15356
  :host {
15228
15357
  display: block;
15229
15358
  }
@@ -15256,28 +15385,30 @@ const isValid = (value) => {
15256
15385
  const removeNullUndefined = (obj) => Object.entries(obj).reduce((acc, [k3, v2]) => {
15257
15386
  return v2 == null ? acc : (acc[k3] = v2, acc);
15258
15387
  }, {});
15259
- var __defProp$c = Object.defineProperty;
15260
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
15261
- var __decorateClass$c = (decorators, target, key, kind) => {
15262
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
15388
+ var __defProp$d = Object.defineProperty;
15389
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
15390
+ var __decorateClass$d = (decorators, target, key, kind) => {
15391
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
15263
15392
  for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
15264
15393
  if (decorator = decorators[i3])
15265
15394
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
15266
- if (kind && result) __defProp$c(target, key, result);
15395
+ if (kind && result) __defProp$d(target, key, result);
15267
15396
  return result;
15268
15397
  };
15269
15398
  let PboTypeForm$1 = class PboTypeForm extends PairboElement {
15270
15399
  constructor() {
15271
15400
  super(...arguments);
15272
- this.windowHeight = window.innerHeight;
15273
15401
  this.resizeTimeout = null;
15274
- this.charsNum = 0;
15275
- this.ctaButtonState = PboTypeForm$1.CTA_STATES.primary;
15276
15402
  this.cardInnerImageUrl = "../../../public/Greeting Card from Pairbo.png";
15277
15403
  this.card = null;
15278
- this.submitTypeForm = (formData) => {
15404
+ this.submitTypeForm = async (formData) => {
15279
15405
  console.error("submitTypingForm function not implemented", formData);
15280
15406
  };
15407
+ this.loading = false;
15408
+ this.disabled = false;
15409
+ this.windowHeight = window.innerHeight;
15410
+ this.charsNum = 0;
15411
+ this.ctaButtonState = PboTypeForm$1.CTA_STATES.primary;
15281
15412
  this.handleResize = () => {
15282
15413
  if (this.resizeTimeout) {
15283
15414
  window.clearTimeout(this.resizeTimeout);
@@ -15287,7 +15418,27 @@ let PboTypeForm$1 = class PboTypeForm extends PairboElement {
15287
15418
  }, 50);
15288
15419
  };
15289
15420
  }
15421
+ isLoadingChanged() {
15422
+ this.ctaButtons.forEach((button) => {
15423
+ button.loading = this.loading;
15424
+ });
15425
+ }
15426
+ disabledChanged() {
15427
+ this.greetingText.disabled = this.disabled;
15428
+ this.fontSelector.disabled = this.disabled;
15429
+ this.textColor.childNodes.forEach((radio) => {
15430
+ radio.disabled = this.disabled;
15431
+ });
15432
+ this.textAlignment.childNodes.forEach((radio) => {
15433
+ radio.disabled = this.disabled;
15434
+ });
15435
+ this.ctaButtons.forEach((button) => {
15436
+ button.disabled = this.disabled;
15437
+ });
15438
+ }
15290
15439
  firstUpdated() {
15440
+ this.disabledChanged();
15441
+ this.isLoadingChanged();
15291
15442
  this.textArea.addEventListener("invalid", () => {
15292
15443
  alert("Please add a message to continue");
15293
15444
  });
@@ -15374,6 +15525,7 @@ let PboTypeForm$1 = class PboTypeForm extends PairboElement {
15374
15525
  ]}"
15375
15526
  @pbo-change=${this.handleFormChange}
15376
15527
  size="large"
15528
+ disabled="${this.disabled}"
15377
15529
  ></pbo-selector>
15378
15530
 
15379
15531
  <div class="color-alignment-container">
@@ -15384,8 +15536,8 @@ let PboTypeForm$1 = class PboTypeForm extends PairboElement {
15384
15536
  label="Color"
15385
15537
  size="large"
15386
15538
  >
15387
- <pbo-radio-button value="rgb(0,0,0)" size="small" circle></pbo-radio-button>
15388
- <pbo-radio-button value="rgb(255,255,255)" size="small" circle></pbo-radio-button>
15539
+ <pbo-radio-button disabled="${this.disabled}" value="rgb(0,0,0)" size="small" circle></pbo-radio-button>
15540
+ <pbo-radio-button disabled="${this.disabled}" value="rgb(255,255,255)" size="small" circle></pbo-radio-button>
15389
15541
  </pbo-radio-group>
15390
15542
 
15391
15543
  <pbo-radio-group
@@ -15452,7 +15604,7 @@ let PboTypeForm$1 = class PboTypeForm extends PairboElement {
15452
15604
  `;
15453
15605
  }
15454
15606
  };
15455
- PboTypeForm$1.styles = [componentStyles, formControlStyles, styles$b];
15607
+ PboTypeForm$1.styles = [componentStyles, formControlStyles, styles$c];
15456
15608
  PboTypeForm$1.dependencies = {
15457
15609
  "pbo-selector": PboSelector,
15458
15610
  "pbo-textarea": PboTextarea$1,
@@ -15471,43 +15623,58 @@ PboTypeForm$1.CTA_STATES = {
15471
15623
  message: "Save and Continue"
15472
15624
  }
15473
15625
  };
15474
- __decorateClass$c([
15626
+ __decorateClass$d([
15627
+ n$3({ type: String, reflect: true })
15628
+ ], PboTypeForm$1.prototype, "cardInnerImageUrl", 2);
15629
+ __decorateClass$d([
15630
+ n$3()
15631
+ ], PboTypeForm$1.prototype, "card", 2);
15632
+ __decorateClass$d([
15633
+ n$3()
15634
+ ], PboTypeForm$1.prototype, "submitTypeForm", 2);
15635
+ __decorateClass$d([
15636
+ n$3({ type: Boolean, reflect: true })
15637
+ ], PboTypeForm$1.prototype, "loading", 2);
15638
+ __decorateClass$d([
15639
+ n$3({ type: Boolean, reflect: true })
15640
+ ], PboTypeForm$1.prototype, "disabled", 2);
15641
+ __decorateClass$d([
15475
15642
  e$5(".greeting-text")
15476
15643
  ], PboTypeForm$1.prototype, "greetingText", 2);
15477
- __decorateClass$c([
15644
+ __decorateClass$d([
15478
15645
  e$5(".font-selector")
15479
15646
  ], PboTypeForm$1.prototype, "fontSelector", 2);
15480
- __decorateClass$c([
15647
+ __decorateClass$d([
15481
15648
  e$5(".text-color")
15482
15649
  ], PboTypeForm$1.prototype, "textColor", 2);
15483
- __decorateClass$c([
15650
+ __decorateClass$d([
15484
15651
  e$5(".text-alignment")
15485
15652
  ], PboTypeForm$1.prototype, "textAlignment", 2);
15486
- __decorateClass$c([
15653
+ __decorateClass$d([
15487
15654
  e$5(".typing-form")
15488
15655
  ], PboTypeForm$1.prototype, "typingForm", 2);
15489
- __decorateClass$c([
15656
+ __decorateClass$d([
15490
15657
  e$5("pbo-textarea")
15491
15658
  ], PboTypeForm$1.prototype, "textArea", 2);
15492
- __decorateClass$c([
15659
+ __decorateClass$d([
15660
+ r$2(".cta-buttons pbo-button")
15661
+ ], PboTypeForm$1.prototype, "ctaButtons", 2);
15662
+ __decorateClass$d([
15493
15663
  r$3()
15494
15664
  ], PboTypeForm$1.prototype, "windowHeight", 2);
15495
- __decorateClass$c([
15665
+ __decorateClass$d([
15496
15666
  r$3()
15497
15667
  ], PboTypeForm$1.prototype, "charsNum", 2);
15498
- __decorateClass$c([
15668
+ __decorateClass$d([
15499
15669
  r$3()
15500
15670
  ], PboTypeForm$1.prototype, "ctaButtonState", 2);
15501
- __decorateClass$c([
15502
- n$3({ type: String, reflect: true })
15503
- ], PboTypeForm$1.prototype, "cardInnerImageUrl", 2);
15504
- __decorateClass$c([
15505
- n$3()
15506
- ], PboTypeForm$1.prototype, "card", 2);
15507
- __decorateClass$c([
15508
- n$3()
15509
- ], PboTypeForm$1.prototype, "submitTypeForm", 2);
15510
- PboTypeForm$1 = __decorateClass$c([
15671
+ __decorateClass$d([
15672
+ watch("loading", { waitUntilFirstUpdate: true })
15673
+ ], PboTypeForm$1.prototype, "isLoadingChanged", 1);
15674
+ __decorateClass$d([
15675
+ watch("disabled", { waitUntilFirstUpdate: true })
15676
+ ], PboTypeForm$1.prototype, "disabledChanged", 1);
15677
+ PboTypeForm$1 = __decorateClass$d([
15511
15678
  t$3("pbo-type-form")
15512
15679
  ], PboTypeForm$1);
15513
15680
  /**
@@ -15546,20 +15713,13 @@ const d = (t2) => l$1(t2) ? t2._$litType$.h : t2.strings, h2 = e$2(class extends
15546
15713
  return this.render(e$12);
15547
15714
  }
15548
15715
  });
15549
- const styles$a = i$7`
15716
+ const styles$b = i$7`
15550
15717
  :host {
15551
15718
  display: block;
15552
15719
  width: 100%;
15553
15720
  height: auto;
15554
15721
  }
15555
15722
 
15556
- ul {
15557
- padding: 0;
15558
- margin: 0;
15559
- list-style: none;
15560
- height: 100%;
15561
- }
15562
-
15563
15723
  .main-slide-container {
15564
15724
  display: inline;
15565
15725
  position: relative;
@@ -15623,39 +15783,168 @@ const styles$a = i$7`
15623
15783
  -webkit-user-drag: none;
15624
15784
  pointer-events: none;
15625
15785
  }
15786
+
15626
15787
  .thumbnails {
15627
15788
  width: 20%;
15628
15789
  display: flex;
15629
15790
  flex-direction: column;
15630
15791
  gap: 1.9%;
15631
- padding: 0;
15632
15792
  justify-content: start;
15633
15793
  overflow-y: auto;
15794
+ box-sizing: border-box;
15634
15795
  }
15635
15796
 
15636
15797
  .thumbnail {
15637
- list-style: none;
15638
- margin: 0 0.2rem;
15639
15798
  cursor: pointer;
15640
- opacity: 0.3;
15799
+ opacity: 0.35;
15800
+ width: 100%;
15801
+ box-sizing: border-box;
15802
+ border: 2px solid var(--pbo-color-gray-300);
15641
15803
  }
15642
15804
 
15643
15805
  .thumbnail.active {
15644
15806
  opacity: 1;
15645
15807
  }
15808
+
15646
15809
  .main-slide.active {
15647
- display: list-item;
15810
+ display: block;
15648
15811
  }
15649
- .thumbnail img {
15812
+
15813
+ .thumbnail img,
15814
+ .thumbnail pbo-image {
15815
+ display: block;
15650
15816
  width: 100%;
15651
15817
  height: auto;
15652
- border: 2px solid var(--pbo-color-gray-300);
15818
+ }
15819
+ `;
15820
+ const splideCss = ".splide__container{box-sizing:border-box;position:relative}.splide__list{backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide:not(.is-overflow) .splide__pagination{display:none}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list>.splide__slide{margin:0!important;opacity:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__arrow{-ms-flex-align:center;align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:2em;-ms-flex-pack:center;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover:not(:disabled){opacity:.9}.splide__arrow:disabled{opacity:.3}.splide__arrow:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide.is-focus-in .splide__arrow:focus{outline:3px solid #0bf;outline-offset:3px}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;position:relative;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4);z-index:1}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__pagination__page:focus{outline:3px solid #0bf;outline-offset:3px}.splide__progress__bar{background:#ccc;height:3px}.splide__slide{-webkit-tap-highlight-color:rgba(0,0,0,0)}.splide__slide:focus{outline:0}@supports (outline-offset:-3px){.splide__slide:focus-visible{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide__slide:focus-visible{border:3px solid #0bf}}@supports (outline-offset:-3px){.splide.is-focus-in .splide__slide:focus{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide.is-focus-in .splide__slide:focus{border:3px solid #0bf}.splide.is-focus-in .splide__track>.splide__list>.splide__slide:focus{border-color:#0bf}}.splide__toggle{cursor:pointer}.splide__toggle:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__toggle:focus{outline:3px solid #0bf;outline-offset:3px}.splide__track--nav>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide__track--nav>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide__arrows--rtl .splide__arrow--prev{left:auto;right:1em}.splide__arrows--rtl .splide__arrow--prev svg{transform:scaleX(1)}.splide__arrows--rtl .splide__arrow--next{left:1em;right:auto}.splide__arrows--rtl .splide__arrow--next svg{transform:scaleX(-1)}.splide__arrows--ttb .splide__arrow{left:50%;transform:translate(-50%)}.splide__arrows--ttb .splide__arrow--prev{top:1em}.splide__arrows--ttb .splide__arrow--prev svg{transform:rotate(-90deg)}.splide__arrows--ttb .splide__arrow--next{bottom:1em;top:auto}.splide__arrows--ttb .splide__arrow--next svg{transform:rotate(90deg)}.splide__pagination--ttb{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:.5em;top:0}";
15821
+ const styles$a = i$7`
15822
+ :host,
15823
+ :host * {
15824
+ max-height: 100%;
15825
+ max-width: 100%;
15826
+ width: 100%;
15827
+ height: auto;
15828
+ object-fit: contain;
15829
+ display: block;
15830
+ margin-left: auto;
15831
+ margin-right: auto;
15653
15832
  }
15654
15833
 
15655
- .main-slide-container ul li {
15834
+ .skeleton {
15835
+ background: #f3f3f3;
15836
+ animation: pulse 1.5s infinite;
15837
+ height: auto;
15838
+ width: 100%;
15839
+ aspect-ratio: 3 / 4;
15840
+ }
15841
+
15842
+ img {
15843
+ width: 100%;
15844
+ height: auto;
15845
+ opacity: 0;
15846
+ transition: opacity 0.3s ease-in-out;
15847
+ }
15848
+
15849
+ img.hidden {
15850
+ display: none;
15851
+ }
15852
+
15853
+ img.loaded {
15854
+ opacity: 1;
15855
+ display: block;
15856
+ }
15857
+
15858
+ @keyframes pulse {
15859
+ 0% {
15860
+ background-color: #f3f3f3;
15861
+ }
15862
+ 50% {
15863
+ background-color: #e0e0e0;
15864
+ }
15865
+ 100% {
15866
+ background-color: #f3f3f3;
15867
+ }
15656
15868
  }
15657
15869
  `;
15658
- const splideCss = ".splide__container{box-sizing:border-box;position:relative}.splide__list{backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide:not(.is-overflow) .splide__pagination{display:none}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list>.splide__slide{margin:0!important;opacity:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__arrow{-ms-flex-align:center;align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:2em;-ms-flex-pack:center;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover:not(:disabled){opacity:.9}.splide__arrow:disabled{opacity:.3}.splide__arrow:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide.is-focus-in .splide__arrow:focus{outline:3px solid #0bf;outline-offset:3px}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;position:relative;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4);z-index:1}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__pagination__page:focus{outline:3px solid #0bf;outline-offset:3px}.splide__progress__bar{background:#ccc;height:3px}.splide__slide{-webkit-tap-highlight-color:rgba(0,0,0,0)}.splide__slide:focus{outline:0}@supports (outline-offset:-3px){.splide__slide:focus-visible{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide__slide:focus-visible{border:3px solid #0bf}}@supports (outline-offset:-3px){.splide.is-focus-in .splide__slide:focus{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide.is-focus-in .splide__slide:focus{border:3px solid #0bf}.splide.is-focus-in .splide__track>.splide__list>.splide__slide:focus{border-color:#0bf}}.splide__toggle{cursor:pointer}.splide__toggle:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__toggle:focus{outline:3px solid #0bf;outline-offset:3px}.splide__track--nav>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide__track--nav>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide__arrows--rtl .splide__arrow--prev{left:auto;right:1em}.splide__arrows--rtl .splide__arrow--prev svg{transform:scaleX(1)}.splide__arrows--rtl .splide__arrow--next{left:1em;right:auto}.splide__arrows--rtl .splide__arrow--next svg{transform:scaleX(-1)}.splide__arrows--ttb .splide__arrow{left:50%;transform:translate(-50%)}.splide__arrows--ttb .splide__arrow--prev{top:1em}.splide__arrows--ttb .splide__arrow--prev svg{transform:rotate(-90deg)}.splide__arrows--ttb .splide__arrow--next{bottom:1em;top:auto}.splide__arrows--ttb .splide__arrow--next svg{transform:rotate(90deg)}.splide__pagination--ttb{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:.5em;top:0}";
15870
+ var __defProp$c = Object.defineProperty;
15871
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
15872
+ var __decorateClass$c = (decorators, target, key, kind) => {
15873
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
15874
+ for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
15875
+ if (decorator = decorators[i3])
15876
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
15877
+ if (kind && result) __defProp$c(target, key, result);
15878
+ return result;
15879
+ };
15880
+ let PboImage$1 = class PboImage extends PairboElement {
15881
+ constructor() {
15882
+ super(...arguments);
15883
+ this.skeletonHeight = "2000px";
15884
+ this.skeletonWidth = "1429px";
15885
+ this.src = "";
15886
+ this.alt = "";
15887
+ this.placeholder = "";
15888
+ this.loaded = false;
15889
+ }
15890
+ handleSrcChange() {
15891
+ this.loaded = false;
15892
+ }
15893
+ handleError() {
15894
+ this.loaded = true;
15895
+ if (this.placeholder) {
15896
+ this.src = this.placeholder;
15897
+ }
15898
+ }
15899
+ handleOnLoad() {
15900
+ this.loaded = true;
15901
+ }
15902
+ firstUpdated() {
15903
+ this.imgEl.onload = () => this.handleOnLoad();
15904
+ }
15905
+ render() {
15906
+ return x$1`
15907
+ ${!this.loaded ? x$1` <div class="skeleton"></div>` : ""}
15908
+ <img
15909
+ src=${this.src}
15910
+ alt=${this.alt}
15911
+ class=${e$1({
15912
+ loaded: this.loaded,
15913
+ hidden: !this.loaded
15914
+ })}
15915
+ @error=${() => this.handleError()}
15916
+ />
15917
+ `;
15918
+ }
15919
+ };
15920
+ PboImage$1.styles = [componentStyles, styles$a];
15921
+ __decorateClass$c([
15922
+ n$3()
15923
+ ], PboImage$1.prototype, "skeletonHeight", 2);
15924
+ __decorateClass$c([
15925
+ n$3()
15926
+ ], PboImage$1.prototype, "skeletonWidth", 2);
15927
+ __decorateClass$c([
15928
+ n$3()
15929
+ ], PboImage$1.prototype, "src", 2);
15930
+ __decorateClass$c([
15931
+ n$3()
15932
+ ], PboImage$1.prototype, "alt", 2);
15933
+ __decorateClass$c([
15934
+ n$3()
15935
+ ], PboImage$1.prototype, "placeholder", 2);
15936
+ __decorateClass$c([
15937
+ r$3()
15938
+ ], PboImage$1.prototype, "loaded", 2);
15939
+ __decorateClass$c([
15940
+ e$5("img")
15941
+ ], PboImage$1.prototype, "imgEl", 2);
15942
+ __decorateClass$c([
15943
+ watch("src")
15944
+ ], PboImage$1.prototype, "handleSrcChange", 1);
15945
+ PboImage$1 = __decorateClass$c([
15946
+ t$3("pbo-image")
15947
+ ], PboImage$1);
15659
15948
  var __defProp$b = Object.defineProperty;
15660
15949
  var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
15661
15950
  var __decorateClass$b = (decorators, target, key, kind) => {
@@ -15729,7 +16018,7 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15729
16018
  var _a2, _b, _c, _d;
15730
16019
  if (newValue) {
15731
16020
  this.mainImageTemplates = [
15732
- x$1`<img src="${newValue.medias.cover.url || "https://picsum.photos/id/1/300/400"}" alt="" />`,
16021
+ x$1`<pbo-image src="${newValue.medias.cover.url || "https://picsum.photos/id/1/300/400"}" alt="" />`,
15733
16022
  x$1`<pbo-type-canvas
15734
16023
  background-url=${newValue.medias.insert.url}
15735
16024
  message=${(_a2 = this.livePreviewProps) == null ? void 0 : _a2.text}
@@ -15738,7 +16027,7 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15738
16027
  font=${(_d = this.livePreviewProps) == null ? void 0 : _d.font}
15739
16028
  @click="${this.handleOpenZoomedClick}"
15740
16029
  ></pbo-type-canvas>`,
15741
- x$1`<img src="${newValue.medias.rendered_2.url || "https://picsum.photos/id/10/300/400"}" alt="" />`
16030
+ x$1`<pbo-image src="${newValue.medias.rendered_2.url || "https://picsum.photos/id/10/300/400"}" alt="" />`
15742
16031
  ];
15743
16032
  }
15744
16033
  }
@@ -15768,7 +16057,7 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15768
16057
  get mainSlides() {
15769
16058
  if (!this.card) return [];
15770
16059
  const templates2 = [
15771
- x$1`<img src="${this.card.medias.cover.url}" alt="" />`,
16060
+ x$1`<pbo-image src="${this.card.medias.cover.url}" alt="" />`,
15772
16061
  x$1`<pbo-type-canvas
15773
16062
  background-url=${this.card.medias.insert.url}
15774
16063
  message=${this.livePreviewProps.text}
@@ -15785,22 +16074,22 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15785
16074
  var _a2, _b, _c, _d, _e2, _f, _g, _h, _i2, _j, _k, _l, _m, _n2, _o2, _p, _q, _r2, _s, _t2;
15786
16075
  return x$1`
15787
16076
  <div class="card--slider--wrapper">
15788
- <ul id="thumbnails" class="thumbnails">
15789
- <li class="thumbnail">
15790
- <img src="${((_a2 = this.card) == null ? void 0 : _a2.medias.cover.url) || "https://picsum.photos/id/1/300/400"}" alt="" />
15791
- </li>
15792
- <li class="thumbnail">
15793
- <img src="${((_b = this.card) == null ? void 0 : _b.medias.rendered_1.url) || "https://picsum.photos/id/10/300/400"}" alt="" />
15794
- </li>
15795
- <li class="thumbnail">
15796
- <img src="${((_c = this.card) == null ? void 0 : _c.medias.rendered_2.url) || "https://picsum.photos/id/10/300/400"}" alt="" />
15797
- </li>
15798
- </ul>
16077
+ <div id="thumbnails" class="thumbnails">
16078
+ <div class="thumbnail">
16079
+ <pbo-image src="${((_a2 = this.card) == null ? void 0 : _a2.medias.cover.url) || "https://picsum.photos/id/1/300/400"}" alt="" />
16080
+ </div>
16081
+ <div class="thumbnail">
16082
+ <pbo-image src="${((_b = this.card) == null ? void 0 : _b.medias.rendered_1.url) || "https://picsum.photos/id/10/300/400"}" alt="" />
16083
+ </div>
16084
+ <div class="thumbnail">
16085
+ <pbo-image src="${((_c = this.card) == null ? void 0 : _c.medias.rendered_2.url) || "https://picsum.photos/id/10/300/400"}" alt="" />
16086
+ </div>
16087
+ </div>
15799
16088
 
15800
16089
  <div class="main-slide-container">
15801
- <ul>
15802
- <li class="main-slide" @click="${this.handleOpenZoomedClick}">
15803
- <img src="${((_d = this.card) == null ? void 0 : _d.medias.cover.url) || "https://picsum.photos/id/1/300/400"}" alt="" />
16090
+ <div>
16091
+ <div class="main-slide" @click="${this.handleOpenZoomedClick}">
16092
+ <pbo-image src="${((_d = this.card) == null ? void 0 : _d.medias.cover.url) || "https://picsum.photos/id/1/300/400"}" alt="" />
15804
16093
  ${isMobileDevice() ? x$1`<div class="zoomed-preview-open-button" @click="${this.handleOpenZoomedClick}">
15805
16094
  <svg
15806
16095
  stroke="currentColor"
@@ -15820,8 +16109,8 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15820
16109
  <line x1="8" y1="11" x2="14" y2="11"></line>
15821
16110
  </svg>
15822
16111
  </div>` : ""}
15823
- </li>
15824
- <li class="main-slide" @click="${this.handleOpenZoomedClick}">
16112
+ </div>
16113
+ <div class="main-slide" @click="${this.handleOpenZoomedClick}">
15825
16114
  ${h2(
15826
16115
  this.type === "type" ? x$1`<pbo-type-canvas
15827
16116
  background-url=${(_e2 = this.card) == null ? void 0 : _e2.medias.insert.url}
@@ -15856,9 +16145,9 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15856
16145
  <line x1="8" y1="11" x2="14" y2="11"></line>
15857
16146
  </svg>
15858
16147
  </div>` : ""}
15859
- </li>
15860
- <li class="main-slide" @click=${this.handleOpenZoomedClick}>
15861
- <img src="${((_k = this.card) == null ? void 0 : _k.medias.rendered_2.url) || "https://picsum.photos/id/10/300/400"}" alt="" />
16148
+ </div>
16149
+ <div class="main-slide" @click=${this.handleOpenZoomedClick}>
16150
+ <pbo-image src="${((_k = this.card) == null ? void 0 : _k.medias.rendered_2.url) || "https://picsum.photos/id/10/300/400"}" alt="" />
15862
16151
  ${isMobileDevice() ? x$1`<div class="zoomed-preview-open-button" @click="${this.handleOpenZoomedClick}">
15863
16152
  <svg
15864
16153
  stroke="currentColor"
@@ -15878,8 +16167,8 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15878
16167
  <line x1="8" y1="11" x2="14" y2="11"></line>
15879
16168
  </svg>
15880
16169
  </div>` : ""}
15881
- </li>
15882
- </ul>
16170
+ </div>
16171
+ </div>
15883
16172
  </div>
15884
16173
  </div>
15885
16174
  <pbo-drawer
@@ -15931,9 +16220,10 @@ let PboEditorCardSlider$1 = class PboEditorCardSlider extends PairboElement {
15931
16220
  `;
15932
16221
  }
15933
16222
  };
15934
- PboEditorCardSlider$1.styles = [componentStyles, styles$a, r$8(splideCss)];
16223
+ PboEditorCardSlider$1.styles = [componentStyles, styles$b, r$8(splideCss)];
15935
16224
  PboEditorCardSlider$1.dependencies = {
15936
- "fabric-example": FabricExample
16225
+ "fabric-example": FabricExample,
16226
+ "pbo-image": PboImage$1
15937
16227
  };
15938
16228
  __decorateClass$b([
15939
16229
  n$3({ type: Object })
@@ -16098,7 +16388,7 @@ let PboEditor$1 = class PboEditor extends PairboElement {
16098
16388
  `;
16099
16389
  }
16100
16390
  };
16101
- PboEditor$1.styles = [componentStyles, styles$c];
16391
+ PboEditor$1.styles = [componentStyles, styles$d];
16102
16392
  PboEditor$1.dependencies = {
16103
16393
  "editor-card-slider": PboEditorCardSlider$1,
16104
16394
  "fabric-example": FabricExample,
@@ -19224,10 +19514,24 @@ let PboPageManager$1 = class PboPageManager extends PairboElement {
19224
19514
  };
19225
19515
  }
19226
19516
  handleSubmitTypeFormUpdate() {
19227
- this.editorEl.submitTypeForm = this.submitTypeForm;
19517
+ this.editorEl.submitTypeForm = async (formData) => {
19518
+ if (!this.submitTypeForm) return;
19519
+ this.editorEl.typeForm.disabled = true;
19520
+ this.editorEl.typeForm.loading = true;
19521
+ await this.submitTypeForm(formData);
19522
+ this.editorEl.typeForm.disabled = false;
19523
+ this.editorEl.typeForm.loading = false;
19524
+ };
19228
19525
  }
19229
19526
  handleSubmitHandwrittenFormUpdate() {
19230
- this.editorEl.submitHandwrittenForm = this.submitHandwrittenForm;
19527
+ this.editorEl.submitHandwrittenForm = async (formData) => {
19528
+ if (!this.submitHandwrittenForm) return;
19529
+ this.editorEl.handwrittenForm.isSubmitDisabled = true;
19530
+ this.editorEl.handwrittenForm.isSubmitLoading = true;
19531
+ await this.submitHandwrittenForm(formData);
19532
+ this.editorEl.handwrittenForm.isSubmitDisabled = false;
19533
+ this.editorEl.handwrittenForm.isSubmitLoading = false;
19534
+ };
19231
19535
  }
19232
19536
  handleGetProcessedImgUpdate() {
19233
19537
  this.editorEl.getProcessedImg = this.getProcessedImg;
@@ -19779,6 +20083,15 @@ let PboEditorSelector$1 = class PboEditorSelector extends PairboElement {
19779
20083
  this.hasSlotController = new HasSlotController(this, "help-text", "label");
19780
20084
  this.size = "medium";
19781
20085
  this.label = "";
20086
+ this.disabled = false;
20087
+ }
20088
+ handleDisabledChanged() {
20089
+ var _a2;
20090
+ if (this._choices && this.disabled) {
20091
+ this._choices.disable();
20092
+ } else {
20093
+ (_a2 = this._choices) == null ? void 0 : _a2.enable();
20094
+ }
19782
20095
  }
19783
20096
  get value() {
19784
20097
  var _a2;
@@ -19786,6 +20099,7 @@ let PboEditorSelector$1 = class PboEditorSelector extends PairboElement {
19786
20099
  }
19787
20100
  firstUpdated() {
19788
20101
  this._initializeChoices();
20102
+ this.handleDisabledChanged();
19789
20103
  }
19790
20104
  _initializeChoices() {
19791
20105
  var _a2;
@@ -19930,6 +20244,12 @@ __decorateClass$3([
19930
20244
  __decorateClass$3([
19931
20245
  n$3()
19932
20246
  ], PboEditorSelector$1.prototype, "label", 2);
20247
+ __decorateClass$3([
20248
+ n$3({ type: Boolean, reflect: true })
20249
+ ], PboEditorSelector$1.prototype, "disabled", 2);
20250
+ __decorateClass$3([
20251
+ watch("disabled", { waitUntilFirstUpdate: true })
20252
+ ], PboEditorSelector$1.prototype, "handleDisabledChanged", 1);
19933
20253
  __decorateClass$3([
19934
20254
  e$5(".js-choice")
19935
20255
  ], PboEditorSelector$1.prototype, "choiceEl", 2);
@@ -19989,7 +20309,7 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
19989
20309
  constructor() {
19990
20310
  super(...arguments);
19991
20311
  this.card = null;
19992
- this.submitHandwrittenForm = (formData) => {
20312
+ this.submitHandwrittenForm = async (formData) => {
19993
20313
  console.warn("submitHandwrittenForm not implemented", formData);
19994
20314
  };
19995
20315
  this.getProcessedImg = async (file) => {
@@ -19999,6 +20319,9 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
19999
20319
  masked_img: ""
20000
20320
  };
20001
20321
  };
20322
+ this.isSubmitLoading = false;
20323
+ this.isSubmitDisabled = false;
20324
+ this.isImageProcessing = false;
20002
20325
  this.sourceImg = null;
20003
20326
  this.processedImg = {
20004
20327
  fileUrl: null,
@@ -20017,6 +20340,25 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
20017
20340
  showPicker() {
20018
20341
  this.imageInput.showPicker();
20019
20342
  }
20343
+ setButtonsDisabled(disable) {
20344
+ if (this.uploadButton && this.saveButton && this.reuploadButton) {
20345
+ this.uploadButton.disabled = disable;
20346
+ this.saveButton.disabled = disable;
20347
+ this.reuploadButton.disabled = disable;
20348
+ }
20349
+ }
20350
+ setButtonsLoading(loading) {
20351
+ if (this.uploadButton && this.saveButton) {
20352
+ this.uploadButton.loading = loading;
20353
+ this.saveButton.loading = loading;
20354
+ }
20355
+ }
20356
+ handleSubmitLoadingChange() {
20357
+ this.setButtonsLoading(this.isSubmitLoading);
20358
+ }
20359
+ handleSubmitDisabledChange() {
20360
+ this.setButtonsDisabled(this.isSubmitDisabled);
20361
+ }
20020
20362
  handleSourceImgChange(oldFile, newFile) {
20021
20363
  this.processedFileUrl = null;
20022
20364
  if (oldFile !== newFile) {
@@ -20039,6 +20381,10 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
20039
20381
  }
20040
20382
  });
20041
20383
  }
20384
+ handleImageProcessingChange() {
20385
+ this.setButtonsDisabled(this.isImageProcessing);
20386
+ this.setButtonsLoading(this.isImageProcessing);
20387
+ }
20042
20388
  get formData() {
20043
20389
  var _a2, _b, _c, _d;
20044
20390
  const pixelsPerMMHeight = 177.8 / this.handwrittenDimensions.cardHeight;
@@ -20070,7 +20416,9 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
20070
20416
  const file = (_b = (_a2 = e3.target) == null ? void 0 : _a2.files) == null ? void 0 : _b[0];
20071
20417
  if (file == null) return;
20072
20418
  this.sourceImg = file;
20419
+ this.isImageProcessing = true;
20073
20420
  const processedImage = await this.getProcessedImg(file);
20421
+ this.isImageProcessing = false;
20074
20422
  this.processedFileUrl = `data:image/png;base64,${processedImage.masked_img}`;
20075
20423
  }
20076
20424
  handleSubmit(e3) {
@@ -20102,7 +20450,6 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
20102
20450
  @change=${this.handleFileChange}
20103
20451
  required
20104
20452
  />
20105
-
20106
20453
  <div class="buttons-container">
20107
20454
  <pbo-button
20108
20455
  name="upload"
@@ -20111,7 +20458,7 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
20111
20458
  variant="primary"
20112
20459
  @click=${this.showPicker}
20113
20460
  style=${o$1({
20114
- display: !this.sourceImg && !this.processedFileUrl ? "block" : "none"
20461
+ display: !this.processedFileUrl ? "block" : "none"
20115
20462
  })}
20116
20463
  >
20117
20464
  Upload Handwritten Image
@@ -20123,7 +20470,7 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
20123
20470
  variant="primary"
20124
20471
  class="submit-cta"
20125
20472
  style=${o$1({
20126
- display: this.sourceImg && this.processedFileUrl ? "block" : "none"
20473
+ display: this.sourceImg && this.processedFileUrl && !this.isImageProcessing ? "block" : "none"
20127
20474
  })}
20128
20475
  >
20129
20476
  Save and Continue
@@ -20146,12 +20493,6 @@ let PboHandwrittenForm$1 = class PboHandwrittenForm extends PairboElement {
20146
20493
  }
20147
20494
  };
20148
20495
  PboHandwrittenForm$1.styles = [componentStyles, styles$2];
20149
- __decorateClass$2([
20150
- e$5(".pixel-input")
20151
- ], PboHandwrittenForm$1.prototype, "imageInput", 2);
20152
- __decorateClass$2([
20153
- e$5(".handwritten-form")
20154
- ], PboHandwrittenForm$1.prototype, "handwrittenForm", 2);
20155
20496
  __decorateClass$2([
20156
20497
  n$3()
20157
20498
  ], PboHandwrittenForm$1.prototype, "card", 2);
@@ -20161,6 +20502,30 @@ __decorateClass$2([
20161
20502
  __decorateClass$2([
20162
20503
  n$3()
20163
20504
  ], PboHandwrittenForm$1.prototype, "getProcessedImg", 2);
20505
+ __decorateClass$2([
20506
+ n$3({ type: Boolean, reflect: true, attribute: "loading" })
20507
+ ], PboHandwrittenForm$1.prototype, "isSubmitLoading", 2);
20508
+ __decorateClass$2([
20509
+ n$3({ type: Boolean, reflect: true, attribute: "disabled" })
20510
+ ], PboHandwrittenForm$1.prototype, "isSubmitDisabled", 2);
20511
+ __decorateClass$2([
20512
+ e$5(".pixel-input")
20513
+ ], PboHandwrittenForm$1.prototype, "imageInput", 2);
20514
+ __decorateClass$2([
20515
+ e$5(".handwritten-form")
20516
+ ], PboHandwrittenForm$1.prototype, "handwrittenForm", 2);
20517
+ __decorateClass$2([
20518
+ e$5("pbo-button[name='upload']")
20519
+ ], PboHandwrittenForm$1.prototype, "uploadButton", 2);
20520
+ __decorateClass$2([
20521
+ e$5("pbo-button[name='save']")
20522
+ ], PboHandwrittenForm$1.prototype, "saveButton", 2);
20523
+ __decorateClass$2([
20524
+ e$5("pbo-button[name='reupload']")
20525
+ ], PboHandwrittenForm$1.prototype, "reuploadButton", 2);
20526
+ __decorateClass$2([
20527
+ r$3()
20528
+ ], PboHandwrittenForm$1.prototype, "isImageProcessing", 2);
20164
20529
  __decorateClass$2([
20165
20530
  r$3()
20166
20531
  ], PboHandwrittenForm$1.prototype, "sourceImg", 2);
@@ -20173,12 +20538,21 @@ __decorateClass$2([
20173
20538
  __decorateClass$2([
20174
20539
  r$3()
20175
20540
  ], PboHandwrittenForm$1.prototype, "handwrittenDimensions", 2);
20541
+ __decorateClass$2([
20542
+ watch("isSubmitLoading")
20543
+ ], PboHandwrittenForm$1.prototype, "handleSubmitLoadingChange", 1);
20544
+ __decorateClass$2([
20545
+ watch("isSubmitDisabled")
20546
+ ], PboHandwrittenForm$1.prototype, "handleSubmitDisabledChange", 1);
20176
20547
  __decorateClass$2([
20177
20548
  watch("sourceImg")
20178
20549
  ], PboHandwrittenForm$1.prototype, "handleSourceImgChange", 1);
20179
20550
  __decorateClass$2([
20180
20551
  watch("processedFileUrl")
20181
20552
  ], PboHandwrittenForm$1.prototype, "handleProcessImageChange", 1);
20553
+ __decorateClass$2([
20554
+ watch("isImageProcessing")
20555
+ ], PboHandwrittenForm$1.prototype, "handleImageProcessingChange", 1);
20182
20556
  PboHandwrittenForm$1 = __decorateClass$2([
20183
20557
  t$3("pbo-handwritten-form")
20184
20558
  ], PboHandwrittenForm$1);
@@ -20814,6 +21188,8 @@ PboGiftOptions$1 = __decorateClass([
20814
21188
  t$3("pbo-gift-options")
20815
21189
  ], PboGiftOptions$1);
20816
21190
  const PboGiftOptions2 = PboGiftOptions$1;
21191
+ const PboSpinner2 = PboSpinner$1;
21192
+ const PboImage2 = PboImage$1;
20817
21193
  class PboBridge {
20818
21194
  /* ------------------------------- constructor ------------------------------ */
20819
21195
  constructor({
@@ -21026,10 +21402,12 @@ export {
21026
21402
  PboGiftOptions2 as PboGiftOption,
21027
21403
  PboHandwrittenCanvas2 as PboHandwrittenCanvas,
21028
21404
  PboHandwrittenForm2 as PboHandwrittenForm,
21405
+ PboImage2 as PboImage,
21029
21406
  PboPageManager2 as PboPageManager,
21030
21407
  PboRadioButton2 as PboRadioButton,
21031
21408
  PboRadioGroup2 as PboRadioGroup,
21032
21409
  PboSelector,
21410
+ PboSpinner2 as PboSpinner,
21033
21411
  PboTextarea2 as PboTextarea,
21034
21412
  PboTypeCanvas2 as PboTypeCanvas,
21035
21413
  PboTypeForm2 as PboTypeForm,