@atlaskit/primitives 7.0.1 → 7.0.3
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 +38 -0
- package/constellation/pressable/examples.mdx +23 -20
- package/constellation/pressable/usage.mdx +35 -33
- package/dist/cjs/components/anchor.js +4 -4
- package/dist/cjs/components/box.js +20 -2
- package/dist/cjs/components/flex.js +7 -1
- package/dist/cjs/components/grid.js +7 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/es2019/components/anchor.js +4 -4
- package/dist/es2019/components/box.js +20 -2
- package/dist/es2019/components/flex.js +7 -1
- package/dist/es2019/components/grid.js +7 -1
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/responsive/build-media-query-css.js +2 -1
- package/dist/es2019/xcss/style-maps.partial.js +1 -0
- package/dist/es2019/xcss/xcss.js +1 -0
- package/dist/esm/components/anchor.js +4 -4
- package/dist/esm/components/box.js +20 -2
- package/dist/esm/components/flex.js +7 -1
- package/dist/esm/components/grid.js +7 -1
- package/dist/esm/components/pressable.js +1 -1
- package/dist/types/components/anchor.d.ts +4 -4
- package/dist/types/xcss/style-maps.partial.d.ts +12 -12
- package/dist/types-ts4.5/components/anchor.d.ts +4 -4
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +12 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 7.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#110975](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110975)
|
|
8
|
+
[`c462a22b33940`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c462a22b33940) -
|
|
9
|
+
Removed type hinting for size values in the following properties in XCSS:
|
|
10
|
+
|
|
11
|
+
- blockSize
|
|
12
|
+
- height
|
|
13
|
+
- inlineSize
|
|
14
|
+
- maxBlockSize
|
|
15
|
+
- maxHeight
|
|
16
|
+
- maxInlineSize
|
|
17
|
+
- maxWidth
|
|
18
|
+
- minBlockSize
|
|
19
|
+
- minHeight
|
|
20
|
+
- minInlineSize
|
|
21
|
+
- minWidth
|
|
22
|
+
- width
|
|
23
|
+
|
|
24
|
+
These properties optionally accept size values like `width: 'size.100'`. However `size` will be
|
|
25
|
+
deprecated in the future. Therefore, the type hinting that displayed `size.XXX` has been removed
|
|
26
|
+
to discourage its usage until it is officially deprecated.
|
|
27
|
+
|
|
28
|
+
No changes in functionality have been introduced. The syntax `width: 'size.100'` remains valid for
|
|
29
|
+
now, so existing code will not be broken. However, consumers are encouraged to use hard-coded
|
|
30
|
+
values, like `width: '8px'`, instead.
|
|
31
|
+
|
|
32
|
+
## 7.0.2
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- [#110867](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110867)
|
|
37
|
+
[`dc7e72da70ef7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dc7e72da70ef7) -
|
|
38
|
+
Migrating instances of `UNSAFE_ANCHOR` primitive imports to the new safe import `Anchor`, in
|
|
39
|
+
preparation of Anchor open beta and removal of the unsafe export from `@atlaskit/primitives`
|
|
40
|
+
|
|
3
41
|
## 7.0.1
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
|
@@ -23,25 +23,22 @@ import SectionMessage from '@atlaskit/section-message';
|
|
|
23
23
|
directoryName="primitives"
|
|
24
24
|
/>
|
|
25
25
|
|
|
26
|
-
Pressable is a primitive
|
|
27
|
-
built-in event tracking. It renders a `<button>` element.
|
|
28
|
-
|
|
29
|
-
Only use Pressable when existing components such as [button](/components/button/examples) are
|
|
30
|
-
unsuitable and unable to be customized to fit your needs.
|
|
26
|
+
Pressable is a primitive for building custom buttons with Atlassian Design System styling and
|
|
27
|
+
built-in event tracking. It renders a `<button>` element. Use pressable when existing
|
|
28
|
+
[buttons](/components/button/examples) can't be customized to fit your needs.
|
|
31
29
|
|
|
32
30
|
## Default
|
|
33
31
|
|
|
34
|
-
Pressable is unstyled by default.
|
|
32
|
+
Pressable is unstyled by default, aside from basic focus styles.
|
|
35
33
|
|
|
36
34
|
<Example Component={PressableDefault} packageName="@atlaskit/primitives/pressable" />
|
|
37
35
|
|
|
38
36
|
## Basic styling with XCSS
|
|
39
37
|
|
|
40
|
-
Pressable can be styled using
|
|
41
|
-
|
|
42
|
-
so it's unnecessary to add your own.
|
|
38
|
+
Pressable can be styled further using the design system styling API,
|
|
39
|
+
[XCSS](/components/primitives/xcss).
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
Make sure styling indicates the interaction state using `:hover` and `:active` pseudo-classes.
|
|
45
42
|
|
|
46
43
|
<Example Component={PressableBasic} packageName="@atlaskit/primitives/pressable" />
|
|
47
44
|
|
|
@@ -57,20 +54,26 @@ Use a combination of XCSS and other primitives for more complex designs.
|
|
|
57
54
|
|
|
58
55
|
## Disabled
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
You can disable pressable buttons with the `isDisabled` prop. Disabled styles should be applied and
|
|
58
|
+
defined conditionally using XCSS.
|
|
59
|
+
|
|
60
|
+
Disabled buttons can cause accessibility issues (disabled elements are not in the tab order) so
|
|
61
|
+
wherever possible, avoid using `isDisabled`. Instead, use validation or other techniques to show
|
|
62
|
+
users how to proceed.
|
|
63
|
+
|
|
64
|
+
<!-- todo: snippet for disabled a11y warnings? -->
|
|
62
65
|
|
|
63
66
|
<Example Component={PressableDisabled} packageName="@atlaskit/primitives/pressable" />
|
|
64
67
|
|
|
65
68
|
## Buttons without visible labels
|
|
66
69
|
|
|
67
|
-
For buttons without visible labels such as icon buttons,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
not all screen readers translate
|
|
70
|
+
For buttons without visible labels such as icon buttons, make an accessible label available using
|
|
71
|
+
the [visually hidden component](/components/visually-hidden/examples). This renders hidden text
|
|
72
|
+
inside the button for assistive technologies, which is preferable to an `aria-label` attribute
|
|
73
|
+
because not all screen readers translate these between languages.
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
Also, consider providing a [tooltip](/components/tooltip) to help sighted users understand the
|
|
76
|
+
button's purpose.
|
|
74
77
|
|
|
75
78
|
<Example
|
|
76
79
|
Component={PressableWithoutVisibleLabels}
|
|
@@ -80,8 +83,8 @@ iconography alone.
|
|
|
80
83
|
|
|
81
84
|
## HTML attributes
|
|
82
85
|
|
|
83
|
-
Pressable passes
|
|
84
|
-
|
|
86
|
+
Pressable passes all valid HTML attributes to the underlying `<button>` element. The `type`
|
|
87
|
+
attribute defaults to `button` to prevent unintentionally submitting forms.
|
|
85
88
|
|
|
86
89
|
<Example Component={PressableHtmlAttributes} packageName="@atlaskit/primitives/pressable" />
|
|
87
90
|
|
|
@@ -9,10 +9,11 @@ import pressablePrimaryDont from './images/pressable-01b-dont.png';
|
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Use pressable to make custom-styled buttons and other pressable elements. Pressable works similarly
|
|
13
|
+
to an HTML `<button>`, but with Atlassian focus styles, analytics events, and styling APIs built in.
|
|
14
|
+
|
|
15
|
+
For example, you could use pressable to make a colored square button that opens a color picker, or a
|
|
16
|
+
basic card that shows more details when selected.
|
|
16
17
|
|
|
17
18
|

|
|
18
19
|
|
|
@@ -23,18 +24,19 @@ existing design system components.
|
|
|
23
24
|
3. **Accessible label:** Pressable should always include a clear label for accessibility. Use this
|
|
24
25
|
to communicate the action that occurs when the button is pressed.
|
|
25
26
|
|
|
26
|
-
### Use
|
|
27
|
+
### Use existing buttons and other components whenever possible
|
|
28
|
+
|
|
29
|
+
Only use pressable when existing components such as [buttons](/components/button/examples) or
|
|
30
|
+
[menus](/components/menu/examples) can't be customized to fit your case.
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
components can't be customized to fit your case. Using existing components with safe customizations
|
|
31
|
-
will prevent inconsistency as Atlassian UI evolves.
|
|
32
|
+
Using [existing components](/components) with safe customizations is usually faster and keeps
|
|
33
|
+
Atlassian UI more visually consistent as things change.
|
|
32
34
|
|
|
33
35
|
<DoDont
|
|
34
36
|
type="do"
|
|
35
37
|
image={{
|
|
36
38
|
url: pressablePrimaryDo,
|
|
37
|
-
alt:
|
|
39
|
+
alt: 'A set of custom buttons built with pressable that are not possible using existing design system components',
|
|
38
40
|
}}
|
|
39
41
|
>
|
|
40
42
|
Use pressable to create buttons when there isn't an existing design system component to achieve
|
|
@@ -48,47 +50,47 @@ will prevent inconsistency as Atlassian UI evolves.
|
|
|
48
50
|
alt: 'A custom button build with Pressable that looks similar to Button, an existing design system component',
|
|
49
51
|
}}
|
|
50
52
|
>
|
|
51
|
-
Don't use pressable
|
|
52
|
-
as <a href="/components/button/examples">
|
|
53
|
-
|
|
53
|
+
Don't use pressable to redesign elements that already exists in the Atlassian design system, such
|
|
54
|
+
as <a href="/components/button/examples">buttons</a>. This can cause visual and behavioral
|
|
55
|
+
inconsistency in products.
|
|
54
56
|
</DoDont>
|
|
55
57
|
|
|
56
58
|
## Accessibility
|
|
57
59
|
|
|
58
60
|
### Use clear labels for assistive technology
|
|
59
61
|
|
|
60
|
-
Pressable should always announce what action will happen once pressed
|
|
62
|
+
Pressable elements should always announce what action will happen once pressed, especially for
|
|
63
|
+
elements with no visible label, such as icon buttons.
|
|
61
64
|
|
|
62
65
|

|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
Use [the visually hidden component](/components/visually-hidden/examples) to provide an accessible
|
|
68
|
+
label. This will render hidden text inside the button, which is preferable over the `aria-label`
|
|
69
|
+
attribute because not all screen readers translate this between languages.
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
text inside the button. This is preferable over the `aria-label` attribute because not all screen
|
|
69
|
-
readers translate this between languages.
|
|
70
|
-
- Use [a tooltip](/components/tooltip/examples) to provide sighted users with the same information.
|
|
71
|
+
Also consider [a tooltip](/components/tooltip/examples) to provide sighted users with the same
|
|
72
|
+
information.
|
|
71
73
|
|
|
72
74
|
### Focus ring behavior
|
|
73
75
|
|
|
74
|
-
Pressable
|
|
75
|
-
|
|
76
|
+
Pressable buttons are available in focus order, and include a visual ring to clarify what is in
|
|
77
|
+
focus by default. Adding additional focus styles is unnecessary.
|
|
76
78
|
|
|
77
79
|
### Avoid disabling buttons
|
|
78
80
|
|
|
79
81
|
Disabled buttons can cause accessibility problems. Avoid disabling buttons and
|
|
80
|
-
[follow our disabled and tooltip
|
|
82
|
+
[follow our disabled button and tooltip guidance](/components/button/usage#avoid-disabling-buttons).
|
|
81
83
|
|
|
82
84
|
## Best practices
|
|
83
85
|
|
|
84
86
|
### Make it clear what can be pressed
|
|
85
87
|
|
|
86
|
-
Custom buttons should
|
|
87
|
-
styles, surrounding context, labels,
|
|
88
|
+
Custom buttons should look interactive. Make sure clickable elements are clearly identifiable
|
|
89
|
+
through styles, surrounding context, labels, and other cues.
|
|
88
90
|
|
|
89
|
-
###
|
|
91
|
+
### Use pressable for on-page actions, not navigation
|
|
90
92
|
|
|
91
|
-
Pressable is meant for on-page actions such as opening modals
|
|
93
|
+
Pressable is meant for on-page actions such as opening modals or submitting forms. If you're making
|
|
92
94
|
something that navigates to a new page, use a component that renders a semantically correct HTML
|
|
93
95
|
`<a>` element such as:
|
|
94
96
|
|
|
@@ -112,12 +114,12 @@ For example, _Change issue color to yellow_ instead of _yellow_.
|
|
|
112
114
|
### Follow other label and UI content guidance
|
|
113
115
|
|
|
114
116
|
Follow label and content guidelines for [buttons](/components/button/usage#content-guidelines).
|
|
115
|
-
Review
|
|
116
|
-
|
|
117
|
+
Review the [general UI text guidance](/foundations/accessibility/#meaningful-text) for specific
|
|
118
|
+
questions.
|
|
117
119
|
|
|
118
120
|
## Related
|
|
119
121
|
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
- Pressable is built on the same API as [box](/components/primitives/box/usage)
|
|
122
|
+
- Use existing components such as [buttons](/components/button/examples) or
|
|
123
|
+
[menus](/components/menu/examples) for most actions in Atlassian products.
|
|
124
|
+
- Use the [anchor primitive for custom links](/components/primitives/button/usage).
|
|
125
|
+
- Pressable is built on the same API as [box](/components/primitives/box/usage).
|
|
@@ -46,7 +46,7 @@ var focusRingStyles = (0, _xcss.xcss)({
|
|
|
46
46
|
});
|
|
47
47
|
var IS_EXTERNAL_LINK_REGEX = /^(?:(http|https):\/\/)/;
|
|
48
48
|
var IS_NON_HTTP_BASED = /^(((mailto|tel|sms):)|(#))/;
|
|
49
|
-
var
|
|
49
|
+
var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
50
50
|
var href = _ref.href,
|
|
51
51
|
children = _ref.children,
|
|
52
52
|
backgroundColor = _ref.backgroundColor,
|
|
@@ -76,7 +76,7 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
76
76
|
action: 'clicked',
|
|
77
77
|
componentName: componentName || 'Anchor',
|
|
78
78
|
packageName: "@atlaskit/primitives",
|
|
79
|
-
packageVersion: "7.0.
|
|
79
|
+
packageVersion: "7.0.3",
|
|
80
80
|
analyticsData: analyticsContext,
|
|
81
81
|
actionSubject: 'link'
|
|
82
82
|
});
|
|
@@ -138,5 +138,5 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
138
138
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
139
139
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
140
140
|
*/
|
|
141
|
-
var
|
|
142
|
-
var _default = exports.default =
|
|
141
|
+
var Anchor = /*#__PURE__*/(0, _react.forwardRef)(AnchorNoRef);
|
|
142
|
+
var _default = exports.default = Anchor;
|
|
@@ -65,8 +65,26 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
65
65
|
className: resolvedStyles.static
|
|
66
66
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
67
67
|
}, safeHtmlAttributes, {
|
|
68
|
-
css: [baseStyles,
|
|
69
|
-
// eslint-disable-next-line @atlaskit/
|
|
68
|
+
css: [baseStyles,
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
70
|
+
backgroundColor && _styleMaps.backgroundColorStylesMap[backgroundColor],
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
72
|
+
(0, _styleMaps.isSurfaceColorToken)(backgroundColor) && _styleMaps.surfaceColorStylesMap[backgroundColor],
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
74
|
+
padding && _styleMaps.paddingStylesMap.padding[padding],
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
76
|
+
paddingBlock && _styleMaps.paddingStylesMap.paddingBlock[paddingBlock],
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
78
|
+
paddingBlockStart && _styleMaps.paddingStylesMap.paddingBlockStart[paddingBlockStart],
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
80
|
+
paddingBlockEnd && _styleMaps.paddingStylesMap.paddingBlockEnd[paddingBlockEnd],
|
|
81
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
82
|
+
paddingInline && _styleMaps.paddingStylesMap.paddingInline[paddingInline],
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
84
|
+
paddingInlineStart && _styleMaps.paddingStylesMap.paddingInlineStart[paddingInlineStart],
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
86
|
+
paddingInlineEnd && _styleMaps.paddingStylesMap.paddingInlineEnd[paddingInlineEnd],
|
|
87
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
70
88
|
resolvedStyles.emotion],
|
|
71
89
|
"data-testid": testId
|
|
72
90
|
}), children);
|
|
@@ -111,7 +111,13 @@ var Flex = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
111
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
112
112
|
,
|
|
113
113
|
className: resolvedStyles.static,
|
|
114
|
-
css: [baseStyles,
|
|
114
|
+
css: [baseStyles,
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
116
|
+
gap && _styleMaps.spaceStylesMap.gap[gap],
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
118
|
+
columnGap && _styleMaps.spaceStylesMap.columnGap[columnGap],
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
120
|
+
rowGap && _styleMaps.spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
|
|
115
121
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
116
122
|
resolvedStyles.emotion],
|
|
117
123
|
"data-testid": testId,
|
|
@@ -177,7 +177,13 @@ var Grid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
177
177
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
178
178
|
,
|
|
179
179
|
className: resolvedStyles.static,
|
|
180
|
-
css: [baseStyles,
|
|
180
|
+
css: [baseStyles,
|
|
181
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
182
|
+
gap && _styleMaps.spaceStylesMap.gap[gap],
|
|
183
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
184
|
+
columnGap && _styleMaps.spaceStylesMap.columnGap[columnGap],
|
|
185
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
186
|
+
rowGap && _styleMaps.spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
|
|
181
187
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
182
188
|
resolvedStyles.emotion],
|
|
183
189
|
"data-testid": testId,
|
|
@@ -78,7 +78,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
78
78
|
action: 'clicked',
|
|
79
79
|
componentName: componentName || 'Pressable',
|
|
80
80
|
packageName: "@atlaskit/primitives",
|
|
81
|
-
packageVersion: "7.0.
|
|
81
|
+
packageVersion: "7.0.3",
|
|
82
82
|
analyticsData: analyticsContext,
|
|
83
83
|
actionSubject: 'button'
|
|
84
84
|
});
|
|
@@ -32,7 +32,7 @@ const focusRingStyles = xcss({
|
|
|
32
32
|
});
|
|
33
33
|
const IS_EXTERNAL_LINK_REGEX = /^(?:(http|https):\/\/)/;
|
|
34
34
|
const IS_NON_HTTP_BASED = /^(((mailto|tel|sms):)|(#))/;
|
|
35
|
-
const
|
|
35
|
+
const AnchorNoRef = ({
|
|
36
36
|
href,
|
|
37
37
|
children,
|
|
38
38
|
backgroundColor,
|
|
@@ -62,7 +62,7 @@ const Anchor = ({
|
|
|
62
62
|
action: 'clicked',
|
|
63
63
|
componentName: componentName || 'Anchor',
|
|
64
64
|
packageName: "@atlaskit/primitives",
|
|
65
|
-
packageVersion: "7.0.
|
|
65
|
+
packageVersion: "7.0.3",
|
|
66
66
|
analyticsData: analyticsContext,
|
|
67
67
|
actionSubject: 'link'
|
|
68
68
|
});
|
|
@@ -124,5 +124,5 @@ const Anchor = ({
|
|
|
124
124
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
125
125
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
126
126
|
*/
|
|
127
|
-
const
|
|
128
|
-
export default
|
|
127
|
+
const Anchor = /*#__PURE__*/forwardRef(AnchorNoRef);
|
|
128
|
+
export default Anchor;
|
|
@@ -58,8 +58,26 @@ export const Box = /*#__PURE__*/forwardRef(({
|
|
|
58
58
|
className: resolvedStyles.static
|
|
59
59
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
60
60
|
}, safeHtmlAttributes, {
|
|
61
|
-
css: [baseStyles,
|
|
62
|
-
// eslint-disable-next-line @atlaskit/
|
|
61
|
+
css: [baseStyles,
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
|
+
backgroundColor && backgroundColorStylesMap[backgroundColor],
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
65
|
+
isSurfaceColorToken(backgroundColor) && surfaceColorStylesMap[backgroundColor],
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
67
|
+
padding && paddingStylesMap.padding[padding],
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
69
|
+
paddingBlock && paddingStylesMap.paddingBlock[paddingBlock],
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
71
|
+
paddingBlockStart && paddingStylesMap.paddingBlockStart[paddingBlockStart],
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
73
|
+
paddingBlockEnd && paddingStylesMap.paddingBlockEnd[paddingBlockEnd],
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
75
|
+
paddingInline && paddingStylesMap.paddingInline[paddingInline],
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
77
|
+
paddingInlineStart && paddingStylesMap.paddingInlineStart[paddingInlineStart],
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
79
|
+
paddingInlineEnd && paddingStylesMap.paddingInlineEnd[paddingInlineEnd],
|
|
80
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
63
81
|
resolvedStyles.emotion],
|
|
64
82
|
"data-testid": testId
|
|
65
83
|
}), children);
|
|
@@ -104,7 +104,13 @@ const Flex = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
104
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
105
105
|
,
|
|
106
106
|
className: resolvedStyles.static,
|
|
107
|
-
css: [baseStyles,
|
|
107
|
+
css: [baseStyles,
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
109
|
+
gap && spaceStylesMap.gap[gap],
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
111
|
+
columnGap && spaceStylesMap.columnGap[columnGap],
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
113
|
+
rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
|
|
108
114
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
109
115
|
resolvedStyles.emotion],
|
|
110
116
|
"data-testid": testId,
|
|
@@ -168,7 +168,13 @@ const Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
168
168
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
169
169
|
,
|
|
170
170
|
className: resolvedStyles.static,
|
|
171
|
-
css: [baseStyles,
|
|
171
|
+
css: [baseStyles,
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
173
|
+
gap && spaceStylesMap.gap[gap],
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
175
|
+
columnGap && spaceStylesMap.columnGap[columnGap],
|
|
176
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
177
|
+
rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
|
|
172
178
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
173
179
|
resolvedStyles.emotion],
|
|
174
180
|
"data-testid": testId,
|
|
@@ -64,7 +64,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
64
64
|
action: 'clicked',
|
|
65
65
|
componentName: componentName || 'Pressable',
|
|
66
66
|
packageName: "@atlaskit/primitives",
|
|
67
|
-
packageVersion: "7.0.
|
|
67
|
+
packageVersion: "7.0.3",
|
|
68
68
|
analyticsData: analyticsContext,
|
|
69
69
|
actionSubject: 'button'
|
|
70
70
|
});
|
|
@@ -30,6 +30,7 @@ export const UNSAFE_buildAboveMediaQueryCSS = input => {
|
|
|
30
30
|
return UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce((acc, breakpoint) => ({
|
|
31
31
|
...acc,
|
|
32
32
|
[breakpoint]: css({
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
33
34
|
[media.above[breakpoint]]: typeof input === 'function' ? input(breakpoint) : input
|
|
34
35
|
})
|
|
35
36
|
}), {});
|
|
@@ -67,7 +68,7 @@ export const UNSAFE_buildBelowMediaQueryCSS = input => {
|
|
|
67
68
|
return {
|
|
68
69
|
...acc,
|
|
69
70
|
[breakpoint]: css({
|
|
70
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
71
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
72
|
[UNSAFE_media.below[breakpoint]]: typeof input === 'function' ? input(breakpoint) : input
|
|
72
73
|
})
|
|
73
74
|
};
|
|
@@ -531,6 +531,7 @@ const spacingProperties = [
|
|
|
531
531
|
const getSerializedStylesMap = (cssProperty, tokenMap) => {
|
|
532
532
|
return Object.keys(tokenMap).reduce((emotionSpacingMap, token) => {
|
|
533
533
|
emotionSpacingMap[token] = css({
|
|
534
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
534
535
|
[cssProperty]: tokenMap[token]
|
|
535
536
|
});
|
|
536
537
|
return emotionSpacingMap;
|
package/dist/es2019/xcss/xcss.js
CHANGED
|
@@ -136,6 +136,7 @@ const transformStyles = styleObj => {
|
|
|
136
136
|
const baseXcss = style => {
|
|
137
137
|
const transformedStyles = transformStyles(style);
|
|
138
138
|
return {
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
139
140
|
[uniqueSymbol]: cssEmotion(transformedStyles)
|
|
140
141
|
};
|
|
141
142
|
};
|
|
@@ -36,7 +36,7 @@ var focusRingStyles = xcss({
|
|
|
36
36
|
});
|
|
37
37
|
var IS_EXTERNAL_LINK_REGEX = /^(?:(http|https):\/\/)/;
|
|
38
38
|
var IS_NON_HTTP_BASED = /^(((mailto|tel|sms):)|(#))/;
|
|
39
|
-
var
|
|
39
|
+
var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
40
40
|
var href = _ref.href,
|
|
41
41
|
children = _ref.children,
|
|
42
42
|
backgroundColor = _ref.backgroundColor,
|
|
@@ -66,7 +66,7 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
66
66
|
action: 'clicked',
|
|
67
67
|
componentName: componentName || 'Anchor',
|
|
68
68
|
packageName: "@atlaskit/primitives",
|
|
69
|
-
packageVersion: "7.0.
|
|
69
|
+
packageVersion: "7.0.3",
|
|
70
70
|
analyticsData: analyticsContext,
|
|
71
71
|
actionSubject: 'link'
|
|
72
72
|
});
|
|
@@ -128,5 +128,5 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
128
128
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
129
129
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
130
130
|
*/
|
|
131
|
-
var
|
|
132
|
-
export default
|
|
131
|
+
var Anchor = /*#__PURE__*/forwardRef(AnchorNoRef);
|
|
132
|
+
export default Anchor;
|
|
@@ -59,8 +59,26 @@ export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
59
59
|
className: resolvedStyles.static
|
|
60
60
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
61
61
|
}, safeHtmlAttributes, {
|
|
62
|
-
css: [baseStyles,
|
|
63
|
-
// eslint-disable-next-line @atlaskit/
|
|
62
|
+
css: [baseStyles,
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
64
|
+
backgroundColor && backgroundColorStylesMap[backgroundColor],
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
66
|
+
isSurfaceColorToken(backgroundColor) && surfaceColorStylesMap[backgroundColor],
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
68
|
+
padding && paddingStylesMap.padding[padding],
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
70
|
+
paddingBlock && paddingStylesMap.paddingBlock[paddingBlock],
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
72
|
+
paddingBlockStart && paddingStylesMap.paddingBlockStart[paddingBlockStart],
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
74
|
+
paddingBlockEnd && paddingStylesMap.paddingBlockEnd[paddingBlockEnd],
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
76
|
+
paddingInline && paddingStylesMap.paddingInline[paddingInline],
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
78
|
+
paddingInlineStart && paddingStylesMap.paddingInlineStart[paddingInlineStart],
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
80
|
+
paddingInlineEnd && paddingStylesMap.paddingInlineEnd[paddingInlineEnd],
|
|
81
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
64
82
|
resolvedStyles.emotion],
|
|
65
83
|
"data-testid": testId
|
|
66
84
|
}), children);
|
|
@@ -104,7 +104,13 @@ var Flex = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
104
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
105
105
|
,
|
|
106
106
|
className: resolvedStyles.static,
|
|
107
|
-
css: [baseStyles,
|
|
107
|
+
css: [baseStyles,
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
109
|
+
gap && spaceStylesMap.gap[gap],
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
111
|
+
columnGap && spaceStylesMap.columnGap[columnGap],
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
113
|
+
rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
|
|
108
114
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
109
115
|
resolvedStyles.emotion],
|
|
110
116
|
"data-testid": testId,
|
|
@@ -169,7 +169,13 @@ var Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
169
169
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
170
170
|
,
|
|
171
171
|
className: resolvedStyles.static,
|
|
172
|
-
css: [baseStyles,
|
|
172
|
+
css: [baseStyles,
|
|
173
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
174
|
+
gap && spaceStylesMap.gap[gap],
|
|
175
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
176
|
+
columnGap && spaceStylesMap.columnGap[columnGap],
|
|
177
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
178
|
+
rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
|
|
173
179
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
174
180
|
resolvedStyles.emotion],
|
|
175
181
|
"data-testid": testId,
|
|
@@ -68,7 +68,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
68
68
|
action: 'clicked',
|
|
69
69
|
componentName: componentName || 'Pressable',
|
|
70
70
|
packageName: "@atlaskit/primitives",
|
|
71
|
-
packageVersion: "7.0.
|
|
71
|
+
packageVersion: "7.0.3",
|
|
72
72
|
analyticsData: analyticsContext,
|
|
73
73
|
actionSubject: 'button'
|
|
74
74
|
});
|
|
@@ -26,7 +26,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
|
|
|
26
26
|
*/
|
|
27
27
|
analyticsContext?: Record<string, any>;
|
|
28
28
|
};
|
|
29
|
-
declare const
|
|
29
|
+
declare const AnchorNoRef: <RouterLinkConfig extends Record<string, any> = never>({ href, children, backgroundColor, padding, paddingBlock, paddingBlockStart, paddingBlockEnd, paddingInline, paddingInlineStart, paddingInlineEnd, testId, xcss: xcssStyles, target, onClick: providedOnClick, interactionName, componentName, analyticsContext, ...htmlAttributes }: AnchorProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* __Anchor__
|
|
32
32
|
*
|
|
@@ -40,7 +40,7 @@ declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>({ h
|
|
|
40
40
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
41
41
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
42
42
|
*/
|
|
43
|
-
declare const
|
|
43
|
+
declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>(props: AnchorProps<RouterLinkConfig> & {
|
|
44
44
|
ref?: Ref<HTMLAnchorElement>;
|
|
45
|
-
}) => ReturnType<typeof
|
|
46
|
-
export default
|
|
45
|
+
}) => ReturnType<typeof AnchorNoRef>;
|
|
46
|
+
export default Anchor;
|
|
@@ -552,7 +552,7 @@ type MarginSpace = AllSpace | 'auto';
|
|
|
552
552
|
type AutoComplete<T extends string> = T | Omit<string, T>;
|
|
553
553
|
export type TokenisedProps = {
|
|
554
554
|
backgroundColor?: BackgroundColor;
|
|
555
|
-
blockSize?:
|
|
555
|
+
blockSize?: Dimension | string;
|
|
556
556
|
borderBlockColor?: AutoComplete<BorderColor>;
|
|
557
557
|
borderBlockEndColor?: AutoComplete<BorderColor>;
|
|
558
558
|
borderBlockEndWidth?: BorderWidth | string;
|
|
@@ -589,8 +589,8 @@ export type TokenisedProps = {
|
|
|
589
589
|
color?: TextColor;
|
|
590
590
|
columnGap?: Space;
|
|
591
591
|
gap?: Space;
|
|
592
|
-
height?:
|
|
593
|
-
inlineSize?:
|
|
592
|
+
height?: Dimension | string;
|
|
593
|
+
inlineSize?: Dimension | string;
|
|
594
594
|
inset?: AutoComplete<AllSpace>;
|
|
595
595
|
insetBlock?: AutoComplete<AllSpace>;
|
|
596
596
|
insetBlockEnd?: AutoComplete<AllSpace>;
|
|
@@ -610,14 +610,14 @@ export type TokenisedProps = {
|
|
|
610
610
|
marginLeft?: AutoComplete<MarginSpace>;
|
|
611
611
|
marginRight?: AutoComplete<MarginSpace>;
|
|
612
612
|
marginTop?: AutoComplete<MarginSpace>;
|
|
613
|
-
maxBlockSize?:
|
|
614
|
-
maxHeight?:
|
|
615
|
-
maxInlineSize?:
|
|
616
|
-
maxWidth?:
|
|
617
|
-
minBlockSize?:
|
|
618
|
-
minHeight?:
|
|
619
|
-
minInlineSize?:
|
|
620
|
-
minWidth?:
|
|
613
|
+
maxBlockSize?: Dimension | string;
|
|
614
|
+
maxHeight?: Dimension | string;
|
|
615
|
+
maxInlineSize?: Dimension | string;
|
|
616
|
+
maxWidth?: Dimension | string;
|
|
617
|
+
minBlockSize?: Dimension | string;
|
|
618
|
+
minHeight?: Dimension | string;
|
|
619
|
+
minInlineSize?: Dimension | string;
|
|
620
|
+
minWidth?: Dimension | string;
|
|
621
621
|
opacity?: AutoComplete<Opacity> | number;
|
|
622
622
|
outlineColor?: BorderColor;
|
|
623
623
|
outlineOffset?: Space;
|
|
@@ -636,7 +636,7 @@ export type TokenisedProps = {
|
|
|
636
636
|
right?: AutoComplete<AllSpace>;
|
|
637
637
|
rowGap?: Space;
|
|
638
638
|
top?: AutoComplete<AllSpace>;
|
|
639
|
-
width?:
|
|
639
|
+
width?: Dimension | string;
|
|
640
640
|
zIndex?: Layer;
|
|
641
641
|
};
|
|
642
642
|
declare const spacingProperties: readonly ["padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "gap", "rowGap", "columnGap"];
|
|
@@ -26,7 +26,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
|
|
|
26
26
|
*/
|
|
27
27
|
analyticsContext?: Record<string, any>;
|
|
28
28
|
};
|
|
29
|
-
declare const
|
|
29
|
+
declare const AnchorNoRef: <RouterLinkConfig extends Record<string, any> = never>({ href, children, backgroundColor, padding, paddingBlock, paddingBlockStart, paddingBlockEnd, paddingInline, paddingInlineStart, paddingInlineEnd, testId, xcss: xcssStyles, target, onClick: providedOnClick, interactionName, componentName, analyticsContext, ...htmlAttributes }: AnchorProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* __Anchor__
|
|
32
32
|
*
|
|
@@ -40,7 +40,7 @@ declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>({ h
|
|
|
40
40
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
41
41
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
42
42
|
*/
|
|
43
|
-
declare const
|
|
43
|
+
declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>(props: AnchorProps<RouterLinkConfig> & {
|
|
44
44
|
ref?: Ref<HTMLAnchorElement>;
|
|
45
|
-
}) => ReturnType<typeof
|
|
46
|
-
export default
|
|
45
|
+
}) => ReturnType<typeof AnchorNoRef>;
|
|
46
|
+
export default Anchor;
|
|
@@ -552,7 +552,7 @@ type MarginSpace = AllSpace | 'auto';
|
|
|
552
552
|
type AutoComplete<T extends string> = T | Omit<string, T>;
|
|
553
553
|
export type TokenisedProps = {
|
|
554
554
|
backgroundColor?: BackgroundColor;
|
|
555
|
-
blockSize?:
|
|
555
|
+
blockSize?: Dimension | string;
|
|
556
556
|
borderBlockColor?: AutoComplete<BorderColor>;
|
|
557
557
|
borderBlockEndColor?: AutoComplete<BorderColor>;
|
|
558
558
|
borderBlockEndWidth?: BorderWidth | string;
|
|
@@ -589,8 +589,8 @@ export type TokenisedProps = {
|
|
|
589
589
|
color?: TextColor;
|
|
590
590
|
columnGap?: Space;
|
|
591
591
|
gap?: Space;
|
|
592
|
-
height?:
|
|
593
|
-
inlineSize?:
|
|
592
|
+
height?: Dimension | string;
|
|
593
|
+
inlineSize?: Dimension | string;
|
|
594
594
|
inset?: AutoComplete<AllSpace>;
|
|
595
595
|
insetBlock?: AutoComplete<AllSpace>;
|
|
596
596
|
insetBlockEnd?: AutoComplete<AllSpace>;
|
|
@@ -610,14 +610,14 @@ export type TokenisedProps = {
|
|
|
610
610
|
marginLeft?: AutoComplete<MarginSpace>;
|
|
611
611
|
marginRight?: AutoComplete<MarginSpace>;
|
|
612
612
|
marginTop?: AutoComplete<MarginSpace>;
|
|
613
|
-
maxBlockSize?:
|
|
614
|
-
maxHeight?:
|
|
615
|
-
maxInlineSize?:
|
|
616
|
-
maxWidth?:
|
|
617
|
-
minBlockSize?:
|
|
618
|
-
minHeight?:
|
|
619
|
-
minInlineSize?:
|
|
620
|
-
minWidth?:
|
|
613
|
+
maxBlockSize?: Dimension | string;
|
|
614
|
+
maxHeight?: Dimension | string;
|
|
615
|
+
maxInlineSize?: Dimension | string;
|
|
616
|
+
maxWidth?: Dimension | string;
|
|
617
|
+
minBlockSize?: Dimension | string;
|
|
618
|
+
minHeight?: Dimension | string;
|
|
619
|
+
minInlineSize?: Dimension | string;
|
|
620
|
+
minWidth?: Dimension | string;
|
|
621
621
|
opacity?: AutoComplete<Opacity> | number;
|
|
622
622
|
outlineColor?: BorderColor;
|
|
623
623
|
outlineOffset?: Space;
|
|
@@ -636,7 +636,7 @@ export type TokenisedProps = {
|
|
|
636
636
|
right?: AutoComplete<AllSpace>;
|
|
637
637
|
rowGap?: Space;
|
|
638
638
|
top?: AutoComplete<AllSpace>;
|
|
639
|
-
width?:
|
|
639
|
+
width?: Dimension | string;
|
|
640
640
|
zIndex?: Layer;
|
|
641
641
|
};
|
|
642
642
|
declare const spacingProperties: readonly [
|