Skip to content

Commit

Permalink
feat(DateTime2): export TimePicker (#6868)
Browse files Browse the repository at this point in the history
  • Loading branch information
bvandercar-vt authored Jun 28, 2024
1 parent e0e513b commit fa69aca
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
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,
/** @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";
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",
"TimezoneSelect",
],
},
);
});

1 comment on commit fa69aca

@svc-palantir-github
Copy link

Choose a reason for hiding this comment

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

feat(DateTime2): export TimePicker (#6868)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.