diff --git a/packages/core/src/components/popover/popover.tsx b/packages/core/src/components/popover/popover.tsx index bb15723242..fcd5160307 100644 --- a/packages/core/src/components/popover/popover.tsx +++ b/packages/core/src/components/popover/popover.tsx @@ -645,18 +645,7 @@ export class Popover< // an OVERRIDE inside a DISMISS does not dismiss, and a DISMISS inside an OVERRIDE will dismiss. const dismissElement = eventTarget.closest(`.${Classes.POPOVER_DISMISS}, .${Classes.POPOVER_DISMISS_OVERRIDE}`); - // dismiss selectors from the "V1" version of Popover in the core package - // we expect these to be rendered by MenuItem, which at this point has no knowledge of Popover - // this can be removed once Popover is merged into core in v5.0 - const dismissElementV1 = eventTarget.closest( - `.${Classes.POPOVER_DISMISS}, .${Classes.POPOVER_DISMISS_OVERRIDE}`, - ); - - const shouldDismiss = - dismissElement?.classList.contains(Classes.POPOVER_DISMISS) ?? - dismissElementV1?.classList.contains(Classes.POPOVER_DISMISS) ?? - false; - + const shouldDismiss = dismissElement?.classList.contains(Classes.POPOVER_DISMISS) ?? false; const isDisabled = eventTarget.closest(`:disabled, .${Classes.DISABLED}`) != null; if (shouldDismiss && !isDisabled && (!isEventPopoverCapturing || isEventFromSelf)) { diff --git a/packages/datetime2/README.md b/packages/datetime2/README.md index 54e6631c2c..e9975aead6 100644 --- a/packages/datetime2/README.md +++ b/packages/datetime2/README.md @@ -4,18 +4,21 @@ Blueprint is a React UI toolkit for the web. -This package contains re-exports of some components from @blueprintjs/datetime v5.x. These "V2" APIs are backwards-compatible with @blueprintjs/datetime2 v0.x. Once you upgrade to Blueprint v5.0, you should migrate your -imports to reference @blueprintjs/datetime instead: - -```diff -- import { DateInput2 } from "@blueprintjs/datetime2"; -+ import { DateInput } from "@blueprintjs/datetime"; -``` - -This package also contains next-generation "V3" components which support react-day-picker v8. This means that -installing @blueprintjs/datetime2 will install multiple versions of react-day-picker (v7.x via @blueprintjs/datetime -and v8.x as a direct dependency). Note that these two copies of react-day-picker can happily exist together in a single -JS bundle, and with the help of tree-shaking, you can avoid bundling both if you _only_ use the deprecated "V1" / "V2" -datetime components or _only_ use the new "V3" APIs. +This package contains next-generation components for interacting with dates & times. + +Compared to the "V1" components in @blueprintjs/datetime, the "V3" components in this package: + +- use [react-day-picker](https://react-day-picker.js.org/) v8 instead of v7 (this unblocks React 18 compatibility) +- are easier to internationalize & localize since date-fns is now a dependency (instead of `localeUtils`, you can specify a locale code and we'll automatically load the date-fns locale object) + +This package also contains legacy APIs which are re-exported aliases for components from @blueprintjs/datetime v5.x. +These "V2" names are backwards-compatible with @blueprintjs/datetime2 v0.x. + +To migrate to the latest "V3" components, follow the [react-day-picker v8 migration guide](https://github.com/palantir/blueprint/wiki/react-day-picker-8-migration). + +Note that @blueprintjs/datetime2 will transitively install multiple versions of react-day-picker. +These two copies of react-day-picker can happily exist together in a single JS bundle, and with the help of tree-shaking, +you can avoid bundling both if you _only_ use the deprecated "V1" / "V2" datetime components or _only_ use the new +"V3" APIs. ### [Full Documentation](http://blueprintjs.com/docs) | [Source Code](https://github.com/palantir/blueprint) diff --git a/packages/docs-app/src/blueprint.md b/packages/docs-app/src/blueprint.md index 6d2839f217..b3792af4fb 100644 --- a/packages/docs-app/src/blueprint.md +++ b/packages/docs-app/src/blueprint.md @@ -7,7 +7,7 @@ It is optimized for building complex data-dense interfaces for desktop applicati @reactDocs Welcome
-
Blueprint v5.0 is now available
+
Blueprint v5.x is now available
Check out the [migration guides to upgrade from v4.x →](https://github.com/palantir/blueprint/wiki/Blueprint-5.0) @@ -26,11 +26,12 @@ yarn add @blueprintjs/core react react-dom ``` Additional UI components and APIs are available in: -- [**@blueprintjs/icons**](https://www.npmjs.com/package/@blueprintjs/icons) -- [**@blueprintjs/datetime**](https://www.npmjs.com/package/@blueprintjs/datetime) -- [**@blueprintjs/datetime2**](https://www.npmjs.com/package/@blueprintjs/datetime2) -- [**@blueprintjs/select**](https://www.npmjs.com/package/@blueprintjs/select) -- [**@blueprintjs/table**](https://www.npmjs.com/package/@blueprintjs/table) + +- [**@blueprintjs/icons**](https://www.npmjs.com/package/@blueprintjs/icons) +- [**@blueprintjs/datetime**](https://www.npmjs.com/package/@blueprintjs/datetime) +- [**@blueprintjs/datetime2**](https://www.npmjs.com/package/@blueprintjs/datetime2) +- [**@blueprintjs/select**](https://www.npmjs.com/package/@blueprintjs/select) +- [**@blueprintjs/table**](https://www.npmjs.com/package/@blueprintjs/table) The navigation sidebar lists all the available packages, separated by use case and significant dependencies. All have peer dependencies on **react** and **react-dom**. @@ -42,7 +43,7 @@ Import React components from the appropriate package. ```tsx import { Button } from "@blueprintjs/core"; -