smoothly 1.0.0-alpha.212 → 1.0.0-alpha.213

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.
@@ -9557,18 +9557,6 @@ Notifier.style = styleCss$x;
9557
9557
 
9558
9558
  const styleCss$w = ".sc-smoothly-picker-h{box-sizing:border-box}.sc-smoothly-picker-h[looks=\"border\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"border\"].sc-smoothly-picker-h{border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"border\"][readonly].sc-smoothly-picker-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-picker-h[looks=\"line\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"line\"].sc-smoothly-picker-h{border-bottom:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"line\"][readonly].sc-smoothly-picker-h{border-bottom:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-picker-h[looks=\"grid\"].sc-smoothly-picker-s>smoothly-picker-menu smoothly-input,[looks=\"grid\"].sc-smoothly-picker-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px}[looks=\"grid\"][readonly].sc-smoothly-picker-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid .5px}[looks=\"transparent\"].sc-smoothly-picker-h{border:none}[looks=\"transparent\"].sc-smoothly-picker-h:not(:focus-within){background-color:transparent}[looks=\"transparent\"].sc-smoothly-picker-h:not(:focus-within) input.sc-smoothly-picker{background:transparent}[looks=\"transparent\"].sc-smoothly-picker-h:focus-within{outline:1px solid rgb(var(--smoothly-color-contrast))}.sc-smoothly-picker-h{display:flex;position:relative;width:max-content;padding:1.2em 0.7em 0.2em 0.8em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)))}.sc-smoothly-picker-h div.element.sc-smoothly-picker{display:flex;background-color:inherit}smoothly-slot-elements.sc-smoothly-picker{white-space:nowrap}.selected.sc-smoothly-picker{position:relative;display:flex;align-items:center;gap:1rem;width:100%;overflow:hidden;text-overflow:ellipsis;margin-right:2px}.selected.sc-smoothly-picker::after{content:\"\";position:absolute;top:0;bottom:0;right:0;width:2ch}.sc-smoothly-picker-h:not([looks=transparent]) .selected.sc-smoothly-picker::after{background:linear-gradient(90deg, rgba(var(--background-color, var(--smoothly-color-shade)), 0) 0%, rgba(var(--background-color, var(--smoothly-color-shade)), 1) 100%)}.selected.sc-smoothly-picker *.sc-smoothly-picker{display:none}.label.sc-smoothly-picker{position:absolute;left:0.4rem;top:0.6rem;color:rgb(var(--text-color, var(--smoothly-color-contrast)));opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}.selected.sc-smoothly-picker:not(:empty)+.label.sc-smoothly-picker{top:0.4em;transform:scale(0.6)}";
9559
9559
 
9560
- var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
9561
- var t = {};
9562
- for (var p in s)
9563
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
9564
- t[p] = s[p];
9565
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
9566
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9567
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9568
- t[p[i]] = s[p[i]];
9569
- }
9570
- return t;
9571
- };
9572
9560
  const SmoothlyPicker = class {
9573
9561
  constructor(hostRef) {
9574
9562
  index.registerInstance(this, hostRef);
@@ -9590,12 +9578,9 @@ const SmoothlyPicker = class {
9590
9578
  this.smoothlyInputLooks.emit(looks => (this.looks = looks));
9591
9579
  }
9592
9580
  selectedChanged() {
9593
- var _a;
9594
9581
  const selected = Array.from(this.selected.values(), option => option.value);
9595
- if ((_a = this.controls) === null || _a === void 0 ? void 0 : _a.synced()) {
9596
- this.smoothlyInput.emit({ [this.name]: this.multiple ? selected : selected.at(0) });
9597
- this.smoothlyChange.emit({ [this.name]: this.multiple ? selected : selected.at(0) });
9598
- }
9582
+ this.smoothlyInput.emit({ [this.name]: this.multiple ? selected : selected.at(0) });
9583
+ this.smoothlyChange.emit({ [this.name]: this.multiple ? selected : selected.at(0) });
9599
9584
  this.display = Array.from(this.selected.values(), option => {
9600
9585
  const span = document.createElement("span");
9601
9586
  option.slotted.forEach(node => span.appendChild(node.cloneNode(true)));
@@ -9604,10 +9589,7 @@ const SmoothlyPicker = class {
9604
9589
  }
9605
9590
  componentDidLoad() {
9606
9591
  if (this.controls)
9607
- this.smoothlyPickerLoaded.emit(((_a) => {
9608
- var controls = __rest$1(_a, ["synced"]);
9609
- return controls;
9610
- })(this.controls));
9592
+ this.smoothlyPickerLoaded.emit(this.controls);
9611
9593
  }
9612
9594
  smoothlyInputLooksHandler(event) {
9613
9595
  if (event.target != this.element)
@@ -9741,7 +9723,6 @@ const SmoothlyPickerMenu = class {
9741
9723
  index.registerInstance(this, hostRef);
9742
9724
  this.notice = index.createEvent(this, "notice", 7);
9743
9725
  this.smoothlyPickerMenuLoaded = index.createEvent(this, "smoothlyPickerMenuLoaded", 7);
9744
- this.synced = false;
9745
9726
  this.looks = undefined;
9746
9727
  this.open = false;
9747
9728
  this.multiple = false;
@@ -9768,12 +9749,6 @@ const SmoothlyPickerMenu = class {
9768
9749
  }, { threshold }));
9769
9750
  }
9770
9751
  }
9771
- sync() {
9772
- if (this.backend.size != this.options.size)
9773
- this.synced = false;
9774
- else
9775
- this.synced = true;
9776
- }
9777
9752
  componentDidLoad() {
9778
9753
  this.smoothlyPickerMenuLoaded.emit({
9779
9754
  remember: () => {
@@ -9807,7 +9782,6 @@ const SmoothlyPickerMenu = class {
9807
9782
  this.options = new Map(Array.from(this.options.entries()).filter(([key]) => !this.created.has(key)));
9808
9783
  this.created = new Map();
9809
9784
  },
9810
- synced: () => this.synced,
9811
9785
  });
9812
9786
  }
9813
9787
  disconnectedCallback() {
@@ -9834,7 +9808,6 @@ const SmoothlyPickerMenu = class {
9834
9808
  optionLoadHandler(event) {
9835
9809
  if (!this.listElement || !event.composedPath().includes(this.listElement)) {
9836
9810
  event.stopPropagation();
9837
- this.sync();
9838
9811
  event.detail.set.readonly(this.readonly);
9839
9812
  const current = this.options.get(event.detail.value);
9840
9813
  if (current)
@@ -9852,7 +9825,6 @@ const SmoothlyPickerMenu = class {
9852
9825
  }
9853
9826
  else
9854
9827
  this.options.set(event.detail.value, event.detail);
9855
- this.sync();
9856
9828
  }
9857
9829
  optionChangeHandler(event) {
9858
9830
  var _a;