@hortiview/shared-components 2.8.5 → 2.8.6
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [2.8.6](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.8.5...v2.8.6) (2025-11-28)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **FormSlider:** extend props to include SliderProps for better integration ([973919c](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/973919cfcd8fd34687e16d35a88872c3f9fed850))
|
|
6
|
+
|
|
1
7
|
## [2.8.5](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.8.4...v2.8.5) (2025-11-12)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { SliderProps } from '@element-public/react-slider';
|
|
1
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
2
3
|
|
|
3
|
-
type FormSliderProps<T extends FieldValues> = {
|
|
4
|
+
type FormSliderProps<T extends FieldValues> = SliderProps & {
|
|
4
5
|
/** the path to the property, like Address.AddressLine1 */
|
|
5
6
|
propertyName: Path<T>;
|
|
6
7
|
/** the label of the Slider */
|
|
@@ -24,5 +25,5 @@ type FormSliderProps<T extends FieldValues> = {
|
|
|
24
25
|
* @param disabled if the field is disabled
|
|
25
26
|
* @returns a Slider component
|
|
26
27
|
*/
|
|
27
|
-
export declare const FormSlider: <T extends FieldValues>({ propertyName, label, minValue, maxValue, step, disabled, }: FormSliderProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const FormSlider: <T extends FieldValues>({ propertyName, label, minValue, maxValue, step, disabled, ...props }: FormSliderProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
28
29
|
export {};
|
|
@@ -94,12 +94,12 @@ var o = {
|
|
|
94
94
|
* THE SOFTWARE.
|
|
95
95
|
*/
|
|
96
96
|
var L;
|
|
97
|
-
(function(
|
|
98
|
-
|
|
97
|
+
(function(v) {
|
|
98
|
+
v[v.ACTIVE = 0] = "ACTIVE", v[v.INACTIVE = 1] = "INACTIVE";
|
|
99
99
|
})(L || (L = {}));
|
|
100
100
|
var i;
|
|
101
|
-
(function(
|
|
102
|
-
|
|
101
|
+
(function(v) {
|
|
102
|
+
v[v.START = 1] = "START", v[v.END = 2] = "END";
|
|
103
103
|
})(i || (i = {}));
|
|
104
104
|
/**
|
|
105
105
|
* @license
|
|
@@ -124,15 +124,15 @@ var i;
|
|
|
124
124
|
* THE SOFTWARE.
|
|
125
125
|
*/
|
|
126
126
|
var W;
|
|
127
|
-
(function(
|
|
128
|
-
|
|
127
|
+
(function(v) {
|
|
128
|
+
v.SLIDER_UPDATE = "slider_update";
|
|
129
129
|
})(W || (W = {}));
|
|
130
130
|
var Z = typeof window < "u", Rt = (
|
|
131
131
|
/** @class */
|
|
132
|
-
function(
|
|
133
|
-
dt(a,
|
|
132
|
+
function(v) {
|
|
133
|
+
dt(a, v);
|
|
134
134
|
function a(t) {
|
|
135
|
-
var r =
|
|
135
|
+
var r = v.call(this, K(K({}, a.defaultAdapter), t)) || this;
|
|
136
136
|
return r.initialStylesRemoved = !1, r.isDisabled = !1, r.isDiscrete = !1, r.step = ot.STEP_SIZE, r.hasTickMarks = !1, r.isRange = !1, r.thumb = null, r.downEventClientX = null, r.startThumbKnobWidth = 0, r.endThumbKnobWidth = 0, r.animFrame = new yt(), r;
|
|
137
137
|
}
|
|
138
138
|
return Object.defineProperty(a, "defaultAdapter", {
|
|
@@ -235,8 +235,8 @@ var Z = typeof window < "u", Rt = (
|
|
|
235
235
|
}), a.prototype.init = function() {
|
|
236
236
|
var t = this;
|
|
237
237
|
this.isDisabled = this.adapter.hasClass(o.DISABLED), this.isDiscrete = this.adapter.hasClass(o.DISCRETE), this.hasTickMarks = this.adapter.hasClass(o.TICK_MARKS), this.isRange = this.adapter.hasClass(o.RANGE);
|
|
238
|
-
var r = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MIN, this.isRange ? i.START : i.END), g.INPUT_MIN), e = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MAX, i.END), g.INPUT_MAX), n = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.END), g.INPUT_VALUE), s = this.isRange ? this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.START), g.INPUT_VALUE) : r,
|
|
239
|
-
this.validateProperties({ min: r, max: e, value: n, valueStart: s, step:
|
|
238
|
+
var r = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MIN, this.isRange ? i.START : i.END), g.INPUT_MIN), e = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MAX, i.END), g.INPUT_MAX), n = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.END), g.INPUT_VALUE), s = this.isRange ? this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.START), g.INPUT_VALUE) : r, h = this.adapter.getInputAttribute(g.INPUT_STEP, i.END), d = h ? this.convertAttributeValueToNumber(h, g.INPUT_STEP) : this.step;
|
|
239
|
+
this.validateProperties({ min: r, max: e, value: n, valueStart: s, step: d }), this.min = r, this.max = e, this.value = n, this.valueStart = s, this.step = d, this.numDecimalPlaces = _t(this.step), this.valueBeforeDownEvent = n, this.valueStartBeforeDownEvent = s, this.mousedownOrTouchstartListener = this.handleMousedownOrTouchstart.bind(this), this.moveListener = this.handleMove.bind(this), this.pointerdownListener = this.handlePointerdown.bind(this), this.pointerupListener = this.handlePointerup.bind(this), this.thumbMouseenterListener = this.handleThumbMouseenter.bind(this), this.thumbMouseleaveListener = this.handleThumbMouseleave.bind(this), this.inputStartChangeListener = function() {
|
|
240
240
|
t.handleInputChange(i.START);
|
|
241
241
|
}, this.inputEndChangeListener = function() {
|
|
242
242
|
t.handleInputChange(i.END);
|
|
@@ -337,8 +337,8 @@ var Z = typeof window < "u", Rt = (
|
|
|
337
337
|
}, a.prototype.getThumbFromDownEvent = function(t, r) {
|
|
338
338
|
if (!this.isRange)
|
|
339
339
|
return i.END;
|
|
340
|
-
var e = this.adapter.getThumbBoundingClientRect(i.START), n = this.adapter.getThumbBoundingClientRect(i.END), s = t >= e.left && t <= e.right,
|
|
341
|
-
return s &&
|
|
340
|
+
var e = this.adapter.getThumbBoundingClientRect(i.START), n = this.adapter.getThumbBoundingClientRect(i.END), s = t >= e.left && t <= e.right, h = t >= n.left && t <= n.right;
|
|
341
|
+
return s && h ? null : s ? i.START : h ? i.END : r < this.valueStart ? i.START : r > this.value ? i.END : r - this.valueStart <= this.value - r ? i.START : i.END;
|
|
342
342
|
}, a.prototype.getThumbFromMoveEvent = function(t) {
|
|
343
343
|
if (this.thumb !== null)
|
|
344
344
|
return this.thumb;
|
|
@@ -365,8 +365,8 @@ var Z = typeof window < "u", Rt = (
|
|
|
365
365
|
}
|
|
366
366
|
}, a.prototype.updateTickMarksUI = function() {
|
|
367
367
|
if (!(!this.isDiscrete || !this.hasTickMarks)) {
|
|
368
|
-
var t = (this.valueStart - this.min) / this.step, r = (this.value - this.valueStart) / this.step + 1, e = (this.max - this.value) / this.step, n = Array.from({ length: t }).fill(L.INACTIVE), s = Array.from({ length: r }).fill(L.ACTIVE),
|
|
369
|
-
this.adapter.updateTickMarks(n.concat(s).concat(
|
|
368
|
+
var t = (this.valueStart - this.min) / this.step, r = (this.value - this.valueStart) / this.step + 1, e = (this.max - this.value) / this.step, n = Array.from({ length: t }).fill(L.INACTIVE), s = Array.from({ length: r }).fill(L.ACTIVE), h = Array.from({ length: e }).fill(L.INACTIVE);
|
|
369
|
+
this.adapter.updateTickMarks(n.concat(s).concat(h));
|
|
370
370
|
}
|
|
371
371
|
}, a.prototype.mapClientXOnSliderScale = function(t) {
|
|
372
372
|
var r = t - this.rect.left, e = r / this.rect.width;
|
|
@@ -396,19 +396,19 @@ var Z = typeof window < "u", Rt = (
|
|
|
396
396
|
var n = this.isRange && r === i.END && t < this.valueStart;
|
|
397
397
|
return n ? this.valueStart : t;
|
|
398
398
|
}, a.prototype.updateThumbAndTrackUI = function(t) {
|
|
399
|
-
var r = this, e = this, n = e.max, s = e.min,
|
|
399
|
+
var r = this, e = this, n = e.max, s = e.min, h = (this.value - this.valueStart) / (n - s), d = h * this.rect.width, m = this.adapter.isRTL(), y = Z ? ut(window, "transform") : "transform";
|
|
400
400
|
if (this.isRange) {
|
|
401
|
-
var D = this.adapter.isRTL() ? (n - this.value) / (n - s) * this.rect.width : (this.valueStart - s) / (n - s) * this.rect.width, T = D +
|
|
401
|
+
var D = this.adapter.isRTL() ? (n - this.value) / (n - s) * this.rect.width : (this.valueStart - s) / (n - s) * this.rect.width, T = D + d;
|
|
402
402
|
this.animFrame.request(W.SLIDER_UPDATE, function() {
|
|
403
|
-
var f = !
|
|
404
|
-
f ? (r.adapter.setTrackActiveStyleProperty("transform-origin", "right"), r.adapter.setTrackActiveStyleProperty("left", "unset"), r.adapter.setTrackActiveStyleProperty("right", r.rect.width - T + "px")) : (r.adapter.setTrackActiveStyleProperty("transform-origin", "left"), r.adapter.setTrackActiveStyleProperty("right", "unset"), r.adapter.setTrackActiveStyleProperty("left", D + "px")), r.adapter.setTrackActiveStyleProperty(y, "scaleX(" +
|
|
405
|
-
var V =
|
|
406
|
-
(t === i.START || !t || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(y, "translateX(" + V + "px)", i.START), (t === i.END || !t || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(y, "translateX(" + _ + "px)", i.END), r.removeInitialStyles(
|
|
403
|
+
var f = !m && t === i.START || m && t !== i.START;
|
|
404
|
+
f ? (r.adapter.setTrackActiveStyleProperty("transform-origin", "right"), r.adapter.setTrackActiveStyleProperty("left", "unset"), r.adapter.setTrackActiveStyleProperty("right", r.rect.width - T + "px")) : (r.adapter.setTrackActiveStyleProperty("transform-origin", "left"), r.adapter.setTrackActiveStyleProperty("right", "unset"), r.adapter.setTrackActiveStyleProperty("left", D + "px")), r.adapter.setTrackActiveStyleProperty(y, "scaleX(" + h + ")");
|
|
405
|
+
var V = m ? T : D, _ = r.adapter.isRTL() ? D : T;
|
|
406
|
+
(t === i.START || !t || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(y, "translateX(" + V + "px)", i.START), (t === i.END || !t || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(y, "translateX(" + _ + "px)", i.END), r.removeInitialStyles(m), r.updateOverlappingThumbsUI(V, _, t);
|
|
407
407
|
});
|
|
408
408
|
} else
|
|
409
409
|
this.animFrame.request(W.SLIDER_UPDATE, function() {
|
|
410
|
-
var f =
|
|
411
|
-
r.adapter.setThumbStyleProperty(y, "translateX(" + f + "px)", i.END), r.adapter.setTrackActiveStyleProperty(y, "scaleX(" +
|
|
410
|
+
var f = m ? r.rect.width - d : d;
|
|
411
|
+
r.adapter.setThumbStyleProperty(y, "translateX(" + f + "px)", i.END), r.adapter.setTrackActiveStyleProperty(y, "scaleX(" + h + ")"), r.removeInitialStyles(m);
|
|
412
412
|
});
|
|
413
413
|
}, a.prototype.removeInitialStyles = function(t) {
|
|
414
414
|
if (!this.initialStylesRemoved) {
|
|
@@ -426,11 +426,11 @@ var Z = typeof window < "u", Rt = (
|
|
|
426
426
|
}, a.prototype.updateOverlappingThumbsUI = function(t, r, e) {
|
|
427
427
|
var n = !1;
|
|
428
428
|
if (this.adapter.isRTL()) {
|
|
429
|
-
var s = t - this.startThumbKnobWidth / 2,
|
|
430
|
-
n =
|
|
429
|
+
var s = t - this.startThumbKnobWidth / 2, h = r + this.endThumbKnobWidth / 2;
|
|
430
|
+
n = h >= s;
|
|
431
431
|
} else {
|
|
432
|
-
var
|
|
433
|
-
n =
|
|
432
|
+
var d = t + this.startThumbKnobWidth / 2, m = r - this.endThumbKnobWidth / 2;
|
|
433
|
+
n = d >= m;
|
|
434
434
|
}
|
|
435
435
|
n ? (this.adapter.addThumbClass(
|
|
436
436
|
o.THUMB_TOP,
|
|
@@ -446,24 +446,24 @@ var Z = typeof window < "u", Rt = (
|
|
|
446
446
|
throw new Error("MDCSliderFoundation: `" + r + "` value is " + ("`" + t + "`, but must be a number."));
|
|
447
447
|
return e;
|
|
448
448
|
}, a.prototype.validateProperties = function(t) {
|
|
449
|
-
var r = t.min, e = t.max, n = t.value, s = t.valueStart,
|
|
449
|
+
var r = t.min, e = t.max, n = t.value, s = t.valueStart, h = t.step;
|
|
450
450
|
if (r >= e)
|
|
451
451
|
throw new Error("MDCSliderFoundation: min must be strictly less than max. " + ("Current: [min: " + r + ", max: " + e + "]"));
|
|
452
|
-
if (
|
|
452
|
+
if (h <= 0)
|
|
453
453
|
throw new Error("MDCSliderFoundation: step must be a positive number. " + ("Current step: " + this.step));
|
|
454
454
|
if (this.isRange) {
|
|
455
455
|
if (n < r || n > e || s < r || s > e)
|
|
456
456
|
throw new Error("MDCSliderFoundation: values must be in [min, max] range. " + ("Current values: [start value: " + s + ", end value: " + n + "]"));
|
|
457
457
|
if (s > n)
|
|
458
458
|
throw new Error("MDCSliderFoundation: start value must be <= end value. " + ("Current values: [start value: " + s + ", end value: " + n + "]"));
|
|
459
|
-
var
|
|
460
|
-
if (
|
|
459
|
+
var d = (s - r) / h, m = (n - r) / h;
|
|
460
|
+
if (d % 1 !== 0 || m % 1 !== 0)
|
|
461
461
|
throw new Error("MDCSliderFoundation: Slider values must be valid based on the " + ("step value. Current values: [start value: " + s + ", ") + ("end value: " + n + "]"));
|
|
462
462
|
} else {
|
|
463
463
|
if (n < r || n > e)
|
|
464
464
|
throw new Error("MDCSliderFoundation: value must be in [min, max] range. " + ("Current value: " + n));
|
|
465
|
-
var
|
|
466
|
-
if (
|
|
465
|
+
var m = (n - r) / h;
|
|
466
|
+
if (m % 1 !== 0)
|
|
467
467
|
throw new Error("MDCSliderFoundation: Slider value must be valid based on the " + ("step value. Current value: " + n));
|
|
468
468
|
}
|
|
469
469
|
}, a.prototype.registerEventHandlers = function() {
|
|
@@ -488,8 +488,8 @@ function Dt() {
|
|
|
488
488
|
"iPod"
|
|
489
489
|
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
490
490
|
}
|
|
491
|
-
function _t(
|
|
492
|
-
var a = /(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(
|
|
491
|
+
function _t(v) {
|
|
492
|
+
var a = /(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(v));
|
|
493
493
|
if (!a)
|
|
494
494
|
return 0;
|
|
495
495
|
var t = a[1] || "", r = a[2] || 0;
|
|
@@ -523,10 +523,10 @@ function _t(m) {
|
|
|
523
523
|
*/
|
|
524
524
|
var Nt = (
|
|
525
525
|
/** @class */
|
|
526
|
-
function(
|
|
527
|
-
dt(a,
|
|
526
|
+
function(v) {
|
|
527
|
+
dt(a, v);
|
|
528
528
|
function a() {
|
|
529
|
-
var t =
|
|
529
|
+
var t = v !== null && v.apply(this, arguments) || this;
|
|
530
530
|
return t.skipInitialUIUpdate = !1, t.valueToAriaValueTextFn = null, t;
|
|
531
531
|
}
|
|
532
532
|
return a.attachTo = function(t, r) {
|
|
@@ -689,32 +689,32 @@ var Nt = (
|
|
|
689
689
|
return t === i.END ? this.ripples[this.ripples.length - 1] : this.ripples[0];
|
|
690
690
|
}, a.prototype.addTickMarks = function(t, r) {
|
|
691
691
|
for (var e = document.createDocumentFragment(), n = 0; n < r.length; n++) {
|
|
692
|
-
var s = document.createElement("div"),
|
|
693
|
-
s.classList.add(
|
|
692
|
+
var s = document.createElement("div"), h = r[n] === L.ACTIVE ? o.TICK_MARK_ACTIVE : o.TICK_MARK_INACTIVE;
|
|
693
|
+
s.classList.add(h), e.appendChild(s);
|
|
694
694
|
}
|
|
695
695
|
t.appendChild(e);
|
|
696
696
|
}, a.prototype.updateTickMarks = function(t, r) {
|
|
697
697
|
for (var e = Array.from(t.children), n = 0; n < e.length; n++)
|
|
698
698
|
r[n] === L.ACTIVE ? (e[n].classList.add(o.TICK_MARK_ACTIVE), e[n].classList.remove(o.TICK_MARK_INACTIVE)) : (e[n].classList.add(o.TICK_MARK_INACTIVE), e[n].classList.remove(o.TICK_MARK_ACTIVE));
|
|
699
699
|
}, a.prototype.createRipples = function() {
|
|
700
|
-
for (var t = [], r = [].slice.call(this.root.querySelectorAll("." + o.THUMB)), e = function(
|
|
701
|
-
var
|
|
702
|
-
|
|
700
|
+
for (var t = [], r = [].slice.call(this.root.querySelectorAll("." + o.THUMB)), e = function(h) {
|
|
701
|
+
var d = r[h], m = n.inputs[h], y = K(K({}, st.createAdapter(n)), { addClass: function(T) {
|
|
702
|
+
d.classList.add(T);
|
|
703
703
|
}, computeBoundingRect: function() {
|
|
704
|
-
return
|
|
704
|
+
return d.getBoundingClientRect();
|
|
705
705
|
}, deregisterInteractionHandler: function(T, f) {
|
|
706
|
-
|
|
706
|
+
m.removeEventListener(T, f);
|
|
707
707
|
}, isSurfaceActive: function() {
|
|
708
|
-
return It(
|
|
708
|
+
return It(m, ":active");
|
|
709
709
|
}, isUnbounded: function() {
|
|
710
710
|
return !0;
|
|
711
711
|
}, registerInteractionHandler: function(T, f) {
|
|
712
|
-
|
|
712
|
+
m.addEventListener(T, f, bt());
|
|
713
713
|
}, removeClass: function(T) {
|
|
714
|
-
|
|
714
|
+
d.classList.remove(T);
|
|
715
715
|
}, updateCssVariable: function(T, f) {
|
|
716
|
-
|
|
717
|
-
} }), D = new st(
|
|
716
|
+
d.style.setProperty(T, f);
|
|
717
|
+
} }), D = new st(d, new St(y));
|
|
718
718
|
D.unbounded = !0, t.push(D);
|
|
719
719
|
}, n = this, s = 0; s < r.length; s++)
|
|
720
720
|
e(s);
|
|
@@ -897,15 +897,15 @@ const Mt = {
|
|
|
897
897
|
trailingBlockStyle: null,
|
|
898
898
|
trailingBlockType: null,
|
|
899
899
|
value: null
|
|
900
|
-
}, X = /* @__PURE__ */ ft((
|
|
900
|
+
}, X = /* @__PURE__ */ ft((v, a) => {
|
|
901
901
|
var t, r;
|
|
902
902
|
const {
|
|
903
903
|
ariaLabel: e,
|
|
904
904
|
ariaLabelledBy: n,
|
|
905
905
|
ariaValuetext: s,
|
|
906
|
-
className:
|
|
907
|
-
disabled:
|
|
908
|
-
discrete:
|
|
906
|
+
className: h,
|
|
907
|
+
disabled: d,
|
|
908
|
+
discrete: m,
|
|
909
909
|
displayMarkers: y,
|
|
910
910
|
id: D,
|
|
911
911
|
leadingBlock: T,
|
|
@@ -926,7 +926,7 @@ const Mt = {
|
|
|
926
926
|
trailingBlockType: C,
|
|
927
927
|
value: M,
|
|
928
928
|
...pt
|
|
929
|
-
} =
|
|
929
|
+
} = v, x = tt(), p = tt();
|
|
930
930
|
et(a, () => x.current, []), et(a, () => ({
|
|
931
931
|
...x.current,
|
|
932
932
|
layout: () => {
|
|
@@ -939,7 +939,7 @@ const Mt = {
|
|
|
939
939
|
(u = p.current) === null || u === void 0 || u.destroy();
|
|
940
940
|
}), [p]), k(() => {
|
|
941
941
|
p.current.foundation.min = S, p.current.foundation.max = I, p.current.foundation.step = R, p.current.foundation.layout();
|
|
942
|
-
}, [p,
|
|
942
|
+
}, [p, m, y, I, S, R]), k(() => {
|
|
943
943
|
p.current.foundation.layout();
|
|
944
944
|
}, [p, _, C]);
|
|
945
945
|
const j = B((u) => {
|
|
@@ -989,8 +989,8 @@ const Mt = {
|
|
|
989
989
|
}
|
|
990
990
|
}, [p, M, P, b, w, H]), k(() => {
|
|
991
991
|
var u;
|
|
992
|
-
(u = p.current) === null || u === void 0 || u.setDisabled(
|
|
993
|
-
}, [p,
|
|
992
|
+
(u = p.current) === null || u === void 0 || u.setDisabled(d);
|
|
993
|
+
}, [p, d]);
|
|
994
994
|
const ct = rt(() => {
|
|
995
995
|
const u = b ? M - 1 : I;
|
|
996
996
|
switch (_) {
|
|
@@ -1049,14 +1049,14 @@ const Mt = {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
}, [C, N, A, P, S, I, R, Q, b, H]), vt = _ !== "input" || (b || C !== "input") && _ === "input", Tt = C || N !== null || N !== void 0;
|
|
1051
1051
|
return /* @__PURE__ */ c.createElement("div", {
|
|
1052
|
-
className: F("lmnt", "lmnt-slider-container",
|
|
1052
|
+
className: F("lmnt", "lmnt-slider-container", d && "lmnt-slider--disabled")
|
|
1053
1053
|
}, vt && /* @__PURE__ */ c.createElement("div", {
|
|
1054
1054
|
className: F("lmnt-slider-info", "lmnt-slider-info-leading", _ === "input" && "lmnt-slider-info-with-input", U === "primary" && "lmnt-slider-info--primary", U === "secondary" && "lmnt-slider-info--secondary"),
|
|
1055
1055
|
style: V
|
|
1056
1056
|
}, ct), /* @__PURE__ */ c.createElement("div", {
|
|
1057
1057
|
className: "lmnt lmnt-slider-inner"
|
|
1058
1058
|
}, /* @__PURE__ */ c.createElement("div", O({
|
|
1059
|
-
className: F("lmnt", "mdc-slider", b && "mdc-slider--range",
|
|
1059
|
+
className: F("lmnt", "mdc-slider", b && "mdc-slider--range", m && "mdc-slider--discrete", m && y && "mdc-slider--tick-marks", U === "primary" && "mdc-slider--primary", U === "secondary" && "mdc-slider--secondary", h),
|
|
1060
1060
|
id: D,
|
|
1061
1061
|
ref: x
|
|
1062
1062
|
}, pt), b && /* @__PURE__ */ c.createElement("input", {
|
|
@@ -1070,9 +1070,9 @@ const Mt = {
|
|
|
1070
1070
|
"aria-label": e,
|
|
1071
1071
|
"aria-labelledby": n,
|
|
1072
1072
|
"aria-valuetext": s,
|
|
1073
|
-
"aria-disabled":
|
|
1074
|
-
disabled:
|
|
1075
|
-
tabIndex:
|
|
1073
|
+
"aria-disabled": d,
|
|
1074
|
+
disabled: d,
|
|
1075
|
+
tabIndex: d ? -1 : "0",
|
|
1076
1076
|
readOnly: !0
|
|
1077
1077
|
}), /* @__PURE__ */ c.createElement("input", {
|
|
1078
1078
|
className: "mdc-slider__input",
|
|
@@ -1085,9 +1085,9 @@ const Mt = {
|
|
|
1085
1085
|
"aria-label": e,
|
|
1086
1086
|
"aria-labelledby": n,
|
|
1087
1087
|
"aria-valuetext": s,
|
|
1088
|
-
"aria-disabled":
|
|
1089
|
-
disabled:
|
|
1090
|
-
tabIndex:
|
|
1088
|
+
"aria-disabled": d,
|
|
1089
|
+
disabled: d,
|
|
1090
|
+
tabIndex: d ? -1 : "0",
|
|
1091
1091
|
readOnly: !0
|
|
1092
1092
|
}), /* @__PURE__ */ c.createElement("div", {
|
|
1093
1093
|
className: "mdc-slider__track"
|
|
@@ -1097,11 +1097,11 @@ const Mt = {
|
|
|
1097
1097
|
className: "mdc-slider__track--active"
|
|
1098
1098
|
}, /* @__PURE__ */ c.createElement("div", {
|
|
1099
1099
|
className: "mdc-slider__track--active_fill"
|
|
1100
|
-
})),
|
|
1100
|
+
})), m && y && /* @__PURE__ */ c.createElement("div", {
|
|
1101
1101
|
className: "mdc-slider__tick-marks"
|
|
1102
1102
|
})), b && /* @__PURE__ */ c.createElement("div", {
|
|
1103
1103
|
className: "mdc-slider__thumb"
|
|
1104
|
-
},
|
|
1104
|
+
}, m && /* @__PURE__ */ c.createElement("div", {
|
|
1105
1105
|
className: "mdc-slider__value-indicator-container",
|
|
1106
1106
|
"aria-hidden": "true"
|
|
1107
1107
|
}, /* @__PURE__ */ c.createElement("div", {
|
|
@@ -1112,7 +1112,7 @@ const Mt = {
|
|
|
1112
1112
|
className: "mdc-slider__thumb-knob"
|
|
1113
1113
|
})), /* @__PURE__ */ c.createElement("div", {
|
|
1114
1114
|
className: "mdc-slider__thumb"
|
|
1115
|
-
},
|
|
1115
|
+
}, m && /* @__PURE__ */ c.createElement("div", {
|
|
1116
1116
|
className: "mdc-slider__value-indicator-container",
|
|
1117
1117
|
"aria-hidden": "true"
|
|
1118
1118
|
}, /* @__PURE__ */ c.createElement("div", {
|
|
@@ -1130,32 +1130,34 @@ X.displayName = "Slider";
|
|
|
1130
1130
|
X.propTypes = Mt;
|
|
1131
1131
|
X.defaultProps = Pt;
|
|
1132
1132
|
const Xt = ({
|
|
1133
|
-
propertyName:
|
|
1133
|
+
propertyName: v,
|
|
1134
1134
|
label: a,
|
|
1135
1135
|
minValue: t,
|
|
1136
1136
|
maxValue: r,
|
|
1137
1137
|
step: e,
|
|
1138
|
-
disabled: n
|
|
1138
|
+
disabled: n,
|
|
1139
|
+
...s
|
|
1139
1140
|
}) => {
|
|
1140
|
-
const { control:
|
|
1141
|
+
const { control: h } = At();
|
|
1141
1142
|
return /* @__PURE__ */ Y(
|
|
1142
1143
|
Ct,
|
|
1143
1144
|
{
|
|
1144
|
-
name:
|
|
1145
|
-
control:
|
|
1145
|
+
name: v,
|
|
1146
|
+
control: h,
|
|
1146
1147
|
render: ({ field: d }) => /* @__PURE__ */ Y(
|
|
1147
1148
|
X,
|
|
1148
1149
|
{
|
|
1149
1150
|
"data-testid": "slider",
|
|
1150
1151
|
...d,
|
|
1151
|
-
onChange: (
|
|
1152
|
-
d.onChange(
|
|
1152
|
+
onChange: (m) => {
|
|
1153
|
+
d.onChange(m.value);
|
|
1153
1154
|
},
|
|
1154
1155
|
label: a,
|
|
1155
1156
|
min: t,
|
|
1156
1157
|
max: r,
|
|
1157
1158
|
step: e,
|
|
1158
|
-
disabled: n
|
|
1159
|
+
disabled: n,
|
|
1160
|
+
...s
|
|
1159
1161
|
}
|
|
1160
1162
|
)
|
|
1161
1163
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hortiview/shared-components",
|
|
3
3
|
"description": "This is a shared component library. It should used in the HortiView platform and its modules.",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
|
|
7
7
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|