@1337exp/taoui 1.10.4 → 1.11.0

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/index.d.ts CHANGED
@@ -606,6 +606,8 @@ modelValue: number | string;
606
606
  disabled?: boolean;
607
607
  /** `medium` — форм-контрол. `small` — тонкий трек (seek, громкость). */
608
608
  size?: "small" | "medium";
609
+ /** Шаг изменения значения при прокрутке колёсика мыши. 0 — отключено. */
610
+ wheel?: number;
609
611
  }>, {
610
612
  min: number;
611
613
  max: number;
@@ -614,6 +616,7 @@ showValue: boolean;
614
616
  placeholder: string;
615
617
  disabled: boolean;
616
618
  size: string;
619
+ wheel: number;
617
620
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
618
621
  "update:modelValue": (...args: any[]) => void;
619
622
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_29<__VLS_TypePropsToRuntimeProps_31<{
@@ -626,6 +629,8 @@ modelValue: number | string;
626
629
  disabled?: boolean;
627
630
  /** `medium` — форм-контрол. `small` — тонкий трек (seek, громкость). */
628
631
  size?: "small" | "medium";
632
+ /** Шаг изменения значения при прокрутке колёсика мыши. 0 — отключено. */
633
+ wheel?: number;
629
634
  }>, {
630
635
  min: number;
631
636
  max: number;
@@ -634,6 +639,7 @@ showValue: boolean;
634
639
  placeholder: string;
635
640
  disabled: boolean;
636
641
  size: string;
642
+ wheel: number;
637
643
  }>>> & Readonly<{
638
644
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
639
645
  }>, {
@@ -642,6 +648,7 @@ disabled: boolean;
642
648
  max: number;
643
649
  step: number;
644
650
  placeholder: string;
651
+ wheel: number;
645
652
  min: number;
646
653
  showValue: boolean;
647
654
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
package/dist/index.mjs CHANGED
@@ -2414,7 +2414,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
2414
2414
  };
2415
2415
  }
2416
2416
  });
2417
- const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-f6b0e565"]]);
2417
+ const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bb1ea2fb"]]);
2418
2418
  const _hoisted_1$z = {
2419
2419
  key: 0,
2420
2420
  class: "tao-tag__prefix"
@@ -2964,7 +2964,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2964
2964
  placeholder: { default: "" },
2965
2965
  modelValue: {},
2966
2966
  disabled: { type: Boolean, default: false },
2967
- size: { default: "medium" }
2967
+ size: { default: "medium" },
2968
+ wheel: { default: 0 }
2968
2969
  },
2969
2970
  emits: ["update:modelValue"],
2970
2971
  setup(__props, { emit: __emit }) {
@@ -3091,6 +3092,14 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
3091
3092
  commit(props.max);
3092
3093
  }
3093
3094
  }
3095
+ function onWheel(event) {
3096
+ if (props.disabled || props.wheel <= 0 || showShadowModel.value) {
3097
+ return;
3098
+ }
3099
+ event.preventDefault();
3100
+ const delta = event.deltaY < 0 ? props.wheel : -props.wheel;
3101
+ commit(current.value + delta);
3102
+ }
3094
3103
  function onBlurShadowModel() {
3095
3104
  if (shadowModel.value) {
3096
3105
  const newValue = packModelValue(clampValue(parseFloat(shadowModel.value) || 0));
@@ -3146,7 +3155,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
3146
3155
  onPointerup: onPointerEnd,
3147
3156
  onPointercancel: onPointerEnd,
3148
3157
  onLostpointercapture: onLostPointerCapture,
3149
- onKeydown
3158
+ onKeydown,
3159
+ onWheel
3150
3160
  }, [
3151
3161
  _cache[2] || (_cache[2] = createElementVNode("div", { class: "tao-slider__track" }, null, -1)),
3152
3162
  createElementVNode("div", {
@@ -3181,7 +3191,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
3181
3191
  };
3182
3192
  }
3183
3193
  });
3184
- const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-24a38782"]]);
3194
+ const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-a0a9cca1"]]);
3185
3195
  const _hoisted_1$s = { class: "tao-file-drop" };
3186
3196
  const _hoisted_2$p = { class: "tao-file-drop__row" };
3187
3197
  const _hoisted_3$k = ["aria-label"];