smoothly 1.0.0-alpha.150 → 1.0.0-alpha.151

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.
@@ -9365,7 +9365,7 @@ const SmoothlyInputDemo = class {
9365
9365
  console.log("smoothlyInput", event.detail);
9366
9366
  }
9367
9367
  render() {
9368
- return (index.h(index.Host, null, index.h("h2", null, "Range"), index.h("smoothly-form", null, index.h("smoothly-input-range", { step: 1 }, index.h("div", { slot: "label" }, "Select number in range"))), index.h("h2", null, "Duration"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input", { name: "duration", type: "duration", placeholder: "hh:mm", value: this.duration, onSmoothlyInput: e => {
9368
+ return (index.h(index.Host, null, index.h("h2", null, "Range"), index.h("smoothly-form", null, index.h("smoothly-input-range", { step: 1, name: "range" }, "Select")), index.h("h2", null, "Duration"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input", { name: "duration", type: "duration", placeholder: "hh:mm", value: this.duration, onSmoothlyInput: e => {
9369
9369
  const duration = e.detail.duration;
9370
9370
  console.log("event duration", duration);
9371
9371
  this.duration = duration;
@@ -9471,7 +9471,7 @@ const MonthSelector = class {
9471
9471
  };
9472
9472
  MonthSelector.style = styleCss$G;
9473
9473
 
9474
- const styleCss$F = ":host{display:flex;position:relative;flex-wrap:wrap;width:100%;justify-content:space-between}:host .output-container{width:100%;margin:0 1.2em;position:relative;height:2em}:host output{position:absolute;transform:translateX(-50%);font-weight:600;font-size:1.2em;left:var(--left-adjustment, 0)}:host ::slotted(div),:host label{margin-bottom:.5em;font-size:1.5em}input[type=range]{-webkit-appearance:none;width:100%;background:transparent;height:3em}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:2em;width:2em;border-radius:50%;background-color:rgb(var(--smoothly-primary-contrast));border:1px rgb(var(--smoothly-primary-contrast)) solid;cursor:pointer;margin-top:.5em;}input[type=range]::-moz-range-thumb{height:2em;width:2em;border-radius:50%;background-color:rgb(var(--smoothly-primary-contrast));border:1px rgb(var(--smoothly-primary-contrast)) solid;cursor:pointer}input[type=range]::-webkit-slider-runnable-track{padding:0 .6em;height:100%;cursor:pointer;background-color:rgb(var(--smoothly-primary-tint));border-radius:20px}input[type=range]::-moz-range-track{width:calc(100% + 1em);height:3em;cursor:pointer;background-color:rgb(var(--smoothly-primary-tint));border-radius:20px}.min,.max{display:inline-block;margin:0.5em .8em}.max{text-align:right}";
9474
+ const styleCss$F = ":host{position:relative;width:100%;justify-content:center;align-items:center;display:flex;padding-top:.8em}:host div{position:relative}:host output{display:block;min-width:3em;text-align:center;margin:0 1em}:host label{position:absolute;display:block;white-space:nowrap;text-align:center;top:-1.5em;font-size:.7em;left:.5em}input[type=range]{-webkit-appearance:none;width:100%;background:transparent;height:2.5em;margin:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:1.5em;width:.8em;border-radius:20%;background-color:rgb(var(--smoothly-primary-contrast));border:1px #333 solid;cursor:pointer;margin-top:-.5em;}input[type=range]::-moz-range-thumb{height:1.5em;width:.8em;border-radius:20%;background-color:rgb(var(--smoothly-primary-contrast));border:1px rgb(var(--text-color, var(--smoothly-color-contrast))) solid;cursor:pointer}input[type=range]::-webkit-slider-runnable-track{height:.5em;cursor:pointer;background-color:rgb(var(--smoothly-primary-tint));border-radius:20px}input[type=range]::-moz-range-track{width:100%;height:.5em;cursor:pointer;background-color:rgb(var(--smoothly-primary-tint));border-radius:20px}";
9475
9475
 
9476
9476
  const SmoothlyInputRange = class {
9477
9477
  constructor(hostRef) {
@@ -9487,12 +9487,13 @@ const SmoothlyInputRange = class {
9487
9487
  valueChanged() {
9488
9488
  this.smoothlyInput.emit({ [this.name]: this.value });
9489
9489
  }
9490
- inputHandler(e) {
9491
- e.target instanceof HTMLInputElement &&
9492
- (this.value = this.step !== "any" ? e.target.valueAsNumber : Math.round(e.target.valueAsNumber * 100) / 100);
9490
+ inputHandler(event) {
9491
+ event.target instanceof HTMLInputElement &&
9492
+ (this.value =
9493
+ this.step !== "any" ? event.target.valueAsNumber : Math.round(event.target.valueAsNumber * 100) / 100);
9493
9494
  }
9494
9495
  render() {
9495
- return (index.h(index.Host, { style: { "--left-adjustment": `${(this.value / this.max) * 100}%` } }, index.h("slot", { name: "label" }, typeof this.labelText === "string" && index.h("label", { htmlFor: this.name }, this.labelText)), index.h("div", { class: "output-container" }, index.h("output", { htmlFor: this.name }, this.value)), index.h("input", { name: this.name, part: "range", type: "range", min: this.min, max: this.max, step: this.step, onInput: e => this.inputHandler(e), value: this.value }), index.h("p", { class: "min" }, this.min), index.h("p", { class: "max" }, this.max)));
9496
+ return (index.h(index.Host, { style: { "--left-adjustment": `${(this.value / this.max) * 100}%` } }, index.h("div", null, index.h("output", { htmlFor: this.name }, this.value), index.h("label", { htmlFor: this.name }, index.h("slot", null))), index.h("input", { name: this.name, part: "range", type: "range", min: this.min, max: this.max, step: this.step, onInput: event => this.inputHandler(event), value: this.value })));
9496
9497
  }
9497
9498
  static get watchers() { return {
9498
9499
  "value": ["valueChanged"]