@homebound/beam 2.103.0 → 2.104.0
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.
|
@@ -3,6 +3,6 @@ import "./DatePicker.css";
|
|
|
3
3
|
export interface DatePickerProps {
|
|
4
4
|
value?: Date;
|
|
5
5
|
onSelect: (value: Date) => void;
|
|
6
|
-
disabledDays?: Modifier;
|
|
6
|
+
disabledDays?: Modifier | Modifier[];
|
|
7
7
|
}
|
|
8
8
|
export declare function DatePicker(props: DatePickerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
// by a GraphQL schema for a `saveAuthor` mutation that takes an author
|
|
4
4
|
// plus the author's books.
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DateOnly = exports.dd200 = exports.dd100 = exports.jan2 = exports.jan1 = void 0;
|
|
6
|
+
exports.DateOnly = exports.dd200 = exports.dd100 = exports.jan10 = exports.jan2 = exports.jan1 = void 0;
|
|
7
7
|
exports.jan1 = new Date(2020, 0, 1);
|
|
8
8
|
exports.jan2 = new Date(2020, 0, 2);
|
|
9
|
+
exports.jan10 = new Date(2020, 0, 10);
|
|
9
10
|
exports.dd100 = { number: "100", category: "Philosophy" };
|
|
10
11
|
exports.dd200 = { number: "200", category: "Religion" };
|
|
11
12
|
class DateOnly {
|
|
@@ -24,8 +24,9 @@ export interface DateFieldProps extends Pick<TextFieldBaseProps<{}>, "borderless
|
|
|
24
24
|
* Set custom logic for individual dates or date ranges to be disabled in the picker
|
|
25
25
|
* exposed from `react-day-picker`: https://react-day-picker.js.org/api/DayPicker#modifiers
|
|
26
26
|
*/
|
|
27
|
-
disabledDays?: Modifier;
|
|
27
|
+
disabledDays?: Modifier | Modifier[];
|
|
28
28
|
onEnter?: Callback;
|
|
29
|
+
defaultOpen?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare function DateField(props: DateFieldProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
31
32
|
declare const dateFormats: {
|
package/dist/inputs/DateField.js
CHANGED
|
@@ -15,7 +15,7 @@ const TextFieldBase_1 = require("./TextFieldBase");
|
|
|
15
15
|
const utils_1 = require("../utils");
|
|
16
16
|
const defaultTestId_1 = require("../utils/defaultTestId");
|
|
17
17
|
function DateField(props) {
|
|
18
|
-
const { label, disabled, required, value, onChange, onFocus, onBlur, errorMsg, helperText, inlineLabel = false, readOnly = false, format = "short", iconLeft = false, disabledDays, onEnter, ...others } = props;
|
|
18
|
+
const { label, disabled, required, value, onChange, onFocus, onBlur, errorMsg, helperText, inlineLabel = false, readOnly = false, format = "short", iconLeft = false, disabledDays, onEnter, defaultOpen, ...others } = props;
|
|
19
19
|
const inputRef = (0, react_1.useRef)(null);
|
|
20
20
|
const inputWrapRef = (0, react_1.useRef)(null);
|
|
21
21
|
const buttonRef = (0, react_1.useRef)(null);
|
|
@@ -47,6 +47,7 @@ function DateField(props) {
|
|
|
47
47
|
(0, utils_1.maybeCall)(onBlur);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
+
isOpen: defaultOpen,
|
|
50
51
|
});
|
|
51
52
|
const { labelProps, inputProps } = (0, react_aria_1.useTextField)({
|
|
52
53
|
...textFieldProps,
|