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 6 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
29 changes: 16 additions & 13 deletions packages/datetime2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,28 @@ export { Classes as Datetime2Classes, ReactDayPickerClasses } from "./classes";
/* eslint-disable deprecation/deprecation */

export {
/** @deprecated import from `@blueprintjs/datetime` or use `Datetime2Classes` instead */
/** @deprecated use `Datetime2Classes` instead */
Classes,
type DateFormatProps,
/** @deprecated import from `@blueprintjs/datetime` instead */
DateInput as DateInput2,
/** @deprecated import from `@blueprintjs/datetime` instead */
/** @deprecated use `DateInput3Props` instead */
Copy link
Contributor

Choose a reason for hiding this comment

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

I would be in support of improving this deprecation message with an "or preferably use ___3"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just changed it back to the old one

type DateInputProps as DateInput2Props,
type DateRange,
/** @deprecated import from `@blueprintjs/datetime` instead */
DateRangeInput as DateRangeInput2,
/** @deprecated import from `@blueprintjs/datetime` instead */
/** @deprecated use `DateRangeInput3Props` 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,
type TimePickerProps,
type DateRangeShortcut,
bvandercar-vt marked this conversation as resolved.
Show resolved Hide resolved
type DatePickerShortcut,
type DateFormatProps,
type DateRange,
type NonNullDateRange,
MonthAndYear,
Months,
getTimezoneMetadata,
TimePrecision,
TimeUnit,
TimezoneDisplayFormat,
type DatePickerLocaleUtils,
} from "@blueprintjs/datetime";
evansjohnson marked this conversation as resolved.
Show resolved Hide resolved