@atlaskit/top-layer 0.7.1 → 0.9.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.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/animations/presets.js +4 -0
- package/dist/cjs/dialog/dialog-content.js +12 -0
- package/dist/cjs/focus/focus.js +2 -0
- package/dist/cjs/internal/ensure-preset-styles.js +1 -1
- package/dist/cjs/internal/use-anchor-position.js +6 -22
- package/dist/cjs/internal/use-preset-styles.js +1 -1
- package/dist/cjs/placement-map/index.js +2 -1
- package/dist/cjs/popover/popover.js +31 -0
- package/dist/cjs/popup/popup-content.js +1 -7
- package/dist/cjs/popup/popup-context.js +2 -0
- package/dist/cjs/use-arrow-navigation/use-arrow-navigation.js +1 -0
- package/dist/es2019/animations/presets.js +4 -0
- package/dist/es2019/dialog/dialog-content.js +12 -0
- package/dist/es2019/focus/focus.js +2 -0
- package/dist/es2019/internal/ensure-preset-styles.js +1 -1
- package/dist/es2019/internal/use-anchor-position.js +6 -20
- package/dist/es2019/internal/use-preset-styles.js +1 -1
- package/dist/es2019/placement-map/index.js +1 -0
- package/dist/es2019/popover/popover.js +31 -0
- package/dist/es2019/popup/popup-content.js +1 -7
- package/dist/es2019/popup/popup-context.js +2 -0
- package/dist/es2019/use-arrow-navigation/use-arrow-navigation.js +1 -0
- package/dist/esm/animations/presets.js +4 -0
- package/dist/esm/dialog/dialog-content.js +12 -0
- package/dist/esm/focus/focus.js +2 -0
- package/dist/esm/internal/ensure-preset-styles.js +1 -1
- package/dist/esm/internal/use-anchor-position.js +6 -22
- package/dist/esm/internal/use-preset-styles.js +1 -1
- package/dist/esm/placement-map/index.js +1 -0
- package/dist/esm/popover/popover.js +31 -0
- package/dist/esm/popup/popup-content.js +1 -7
- package/dist/esm/popup/popup-context.js +2 -0
- package/dist/esm/use-arrow-navigation/use-arrow-navigation.js +1 -0
- package/dist/types/internal/use-anchor-position.d.ts +1 -11
- package/dist/types/internal/use-preset-styles.d.ts +1 -1
- package/dist/types/popover/types.d.ts +4 -4
- package/dist/types/popup/types.d.ts +1 -28
- package/dist/types-ts4.5/internal/use-anchor-position.d.ts +1 -11
- package/dist/types-ts4.5/internal/use-preset-styles.d.ts +1 -1
- package/dist/types-ts4.5/popover/types.d.ts +4 -4
- package/dist/types-ts4.5/popup/types.d.ts +1 -28
- package/package.json +3 -1
- package/arrow/package.json +0 -17
- package/dist/cjs/arrow/index.js +0 -130
- package/dist/cjs/arrow/types.js +0 -5
- package/dist/cjs/entry-points/arrow.js +0 -12
- package/dist/es2019/arrow/index.js +0 -268
- package/dist/es2019/arrow/types.js +0 -1
- package/dist/es2019/entry-points/arrow.js +0 -1
- package/dist/esm/arrow/index.js +0 -123
- package/dist/esm/arrow/types.js +0 -1
- package/dist/esm/entry-points/arrow.js +0 -1
- package/dist/types/arrow/index.d.ts +0 -24
- package/dist/types/arrow/types.d.ts +0 -29
- package/dist/types/entry-points/arrow.d.ts +0 -2
- package/dist/types-ts4.5/arrow/index.d.ts +0 -24
- package/dist/types-ts4.5/arrow/types.d.ts +0 -29
- package/dist/types-ts4.5/entry-points/arrow.d.ts +0 -2
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { TPlacementOptions } from '../popup/types';
|
|
2
|
-
/**
|
|
3
|
-
* A self-contained arrow preset for PopoverContent.
|
|
4
|
-
*
|
|
5
|
-
* Contains the CSS rules (injected once into `<head>`), a data-attribute name
|
|
6
|
-
* for CSS targeting, and a function to compute `position-try-fallbacks` values
|
|
7
|
-
* that change both `position-area` and `margin` when the popover flips.
|
|
8
|
-
*
|
|
9
|
-
* Imported from `@atlaskit/top-layer/arrow` so that consumers who don't use
|
|
10
|
-
* arrows pay no bundle cost for the CSS string or fallback logic.
|
|
11
|
-
*/
|
|
12
|
-
export type TArrowPreset = {
|
|
13
|
-
/**
|
|
14
|
-
* CSS to inject once into `document.head`, scoped to `[data-ds-popover-{name}]`.
|
|
15
|
-
*/
|
|
16
|
-
css: string;
|
|
17
|
-
/**
|
|
18
|
-
* Data attribute suffix for CSS targeting (e.g. `'arrow'`).
|
|
19
|
-
*/
|
|
20
|
-
name: string;
|
|
21
|
-
/**
|
|
22
|
-
* Returns the `position-try-fallbacks` value for a given placement.
|
|
23
|
-
* Uses named `@position-try` rules that update both `position-area`
|
|
24
|
-
* and `margin` so the correct arrow is revealed after a flip.
|
|
25
|
-
*/
|
|
26
|
-
getTryFallbacks: (args: {
|
|
27
|
-
placement: TPlacementOptions;
|
|
28
|
-
}) => string;
|
|
29
|
-
};
|