@invoicebox/ui 0.1.0-alpha.225 → 0.1.0-alpha.226

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.
@@ -75,10 +75,10 @@ var MobileDateTimeCalendar = exports.MobileDateTimeCalendar = function MobileDat
75
75
  minDate: minDate,
76
76
  maxDate: maxDate,
77
77
  isLargeMobileSize: true
78
- })) : /*#__PURE__*/_react["default"].createElement(_TimePicker.TimePicker, {
78
+ })) : /*#__PURE__*/_react["default"].createElement(S.TimePickerWrapper, null, /*#__PURE__*/_react["default"].createElement(_TimePicker.TimePicker, {
79
79
  value: [(calendarDropdownValue === null || calendarDropdownValue === void 0 ? void 0 : calendarDropdownValue.getHours()) || 0, (calendarDropdownValue === null || calendarDropdownValue === void 0 ? void 0 : calendarDropdownValue.getMinutes()) || 0],
80
80
  onChange: onTimeChange,
81
81
  maxTime: calendarDropdownValue && maxDate && calendarDropdownValue.getDay() === maxDate.getDay() ? [maxDate.getHours(), maxDate.getMinutes()] : undefined,
82
82
  minTime: calendarDropdownValue && minDate && calendarDropdownValue.getDay() === minDate.getDay() ? [minDate.getHours(), minDate.getMinutes()] : undefined
83
- }));
83
+ })));
84
84
  };
@@ -10,3 +10,4 @@ export declare const ApplyButton: import("styled-components/dist/types").IStyled
10
10
  $color: string;
11
11
  }>> & string;
12
12
  export declare const MobileCalendarWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ export declare const TimePickerWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.MobileCalendarWrapper = exports.Header = exports.HeadLabel = exports.CloseButton = exports.ApplyButton = void 0;
6
+ exports.TimePickerWrapper = exports.MobileCalendarWrapper = exports.Header = exports.HeadLabel = exports.CloseButton = exports.ApplyButton = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
8
  var _Typography = require("../../../../common/Typography");
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -35,4 +35,8 @@ var ApplyButton = exports.ApplyButton = _styledComponents["default"].button.with
35
35
  var MobileCalendarWrapper = exports.MobileCalendarWrapper = _styledComponents["default"].div.withConfig({
36
36
  displayName: "styles__MobileCalendarWrapper",
37
37
  componentId: "sc-agerw5-4"
38
- })(["padding:18px 16px 30px;display:flex;justify-content:center;"]);
38
+ })(["padding:18px 16px 30px;display:flex;justify-content:center;"]);
39
+ var TimePickerWrapper = exports.TimePickerWrapper = _styledComponents["default"].div.withConfig({
40
+ displayName: "styles__TimePickerWrapper",
41
+ componentId: "sc-agerw5-5"
42
+ })(["padding-bottom:30px;"]);
@@ -11,7 +11,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
11
11
  var Wrapper = exports.Wrapper = _styledComponents["default"].div.withConfig({
12
12
  displayName: "styles__Wrapper",
13
13
  componentId: "sc-okz9lx-0"
14
- })(["display:flex;width:93px;box-sizing:border-box;height:", "px;@media ", "{flex-direction:column;width:auto;}"], function (_ref) {
14
+ })(["display:flex;width:93px;box-sizing:border-box;height:", "px;@media ", "{flex-direction:column;width:auto;height:auto;}"], function (_ref) {
15
15
  var $height = _ref.$height;
16
16
  return $height;
17
17
  }, _breakpoints.breakpoints.sm);
