@atlaskit/primitives 19.0.1 → 20.0.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 +54 -0
- package/anchor/package.json +1 -8
- package/bleed/package.json +1 -8
- package/box/package.json +1 -8
- package/compiled/anchor/package.json +1 -8
- package/compiled/bleed/package.json +1 -8
- package/compiled/box/package.json +1 -8
- package/compiled/components/types/package.json +1 -8
- package/compiled/flex/package.json +1 -8
- package/compiled/focusable/package.json +1 -8
- package/compiled/grid/package.json +1 -8
- package/compiled/hide/package.json +1 -8
- package/compiled/inline/package.json +1 -8
- package/compiled/media-helper/package.json +1 -8
- package/compiled/metric-text/package.json +1 -8
- package/compiled/package.json +1 -8
- package/compiled/pressable/package.json +1 -8
- package/compiled/show/package.json +1 -8
- package/compiled/stack/package.json +1 -8
- package/compiled/surface-provider/package.json +1 -8
- package/compiled/text/package.json +1 -8
- package/compiled/types/package.json +1 -8
- package/compiled/use-media-query/package.json +1 -8
- package/compiled/utils/types/package.json +1 -8
- package/components/flex/package.json +1 -8
- package/constants/package.json +1 -8
- package/constellation/pressable/examples.mdx +15 -9
- package/dist/cjs/compiled/components/anchor.js +1 -1
- package/dist/cjs/compiled/components/box.compiled.css +1 -1
- package/dist/cjs/compiled/components/box.js +1 -1
- package/dist/cjs/compiled/components/pressable.js +1 -1
- package/dist/cjs/compiled/components/text.js +2 -0
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/box.js +2 -0
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/responsive/constants.js +2 -0
- package/dist/cjs/utils/has-text-ancestor-context.js +1 -0
- package/dist/cjs/xcss/style-maps.partial.js +38 -10
- package/dist/cjs/xcss/xcss.js +2 -0
- package/dist/es2019/compiled/components/anchor.js +1 -1
- package/dist/es2019/compiled/components/box.compiled.css +1 -1
- package/dist/es2019/compiled/components/box.js +1 -1
- package/dist/es2019/compiled/components/pressable.js +1 -1
- package/dist/es2019/compiled/components/text.js +2 -0
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/box.js +2 -0
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/responsive/constants.js +2 -0
- package/dist/es2019/utils/has-text-ancestor-context.js +1 -0
- package/dist/es2019/xcss/style-maps.partial.js +38 -10
- package/dist/es2019/xcss/xcss.js +2 -0
- package/dist/esm/compiled/components/anchor.js +1 -1
- package/dist/esm/compiled/components/box.compiled.css +1 -1
- package/dist/esm/compiled/components/box.js +1 -1
- package/dist/esm/compiled/components/pressable.js +1 -1
- package/dist/esm/compiled/components/text.js +2 -0
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/box.js +2 -0
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/responsive/constants.js +2 -0
- package/dist/esm/utils/has-text-ancestor-context.js +1 -0
- package/dist/esm/xcss/style-maps.partial.js +38 -10
- package/dist/esm/xcss/xcss.js +2 -0
- package/dist/types/compiled/components/types.d.ts +1 -1
- package/dist/types/utils/types.d.ts +1 -1
- package/dist/types/xcss/style-maps.partial.d.ts +36 -8
- package/flex/package.json +1 -8
- package/grid/package.json +1 -8
- package/inline/package.json +1 -8
- package/media-helper/package.json +1 -8
- package/metric-text/package.json +1 -8
- package/package.json +31 -63
- package/pressable/package.json +1 -8
- package/primitives.docs.tsx +359 -356
- package/responsive/build-media-query-css/package.json +1 -8
- package/responsive/constants/package.json +1 -8
- package/responsive/hide/package.json +1 -8
- package/responsive/media-helper/package.json +1 -8
- package/responsive/package.json +1 -8
- package/responsive/show/package.json +1 -8
- package/responsive/types/package.json +1 -8
- package/responsive/use-media-query/package.json +1 -8
- package/scripts/color-codegen-template.tsx +2 -1
- package/stack/package.json +1 -8
- package/surface-provider/package.json +1 -8
- package/text/package.json +1 -8
- package/types/package.json +1 -8
- package/xcss/package.json +1 -8
- package/dist/types-ts4.5/compiled/components/anchor.d.ts +0 -63
- package/dist/types-ts4.5/compiled/components/bleed.d.ts +0 -34
- package/dist/types-ts4.5/compiled/components/box.d.ts +0 -109
- package/dist/types-ts4.5/compiled/components/flex.d.ts +0 -71
- package/dist/types-ts4.5/compiled/components/focusable.d.ts +0 -36
- package/dist/types-ts4.5/compiled/components/grid.d.ts +0 -80
- package/dist/types-ts4.5/compiled/components/inline.d.ts +0 -70
- package/dist/types-ts4.5/compiled/components/metric-text.d.ts +0 -49
- package/dist/types-ts4.5/compiled/components/pressable.d.ts +0 -49
- package/dist/types-ts4.5/compiled/components/stack.d.ts +0 -57
- package/dist/types-ts4.5/compiled/components/text.d.ts +0 -101
- package/dist/types-ts4.5/compiled/components/types.d.ts +0 -45
- package/dist/types-ts4.5/compiled/index.d.ts +0 -16
- package/dist/types-ts4.5/compiled/responsive/hide.d.ts +0 -39
- package/dist/types-ts4.5/compiled/responsive/index.d.ts +0 -5
- package/dist/types-ts4.5/compiled/responsive/media-helper.d.ts +0 -35
- package/dist/types-ts4.5/compiled/responsive/show.d.ts +0 -39
- package/dist/types-ts4.5/compiled/responsive/types.d.ts +0 -10
- package/dist/types-ts4.5/compiled/responsive/use-media-query.d.ts +0 -23
- package/dist/types-ts4.5/components/anchor.d.ts +0 -106
- package/dist/types-ts4.5/components/bleed.d.ts +0 -36
- package/dist/types-ts4.5/components/box.d.ts +0 -85
- package/dist/types-ts4.5/components/flex.d.ts +0 -105
- package/dist/types-ts4.5/components/grid.d.ts +0 -137
- package/dist/types-ts4.5/components/inline.d.ts +0 -74
- package/dist/types-ts4.5/components/metric-text.d.ts +0 -16
- package/dist/types-ts4.5/components/pressable.d.ts +0 -92
- package/dist/types-ts4.5/components/stack.d.ts +0 -61
- package/dist/types-ts4.5/components/text.d.ts +0 -75
- package/dist/types-ts4.5/components/types.d.ts +0 -33
- package/dist/types-ts4.5/constants.d.ts +0 -12
- package/dist/types-ts4.5/entry-points/anchor.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/bleed.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/box.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/compiled-anchor.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-bleed.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-box.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-components-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/compiled-flex.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-focusable.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-grid.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-hide.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/compiled-inline.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-media-helper.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/compiled-metric-text.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-pressable.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-show.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/compiled-stack.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-surface-provider.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/compiled-text.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/compiled-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/compiled-use-media-query.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/compiled-utils-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/constants.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/flex.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/grid.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/inline.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/media-helper.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/metric-text.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/pressable.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/responsive-build-media-query-css.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/responsive-constants.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/responsive-hide.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/responsive-media-helper.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/responsive-show.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/responsive-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/responsive-use-media-query.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/stack.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/surface-provider.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/text.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/xcss.d.ts +0 -2
- package/dist/types-ts4.5/index.d.ts +0 -27
- package/dist/types-ts4.5/responsive/build-media-query-css.d.ts +0 -2
- package/dist/types-ts4.5/responsive/constants.d.ts +0 -67
- package/dist/types-ts4.5/responsive/hide.d.ts +0 -41
- package/dist/types-ts4.5/responsive/index.d.ts +0 -7
- package/dist/types-ts4.5/responsive/media-helper.d.ts +0 -29
- package/dist/types-ts4.5/responsive/media.d.ts +0 -25
- package/dist/types-ts4.5/responsive/show.d.ts +0 -40
- package/dist/types-ts4.5/responsive/types.d.ts +0 -32
- package/dist/types-ts4.5/responsive/unsafe-build-above-media-query-css.d.ts +0 -33
- package/dist/types-ts4.5/responsive/unsafe-build-below-media-query-css.d.ts +0 -32
- package/dist/types-ts4.5/responsive/use-media-query.d.ts +0 -23
- package/dist/types-ts4.5/utils/has-text-ancestor-context.d.ts +0 -9
- package/dist/types-ts4.5/utils/surface-context.d.ts +0 -8
- package/dist/types-ts4.5/utils/surface-provider.d.ts +0 -10
- package/dist/types-ts4.5/utils/types.d.ts +0 -6
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +0 -773
- package/dist/types-ts4.5/xcss/xcss.d.ts +0 -143
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
6
|
-
import type { BasePrimitiveProps, MetricTextFontSize, TextAlign } from './types';
|
|
7
|
-
declare const asAllowlist: readonly [
|
|
8
|
-
"span",
|
|
9
|
-
"div"
|
|
10
|
-
];
|
|
11
|
-
type AsElement = (typeof asAllowlist)[number];
|
|
12
|
-
type MetricTextPropsBase<T extends ElementType = 'span'> = {
|
|
13
|
-
/**
|
|
14
|
-
* HTML tag to be rendered. Defaults to `span`.
|
|
15
|
-
*/
|
|
16
|
-
as?: AsElement;
|
|
17
|
-
/**
|
|
18
|
-
* Elements rendered within the Text element.
|
|
19
|
-
*/
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* The [HTML `id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
|
|
23
|
-
*/
|
|
24
|
-
id?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Text alignment.
|
|
27
|
-
*/
|
|
28
|
-
align?: TextAlign;
|
|
29
|
-
/**
|
|
30
|
-
* Text size.
|
|
31
|
-
*/
|
|
32
|
-
size: MetricTextFontSize;
|
|
33
|
-
/**
|
|
34
|
-
* Forwarded ref.
|
|
35
|
-
*/
|
|
36
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
37
|
-
};
|
|
38
|
-
export type MetricTextProps<T extends ElementType = 'span'> = MetricTextPropsBase<T> & Omit<BasePrimitiveProps, 'xcss'>;
|
|
39
|
-
/**
|
|
40
|
-
* __MetricText__
|
|
41
|
-
*
|
|
42
|
-
* MetricText is a primitive component that has the Atlassian Design System's design guidelines baked in.
|
|
43
|
-
* It is designed for use specifically with displaying metrics and is not to be used for headings or general UI text.
|
|
44
|
-
* It renders a `span` by default.
|
|
45
|
-
*
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
48
|
-
declare const MetricText: React.ForwardRefExoticComponent<React.PropsWithoutRef<MetricTextProps<ElementType>> & React.RefAttributes<any>>;
|
|
49
|
-
export default MetricText;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';
|
|
6
|
-
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
-
import type { BasePrimitiveProps, StyleProp } from './types';
|
|
8
|
-
type BasePressableProps = {
|
|
9
|
-
/**
|
|
10
|
-
* Elements to be rendered inside the Pressable.
|
|
11
|
-
*/
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* Handler called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the ['analytics-next' package](https://atlaskit.atlassian.com/packages/analytics/analytics-next) documentation for more information.
|
|
15
|
-
*/
|
|
16
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Whether the button is disabled.
|
|
19
|
-
*/
|
|
20
|
-
isDisabled?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
23
|
-
*/
|
|
24
|
-
interactionName?: string;
|
|
25
|
-
/**
|
|
26
|
-
* An optional component name used to identify this component in Atlaskit analytics events. This can be used if a parent component's name is preferred over the default 'Pressable'.
|
|
27
|
-
*/
|
|
28
|
-
componentName?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Additional information to be included in the `context` of Atlaskit analytics events that come from pressable.
|
|
31
|
-
*/
|
|
32
|
-
analyticsContext?: Record<string, any>;
|
|
33
|
-
/**
|
|
34
|
-
* Forwarded ref.
|
|
35
|
-
*/
|
|
36
|
-
ref?: Ref<HTMLButtonElement>;
|
|
37
|
-
};
|
|
38
|
-
export type PressableProps = Omit<ComponentPropsWithoutRef<'button'>, 'disabled' | 'onClick' | 'style' | 'className'> & BasePrimitiveProps & StyleProp & BasePressableProps;
|
|
39
|
-
/**
|
|
40
|
-
* __Pressable__
|
|
41
|
-
*
|
|
42
|
-
* A primitive for building custom buttons.
|
|
43
|
-
*
|
|
44
|
-
* - [Examples](https://atlassian.design/components/primitives/pressable/examples)
|
|
45
|
-
* - [Code](https://atlassian.design/components/primitives/pressable/code)
|
|
46
|
-
* - [Usage](https://atlassian.design/components/primitives/pressable/usage)
|
|
47
|
-
*/
|
|
48
|
-
declare const Pressable: React.ForwardRefExoticComponent<React.PropsWithoutRef<PressableProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
49
|
-
export default Pressable;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type AriaAttributes, type ElementType, type ForwardRefExoticComponent, type MemoExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
|
-
import { type FlexProps } from './flex';
|
|
7
|
-
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
8
|
-
export type StackProps<T extends ElementType = 'div'> = {
|
|
9
|
-
/**
|
|
10
|
-
* The DOM element to render as the Stack. Defaults to `div`.
|
|
11
|
-
*/
|
|
12
|
-
as?: 'div' | 'span' | 'ul' | 'ol' | 'dl';
|
|
13
|
-
/**
|
|
14
|
-
* Used to align children along the block axis (typically vertical).
|
|
15
|
-
*/
|
|
16
|
-
alignBlock?: Exclude<AlignBlock, 'baseline'>;
|
|
17
|
-
/**
|
|
18
|
-
* Used to align children along the inline axis (typically horizontal).
|
|
19
|
-
*/
|
|
20
|
-
alignInline?: AlignInline;
|
|
21
|
-
/**
|
|
22
|
-
* Used to distribute the children along the main axis.
|
|
23
|
-
*/
|
|
24
|
-
spread?: Spread;
|
|
25
|
-
/**
|
|
26
|
-
* Used to set whether the container should grow to fill the available space.
|
|
27
|
-
*/
|
|
28
|
-
grow?: Grow;
|
|
29
|
-
/**
|
|
30
|
-
* Represents the space between each child.
|
|
31
|
-
*/
|
|
32
|
-
space?: FlexProps['gap'];
|
|
33
|
-
/**
|
|
34
|
-
* Elements to be rendered inside the Stack.
|
|
35
|
-
*/
|
|
36
|
-
children: ReactNode;
|
|
37
|
-
/**
|
|
38
|
-
* Forwarded ref element.
|
|
39
|
-
*/
|
|
40
|
-
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
41
|
-
} & BasePrimitiveProps & AriaAttributes;
|
|
42
|
-
/**
|
|
43
|
-
* __Stack__
|
|
44
|
-
*
|
|
45
|
-
* Stack is a primitive component based on flexbox that manages the block layout of direct children.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```tsx
|
|
49
|
-
* <Stack>
|
|
50
|
-
* <Box padding="space.100" backgroundColor="neutral"></Box>
|
|
51
|
-
* <Box padding="space.100" backgroundColor="neutral"></Box>
|
|
52
|
-
* </Stack>
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
declare const Stack: MemoExoticComponent<ForwardRefExoticComponent<Omit<StackProps<ElementType>, 'ref'> & RefAttributes<any>>>;
|
|
57
|
-
export default Stack;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
6
|
-
import { type StrictXCSSProp } from '@atlaskit/css';
|
|
7
|
-
import type { BasePrimitiveProps, FontSize, FontWeight, TextAlign, TextColor } from './types';
|
|
8
|
-
declare const asAllowlist: readonly [
|
|
9
|
-
"span",
|
|
10
|
-
"p",
|
|
11
|
-
"strong",
|
|
12
|
-
"em"
|
|
13
|
-
];
|
|
14
|
-
type AsElement = (typeof asAllowlist)[number];
|
|
15
|
-
type TextPropsBase<T extends ElementType = 'span'> = {
|
|
16
|
-
/**
|
|
17
|
-
* HTML tag to be rendered. Defaults to `span`.
|
|
18
|
-
*/
|
|
19
|
-
as?: AsElement;
|
|
20
|
-
/**
|
|
21
|
-
* Elements rendered within the Text element.
|
|
22
|
-
*/
|
|
23
|
-
children: ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Token representing text color with a built-in fallback value.
|
|
26
|
-
* Will apply inverse text color automatically if placed within a Box with bold background color.
|
|
27
|
-
* Defaults to `color.text` if not nested in other Text components.
|
|
28
|
-
*/
|
|
29
|
-
color?: TextColor | 'inherit';
|
|
30
|
-
/**
|
|
31
|
-
* The [HTML `id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
|
|
32
|
-
*/
|
|
33
|
-
id?: string;
|
|
34
|
-
/**
|
|
35
|
-
* The number of lines to limit the provided text to. Text will be truncated with an ellipsis.
|
|
36
|
-
*
|
|
37
|
-
* When `maxLines={1}`, `wordBreak` defaults to `break-all` to match the behaviour of `text-overflow: ellipsis`.
|
|
38
|
-
*/
|
|
39
|
-
maxLines?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Text alignment.
|
|
42
|
-
*/
|
|
43
|
-
align?: TextAlign;
|
|
44
|
-
/**
|
|
45
|
-
* Text size.
|
|
46
|
-
*/
|
|
47
|
-
size?: FontSize;
|
|
48
|
-
/**
|
|
49
|
-
* The [HTML `font-weight` attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight).
|
|
50
|
-
*/
|
|
51
|
-
weight?: FontWeight;
|
|
52
|
-
/**
|
|
53
|
-
* Bounded style overrides.
|
|
54
|
-
*/
|
|
55
|
-
xcss?: StrictXCSSProp<'overflowWrap' | 'textDecorationLine' | 'fontVariantNumeric', never>;
|
|
56
|
-
/**
|
|
57
|
-
* Forwarded ref.
|
|
58
|
-
*/
|
|
59
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
60
|
-
};
|
|
61
|
-
export type TextProps<T extends ElementType = 'span'> = TextPropsBase<T> & Omit<BasePrimitiveProps, 'xcss'>;
|
|
62
|
-
export declare const inverseColorMap: {
|
|
63
|
-
readonly 'color.background.neutral.bold': "color.text.inverse";
|
|
64
|
-
readonly 'color.background.neutral.bold.hovered': "color.text.inverse";
|
|
65
|
-
readonly 'color.background.neutral.bold.pressed': "color.text.inverse";
|
|
66
|
-
readonly 'color.background.selected.bold': "color.text.inverse";
|
|
67
|
-
readonly 'color.background.selected.bold.hovered': "color.text.inverse";
|
|
68
|
-
readonly 'color.background.selected.bold.pressed': "color.text.inverse";
|
|
69
|
-
readonly 'color.background.brand.bold': "color.text.inverse";
|
|
70
|
-
readonly 'color.background.brand.bold.hovered': "color.text.inverse";
|
|
71
|
-
readonly 'color.background.brand.bold.pressed': "color.text.inverse";
|
|
72
|
-
readonly 'color.background.brand.boldest': "color.text.inverse";
|
|
73
|
-
readonly 'color.background.brand.boldest.hovered': "color.text.inverse";
|
|
74
|
-
readonly 'color.background.brand.boldest.pressed': "color.text.inverse";
|
|
75
|
-
readonly 'color.background.danger.bold': "color.text.inverse";
|
|
76
|
-
readonly 'color.background.danger.bold.hovered': "color.text.inverse";
|
|
77
|
-
readonly 'color.background.danger.bold.pressed': "color.text.inverse";
|
|
78
|
-
readonly 'color.background.warning.bold': "color.text.warning.inverse";
|
|
79
|
-
readonly 'color.background.warning.bold.hovered': "color.text.warning.inverse";
|
|
80
|
-
readonly 'color.background.warning.bold.pressed': "color.text.warning.inverse";
|
|
81
|
-
readonly 'color.background.success.bold': "color.text.inverse";
|
|
82
|
-
readonly 'color.background.success.bold.hovered': "color.text.inverse";
|
|
83
|
-
readonly 'color.background.success.bold.pressed': "color.text.inverse";
|
|
84
|
-
readonly 'color.background.discovery.bold': "color.text.inverse";
|
|
85
|
-
readonly 'color.background.discovery.bold.hovered': "color.text.inverse";
|
|
86
|
-
readonly 'color.background.discovery.bold.pressed': "color.text.inverse";
|
|
87
|
-
readonly 'color.background.information.bold': "color.text.inverse";
|
|
88
|
-
readonly 'color.background.information.bold.hovered': "color.text.inverse";
|
|
89
|
-
readonly 'color.background.information.bold.pressed': "color.text.inverse";
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* __Text__
|
|
93
|
-
*
|
|
94
|
-
* Text is a primitive component that has the Atlassian Design System's design guidelines baked in.
|
|
95
|
-
* This includes considerations for text attributes such as color, font size, font weight, and line height.
|
|
96
|
-
* It renders a `span` by default.
|
|
97
|
-
*
|
|
98
|
-
* @internal
|
|
99
|
-
*/
|
|
100
|
-
declare const Text: React.ForwardRefExoticComponent<React.PropsWithoutRef<TextProps<ElementType>> & React.RefAttributes<any>>;
|
|
101
|
-
export default Text;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { StrictXCSSProp, XCSSAllProperties, XCSSAllPseudos } from '@atlaskit/css';
|
|
3
|
-
export type BasePrimitiveProps = {
|
|
4
|
-
/**
|
|
5
|
-
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
6
|
-
*/
|
|
7
|
-
testId?: string;
|
|
8
|
-
/**
|
|
9
|
-
* `data-testid` is strictly controlled through the `testId` prop.
|
|
10
|
-
* This lets consumers know that this data attribute will not be applied.
|
|
11
|
-
*/
|
|
12
|
-
'data-testid'?: never;
|
|
13
|
-
/**
|
|
14
|
-
* Apply a subset of permitted styles powered by Atlassian Design System design tokens.
|
|
15
|
-
*/
|
|
16
|
-
xcss?: StrictXCSSProp<XCSSAllProperties, XCSSAllPseudos>;
|
|
17
|
-
/**
|
|
18
|
-
* Accessible role.
|
|
19
|
-
*/
|
|
20
|
-
role?: string;
|
|
21
|
-
};
|
|
22
|
-
export type StyleProp = {
|
|
23
|
-
style?: CSSProperties;
|
|
24
|
-
};
|
|
25
|
-
export type AlignBlock = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
|
|
26
|
-
export type AlignContent = 'center' | 'start' | 'space-around' | 'space-between' | 'space-evenly' | 'stretch' | 'end';
|
|
27
|
-
export type AlignInline = 'start' | 'center' | 'end' | 'stretch';
|
|
28
|
-
export type AlignItems = 'center' | 'start' | 'stretch' | 'end' | 'baseline';
|
|
29
|
-
export type AutoFlow = 'column' | 'row' | 'dense' | 'row dense' | 'column dense';
|
|
30
|
-
export type Direction = 'column' | 'row';
|
|
31
|
-
export type Grow = 'hug' | 'fill';
|
|
32
|
-
export type JustifyContent = 'center' | 'start' | 'space-around' | 'space-between' | 'space-evenly' | 'stretch' | 'end';
|
|
33
|
-
export type JustifyItems = 'center' | 'start' | 'stretch' | 'end';
|
|
34
|
-
export type Spread = 'space-between';
|
|
35
|
-
export type Wrap = 'wrap' | 'nowrap';
|
|
36
|
-
export type BleedSpaceToken = 'space.025' | 'space.050' | 'space.100' | 'space.150' | 'space.200';
|
|
37
|
-
export type PositiveSpaceToken = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000';
|
|
38
|
-
export type PaddingToken = PositiveSpaceToken;
|
|
39
|
-
export type GapToken = PositiveSpaceToken;
|
|
40
|
-
export type SurfaceColorToken = 'utility.elevation.surface.current' | 'elevation.surface' | 'elevation.surface.overlay' | 'elevation.surface.raised' | 'elevation.surface.sunken';
|
|
41
|
-
export type TextAlign = 'center' | 'end' | 'start';
|
|
42
|
-
export type TextColor = 'color.text' | 'color.text.accent.lime' | 'color.text.accent.lime.bolder' | 'color.text.accent.red' | 'color.text.accent.red.bolder' | 'color.text.accent.orange' | 'color.text.accent.orange.bolder' | 'color.text.accent.yellow' | 'color.text.accent.yellow.bolder' | 'color.text.accent.green' | 'color.text.accent.green.bolder' | 'color.text.accent.teal' | 'color.text.accent.teal.bolder' | 'color.text.accent.blue' | 'color.text.accent.blue.bolder' | 'color.text.accent.purple' | 'color.text.accent.purple.bolder' | 'color.text.accent.magenta' | 'color.text.accent.magenta.bolder' | 'color.text.accent.gray' | 'color.text.accent.gray.bolder' | 'color.text.disabled' | 'color.text.inverse' | 'color.text.selected' | 'color.text.brand' | 'color.text.danger' | 'color.text.warning' | 'color.text.warning.inverse' | 'color.text.success' | 'color.text.discovery' | 'color.text.information' | 'color.text.subtlest' | 'color.text.subtle' | 'color.link' | 'color.link.pressed' | 'color.link.visited' | 'color.link.visited.pressed';
|
|
43
|
-
export type FontSize = 'small' | 'medium' | 'large';
|
|
44
|
-
export type FontWeight = 'bold' | 'medium' | 'regular' | 'semibold';
|
|
45
|
-
export type MetricTextFontSize = 'small' | 'medium' | 'large';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { default as Box, type BoxProps } from './components/box';
|
|
2
|
-
export { default as Inline, type InlineProps } from './components/inline';
|
|
3
|
-
export { default as Stack, type StackProps } from './components/stack';
|
|
4
|
-
export { default as Flex, type FlexProps } from './components/flex';
|
|
5
|
-
export { default as Grid, type GridProps } from './components/grid';
|
|
6
|
-
export { default as Bleed, type BleedProps } from './components/bleed';
|
|
7
|
-
export { default as Text, type TextProps } from './components/text';
|
|
8
|
-
export { default as MetricText, type MetricTextProps } from './components/metric-text';
|
|
9
|
-
export { default as Pressable, type PressableProps } from './components/pressable';
|
|
10
|
-
export { default as Anchor, type AnchorProps } from './components/anchor';
|
|
11
|
-
export { media, type Breakpoint, type MediaQuery, UNSAFE_useMediaQuery, Show, Hide, } from './responsive';
|
|
12
|
-
export { default as Focusable } from './components/focusable';
|
|
13
|
-
export type { FocusableProps } from './components/focusable';
|
|
14
|
-
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext, } from '../utils/surface-provider';
|
|
15
|
-
export type { BackgroundColorToken as BackgroundColor } from '../utils/types';
|
|
16
|
-
export type { PositiveSpaceToken as Space, TextColor } from './components/types';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactNode } from 'react';
|
|
6
|
-
import { type BasePrimitiveProps } from '../components/types';
|
|
7
|
-
import type { Breakpoint, ComponentAs } from './types';
|
|
8
|
-
type ResponsiveHideProps = {
|
|
9
|
-
as?: ComponentAs;
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
} & ({
|
|
12
|
-
above?: never;
|
|
13
|
-
/**
|
|
14
|
-
* Apply CSS to hide this specifically **below** this breakpoint.
|
|
15
|
-
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
16
|
-
*
|
|
17
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
18
|
-
*/
|
|
19
|
-
below: Exclude<Breakpoint, 'xxs'>;
|
|
20
|
-
} | {
|
|
21
|
-
/**
|
|
22
|
-
* Apply CSS to hide this specifically **above** this breakpoint.
|
|
23
|
-
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
24
|
-
*
|
|
25
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
26
|
-
*/
|
|
27
|
-
above: Exclude<Breakpoint, 'xxs'>;
|
|
28
|
-
below?: never;
|
|
29
|
-
}) & Pick<BasePrimitiveProps, 'xcss'>;
|
|
30
|
-
/**
|
|
31
|
-
* Hides the content at a given breakpoint. By default, content is shown. The primary use case is for visual presentation.
|
|
32
|
-
* Mix `<Hide above="md">` with `<Show above="md">` to achieve content that shifts at a breakpoint.
|
|
33
|
-
*
|
|
34
|
-
* Please note:
|
|
35
|
-
* - This only uses `display: none` hide, it does not skip rendering of children trees.
|
|
36
|
-
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
37
|
-
*/
|
|
38
|
-
export declare const Hide: ({ above, below, children, as: AsElement, xcss, }: ResponsiveHideProps) => JSX.Element;
|
|
39
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is an object of usable media query helpers using our internal breakpoints configuration.
|
|
3
|
-
*
|
|
4
|
-
* When using Compiled CSS-in-JS, please ensure that only a single declaration can take effect at a time.
|
|
5
|
-
* This means that you should avoid multiple breakpoints taking effect at the same time,
|
|
6
|
-
* eg. ```{ [media.above.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
7
|
-
* Instead, make sure that only one breakpoint can take effect at a time,
|
|
8
|
-
* e.g, ```{ [media.only.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
9
|
-
* For more details, please see <https://compiledcssinjs.com/docs/atomic-css#selector-specificity>.
|
|
10
|
-
*/
|
|
11
|
-
export declare const media: {
|
|
12
|
-
above: {
|
|
13
|
-
readonly xxs: "@media all";
|
|
14
|
-
readonly xs: "@media (min-width: 30rem)";
|
|
15
|
-
readonly sm: "@media (min-width: 48rem)";
|
|
16
|
-
readonly md: "@media (min-width: 64rem)";
|
|
17
|
-
readonly lg: "@media (min-width: 90rem)";
|
|
18
|
-
readonly xl: "@media (min-width: 110.5rem)";
|
|
19
|
-
};
|
|
20
|
-
only: {
|
|
21
|
-
readonly xxs: "@media (min-width: 0rem) and (max-width: 29.99rem)";
|
|
22
|
-
readonly xs: "@media (min-width: 30rem) and (max-width: 47.99rem)";
|
|
23
|
-
readonly sm: "@media (min-width: 48rem) and (max-width: 63.99rem)";
|
|
24
|
-
readonly md: "@media (min-width: 64rem) and (max-width: 89.99rem)";
|
|
25
|
-
readonly lg: "@media (min-width: 90rem) and (max-width: 110.49rem)";
|
|
26
|
-
readonly xl: "@media (min-width: 110.5rem)";
|
|
27
|
-
};
|
|
28
|
-
below: {
|
|
29
|
-
readonly xs: "@media not all and (min-width: 30rem)";
|
|
30
|
-
readonly sm: "@media not all and (min-width: 48rem)";
|
|
31
|
-
readonly md: "@media not all and (min-width: 64rem)";
|
|
32
|
-
readonly lg: "@media not all and (min-width: 90rem)";
|
|
33
|
-
readonly xl: "@media not all and (min-width: 110.5rem)";
|
|
34
|
-
};
|
|
35
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactNode } from 'react';
|
|
6
|
-
import { type BasePrimitiveProps } from '../components/types';
|
|
7
|
-
import type { Breakpoint, ComponentAs } from './types';
|
|
8
|
-
type ResponsiveShowProps = {
|
|
9
|
-
as?: ComponentAs;
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
} & ({
|
|
12
|
-
above?: never;
|
|
13
|
-
/**
|
|
14
|
-
* Apply CSS to show this specifically **below** this breakpoint.
|
|
15
|
-
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
16
|
-
*
|
|
17
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
18
|
-
*/
|
|
19
|
-
below: Exclude<Breakpoint, 'xxs'>;
|
|
20
|
-
} | {
|
|
21
|
-
/**
|
|
22
|
-
* Apply CSS to show this specifically **above** this breakpoint.
|
|
23
|
-
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
24
|
-
*
|
|
25
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
26
|
-
*/
|
|
27
|
-
above: Exclude<Breakpoint, 'xxs'>;
|
|
28
|
-
below?: never;
|
|
29
|
-
}) & Pick<BasePrimitiveProps, 'xcss'>;
|
|
30
|
-
/**
|
|
31
|
-
* Shows the content at a given breakpoint. By default, content is hidden. The primary use case is for visual presentation.
|
|
32
|
-
* Mix `<Show above="md">` with `<Hide above="md">` to achieve content that shifts at a breakpoint.
|
|
33
|
-
*
|
|
34
|
-
* Please note:
|
|
35
|
-
* - This only uses `display: none` and `display: revert` to show/hide, it does not skip rendering of children trees.
|
|
36
|
-
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
37
|
-
*/
|
|
38
|
-
export declare const Show: ({ above, below, children, as: AsElement, xcss, }: ResponsiveShowProps) => JSX.Element;
|
|
39
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type media } from './media-helper';
|
|
2
|
-
/**
|
|
3
|
-
* The breakpoints we have for responsiveness.
|
|
4
|
-
*/
|
|
5
|
-
export type Breakpoint = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
-
/**
|
|
7
|
-
* All supported media queries for use as keys, eg. in `css({ [media.above.md]: { … } })`.
|
|
8
|
-
*/
|
|
9
|
-
export type MediaQuery = (typeof media.above)[Breakpoint];
|
|
10
|
-
export type ComponentAs = 'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { media } from './media-helper';
|
|
2
|
-
type NestedQueryString = `above.${keyof typeof media.above}` | `below.${keyof typeof media.below}`;
|
|
3
|
-
/**
|
|
4
|
-
* A hook which returnes a `window.matchMedia` result to help you build responsively around breakpoints in JavaScript.
|
|
5
|
-
*
|
|
6
|
-
* The returning value **WILL NOT** update or react to change. You can use `mq.matches` to get the latest version and you can use the optional listener argument to react to changes as desired.
|
|
7
|
-
*
|
|
8
|
-
* @important
|
|
9
|
-
* - This will always be `null` in SSR and the event listener should not fire on SSR => clientside hydration.
|
|
10
|
-
* - `above.xxs` will always be truthy, your listener should never fire.
|
|
11
|
-
*
|
|
12
|
-
* @experimental This hook only works on the client-side and is not safe in an SSR environment as `window` is unavailable (and the user's viewport would be unknown)
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const mq = useMediaQuery('below.md', useCallback((event) => console.log('changed', event.matches)), []))
|
|
16
|
-
* const isMobile = mq?.matches;
|
|
17
|
-
*
|
|
18
|
-
* @returns
|
|
19
|
-
* - `MediaQueryList`, primarily used to get if that media query is currently
|
|
20
|
-
* - `null` when `matchMedia` is unavailable, eg. in SSR.
|
|
21
|
-
*/
|
|
22
|
-
export declare const UNSAFE_useMediaQuery: (queryString: NestedQueryString, listener?: (event: MediaQueryListEvent) => void) => MediaQueryList | null;
|
|
23
|
-
export {};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
|
-
import { type RouterLinkComponentProps } from '@atlaskit/app-provider';
|
|
9
|
-
import { type BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
10
|
-
import type { BasePrimitiveProps, StyleProp } from './types';
|
|
11
|
-
type BaseAnchorProps = {
|
|
12
|
-
/**
|
|
13
|
-
* Elements to be rendered inside the Anchor.
|
|
14
|
-
*/
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Handler called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the ['analytics-next' package](https://atlaskit.atlassian.com/packages/analytics/analytics-next) documentation for more information.
|
|
18
|
-
*/
|
|
19
|
-
onClick?: (e: React.MouseEvent<HTMLAnchorElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
20
|
-
/**
|
|
21
|
-
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
22
|
-
*/
|
|
23
|
-
interactionName?: string;
|
|
24
|
-
/**
|
|
25
|
-
* An optional component name used to identify this component in Atlaskit analytics events. This can be used if a parent component's name is preferred over the default 'Anchor'.
|
|
26
|
-
*/
|
|
27
|
-
componentName?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Additional information to be included in the `context` of Atlaskit analytics events that come from anchor.
|
|
30
|
-
*/
|
|
31
|
-
analyticsContext?: Record<string, any>;
|
|
32
|
-
/**
|
|
33
|
-
* Token representing background color with a built-in fallback value.
|
|
34
|
-
* @deprecated Please pass via `props.xcss`, eg. `xcss({ backgroundColor: '…' })` instead and include states such as hover values as well.
|
|
35
|
-
*/
|
|
36
|
-
backgroundColor?: BackgroundColor;
|
|
37
|
-
/**
|
|
38
|
-
* Use this to set a label for assistive technology that describes the link as opening in a new window. The default label is "(opens new window)".
|
|
39
|
-
*/
|
|
40
|
-
newWindowLabel?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Tokens representing CSS shorthand for `paddingBlock` and `paddingInline` together.
|
|
43
|
-
*
|
|
44
|
-
* @see paddingBlock
|
|
45
|
-
* @see paddingInline
|
|
46
|
-
*/
|
|
47
|
-
padding?: Space;
|
|
48
|
-
/**
|
|
49
|
-
* Tokens representing CSS shorthand `paddingBlock`.
|
|
50
|
-
*
|
|
51
|
-
* @see paddingBlockStart
|
|
52
|
-
* @see paddingBlockEnd
|
|
53
|
-
*/
|
|
54
|
-
paddingBlock?: Space;
|
|
55
|
-
/**
|
|
56
|
-
* Tokens representing CSS `paddingBlockStart`.
|
|
57
|
-
*/
|
|
58
|
-
paddingBlockStart?: Space;
|
|
59
|
-
/**
|
|
60
|
-
* Tokens representing CSS `paddingBlockEnd`.
|
|
61
|
-
*/
|
|
62
|
-
paddingBlockEnd?: Space;
|
|
63
|
-
/**
|
|
64
|
-
* Tokens representing CSS shorthand `paddingInline`.
|
|
65
|
-
*
|
|
66
|
-
* @see paddingInlineStart
|
|
67
|
-
* @see paddingInlineEnd
|
|
68
|
-
*/
|
|
69
|
-
paddingInline?: Space;
|
|
70
|
-
/**
|
|
71
|
-
* Tokens representing CSS `paddingInlineStart`.
|
|
72
|
-
*/
|
|
73
|
-
paddingInlineStart?: Space;
|
|
74
|
-
/**
|
|
75
|
-
* Tokens representing CSS `paddingInlineEnd`.
|
|
76
|
-
*/
|
|
77
|
-
paddingInlineEnd?: Space;
|
|
78
|
-
/**
|
|
79
|
-
* Forwarded ref.
|
|
80
|
-
*/
|
|
81
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
82
|
-
};
|
|
83
|
-
export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> = RouterLinkComponentProps<RouterLinkConfig> & Omit<ComponentPropsWithoutRef<'a'>, 'href' | 'onClick' | 'style' | 'className'> & BasePrimitiveProps & StyleProp & BaseAnchorProps;
|
|
84
|
-
/**
|
|
85
|
-
* __Anchor__
|
|
86
|
-
*
|
|
87
|
-
* A primitive for building custom anchor links.
|
|
88
|
-
*
|
|
89
|
-
* - [Examples](https://atlassian.design/components/primitives/anchor/examples)
|
|
90
|
-
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
91
|
-
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
92
|
-
*/
|
|
93
|
-
declare const AnchorNoRef: <RouterLinkConfig extends Record<string, any> = never>({ href, children, backgroundColor, newWindowLabel, padding, paddingBlock, paddingBlockStart, paddingBlockEnd, paddingInline, paddingInlineStart, paddingInlineEnd, onClick: providedOnClick, interactionName, componentName, analyticsContext, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, style, target, testId, xcss, ...htmlAttributes }: AnchorProps<RouterLinkConfig>, ref?: Ref<HTMLAnchorElement>) => jsx.JSX.Element;
|
|
94
|
-
/**
|
|
95
|
-
* __Anchor__
|
|
96
|
-
*
|
|
97
|
-
* Anchor is a primitive for building custom anchor links. It's a wrapper around the HTML `<a>` element that provides a consistent API for handling client-side routing and Atlassian Design System styling.
|
|
98
|
-
*
|
|
99
|
-
* - [Examples](https://atlassian.design/components/primitives/anchor/examples)
|
|
100
|
-
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
101
|
-
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
102
|
-
*/
|
|
103
|
-
declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>(props: AnchorProps<RouterLinkConfig> & {
|
|
104
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
105
|
-
}) => ReturnType<typeof AnchorNoRef>;
|
|
106
|
-
export default Anchor;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React, { type ReactNode } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { BasePrimitiveProps } from './types';
|
|
8
|
-
export type BleedProps = {
|
|
9
|
-
/**
|
|
10
|
-
* Elements to be rendered inside the Flex.
|
|
11
|
-
*/
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* Bleed along both axes.
|
|
15
|
-
*/
|
|
16
|
-
all?: Space;
|
|
17
|
-
/**
|
|
18
|
-
* Bleed along the inline axis.
|
|
19
|
-
*/
|
|
20
|
-
inline?: Space;
|
|
21
|
-
/**
|
|
22
|
-
* Bleed along the block axis.
|
|
23
|
-
*/
|
|
24
|
-
block?: Space;
|
|
25
|
-
} & BasePrimitiveProps;
|
|
26
|
-
type Space = 'space.025' | 'space.050' | 'space.100' | 'space.150' | 'space.200';
|
|
27
|
-
/**
|
|
28
|
-
* __Bleed__
|
|
29
|
-
*
|
|
30
|
-
* `Bleed` is a primitive layout component that controls negative whitespace.
|
|
31
|
-
*
|
|
32
|
-
* - [Examples](https://atlassian.design/components/primitives/bleed/examples)
|
|
33
|
-
* - [Code](https://atlassian.design/components/primitives/bleed/code)
|
|
34
|
-
*/
|
|
35
|
-
declare const Bleed: React.MemoExoticComponent<({ children, testId, inline, block, all, xcss }: BleedProps) => jsx.JSX.Element>;
|
|
36
|
-
export default Bleed;
|