@synerise/ds-time-picker 0.6.37 → 0.6.38

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.6.38](https://github.com/Synerise/synerise-design/compare/@synerise/ds-time-picker@0.6.37...@synerise/ds-time-picker@0.6.38) (2022-09-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **time-picker:** fix scroll picker issue ([6ab6f23](https://github.com/Synerise/synerise-design/commit/6ab6f23e50cc063494afb22496b286672f29ff35))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.6.37](https://github.com/Synerise/synerise-design/compare/@synerise/ds-time-picker@0.6.36...@synerise/ds-time-picker@0.6.37) (2022-09-07)
7
18
 
8
19
  **Note:** Version bump only for package @synerise/ds-time-picker
@@ -15,7 +15,7 @@ export var OverlayContainer = styled.div.withConfig({
15
15
  export var Unit = styled.div.withConfig({
16
16
  displayName: "TimePickerstyles__Unit",
17
17
  componentId: "yk19n0-2"
18
- })(["display:flex;flex-direction:column;width:100%;height:192px;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;&::-webkit-scrollbar{width:0;}"]);
18
+ })(["display:flex;flex-direction:column;width:100%;overflow-x:hidden;overflow-y:scroll;.scrollbar-container{margin-right:-11px;}"]);
19
19
  export var UnitSeperator = styled.div.withConfig({
20
20
  displayName: "TimePickerstyles__UnitSeperator",
21
21
  componentId: "yk19n0-3"
@@ -31,7 +31,7 @@ export var CellText = styled(Label).withConfig({
31
31
  export var Cell = styled.button.withConfig({
32
32
  displayName: "TimePickerstyles__Cell",
33
33
  componentId: "yk19n0-5"
34
- })(["height:32px;text-align:center;display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:background-color 0.3s;cursor:pointer;background-color:", ";&&{border:none;padding:0;}&:hover{background-color:", ";", "{color:", ";}}&:disabled{&&{cursor:not-allowed;background-color:", ";}", "{cursor:not-allowed;opacity:0.4;}}", ";"], function (props) {
34
+ })(["height:32px;width:100%;text-align:center;display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:background-color 0.3s;cursor:pointer;background-color:", ";&&{border:none;padding:0;}&:hover{background-color:", ";", "{color:", ";}}&:disabled{&&{cursor:not-allowed;background-color:", ";}", "{cursor:not-allowed;opacity:0.4;}}", ";"], function (props) {
35
35
  return props.theme.palette.white;
36
36
  }, function (props) {
37
37
  return props.theme.palette['grey-050'];
@@ -61,7 +61,7 @@ export var TimePickerInput = styled(Input).withConfig({
61
61
  export var PlaceholderWrapper = styled.div.withConfig({
62
62
  displayName: "TimePickerstyles__PlaceholderWrapper",
63
63
  componentId: "yk19n0-8"
64
- })([" width:100%;position:relative;"]);
64
+ })(["width:100%;position:relative;"]);
65
65
  export var Placeholder = styled.div.withConfig({
66
66
  displayName: "TimePickerstyles__Placeholder",
67
67
  componentId: "yk19n0-9"
package/dist/Unit.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import dayjs from 'dayjs';
3
3
  import { debounce } from 'debounce';
4
+ import Scrollbar from '@synerise/ds-scrollbar';
4
5
  import * as S from './TimePicker.styles';
5
6
  var CELL_HEIGHT = 32;
6
7
  var DEBOUNCE_DELAY = 150;
@@ -61,9 +62,11 @@ var Unit = function Unit(_ref) {
61
62
  }
62
63
  }, [selectedCellRef, unitContainerRef, isFirstRender, forceUpdate, containerHeight]);
63
64
  return /*#__PURE__*/React.createElement(S.Unit, {
64
- "data-testid": "ds-time-picker-unit-" + unit,
65
+ "data-testid": "ds-time-picker-unit-" + unit
66
+ }, /*#__PURE__*/React.createElement(Scrollbar, {
65
67
  ref: unitContainerRef,
66
- onScroll: debounce(scrollHandler, DEBOUNCE_DELAY)
68
+ onScroll: debounce(scrollHandler, DEBOUNCE_DELAY),
69
+ maxHeight: 192
67
70
  }, options.map(function (option) {
68
71
  var normalizedStringValue = option < 10 ? "0" + option : option.toString();
69
72
  var isDisabled = disabled && disabled.includes(option);
@@ -83,7 +86,7 @@ var Unit = function Unit(_ref) {
83
86
  }, /*#__PURE__*/React.createElement(S.CellText, null, normalizedStringValue));
84
87
  }), !!containerHeight && /*#__PURE__*/React.createElement(S.PlaceholderWrapper, null, /*#__PURE__*/React.createElement(S.Placeholder, {
85
88
  height: containerHeight - CELL_HEIGHT
86
- })));
89
+ }))));
87
90
  };
88
91
 
89
92
  export default Unit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-time-picker",
3
- "version": "0.6.37",
3
+ "version": "0.6.38",
4
4
  "description": "TimePicker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -47,5 +47,5 @@
47
47
  "devDependencies": {
48
48
  "@types/debounce": "^1.2.0"
49
49
  },
50
- "gitHead": "93bd4f1ab7f265f408a77218692a7987190ebce2"
50
+ "gitHead": "4a728965c03f982f1da86336e3a16db41ffc5a27"
51
51
  }