Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DateTime2): export TimePicker #6868

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/datetime/src/components/date-input/dateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
DISPLAYNAME_PREFIX,
InputGroup,
type InputGroupProps,
Intent,
mergeRefs,
Popover,
type PopoverClickTargetHandlers,
Expand Down Expand Up @@ -629,7 +630,7 @@ export const DateInput: React.FC<DateInputProps> = React.memo(function _DateInpu
<InputGroup
autoComplete="off"
className={classNames(targetProps.className, inputProps.className)}
intent={shouldShowErrorStyling && isErrorState ? "danger" : "none"}
intent={shouldShowErrorStyling && isErrorState ? Intent.DANGER : Intent.NONE}
placeholder={placeholder}
rightElement={
<>
Expand Down
3 changes: 2 additions & 1 deletion packages/datetime2/src/components/date-input3/dateInput3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
type ButtonProps,
DISPLAYNAME_PREFIX,
InputGroup,
Intent,
mergeRefs,
Popover,
type PopoverClickTargetHandlers,
Expand Down Expand Up @@ -500,7 +501,7 @@ export const DateInput3: React.FC<DateInput3Props> = React.memo(function _DateIn
<InputGroup
autoComplete="off"
className={classNames(targetProps.className, inputProps.className)}
intent={shouldShowErrorStyling && isErrorState ? "danger" : "none"}
intent={shouldShowErrorStyling && isErrorState ? Intent.DANGER : Intent.NONE}
placeholder={placeholder}
rightElement={
<>
Expand Down
33 changes: 27 additions & 6 deletions packages/datetime2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,46 @@ export { Classes as Datetime2Classes, ReactDayPickerClasses } from "./classes";
/* eslint-disable deprecation/deprecation */

export {
/** @deprecated import from `@blueprintjs/datetime` or use `Datetime2Classes` instead */
/** @deprecated import from `@blueprintjs/datetime` instead, or use `Datetime2Classes` */
Classes,
type DateFormatProps,
/** @deprecated import from `@blueprintjs/datetime` instead */
DateInput as DateInput2,
/** @deprecated import from `@blueprintjs/datetime` instead */
type DateInputProps as DateInput2Props,
type DateRange,
/** @deprecated import from `@blueprintjs/datetime` instead */
DateRangeInput as DateRangeInput2,
/** @deprecated import from `@blueprintjs/datetime` instead */
type DateRangeInputProps as DateRangeInput2Props,
/** @deprecated import from `@blueprintjs/datetime` instead */
getTimezoneMetadata,
TimePrecision,
/** @deprecated import from `@blueprintjs/datetime` instead */
TimezoneSelect,
/** @deprecated import from `@blueprintjs/datetime` instead */
type TimezoneSelectProps,
/** @deprecated import from `@blueprintjs/datetime` instead */
TimePicker,
/** @deprecated import from `@blueprintjs/datetime` instead */
type TimePickerProps,
/** @deprecated import from `@blueprintjs/datetime` instead */
type DateRangeShortcut,
bvandercar-vt marked this conversation as resolved.
Show resolved Hide resolved
/** @deprecated import from `@blueprintjs/datetime` instead */
type DatePickerShortcut,
/** @deprecated import from `@blueprintjs/datetime` instead */
type DateFormatProps,
/** @deprecated import from `@blueprintjs/datetime` instead */
type DateRange,
/** @deprecated import from `@blueprintjs/datetime` instead */
type NonNullDateRange,
/** @deprecated import from `@blueprintjs/datetime` instead */
MonthAndYear,
/** @deprecated import from `@blueprintjs/datetime` instead */
Months,
/** @deprecated import from `@blueprintjs/datetime` instead */
getTimezoneMetadata,
/** @deprecated import from `@blueprintjs/datetime` instead */
TimePrecision,
/** @deprecated import from `@blueprintjs/datetime` instead */
TimeUnit,
/** @deprecated import from `@blueprintjs/datetime` instead */
TimezoneDisplayFormat,
/** @deprecated import from `@blueprintjs/datetime` instead */
type DatePickerLocaleUtils,
} from "@blueprintjs/datetime";
evansjohnson marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 7 additions & 1 deletion packages/datetime2/test/isotest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ describe("@blueprintjs/datetime2 isomorphic rendering", () => {
DateRangePicker3: {},
},
{
excludedSymbols: ["DateInput2", "DateInput2MigrationUtils", "DateRangeInput2", "TimezoneSelect"],
excludedSymbols: [
"DateInput2",
"DateInput2MigrationUtils",
"DateRangeInput2",
"MonthAndYear",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, do you know what this was needed for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test was failing and MonthAndYear is also excluded in the same place in /datetime/test/isotest.mjs

"TimezoneSelect",
],
},
);
});