@@ -35,11 +35,11 @@ var Label = exports.Label = (0, _styledComponents["default"])(_Typography.Typogr
35
35
  var ValuesWrapper = exports.ValuesWrapper = _styledComponents["default"].div.withConfig({
36
36
  displayName: "styles__ValuesWrapper",
37
37
  componentId: "sc-okz9lx-3"
38
- })(["display:flex;flex-direction:column;gap:4px;width:30px;padding:8px;@media ", "{flex-direction:row;gap:0;}"], _breakpoints.breakpoints.sm);
38
+ })(["display:flex;flex-direction:column;gap:4px;width:30px;padding:8px 0;box-sizing:border-box;margin:0 auto;@media ", "{flex-direction:row;gap:0;margin:0;width:auto;padding:8px 0;}"], _breakpoints.breakpoints.sm);
39
39
  var ValueWrapper = exports.ValueWrapper = _styledComponents["default"].button.withConfig({
40
40
  displayName: "styles__ValueWrapper",
41
41
  componentId: "sc-okz9lx-4"
42
- })(["padding:2px 0;display:flex;justify-content:center;align-items:center;color:", ";background:", ";border-radius:5px;border:none;cursor:pointer;outline:none;&:disabled{cursor:not-allowed;color:", ";}@media ", "{flex-direction:row;width:44px;height:48px;flex-shrink:0;border-radius:50%;}"], function (_ref5) {
42
+ })(["padding:2px 0;display:flex;justify-content:center;align-items:center;color:", ";background:", ";border-radius:5px;border:none;cursor:pointer;outline:none;&:disabled{cursor:not-allowed;color:", ";}@media ", "{flex-direction:row;width:44px;height:48px;flex-shrink:0;border-radius:50%;padding:0;}"], function (_ref5) {
43
43
  var $isActive = _ref5.$isActive,
44
44
  $color = _ref5.$color,
45
45
  $colorActive = _ref5.$colorActive;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const useTimePickerHeight: () => {
2
+ export declare const useTimePickerHeight: (isOpen: boolean) => {
3
3
  calendarRef: import("react").RefObject<HTMLDivElement>;
4
4
  timePickerHeight: number;
5
5
  handleTimePickerSetHeight: () => void;
@@ -11,7 +11,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
11
11
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
12
12
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
13
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
14
- var useTimePickerHeight = exports.useTimePickerHeight = function useTimePickerHeight() {
14
+ var useTimePickerHeight = exports.useTimePickerHeight = function useTimePickerHeight(isOpen) {
15
15
  var calendarRef = (0, _react.useRef)(null);
16
16
  var _useState = (0, _react.useState)(0),
17
17
  _useState2 = _slicedToArray(_useState, 2),
@@ -28,7 +28,7 @@ var useTimePickerHeight = exports.useTimePickerHeight = function useTimePickerHe
28
28
  };
29
29
  (0, _react.useEffect)(function () {
30
30
  handleTimePickerSetHeight();
31
- }, []);
31
+ }, [isOpen]);
32
32
  return {
33
33
  calendarRef: calendarRef,
34
34
  timePickerHeight: timePickerHeight,
@@ -74,7 +74,7 @@ var DateTimeInput = exports.DateTimeInput = function DateTimeInput(_ref) {
74
74
  return isOpen ? handleCloseAndSkipDropdownValue() : setOpenFlag(true);
75
75
  }, [handleCloseAndSkipDropdownValue, isOpen]);
76
76
  var elRef = (0, _useOutsideClick.useOutsideClick)(handleCloseAndSkipDropdownValue);
77
- var _useTimePickerHeight = (0, _useTimePickerHeight2.useTimePickerHeight)(),
77
+ var _useTimePickerHeight = (0, _useTimePickerHeight2.useTimePickerHeight)(isOpen),
78
78
  calendarRef = _useTimePickerHeight.calendarRef,
79
79
  handleTimePickerSetHeight = _useTimePickerHeight.handleTimePickerSetHeight,
80
80
  timePickerHeight = _useTimePickerHeight.timePickerHeight;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invoicebox/ui",
3
- "version": "0.1.0-alpha.225",
3
+ "version": "0.1.0-alpha.226",
4
4
  "description": "Invoicebox UI",
5
5
  "license": "Apache License 2.0",
6
6
  "scripts": {