carbon-react 119.6.1 → 119.6.2
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/esm/__internal__/input/input-presentation.component.d.ts +3 -1
- package/esm/__internal__/input/input-presentation.component.js +3 -0
- package/esm/__internal__/input/input-presentation.style.d.ts +1 -1
- package/esm/__internal__/input/input-presentation.style.js +4 -2
- package/esm/__internal__/popover/popover.component.d.ts +4 -1
- package/esm/components/date/__internal__/date-formats/index.d.ts +3 -6
- package/esm/components/date/__internal__/date-formats/index.js +3 -3
- package/esm/components/date/__internal__/date-picker/date-picker.component.d.ts +38 -0
- package/esm/components/date/__internal__/date-picker/date-picker.component.js +243 -34
- package/esm/components/date/__internal__/date-picker/day-picker.style.d.ts +2 -0
- package/esm/components/date/__internal__/date-picker/index.d.ts +2 -0
- package/esm/components/date/__internal__/navbar/button.style.d.ts +4 -0
- package/esm/components/date/__internal__/navbar/index.d.ts +2 -0
- package/esm/components/date/__internal__/navbar/navbar.component.d.ts +8 -0
- package/esm/components/date/__internal__/navbar/navbar.component.js +7 -9
- package/esm/components/date/__internal__/navbar/navbar.style.d.ts +2 -0
- package/esm/components/date/__internal__/utils.d.ts +14 -0
- package/esm/components/date/__internal__/utils.js +22 -18
- package/esm/components/date/__internal__/weekday/abbr.style.d.ts +2 -0
- package/esm/components/date/__internal__/weekday/index.d.ts +2 -0
- package/esm/components/date/__internal__/weekday/weekday.component.d.ts +8 -0
- package/esm/components/date/__internal__/weekday/weekday.component.js +1 -6
- package/esm/components/date/__internal__/weekday/weekday.style.d.ts +2 -0
- package/esm/components/date/date.component.d.ts +43 -0
- package/esm/components/date/date.component.js +781 -60
- package/esm/components/date/date.style.d.ts +6 -0
- package/esm/components/date/date.style.js +3 -8
- package/esm/components/date/index.d.ts +2 -2
- package/esm/components/date-range/date-range.component.d.ts +88 -0
- package/esm/components/date-range/date-range.component.js +22 -102
- package/esm/components/date-range/date-range.context.d.ts +22 -0
- package/esm/components/date-range/date-range.style.d.ts +6 -0
- package/esm/components/date-range/date-range.style.js +1 -1
- package/esm/components/date-range/index.d.ts +3 -3
- package/esm/components/textbox/textbox.component.js +1 -0
- package/esm/hooks/__internal__/useFloating/useFloating.d.ts +4 -1
- package/lib/__internal__/input/input-presentation.component.d.ts +3 -1
- package/lib/__internal__/input/input-presentation.component.js +3 -0
- package/lib/__internal__/input/input-presentation.style.d.ts +1 -1
- package/lib/__internal__/input/input-presentation.style.js +4 -2
- package/lib/__internal__/popover/popover.component.d.ts +4 -1
- package/lib/components/date/__internal__/date-formats/index.d.ts +3 -6
- package/lib/components/date/__internal__/date-formats/index.js +3 -3
- package/lib/components/date/__internal__/date-picker/date-picker.component.d.ts +38 -0
- package/lib/components/date/__internal__/date-picker/date-picker.component.js +243 -35
- package/lib/components/date/__internal__/date-picker/day-picker.style.d.ts +2 -0
- package/lib/components/date/__internal__/date-picker/index.d.ts +2 -0
- package/lib/components/date/__internal__/navbar/button.style.d.ts +4 -0
- package/lib/components/date/__internal__/navbar/index.d.ts +2 -0
- package/lib/components/date/__internal__/navbar/navbar.component.d.ts +8 -0
- package/lib/components/date/__internal__/navbar/navbar.component.js +8 -9
- package/lib/components/date/__internal__/navbar/navbar.style.d.ts +2 -0
- package/lib/components/date/__internal__/utils.d.ts +14 -0
- package/lib/components/date/__internal__/utils.js +22 -18
- package/lib/components/date/__internal__/weekday/abbr.style.d.ts +2 -0
- package/lib/components/date/__internal__/weekday/index.d.ts +2 -0
- package/lib/components/date/__internal__/weekday/weekday.component.d.ts +8 -0
- package/lib/components/date/__internal__/weekday/weekday.component.js +2 -6
- package/lib/components/date/__internal__/weekday/weekday.style.d.ts +2 -0
- package/lib/components/date/date.component.d.ts +43 -0
- package/lib/components/date/date.component.js +781 -60
- package/lib/components/date/date.style.d.ts +6 -0
- package/lib/components/date/date.style.js +3 -8
- package/lib/components/date/index.d.ts +2 -2
- package/lib/components/date-range/date-range.component.d.ts +88 -0
- package/lib/components/date-range/date-range.component.js +23 -102
- package/lib/components/date-range/date-range.context.d.ts +22 -0
- package/lib/components/date-range/date-range.style.d.ts +6 -0
- package/lib/components/date-range/date-range.style.js +1 -1
- package/lib/components/date-range/index.d.ts +3 -3
- package/lib/components/textbox/textbox.component.js +1 -0
- package/lib/hooks/__internal__/useFloating/useFloating.d.ts +4 -1
- package/package.json +1 -1
- package/esm/components/date/__internal__/date-picker/date-picker.d.ts +0 -27
- package/esm/components/date/__internal__/navbar/navbar.d.ts +0 -8
- package/esm/components/date/__internal__/weekday/weekday.d.ts +0 -13
- package/esm/components/date/date.d.ts +0 -52
- package/esm/components/date-range/date-range-context.d.ts +0 -17
- package/esm/components/date-range/date-range.d.ts +0 -92
- package/lib/components/date/__internal__/date-picker/date-picker.d.ts +0 -27
- package/lib/components/date/__internal__/navbar/navbar.d.ts +0 -8
- package/lib/components/date/__internal__/weekday/weekday.d.ts +0 -13
- package/lib/components/date/date.d.ts +0 -52
- package/lib/components/date-range/date-range-context.d.ts +0 -17
- package/lib/components/date-range/date-range.d.ts +0 -92
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface WeekdayProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const Weekday: ({ className, title, children, ...props }: WeekdayProps) => React.JSX.Element;
|
|
8
|
+
export default Weekday;
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import StyledWeekday from "./weekday.style";
|
|
5
5
|
import StyledAbbr from "./abbr.style";
|
|
6
|
-
const Weekday = _ref => {
|
|
6
|
+
export const Weekday = _ref => {
|
|
7
7
|
let {
|
|
8
8
|
className,
|
|
9
9
|
title,
|
|
@@ -17,9 +17,4 @@ const Weekday = _ref => {
|
|
|
17
17
|
title: title
|
|
18
18
|
}, children));
|
|
19
19
|
};
|
|
20
|
-
Weekday.propTypes = {
|
|
21
|
-
className: PropTypes.string,
|
|
22
|
-
title: PropTypes.string,
|
|
23
|
-
children: PropTypes.node
|
|
24
|
-
};
|
|
25
20
|
export default Weekday;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TextboxProps } from "../textbox";
|
|
3
|
+
import { PickerProps } from "./__internal__/date-picker";
|
|
4
|
+
import { InputName } from "../date-range/date-range.context";
|
|
5
|
+
export interface DateChangeEvent {
|
|
6
|
+
target: {
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
value: {
|
|
10
|
+
formattedValue: string;
|
|
11
|
+
rawValue: string | null;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface DateInputProps extends Omit<TextboxProps, "value" | "formattedValue" | "rawValue" | "onChange" | "onBlur" | "onMouseDown" | "onChangeDeferred" | "deferTimeout" | "children" | "leftChildren" | "placeholder" | "iconOnClick" | "iconOnMouseDown" | "enforceCharacterLimit" | "characterLimit" | "warnOverLimit" | "iconTabIndex" | "inputIcon"> {
|
|
16
|
+
/** Boolean to allow the input to have an empty value */
|
|
17
|
+
allowEmptyValue?: boolean;
|
|
18
|
+
/** Boolean to toggle where DatePicker is rendered in relation to the Date Input */
|
|
19
|
+
disablePortal?: boolean;
|
|
20
|
+
/** Minimum possible date YYYY-MM-DD */
|
|
21
|
+
minDate?: string;
|
|
22
|
+
/** Maximum possible date YYYY-MM-DD */
|
|
23
|
+
maxDate?: string;
|
|
24
|
+
/** Specify a callback triggered on change */
|
|
25
|
+
onChange: (ev: DateChangeEvent) => void;
|
|
26
|
+
/** Specify a callback triggered on blur */
|
|
27
|
+
onBlur?: (ev: DateChangeEvent) => void;
|
|
28
|
+
/** The current date string */
|
|
29
|
+
value: string;
|
|
30
|
+
/**
|
|
31
|
+
* Pass any props that match the DayPickerProps interface to override default behaviors
|
|
32
|
+
* See [DayPickerProps](https://react-day-picker-v7.netlify.app/docs/getting-started/) for a full list of available props
|
|
33
|
+
* */
|
|
34
|
+
pickerProps?: PickerProps;
|
|
35
|
+
/**
|
|
36
|
+
* @private
|
|
37
|
+
* @ignore
|
|
38
|
+
* Name passed from DateRange to allow it to know which input is updating
|
|
39
|
+
* */
|
|
40
|
+
inputName?: InputName;
|
|
41
|
+
}
|
|
42
|
+
export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
43
|
+
export default DateInput;
|