@invoicebox/ui 0.1.0-alpha.224 → 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.
- package/dist/components/form/DateTimeInput/components/MobileDateTimeCalendar/index.js +2 -2
- package/dist/components/form/DateTimeInput/components/MobileDateTimeCalendar/styles.d.ts +1 -0
- package/dist/components/form/DateTimeInput/components/MobileDateTimeCalendar/styles.js +6 -2
- package/dist/components/form/DateTimeInput/components/TimePicker/styles.js +3 -3
- package/dist/components/form/DateTimeInput/hooks/useTimePickerHeight.d.ts +1 -1
- package/dist/components/form/DateTimeInput/hooks/useTimePickerHeight.js +2 -2
- package/dist/components/form/DateTimeInput/index.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/package.json +1 -1
|
@@ -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/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export { Toggle } from './components/form/Toggle';
|
|
|
45
45
|
export type { TProps as TToggleProps } from './components/form/Toggle';
|
|
46
46
|
export { DateInput } from './components/form/DateInput';
|
|
47
47
|
export type { TProps as TDateInputProps } from './components/form/DateInput';
|
|
48
|
+
export { DateTimeInput } from './components/form/DateTimeInput';
|
|
49
|
+
export type { TProps as TDateTimeInputProps } from './components/form/DateTimeInput';
|
|
48
50
|
export { SearchInput } from './components/form/SearchInput';
|
|
49
51
|
export type { TProps as TSearchInputProps } from './components/form/SearchInput';
|
|
50
52
|
export { CodeInput } from './components/form/CodeInput';
|
package/dist/index.js
CHANGED
|
@@ -75,6 +75,12 @@ Object.defineProperty(exports, "DateInput", {
|
|
|
75
75
|
return _DateInput.DateInput;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "DateTimeInput", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function get() {
|
|
81
|
+
return _DateTimeInput.DateTimeInput;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
78
84
|
Object.defineProperty(exports, "Divider", {
|
|
79
85
|
enumerable: true,
|
|
80
86
|
get: function get() {
|
|
@@ -364,6 +370,7 @@ var _TextInput = require("./components/form/TextInput");
|
|
|
364
370
|
var _Select = require("./components/form/Select");
|
|
365
371
|
var _Toggle = require("./components/form/Toggle");
|
|
366
372
|
var _DateInput = require("./components/form/DateInput");
|
|
373
|
+
var _DateTimeInput = require("./components/form/DateTimeInput");
|
|
367
374
|
var _SearchInput = require("./components/form/SearchInput");
|
|
368
375
|
var _CodeInput = require("./components/form/CodeInput");
|
|
369
376
|
var _CountrySelect = require("./components/form/CountrySelect");
|