@atlaskit/primitives 11.0.1 → 11.1.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 +16 -0
- package/constellation/anchor/code.mdx +5 -3
- package/constellation/anchor/examples.mdx +1 -2
- package/constellation/anchor/images/anchor-01a-do.png +0 -0
- package/constellation/anchor/images/anchor-01b-dont.png +0 -0
- package/constellation/anchor/images/anchor-02a-do.png +0 -0
- package/constellation/anchor/images/anchor-02b-dont.png +0 -0
- package/constellation/anchor/usage.mdx +61 -99
- package/constellation/box/code.mdx +3 -0
- package/constellation/pressable/code.mdx +5 -3
- package/constellation/pressable/usage.mdx +6 -4
- package/constellation/responsive/01-show/code.mdx +5 -3
- package/constellation/responsive/02-hide/code.mdx +5 -3
- package/dist/cjs/components/anchor.js +8 -5
- package/dist/cjs/components/bleed.js +1 -1
- package/dist/cjs/components/box.js +1 -1
- package/dist/cjs/components/flex.js +1 -1
- package/dist/cjs/components/grid.js +1 -1
- package/dist/cjs/components/inline.js +1 -1
- package/dist/cjs/components/pressable.js +2 -2
- package/dist/cjs/components/stack.js +1 -1
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/responsive/hide.js +1 -1
- package/dist/cjs/responsive/show.js +1 -1
- package/dist/es2019/components/anchor.js +8 -4
- package/dist/es2019/components/bleed.js +1 -1
- package/dist/es2019/components/box.js +1 -1
- package/dist/es2019/components/flex.js +1 -1
- package/dist/es2019/components/grid.js +1 -1
- package/dist/es2019/components/inline.js +1 -1
- package/dist/es2019/components/pressable.js +2 -2
- package/dist/es2019/components/stack.js +1 -1
- package/dist/es2019/components/text.js +1 -1
- package/dist/es2019/responsive/hide.js +1 -1
- package/dist/es2019/responsive/show.js +1 -1
- package/dist/esm/components/anchor.js +8 -5
- package/dist/esm/components/bleed.js +1 -1
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/inline.js +1 -1
- package/dist/esm/components/pressable.js +2 -2
- package/dist/esm/components/stack.js +1 -1
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/responsive/hide.js +1 -1
- package/dist/esm/responsive/show.js +1 -1
- package/dist/types/components/anchor.d.ts +6 -2
- package/dist/types/components/bleed.d.ts +1 -1
- package/dist/types/components/box.d.ts +1 -1
- package/dist/types/components/flex.d.ts +3 -3
- package/dist/types/components/grid.d.ts +1 -1
- package/dist/types/components/inline.d.ts +3 -3
- package/dist/types/components/pressable.d.ts +1 -1
- package/dist/types/components/stack.d.ts +3 -3
- package/dist/types/components/text.d.ts +1 -1
- package/dist/types/responsive/hide.d.ts +1 -1
- package/dist/types/responsive/show.d.ts +1 -1
- package/dist/types-ts4.5/components/anchor.d.ts +6 -2
- package/dist/types-ts4.5/components/bleed.d.ts +1 -1
- package/dist/types-ts4.5/components/box.d.ts +1 -1
- package/dist/types-ts4.5/components/flex.d.ts +3 -3
- package/dist/types-ts4.5/components/grid.d.ts +1 -1
- package/dist/types-ts4.5/components/inline.d.ts +3 -3
- package/dist/types-ts4.5/components/pressable.d.ts +1 -1
- package/dist/types-ts4.5/components/stack.d.ts +3 -3
- package/dist/types-ts4.5/components/text.d.ts +1 -1
- package/dist/types-ts4.5/responsive/hide.d.ts +1 -1
- package/dist/types-ts4.5/responsive/show.d.ts +1 -1
- package/package.json +2 -2
- package/extract-react-types/anchor-props.tsx +0 -120
- package/extract-react-types/bleed-props.tsx +0 -29
- package/extract-react-types/box-props.tsx +0 -89
- package/extract-react-types/flex-props.tsx +0 -80
- package/extract-react-types/grid-props.tsx +0 -102
- package/extract-react-types/hide-props.tsx +0 -48
- package/extract-react-types/inline-props.tsx +0 -89
- package/extract-react-types/pressable-props.tsx +0 -115
- package/extract-react-types/show-props.tsx +0 -48
- package/extract-react-types/stack-props.tsx +0 -73
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
import React, { Children, forwardRef, Fragment, memo } from 'react';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
import { forwardRef, useCallback, useContext } from 'react';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -85,7 +85,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
85
85
|
action: 'clicked',
|
|
86
86
|
componentName: componentName || 'Pressable',
|
|
87
87
|
packageName: "@atlaskit/primitives",
|
|
88
|
-
packageVersion: "11.0
|
|
88
|
+
packageVersion: "11.1.0",
|
|
89
89
|
analyticsData: analyticsContext,
|
|
90
90
|
actionSubject: 'button'
|
|
91
91
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
import { forwardRef, memo } from 'react';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["href", "children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "onClick", "interactionName", "componentName", "analyticsContext", "aria-label", "aria-labelledby", "style", "target", "testId", "xcss"],
|
|
4
|
+
var _excluded = ["href", "children", "backgroundColor", "newWindowLabel", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "onClick", "interactionName", "componentName", "analyticsContext", "aria-label", "aria-labelledby", "style", "target", "testId", "xcss"],
|
|
5
5
|
_excluded2 = ["className"];
|
|
6
6
|
/**
|
|
7
7
|
* @jsxRuntime classic
|
|
8
|
+
* @jsx jsx
|
|
8
9
|
*/
|
|
9
|
-
/** @jsx jsx */
|
|
10
10
|
import { forwardRef, useCallback, useContext } from 'react';
|
|
11
11
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -47,6 +47,7 @@ var baseStyles = css({
|
|
|
47
47
|
});
|
|
48
48
|
var IS_EXTERNAL_LINK_REGEX = /^(?:(http|https):\/\/)/;
|
|
49
49
|
var IS_NON_HTTP_BASED = /^(((mailto|tel|sms):)|(#))/;
|
|
50
|
+
// Comma is added here to add a slight pause between announcing the anchor label and "opens in new window"
|
|
50
51
|
var OPENS_NEW_WINDOW_LABEL = '(opens new window)';
|
|
51
52
|
|
|
52
53
|
/**
|
|
@@ -62,6 +63,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
62
63
|
var href = _ref.href,
|
|
63
64
|
children = _ref.children,
|
|
64
65
|
backgroundColor = _ref.backgroundColor,
|
|
66
|
+
newWindowLabel = _ref.newWindowLabel,
|
|
65
67
|
padding = _ref.padding,
|
|
66
68
|
paddingBlock = _ref.paddingBlock,
|
|
67
69
|
paddingBlockStart = _ref.paddingBlockStart,
|
|
@@ -97,7 +99,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
97
99
|
action: 'clicked',
|
|
98
100
|
componentName: componentName || 'Anchor',
|
|
99
101
|
packageName: "@atlaskit/primitives",
|
|
100
|
-
packageVersion: "11.0
|
|
102
|
+
packageVersion: "11.1.0",
|
|
101
103
|
analyticsData: analyticsContext,
|
|
102
104
|
actionSubject: 'link'
|
|
103
105
|
});
|
|
@@ -136,7 +138,8 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
136
138
|
href: !isRouterLink && typeof href !== 'string' ? undefined : href,
|
|
137
139
|
target: target,
|
|
138
140
|
onClick: onClick,
|
|
139
|
-
"aria-label": ariaLabel && target === '_blank' && !ariaLabelledBy ?
|
|
141
|
+
"aria-label": ariaLabel && target === '_blank' && !ariaLabelledBy ? //`${ariaLabel} ${OPENS_NEW_WINDOW_LABEL}`
|
|
142
|
+
"".concat(ariaLabel, " , ").concat(newWindowLabel ? newWindowLabel : OPENS_NEW_WINDOW_LABEL) : ariaLabel,
|
|
140
143
|
"aria-labelledby": ariaLabelledBy && target === '_blank' ? "".concat(ariaLabelledBy, " ").concat(opensNewWindowLabelId) : ariaLabelledBy,
|
|
141
144
|
css: [baseStyles, focusRingStyles,
|
|
142
145
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -161,7 +164,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
161
164
|
"data-is-router-link": testId ? isRouterLink ? 'true' : 'false' : undefined
|
|
162
165
|
}), children, target === '_blank' && (children && !ariaLabel && !ariaLabelledBy || ariaLabelledBy) && jsx(VisuallyHidden, {
|
|
163
166
|
id: opensNewWindowLabelId
|
|
164
|
-
}, OPENS_NEW_WINDOW_LABEL));
|
|
167
|
+
}, ", ".concat(newWindowLabel ? newWindowLabel : OPENS_NEW_WINDOW_LABEL)));
|
|
165
168
|
};
|
|
166
169
|
|
|
167
170
|
// Workarounds to support generic types with forwardRef
|
|
@@ -4,8 +4,8 @@ var _excluded = ["as", "children", "backgroundColor", "padding", "paddingBlock",
|
|
|
4
4
|
_excluded2 = ["className"];
|
|
5
5
|
/**
|
|
6
6
|
* @jsxRuntime classic
|
|
7
|
+
* @jsx jsx
|
|
7
8
|
*/
|
|
8
|
-
/** @jsx jsx */
|
|
9
9
|
import { forwardRef } from 'react';
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
import { forwardRef, memo, useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -2,8 +2,8 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
5
6
|
*/
|
|
6
|
-
/** @jsx jsx */
|
|
7
7
|
import React, { Children, forwardRef, Fragment, memo } from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -4,8 +4,8 @@ var _excluded = ["children", "backgroundColor", "padding", "paddingBlock", "padd
|
|
|
4
4
|
_excluded2 = ["className"];
|
|
5
5
|
/**
|
|
6
6
|
* @jsxRuntime classic
|
|
7
|
+
* @jsx jsx
|
|
7
8
|
*/
|
|
8
|
-
/** @jsx jsx */
|
|
9
9
|
import { forwardRef, useCallback, useContext } from 'react';
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -89,7 +89,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
89
89
|
action: 'clicked',
|
|
90
90
|
componentName: componentName || 'Pressable',
|
|
91
91
|
packageName: "@atlaskit/primitives",
|
|
92
|
-
packageVersion: "11.0
|
|
92
|
+
packageVersion: "11.1.0",
|
|
93
93
|
analyticsData: analyticsContext,
|
|
94
94
|
actionSubject: 'button'
|
|
95
95
|
});
|
|
@@ -2,8 +2,8 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
5
6
|
*/
|
|
6
|
-
/** @jsx jsx */
|
|
7
7
|
import { forwardRef, memo } from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
@@ -33,6 +33,10 @@ type BaseAnchorProps = {
|
|
|
33
33
|
* Token representing background color with a built-in fallback value.
|
|
34
34
|
*/
|
|
35
35
|
backgroundColor?: BackgroundColor;
|
|
36
|
+
/**
|
|
37
|
+
* 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)".
|
|
38
|
+
*/
|
|
39
|
+
newWindowLabel?: string;
|
|
36
40
|
/**
|
|
37
41
|
* Tokens representing CSS shorthand for `paddingBlock` and `paddingInline` together.
|
|
38
42
|
*
|
|
@@ -85,7 +89,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
|
|
|
85
89
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
86
90
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
87
91
|
*/
|
|
88
|
-
declare const AnchorNoRef: <RouterLinkConfig extends Record<string, any> = never>({ href, children, backgroundColor, 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;
|
|
92
|
+
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;
|
|
89
93
|
/**
|
|
90
94
|
* __Anchor__
|
|
91
95
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactElement, type ReactNode } from 'react';
|
|
6
6
|
import { type BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import { type SVGElements } from './internal/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { BasePrimitiveProps } from './types';
|
|
@@ -9,7 +9,7 @@ export type FlexProps<T extends ElementType = 'div'> = {
|
|
|
9
9
|
/**
|
|
10
10
|
* The DOM element to render as the Flex. Defaults to `div`.
|
|
11
11
|
*/
|
|
12
|
-
as?: 'div' | 'span' | 'ul' | 'ol' | 'li';
|
|
12
|
+
as?: 'div' | 'span' | 'ul' | 'ol' | 'li' | 'dl';
|
|
13
13
|
/**
|
|
14
14
|
* Used to align children along the main axis.
|
|
15
15
|
*/
|
|
@@ -99,7 +99,7 @@ declare const Flex: import("react").MemoExoticComponent<import("react").ForwardR
|
|
|
99
99
|
/**
|
|
100
100
|
* The DOM element to render as the Flex. Defaults to `div`.
|
|
101
101
|
*/
|
|
102
|
-
as?: "div" | "li" | "ol" | "span" | "ul" | undefined;
|
|
102
|
+
as?: "div" | "dl" | "li" | "ol" | "span" | "ul" | undefined;
|
|
103
103
|
/**
|
|
104
104
|
* Used to align children along the main axis.
|
|
105
105
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import React, { type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
@@ -9,7 +9,7 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
9
9
|
/**
|
|
10
10
|
* The DOM element to render as the Inline. Defaults to `div`.
|
|
11
11
|
*/
|
|
12
|
-
as?: 'div' | 'span' | 'ul' | 'ol' | 'li';
|
|
12
|
+
as?: 'div' | 'span' | 'ul' | 'ol' | 'li' | 'dl';
|
|
13
13
|
/**
|
|
14
14
|
* Used to align children along the block axis (typically vertical).
|
|
15
15
|
*/
|
|
@@ -70,7 +70,7 @@ declare const Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<
|
|
|
70
70
|
/**
|
|
71
71
|
* The DOM element to render as the Inline. Defaults to `div`.
|
|
72
72
|
*/
|
|
73
|
-
as?: "div" | "li" | "ol" | "span" | "ul" | undefined;
|
|
73
|
+
as?: "div" | "dl" | "li" | "ol" | "span" | "ul" | undefined;
|
|
74
74
|
/**
|
|
75
75
|
* Used to align children along the block axis (typically vertical).
|
|
76
76
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';
|
|
6
6
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
7
|
import { type BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
@@ -9,7 +9,7 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
9
9
|
/**
|
|
10
10
|
* The DOM element to render as the Stack. Defaults to `div`.
|
|
11
11
|
*/
|
|
12
|
-
as?: 'div' | 'span' | 'ul' | 'ol';
|
|
12
|
+
as?: 'div' | 'span' | 'ul' | 'ol' | 'dl';
|
|
13
13
|
/**
|
|
14
14
|
* Used to align children along the block axis (typically vertical).
|
|
15
15
|
*/
|
|
@@ -57,7 +57,7 @@ declare const Stack: import("react").MemoExoticComponent<import("react").Forward
|
|
|
57
57
|
/**
|
|
58
58
|
* The DOM element to render as the Stack. Defaults to `div`.
|
|
59
59
|
*/
|
|
60
|
-
as?: "div" | "ol" | "span" | "ul" | undefined;
|
|
60
|
+
as?: "div" | "dl" | "ol" | "span" | "ul" | undefined;
|
|
61
61
|
/**
|
|
62
62
|
* Used to align children along the block axis (typically vertical).
|
|
63
63
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type FontSize, type FontWeight, type TextColor } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { BasePrimitiveProps } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
@@ -33,6 +33,10 @@ type BaseAnchorProps = {
|
|
|
33
33
|
* Token representing background color with a built-in fallback value.
|
|
34
34
|
*/
|
|
35
35
|
backgroundColor?: BackgroundColor;
|
|
36
|
+
/**
|
|
37
|
+
* 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)".
|
|
38
|
+
*/
|
|
39
|
+
newWindowLabel?: string;
|
|
36
40
|
/**
|
|
37
41
|
* Tokens representing CSS shorthand for `paddingBlock` and `paddingInline` together.
|
|
38
42
|
*
|
|
@@ -85,7 +89,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
|
|
|
85
89
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
86
90
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
87
91
|
*/
|
|
88
|
-
declare const AnchorNoRef: <RouterLinkConfig extends Record<string, any> = never>({ href, children, backgroundColor, 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;
|
|
92
|
+
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;
|
|
89
93
|
/**
|
|
90
94
|
* __Anchor__
|
|
91
95
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactElement, type ReactNode } from 'react';
|
|
6
6
|
import { type BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import { type SVGElements } from './internal/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { BasePrimitiveProps } from './types';
|
|
@@ -9,7 +9,7 @@ export type FlexProps<T extends ElementType = 'div'> = {
|
|
|
9
9
|
/**
|
|
10
10
|
* The DOM element to render as the Flex. Defaults to `div`.
|
|
11
11
|
*/
|
|
12
|
-
as?: 'div' | 'span' | 'ul' | 'ol' | 'li';
|
|
12
|
+
as?: 'div' | 'span' | 'ul' | 'ol' | 'li' | 'dl';
|
|
13
13
|
/**
|
|
14
14
|
* Used to align children along the main axis.
|
|
15
15
|
*/
|
|
@@ -99,7 +99,7 @@ declare const Flex: import("react").MemoExoticComponent<import("react").ForwardR
|
|
|
99
99
|
/**
|
|
100
100
|
* The DOM element to render as the Flex. Defaults to `div`.
|
|
101
101
|
*/
|
|
102
|
-
as?: "div" | "li" | "ol" | "span" | "ul" | undefined;
|
|
102
|
+
as?: "div" | "dl" | "li" | "ol" | "span" | "ul" | undefined;
|
|
103
103
|
/**
|
|
104
104
|
* Used to align children along the main axis.
|
|
105
105
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import React, { type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
@@ -9,7 +9,7 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
9
9
|
/**
|
|
10
10
|
* The DOM element to render as the Inline. Defaults to `div`.
|
|
11
11
|
*/
|
|
12
|
-
as?: 'div' | 'span' | 'ul' | 'ol' | 'li';
|
|
12
|
+
as?: 'div' | 'span' | 'ul' | 'ol' | 'li' | 'dl';
|
|
13
13
|
/**
|
|
14
14
|
* Used to align children along the block axis (typically vertical).
|
|
15
15
|
*/
|
|
@@ -70,7 +70,7 @@ declare const Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<
|
|
|
70
70
|
/**
|
|
71
71
|
* The DOM element to render as the Inline. Defaults to `div`.
|
|
72
72
|
*/
|
|
73
|
-
as?: "div" | "li" | "ol" | "span" | "ul" | undefined;
|
|
73
|
+
as?: "div" | "dl" | "li" | "ol" | "span" | "ul" | undefined;
|
|
74
74
|
/**
|
|
75
75
|
* Used to align children along the block axis (typically vertical).
|
|
76
76
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';
|
|
6
6
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
7
|
import { type BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type Space } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
@@ -9,7 +9,7 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
9
9
|
/**
|
|
10
10
|
* The DOM element to render as the Stack. Defaults to `div`.
|
|
11
11
|
*/
|
|
12
|
-
as?: 'div' | 'span' | 'ul' | 'ol';
|
|
12
|
+
as?: 'div' | 'span' | 'ul' | 'ol' | 'dl';
|
|
13
13
|
/**
|
|
14
14
|
* Used to align children along the block axis (typically vertical).
|
|
15
15
|
*/
|
|
@@ -57,7 +57,7 @@ declare const Stack: import("react").MemoExoticComponent<import("react").Forward
|
|
|
57
57
|
/**
|
|
58
58
|
* The DOM element to render as the Stack. Defaults to `div`.
|
|
59
59
|
*/
|
|
60
|
-
as?: "div" | "ol" | "span" | "ul" | undefined;
|
|
60
|
+
as?: "div" | "dl" | "ol" | "span" | "ul" | undefined;
|
|
61
61
|
/**
|
|
62
62
|
* Used to align children along the block axis (typically vertical).
|
|
63
63
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
6
6
|
import { type FontSize, type FontWeight, type TextColor } from '../xcss/style-maps.partial';
|
|
7
7
|
import type { BasePrimitiveProps } from './types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"@atlaskit/css": "^0.3.0",
|
|
129
129
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
130
130
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
131
|
-
"@atlaskit/tokens": "^1.
|
|
131
|
+
"@atlaskit/tokens": "^1.56.0",
|
|
132
132
|
"@atlaskit/visually-hidden": "^1.4.0",
|
|
133
133
|
"@babel/runtime": "^7.0.0",
|
|
134
134
|
"@emotion/react": "^11.7.1",
|