@mw-kit/mw-ui 1.7.37 → 1.7.39

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.
@@ -15,6 +15,7 @@ export interface RangeProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
15
15
  value: number;
16
16
  width?: string;
17
17
  onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: number) => void;
18
+ setValue: React.Dispatch<React.SetStateAction<number>>;
18
19
  markers?: {
19
20
  min?: number;
20
21
  max?: number;
@@ -1,10 +1,15 @@
1
1
  import React from 'react';
2
+ export declare const NavBar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
+ percent: number;
4
+ position: 'bottom' | 'top';
5
+ }, never>;
2
6
  export declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
3
7
  interface StyledLabelProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
4
8
  disabled: 1 | 0;
5
9
  required: 1 | 0;
6
10
  width?: string;
7
11
  }
12
+ export declare const LabelContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
13
  export declare const Label: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, StyledLabelProps, never>;
9
14
  interface InputContainerProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
10
15
  invalid: 1 | 0;
package/dist/index.js CHANGED
@@ -15545,7 +15545,7 @@ var Switch = function Switch(props) {
15545
15545
  })), React__default.createElement("span", null), label.after && React__default.createElement(LabelContainer$3, null, label.after));
15546
15546
  };
15547
15547
 
15548
- var _templateObject$q, _templateObject2$m, _templateObject3$i, _templateObject4$d, _templateObject5$b, _templateObject6$a, _templateObject7$a, _templateObject8$8, _templateObject9$8, _templateObject10$6, _templateObject11$4, _templateObject12$3, _templateObject13$2, _templateObject14$2, _templateObject15$2, _templateObject16$2;
15548
+ var _templateObject$q, _templateObject2$m, _templateObject3$i, _templateObject4$d, _templateObject5$b, _templateObject6$a, _templateObject7$a, _templateObject8$8, _templateObject9$8, _templateObject10$6, _templateObject11$4, _templateObject12$3, _templateObject13$2, _templateObject14$2, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$1, _templateObject20$1;
15549
15549
  var bullet = styled.css(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n appearance: none;\n width: ", ";\n height: ", ";\n border-radius: 100%;\n border-width: 1px;\n border-style: solid;\n background-color: ", ";\n box-shadow: 0px 1px 3px ", ";\n"])), function (_ref) {
15550
15550
  var theme = _ref.theme;
15551
15551
  return theme.spacings.s4;
@@ -15559,61 +15559,88 @@ var bullet = styled.css(_templateObject$q || (_templateObject$q = _taggedTemplat
15559
15559
  var theme = _ref4.theme;
15560
15560
  return theme.getColor('black', 10);
15561
15561
  });
15562
- var Input$2 = styled__default.input(_templateObject2$m || (_templateObject2$m = _taggedTemplateLiteralLoose(["\n appearance: none;\n width: 100%;\n height: 10px;\n background-color: transparent;\n outline: none;\n position: relative;\n z-index: 3;\n margin: 0;\n\n :not(:disabled) {\n cursor: pointer;\n }\n\n /** firefox */\n ::-moz-range-thumb {\n ", "\n }\n /** ie */\n ::-ms-thumb {\n ", "\n }\n /** chrome */\n ::-webkit-slider-thumb {\n ", "\n }\n"])), bullet, bullet, bullet);
15563
- var Label$5 = styled__default.label(_templateObject3$i || (_templateObject3$i = _taggedTemplateLiteralLoose(["\n ", ";\n line-height: 19px;\n\n width: ", ";\n box-sizing: border-box;\n display: block;\n position: relative;\n\n ", "\n\n > div:first-child {\n display: inline-block;\n margin-bottom: ", ";\n\n ", "\n }\n"])), function (_ref5) {
15562
+ var NavBar = styled__default.div(_templateObject2$m || (_templateObject2$m = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 2;\n\n left: 0;\n width: 100%;\n height: calc(33px + ", ");\n transition: height 0.25s ease-in-out;\n overflow: hidden;\n\n ", "\n\n > div {\n position: absolute;\n z-index: 2;\n\n width: 100px;\n left: ", ";\n background-color: ", ";\n color: ", ";\n padding: ", ";\n border-radius: 4px;\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n"])), function (_ref5) {
15564
15563
  var theme = _ref5.theme;
15565
- return theme.useTypography('p');
15566
- }, function (_ref6) {
15567
- var width = _ref6.width;
15568
- return width || '100%';
15569
- }, function (_ref7) {
15570
- var disabled = _ref7.disabled;
15571
- if (!disabled) return;
15572
- return styled.css(_templateObject4$d || (_templateObject4$d = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
15573
- }, function (_ref8) {
15574
- var theme = _ref8.theme;
15575
15564
  return theme.spacings.s1;
15565
+ }, function (_ref6) {
15566
+ var position = _ref6.position;
15567
+ return position === 'bottom' ? styled.css(_templateObject3$i || (_templateObject3$i = _taggedTemplateLiteralLoose(["\n bottom: 100%;\n > div {\n bottom: ", ";\n }\n "])), function (_ref7) {
15568
+ var theme = _ref7.theme;
15569
+ return theme.spacings.s1;
15570
+ }) : styled.css(_templateObject4$d || (_templateObject4$d = _taggedTemplateLiteralLoose(["\n top: 100%;\n > div {\n top: ", ";\n }\n "])), function (_ref8) {
15571
+ var theme = _ref8.theme;
15572
+ return theme.spacings.s1;
15573
+ });
15576
15574
  }, function (_ref9) {
15577
- var required = _ref9.required;
15578
- if (!required) return;
15579
- return styled.css(_templateObject5$b || (_templateObject5$b = _taggedTemplateLiteralLoose(["\n :after {\n content: ' *';\n }\n "])));
15575
+ var percent = _ref9.percent;
15576
+ if (percent < 10) return '0%';
15577
+ if (percent > 90) return 'calc(100% - 100px)';
15578
+ return "calc(" + percent + "% - 50px + 22px * " + (50 - percent) / 100 + ")";
15579
+ }, function (_ref10) {
15580
+ var theme = _ref10.theme;
15581
+ return theme.colors.blue;
15582
+ }, function (_ref11) {
15583
+ var theme = _ref11.theme;
15584
+ return theme.colors.white;
15585
+ }, function (_ref12) {
15586
+ var theme = _ref12.theme;
15587
+ return theme.spacings.s1;
15580
15588
  });
15581
- var InputContainer$1 = styled__default.div(_templateObject6$a || (_templateObject6$a = _taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n gap: 6px;\n\n > div {\n position: relative;\n }\n\n ", "\n"])), function (_ref10) {
15582
- var theme = _ref10.theme,
15583
- invalid = _ref10.invalid;
15589
+ var Input$2 = styled__default.input(_templateObject5$b || (_templateObject5$b = _taggedTemplateLiteralLoose(["\n appearance: none;\n width: 100%;\n height: 10px;\n background-color: transparent;\n outline: none;\n position: relative;\n z-index: 3;\n margin: 0;\n\n :not(:disabled) {\n cursor: pointer;\n }\n\n /** firefox */\n ::-moz-range-thumb {\n ", "\n }\n /** ie */\n ::-ms-thumb {\n ", "\n }\n /** chrome */\n ::-webkit-slider-thumb {\n ", "\n }\n"])), bullet, bullet, bullet);
15590
+ var LabelContainer$4 = styled__default.div(_templateObject6$a || (_templateObject6$a = _taggedTemplateLiteralLoose(["\n display: inline-block;\n margin-bottom: ", ";\n"])), function (_ref13) {
15591
+ var theme = _ref13.theme;
15592
+ return theme.spacings.s1;
15593
+ });
15594
+ var Label$5 = styled__default.label(_templateObject7$a || (_templateObject7$a = _taggedTemplateLiteralLoose(["\n ", ";\n line-height: 19px;\n\n width: ", ";\n box-sizing: border-box;\n display: block;\n position: relative;\n\n ", "\n\n > ", " {\n ", "\n }\n\n :not(:hover) ", " {\n height: 0;\n }\n"])), function (_ref14) {
15595
+ var theme = _ref14.theme;
15596
+ return theme.useTypography('p');
15597
+ }, function (_ref15) {
15598
+ var width = _ref15.width;
15599
+ return width || '100%';
15600
+ }, function (_ref16) {
15601
+ var disabled = _ref16.disabled;
15602
+ if (!disabled) return;
15603
+ return styled.css(_templateObject8$8 || (_templateObject8$8 = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
15604
+ }, LabelContainer$4, function (_ref17) {
15605
+ var required = _ref17.required;
15606
+ return required && styled.css(_templateObject9$8 || (_templateObject9$8 = _taggedTemplateLiteralLoose(["\n :after {\n content: ' *';\n }\n "])));
15607
+ }, NavBar);
15608
+ var InputContainer$1 = styled__default.div(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n gap: 6px;\n\n > div {\n position: relative;\n }\n\n ", "\n"])), function (_ref18) {
15609
+ var theme = _ref18.theme,
15610
+ invalid = _ref18.invalid;
15584
15611
 
15585
15612
  if (!invalid) {
15586
- return styled.css(_templateObject7$a || (_templateObject7$a = _taggedTemplateLiteralLoose(["\n ", " > span {\n background-color: ", ";\n }\n\n ", " {\n /** firefox */\n ::-moz-range-thumb {\n border-color: ", ";\n }\n /** ie */\n ::-ms-thumb {\n border-color: ", ";\n }\n /** chrome */\n ::-webkit-slider-thumb {\n border-color: ", ";\n }\n }\n "])), SelectedArea, theme.colors.blue, Input$2, theme.colors.lightestGrey, theme.colors.lightestGrey, theme.colors.lightestGrey);
15613
+ return styled.css(_templateObject11$4 || (_templateObject11$4 = _taggedTemplateLiteralLoose(["\n ", " > span {\n background-color: ", ";\n }\n\n ", " {\n /** firefox */\n ::-moz-range-thumb {\n border-color: ", ";\n }\n /** ie */\n ::-ms-thumb {\n border-color: ", ";\n }\n /** chrome */\n ::-webkit-slider-thumb {\n border-color: ", ";\n }\n }\n "])), SelectedArea, theme.colors.blue, Input$2, theme.colors.lightestGrey, theme.colors.lightestGrey, theme.colors.lightestGrey);
15587
15614
  }
15588
15615
 
15589
- return styled.css(_templateObject8$8 || (_templateObject8$8 = _taggedTemplateLiteralLoose(["\n ", " > span {\n background-color: ", ";\n }\n\n ", " {\n /** firefox */\n ::-moz-range-thumb {\n border-color: ", ";\n }\n /** ie */\n ::-ms-thumb {\n border-color: ", ";\n }\n /** chrome */\n ::-webkit-slider-thumb {\n border-color: ", ";\n }\n }\n "])), SelectedArea, theme.colors.warningRed, Input$2, theme.colors.warningRed, theme.colors.warningRed, theme.colors.warningRed);
15616
+ return styled.css(_templateObject12$3 || (_templateObject12$3 = _taggedTemplateLiteralLoose(["\n ", " > span {\n background-color: ", ";\n }\n\n ", " {\n /** firefox */\n ::-moz-range-thumb {\n border-color: ", ";\n }\n /** ie */\n ::-ms-thumb {\n border-color: ", ";\n }\n /** chrome */\n ::-webkit-slider-thumb {\n border-color: ", ";\n }\n }\n "])), SelectedArea, theme.colors.warningRed, Input$2, theme.colors.warningRed, theme.colors.warningRed, theme.colors.warningRed);
15590
15617
  });
15591
- var MinMaxLabelContainer = styled__default.div(_templateObject9$8 || (_templateObject9$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n padding-bottom: 2px;\n"])));
15592
- var LabelsContainer = styled__default.div(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 7px;\n\n ", "\n"])), function (_ref11) {
15593
- var position = _ref11.position;
15618
+ var MinMaxLabelContainer = styled__default.div(_templateObject13$2 || (_templateObject13$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n padding-bottom: 2px;\n"])));
15619
+ var LabelsContainer = styled__default.div(_templateObject14$2 || (_templateObject14$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 7px;\n\n ", "\n"])), function (_ref19) {
15620
+ var position = _ref19.position;
15594
15621
 
15595
15622
  if (position === 'bottom') {
15596
- return styled.css(_templateObject11$4 || (_templateObject11$4 = _taggedTemplateLiteralLoose(["\n ", " {\n flex-direction: column-reverse;\n }\n\n ", " {\n :after {\n bottom: calc(100% + 10.5px);\n }\n }\n\n ", " {\n align-items: start;\n }\n "])), InputContainer$1, Marker, MinMaxLabelContainer);
15623
+ return styled.css(_templateObject15$2 || (_templateObject15$2 = _taggedTemplateLiteralLoose(["\n ", " {\n flex-direction: column-reverse;\n }\n\n ", " {\n :after {\n bottom: calc(100% + 10.5px);\n }\n }\n\n ", " {\n align-items: start;\n }\n "])), InputContainer$1, Marker, MinMaxLabelContainer);
15597
15624
  }
15598
15625
 
15599
- return styled.css(_templateObject12$3 || (_templateObject12$3 = _taggedTemplateLiteralLoose(["\n ", " {\n flex-direction: column;\n }\n\n ", " {\n :after {\n top: calc(100% + 8px);\n }\n }\n\n ", " {\n align-items: end;\n }\n "])), InputContainer$1, Marker, MinMaxLabelContainer);
15626
+ return styled.css(_templateObject16$2 || (_templateObject16$2 = _taggedTemplateLiteralLoose(["\n ", " {\n flex-direction: column;\n }\n\n ", " {\n :after {\n top: calc(100% + 8px);\n }\n }\n\n ", " {\n align-items: end;\n }\n "])), InputContainer$1, Marker, MinMaxLabelContainer);
15600
15627
  });
15601
- var SelectedArea = styled__default.div(_templateObject13$2 || (_templateObject13$2 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n\n height: 3px;\n width: 100%;\n position: absolute;\n bottom: calc(50% - 2px);\n left: 0;\n display: flex;\n z-index: 1;\n\n > span {\n width: ", "%;\n display: block;\n box-sizing: border-box;\n height: 100%;\n }\n"])), function (_ref12) {
15602
- var theme = _ref12.theme;
15628
+ var SelectedArea = styled__default.div(_templateObject17$2 || (_templateObject17$2 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n\n height: 3px;\n width: 100%;\n position: absolute;\n bottom: calc(50% - 2px);\n left: 0;\n display: flex;\n z-index: 1;\n\n > span {\n width: ", "%;\n display: block;\n box-sizing: border-box;\n height: 100%;\n }\n"])), function (_ref20) {
15629
+ var theme = _ref20.theme;
15603
15630
  return theme.getColor('greyishBlue', 10);
15604
- }, function (_ref13) {
15605
- var percent = _ref13.percent;
15631
+ }, function (_ref21) {
15632
+ var percent = _ref21.percent;
15606
15633
  return percent;
15607
15634
  });
15608
- var MarkersContainer = styled__default.div(_templateObject14$2 || (_templateObject14$2 = _taggedTemplateLiteralLoose(["\n height: 17px;\n"])));
15609
- var Marker = styled__default.div(_templateObject15$2 || (_templateObject15$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n width: 40px;\n text-align: center;\n left: ", ";\n z-index: 2;\n\n :first-child {\n left: 0;\n text-align: left;\n\n :after {\n left: 0;\n }\n }\n :last-child {\n right: 0;\n left: unset;\n text-align: right;\n\n :after {\n right: 0;\n left: unset;\n }\n }\n\n ", "\n"])), function (_ref14) {
15610
- var left = _ref14.left;
15635
+ var MarkersContainer = styled__default.div(_templateObject18$2 || (_templateObject18$2 = _taggedTemplateLiteralLoose(["\n height: 17px;\n"])));
15636
+ var Marker = styled__default.div(_templateObject19$1 || (_templateObject19$1 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n width: 40px;\n text-align: center;\n left: ", ";\n z-index: 2;\n\n :first-child {\n left: 0;\n text-align: left;\n\n :after {\n left: 0;\n }\n }\n :last-child {\n right: 0;\n left: unset;\n text-align: right;\n\n :after {\n right: 0;\n left: unset;\n }\n }\n\n ", "\n"])), function (_ref22) {
15637
+ var left = _ref22.left;
15611
15638
  return left;
15612
- }, function (_ref15) {
15613
- var bullet = _ref15.bullet,
15614
- theme = _ref15.theme;
15639
+ }, function (_ref23) {
15640
+ var bullet = _ref23.bullet,
15641
+ theme = _ref23.theme;
15615
15642
  if (!bullet) return;
15616
- return styled.css(_templateObject16$2 || (_templateObject16$2 = _taggedTemplateLiteralLoose(["\n :after {\n content: '';\n position: absolute;\n left: calc(50% - 5px);\n width: 10px;\n height: 10px;\n border-radius: 100%;\n border: 1px solid ", ";\n background-color: ", ";\n box-shadow: 0px 1px 3px ", ";\n }\n "])), theme.colors.lightestGrey, theme.colors.white, theme.getColor('black', 10));
15643
+ return styled.css(_templateObject20$1 || (_templateObject20$1 = _taggedTemplateLiteralLoose(["\n :after {\n content: '';\n position: absolute;\n left: calc(50% - 5px);\n width: 10px;\n height: 10px;\n border-radius: 100%;\n border: 1px solid ", ";\n background-color: ", ";\n box-shadow: 0px 1px 3px ", ";\n }\n "])), theme.colors.lightestGrey, theme.colors.white, theme.getColor('black', 10));
15617
15644
  });
15618
15645
 
15619
15646
  var getMarkers = function getMarkers(props) {
@@ -15686,6 +15713,16 @@ var getMarkers = function getMarkers(props) {
15686
15713
  };
15687
15714
  };
15688
15715
 
15716
+ var getLeft = function getLeft(markers, percent, index) {
15717
+ var z = markers - 2;
15718
+ if (z < markers - 1) z = markers - 1;
15719
+ var y = 20 / z;
15720
+ var x = 20 - y * (z - index);
15721
+ var p = index * percent;
15722
+ var left = "calc(" + p + "% - 10px - " + x + "px)";
15723
+ return left;
15724
+ };
15725
+
15689
15726
  var Range = React__default.forwardRef(function (props, ref) {
15690
15727
  var label = props.label,
15691
15728
  minLabel = props.minLabel,
@@ -15693,7 +15730,8 @@ var Range = React__default.forwardRef(function (props, ref) {
15693
15730
  invalid = props.invalid,
15694
15731
  disabled = props.disabled,
15695
15732
  required = props.required,
15696
- width = props.width;
15733
+ width = props.width,
15734
+ setValue = props.setValue;
15697
15735
 
15698
15736
  var _getMarkers = getMarkers(props),
15699
15737
  min = _getMarkers.min,
@@ -15712,18 +15750,69 @@ var Range = React__default.forwardRef(function (props, ref) {
15712
15750
  throw new Error('Invalid value');
15713
15751
  }
15714
15752
 
15715
- var _onChange = props.onChange || function () {};
15716
-
15717
- var onChange = strict ? function (event) {
15718
- var index = parseInt(event.target.value);
15753
+ var getValue = strict ? function (v) {
15754
+ var index = typeof v === 'number' ? v : parseInt(v);
15719
15755
  var value = markers[index].value;
15756
+ return value;
15757
+ } : function (v) {
15758
+ var value = typeof v === 'number' ? v : parseFloat(v);
15759
+ return value;
15760
+ };
15720
15761
 
15721
- _onChange(event, value);
15722
- } : function (event) {
15723
- var value = parseFloat(event.target.value);
15762
+ var _onChange = props.onChange || function (_event, value) {
15763
+ return setValue(value);
15764
+ };
15765
+
15766
+ var onChange = function onChange(event) {
15767
+ var value = getValue(event.target.value);
15724
15768
 
15725
15769
  _onChange(event, value);
15726
15770
  };
15771
+
15772
+ var _ref = strict ? {
15773
+ increment: function increment() {
15774
+ setValue(function (prev) {
15775
+ var index = markers.findIndex(function (e) {
15776
+ return e.value === prev;
15777
+ });
15778
+ if (index < 0) return prev;
15779
+ var x = index + 1;
15780
+ return x < markers.length ? markers[x].value : prev;
15781
+ });
15782
+ },
15783
+ canIncrement: value + 1 < markers.length,
15784
+ decrement: function decrement() {
15785
+ setValue(function (prev) {
15786
+ var index = markers.findIndex(function (e) {
15787
+ return e.value === prev;
15788
+ });
15789
+ if (index < 0) return prev;
15790
+ var x = index - 1;
15791
+ return x >= 0 ? markers[x].value : prev;
15792
+ });
15793
+ },
15794
+ canDecrement: value - 1 >= 0
15795
+ } : {
15796
+ increment: function increment() {
15797
+ setValue(function (prev) {
15798
+ var x = prev + step;
15799
+ return x > max ? prev : x;
15800
+ });
15801
+ },
15802
+ canIncrement: value + step <= max,
15803
+ decrement: function decrement() {
15804
+ setValue(function (prev) {
15805
+ var x = prev - step;
15806
+ return x < min ? prev : x;
15807
+ });
15808
+ },
15809
+ canDecrement: value - step >= min
15810
+ },
15811
+ increment = _ref.increment,
15812
+ canIncrement = _ref.canIncrement,
15813
+ decrement = _ref.decrement,
15814
+ canDecrement = _ref.canDecrement;
15815
+
15727
15816
  var inputProps = filterObject(props, ['label', 'minLabel', 'maxLabel', 'invalid', 'required', 'width', 'onChange', 'step', 'value'], {
15728
15817
  min: min,
15729
15818
  max: max,
@@ -15735,17 +15824,14 @@ var Range = React__default.forwardRef(function (props, ref) {
15735
15824
  required: required ? 1 : 0,
15736
15825
  disabled: disabled ? 1 : 0,
15737
15826
  width: width
15738
- }, React__default.createElement("div", null, label), React__default.createElement(LabelsContainer, {
15827
+ }, label && React__default.createElement("div", {
15828
+ children: label
15829
+ }), React__default.createElement(LabelsContainer, {
15739
15830
  position: position
15740
15831
  }, minLabel && React__default.createElement(MinMaxLabelContainer, null, minLabel), React__default.createElement(InputContainer$1, {
15741
15832
  invalid: invalid ? 1 : 0
15742
15833
  }, markers.length > 0 && React__default.createElement(MarkersContainer, null, markers.map(function (marker, index) {
15743
- var z = markers.length - 2;
15744
- if (z < markers.length - 1) z = markers.length - 1;
15745
- var y = 20 / z;
15746
- var x = 20 - y * (z - index);
15747
- var p = index * percent;
15748
- var left = "calc(" + p + "% - 10px - " + x + "px)";
15834
+ var left = getLeft(markers.length, percent, index);
15749
15835
  var bullet = marker.value > value ? 1 : 0;
15750
15836
  return React__default.createElement(Marker, {
15751
15837
  key: marker.value,
@@ -15754,7 +15840,20 @@ var Range = React__default.forwardRef(function (props, ref) {
15754
15840
  }, marker.label);
15755
15841
  })), React__default.createElement("div", null, React__default.createElement(Input$2, Object.assign({
15756
15842
  ref: ref
15757
- }, inputProps)), React__default.createElement(SelectedArea, {
15843
+ }, inputProps)), React__default.createElement(NavBar, {
15844
+ percent: value * 100 / max,
15845
+ position: position
15846
+ }, React__default.createElement("div", null, React__default.createElement(Icon, {
15847
+ type: 'feather',
15848
+ icon: 'minus_circle',
15849
+ color: 'white',
15850
+ onClick: canDecrement ? decrement : undefined
15851
+ }), getValue(value), React__default.createElement(Icon, {
15852
+ type: 'feather',
15853
+ icon: 'plus_circle',
15854
+ color: 'white',
15855
+ onClick: canIncrement ? increment : undefined
15856
+ }))), React__default.createElement(SelectedArea, {
15758
15857
  percent: percent
15759
15858
  }, Array(spans).fill(1).map(function (_value, index) {
15760
15859
  return React__default.createElement("span", {
@@ -15765,7 +15864,7 @@ var Range = React__default.forwardRef(function (props, ref) {
15765
15864
  Range.displayName = 'input';
15766
15865
 
15767
15866
  var _templateObject$r, _templateObject2$n, _templateObject3$j, _templateObject4$e, _templateObject5$c, _templateObject6$b, _templateObject7$b;
15768
- var LabelContainer$4 = styled__default.div(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n ", "\n display: flex;\n align-items: center;\n"])), function (_ref) {
15867
+ var LabelContainer$5 = styled__default.div(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n ", "\n display: flex;\n align-items: center;\n"])), function (_ref) {
15769
15868
  var theme = _ref.theme;
15770
15869
  return theme.useTypography('p');
15771
15870
  });
@@ -15783,7 +15882,7 @@ var Label$6 = styled__default.label(_templateObject2$n || (_templateObject2$n =
15783
15882
  }, function (_ref4) {
15784
15883
  var required = _ref4.required;
15785
15884
  if (!required) return;
15786
- return styled.css(_templateObject5$c || (_templateObject5$c = _taggedTemplateLiteralLoose(["\n > ", " {\n :after {\n content: ' *';\n }\n }\n "])), LabelContainer$4);
15885
+ return styled.css(_templateObject5$c || (_templateObject5$c = _taggedTemplateLiteralLoose(["\n > ", " {\n :after {\n content: ' *';\n }\n }\n "])), LabelContainer$5);
15787
15886
  }, function (_ref5) {
15788
15887
  var invalid = _ref5.invalid;
15789
15888
 
@@ -15821,7 +15920,7 @@ var RadioButton = function RadioButton(props) {
15821
15920
  invalid: invalid ? 1 : 0
15822
15921
  }, React__default.createElement("input", Object.assign({}, htmlProps, {
15823
15922
  type: 'radio'
15824
- })), React__default.createElement("span", null), label && React__default.createElement(LabelContainer$4, null, label));
15923
+ })), React__default.createElement("span", null), label && React__default.createElement(LabelContainer$5, null, label));
15825
15924
  };
15826
15925
 
15827
15926
  var validate = function validate(_ref, min, max) {
@@ -16009,7 +16108,7 @@ var parse = function parse(value) {
16009
16108
 
16010
16109
  var _templateObject$s, _templateObject2$o, _templateObject3$k, _templateObject4$f, _templateObject5$d, _templateObject6$c, _templateObject7$c, _templateObject8$9, _templateObject9$9, _templateObject10$7, _templateObject11$5, _templateObject12$4;
16011
16110
  var RelativeContainer$5 = styled__default.div(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n position: relative;\n user-select: none;\n min-width: 220px;\n\n > input,\n > label > input {\n color: transparent;\n background-color: transparent;\n width: 1px;\n height: 1px;\n position: absolute;\n left: 0;\n bottom: 0;\n border: 0;\n padding: 0;\n overflow: hidden;\n outline: none;\n box-shadow: none;\n }\n"])));
16012
- var LabelContainer$5 = styled__default.div(_templateObject2$o || (_templateObject2$o = _taggedTemplateLiteralLoose(["\n ", "\n line-height: 17px;\n flex: 1;\n\n :first-child {\n text-align: left;\n }\n :not(:first-child) {\n text-align: center;\n }\n\n ", "\n\n ", ";\n"])), function (_ref) {
16111
+ var LabelContainer$6 = styled__default.div(_templateObject2$o || (_templateObject2$o = _taggedTemplateLiteralLoose(["\n ", "\n line-height: 17px;\n flex: 1;\n\n :first-child {\n text-align: left;\n }\n :not(:first-child) {\n text-align: center;\n }\n\n ", "\n\n ", ";\n"])), function (_ref) {
16013
16112
  var theme = _ref.theme;
16014
16113
  return theme.useTypography('p');
16015
16114
  }, function (_ref2) {
@@ -16177,7 +16276,7 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
16177
16276
  paddingless: props.paddingless ? 1 : 0,
16178
16277
  borderless: props.borderless ? 1 : 0
16179
16278
  }, function () {
16180
- var label = React__default.createElement(LabelContainer$5, {
16279
+ var label = React__default.createElement(LabelContainer$6, {
16181
16280
  onClick: onClick
16182
16281
  }, !value.some(function (v) {
16183
16282
  return !isDateInstance(v);