@dreamcommerce/aurora 3.1.36-3 → 3.1.36-5
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/build/cjs/packages/aurora/src/components/time_picker/components/time_picker_content.js +1 -1
- package/build/cjs/packages/aurora/src/components/time_picker/time_picker.js +1 -1
- package/build/cjs/packages/aurora/src/components/time_picker/time_picker_utils.js +2 -2
- package/build/esm/packages/aurora/src/components/time_picker/components/time_picker_content.js +1 -1
- package/build/esm/packages/aurora/src/components/time_picker/components/time_picker_time_selector.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/time_picker/time_picker.js +1 -1
- package/build/esm/packages/aurora/src/components/time_picker/time_picker_types.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/time_picker/time_picker_utils.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/time_picker/time_picker_utils.js +2 -2
- package/package.json +1 -1
package/build/cjs/packages/aurora/src/components/time_picker/components/time_picker_content.js
CHANGED
|
@@ -20,7 +20,7 @@ var TimePickerContent = function TimePickerContent(_ref) {
|
|
|
20
20
|
onChoose = _ref.onChoose,
|
|
21
21
|
format = _ref.format;
|
|
22
22
|
return /*#__PURE__*/React__default['default'].createElement(popover_content.PopoverContent, {
|
|
23
|
-
className: "aurora-bg-neutral-0 aurora-w-[264px] aurora-rounded-16 aurora-border aurora-border-strong aurora-shadow-l aurora-overflow-hidden"
|
|
23
|
+
className: "aurora-bg-neutral-0 aurora-w-[264px] aurora-rounded-16 aurora-border aurora-border-strong aurora-shadow-l aurora-overflow-hidden js__aurora-timepicker-dropdown"
|
|
24
24
|
}, /*#__PURE__*/React__default['default'].createElement(time_picker_time_selector.TimePickerTimeSelector, {
|
|
25
25
|
hour: hour,
|
|
26
26
|
minute: minute,
|
|
@@ -24,7 +24,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
24
24
|
value = _ref.value,
|
|
25
25
|
onChange = _ref.onChange,
|
|
26
26
|
_ref$format = _ref.format,
|
|
27
|
-
format = _ref$format === void 0 ? '
|
|
27
|
+
format = _ref$format === void 0 ? '24h' : _ref$format;
|
|
28
28
|
var _useState = React.useState(false),
|
|
29
29
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
30
30
|
open = _useState2[0],
|
|
@@ -40,9 +40,9 @@ _rollupPluginBabelHelpers.defineProperty(TimePickerUtils, "formatTimeStringForDi
|
|
|
40
40
|
return _TimePickerUtils.formatTimeForDisplay(time.hour, time.minute);
|
|
41
41
|
});
|
|
42
42
|
_rollupPluginBabelHelpers.defineProperty(TimePickerUtils, "generateTimeOptions", function (type) {
|
|
43
|
-
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '
|
|
43
|
+
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '24h';
|
|
44
44
|
if (type === 'hour') {
|
|
45
|
-
if (format === '
|
|
45
|
+
if (format === '12h') {
|
|
46
46
|
return Array.from({
|
|
47
47
|
length: 12
|
|
48
48
|
}, function (_, i) {
|
package/build/esm/packages/aurora/src/components/time_picker/components/time_picker_content.js
CHANGED
|
@@ -12,7 +12,7 @@ var TimePickerContent = function TimePickerContent(_ref) {
|
|
|
12
12
|
onChoose = _ref.onChoose,
|
|
13
13
|
format = _ref.format;
|
|
14
14
|
return /*#__PURE__*/React__default.createElement(PopoverContent, {
|
|
15
|
-
className: "aurora-bg-neutral-0 aurora-w-[264px] aurora-rounded-16 aurora-border aurora-border-strong aurora-shadow-l aurora-overflow-hidden"
|
|
15
|
+
className: "aurora-bg-neutral-0 aurora-w-[264px] aurora-rounded-16 aurora-border aurora-border-strong aurora-shadow-l aurora-overflow-hidden js__aurora-timepicker-dropdown"
|
|
16
16
|
}, /*#__PURE__*/React__default.createElement(TimePickerTimeSelector, {
|
|
17
17
|
hour: hour,
|
|
18
18
|
minute: minute,
|
|
@@ -4,6 +4,6 @@ export interface TimePickerTimeSelectorProps {
|
|
|
4
4
|
minute: number | null;
|
|
5
5
|
onHourChange: (hour: number | null) => void;
|
|
6
6
|
onMinuteChange: (minute: number | null) => void;
|
|
7
|
-
format: '
|
|
7
|
+
format: '12h' | '24h';
|
|
8
8
|
}
|
|
9
9
|
export declare const TimePickerTimeSelector: ({ hour, minute, onHourChange, onMinuteChange, format }: TimePickerTimeSelectorProps) => React.JSX.Element;
|
|
@@ -16,7 +16,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
16
16
|
value = _ref.value,
|
|
17
17
|
onChange = _ref.onChange,
|
|
18
18
|
_ref$format = _ref.format,
|
|
19
|
-
format = _ref$format === void 0 ? '
|
|
19
|
+
format = _ref$format === void 0 ? '24h' : _ref$format;
|
|
20
20
|
var _useState = useState(false),
|
|
21
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
22
|
open = _useState2[0],
|
|
@@ -5,7 +5,7 @@ export interface TimePickerProps {
|
|
|
5
5
|
errors?: string | string[];
|
|
6
6
|
value?: string;
|
|
7
7
|
onChange?: (value: string) => void;
|
|
8
|
-
format?: '
|
|
8
|
+
format?: '12h' | '24h';
|
|
9
9
|
}
|
|
10
10
|
export interface TimePickerContentProps {
|
|
11
11
|
hour: number | null;
|
|
@@ -14,5 +14,5 @@ export interface TimePickerContentProps {
|
|
|
14
14
|
onMinuteChange: (minute: number | null) => void;
|
|
15
15
|
onCancel: () => void;
|
|
16
16
|
onChoose: () => void;
|
|
17
|
-
format: '
|
|
17
|
+
format: '12h' | '24h';
|
|
18
18
|
}
|
|
@@ -6,5 +6,5 @@ export declare class TimePickerUtils {
|
|
|
6
6
|
static formatTimeToString: (hour: number, minute: number) => string;
|
|
7
7
|
static formatTimeForDisplay: (hour: number, minute: number) => string;
|
|
8
8
|
static formatTimeStringForDisplay: (value: string | undefined) => string;
|
|
9
|
-
static generateTimeOptions: (type: 'hour' | 'minute', format?: '
|
|
9
|
+
static generateTimeOptions: (type: 'hour' | 'minute', format?: '12h' | '24h') => string[];
|
|
10
10
|
}
|
|
@@ -36,9 +36,9 @@ _defineProperty(TimePickerUtils, "formatTimeStringForDisplay", function (value)
|
|
|
36
36
|
return _TimePickerUtils.formatTimeForDisplay(time.hour, time.minute);
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(TimePickerUtils, "generateTimeOptions", function (type) {
|
|
39
|
-
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '
|
|
39
|
+
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '24h';
|
|
40
40
|
if (type === 'hour') {
|
|
41
|
-
if (format === '
|
|
41
|
+
if (format === '12h') {
|
|
42
42
|
return Array.from({
|
|
43
43
|
length: 12
|
|
44
44
|
}, function (_, i) {
|