smoothly 1.0.0-alpha.150 → 1.0.0-alpha.152
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/cjs/smoothly-accordion_73.cjs.entry.js +14 -8
- package/dist/cjs/smoothly-accordion_73.cjs.entry.js.map +1 -1
- package/dist/collection/components/input/demo/index.js +1 -1
- package/dist/collection/components/input/demo/index.js.map +1 -1
- package/dist/collection/components/input/index.js +7 -2
- package/dist/collection/components/input/index.js.map +1 -1
- package/dist/collection/components/input/range/index.js +5 -4
- package/dist/collection/components/input/range/index.js.map +1 -1
- package/dist/collection/components/input/range/style.css +30 -38
- package/dist/custom-elements/index.js +14 -8
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/smoothly-accordion_73.entry.js +14 -8
- package/dist/esm/smoothly-accordion_73.entry.js.map +1 -1
- package/dist/smoothly/{p-2a047716.entry.js → p-8be1a00c.entry.js} +2 -2
- package/dist/smoothly/p-8be1a00c.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/input/index.d.ts +1 -0
- package/dist/types/components/input/range/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/smoothly/p-2a047716.entry.js.map +0 -1
|
@@ -9113,8 +9113,7 @@ const SmoothlyInput = class {
|
|
|
9113
9113
|
let pasted = event.clipboardData ? event.clipboardData.getData("text") : "";
|
|
9114
9114
|
const backend = event.target;
|
|
9115
9115
|
pasted = this.expiresAutocompleteFix(backend, pasted);
|
|
9116
|
-
|
|
9117
|
-
this.processKey({ key: letter }, backend);
|
|
9116
|
+
this.processPaste(pasted, backend);
|
|
9118
9117
|
}
|
|
9119
9118
|
onInput(event) {
|
|
9120
9119
|
var _a;
|
|
@@ -9146,6 +9145,12 @@ const SmoothlyInput = class {
|
|
|
9146
9145
|
: value;
|
|
9147
9146
|
return value;
|
|
9148
9147
|
}
|
|
9148
|
+
processPaste(pasted, backend) {
|
|
9149
|
+
if (!this.readonly) {
|
|
9150
|
+
const after = Action.paste(this.formatter, this.state, pasted);
|
|
9151
|
+
this.updateBackend(after, backend);
|
|
9152
|
+
}
|
|
9153
|
+
}
|
|
9149
9154
|
processKey(event, backend) {
|
|
9150
9155
|
if (!this.readonly) {
|
|
9151
9156
|
const after = Action.apply(this.formatter, this.state, event);
|
|
@@ -9365,7 +9370,7 @@ const SmoothlyInputDemo = class {
|
|
|
9365
9370
|
console.log("smoothlyInput", event.detail);
|
|
9366
9371
|
}
|
|
9367
9372
|
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
|
|
9373
|
+
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
9374
|
const duration = e.detail.duration;
|
|
9370
9375
|
console.log("event duration", duration);
|
|
9371
9376
|
this.duration = duration;
|
|
@@ -9471,7 +9476,7 @@ const MonthSelector = class {
|
|
|
9471
9476
|
};
|
|
9472
9477
|
MonthSelector.style = styleCss$G;
|
|
9473
9478
|
|
|
9474
|
-
const styleCss$F = ":host{
|
|
9479
|
+
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
9480
|
|
|
9476
9481
|
const SmoothlyInputRange = class {
|
|
9477
9482
|
constructor(hostRef) {
|
|
@@ -9487,12 +9492,13 @@ const SmoothlyInputRange = class {
|
|
|
9487
9492
|
valueChanged() {
|
|
9488
9493
|
this.smoothlyInput.emit({ [this.name]: this.value });
|
|
9489
9494
|
}
|
|
9490
|
-
inputHandler(
|
|
9491
|
-
|
|
9492
|
-
(this.value =
|
|
9495
|
+
inputHandler(event) {
|
|
9496
|
+
event.target instanceof HTMLInputElement &&
|
|
9497
|
+
(this.value =
|
|
9498
|
+
this.step !== "any" ? event.target.valueAsNumber : Math.round(event.target.valueAsNumber * 100) / 100);
|
|
9493
9499
|
}
|
|
9494
9500
|
render() {
|
|
9495
|
-
return (index.h(index.Host, { style: { "--left-adjustment": `${(this.value / this.max) * 100}%` } }, index.h("
|
|
9501
|
+
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
9502
|
}
|
|
9497
9503
|
static get watchers() { return {
|
|
9498
9504
|
"value": ["valueChanged"]
|