@atlaskit/primitives 1.6.2 → 1.6.4
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 +12 -0
- package/constellation/overview/index.mdx +12 -3
- package/dist/cjs/components/bleed.js +1 -2
- package/dist/cjs/components/box.js +2 -4
- package/dist/cjs/components/flex.js +1 -2
- package/dist/cjs/components/grid.js +1 -2
- package/dist/cjs/components/inline.js +1 -2
- package/dist/cjs/components/internal/surface-provider.js +2 -4
- package/dist/cjs/components/pressable.js +1 -2
- package/dist/cjs/components/stack.js +1 -2
- package/dist/cjs/components/text.js +1 -2
- package/dist/cjs/constants.js +2 -3
- package/dist/cjs/responsive/build-media-query-css.js +3 -5
- package/dist/cjs/responsive/constants.js +3 -6
- package/dist/cjs/responsive/hide.js +2 -3
- package/dist/cjs/responsive/media-helper.js +3 -5
- package/dist/cjs/responsive/show.js +2 -3
- package/dist/cjs/responsive/use-media-query.js +13 -14
- package/dist/cjs/xcss/style-maps.partial.js +46 -87
- package/dist/cjs/xcss/xcss.js +2 -2
- package/dist/es2019/xcss/style-maps.partial.js +13 -23
- package/dist/esm/responsive/use-media-query.js +11 -11
- package/dist/esm/xcss/style-maps.partial.js +13 -23
- package/dist/types/xcss/style-maps.partial.d.ts +11 -24
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +11 -24
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 1.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#40324](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40324) [`8d123310957`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d123310957) - Minor internal changes. There is no expected behaviour change
|
|
8
|
+
|
|
9
|
+
## 1.6.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#40299](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40299) [`b1882fdd842`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1882fdd842) - Change typography token naming to be more verbose.
|
|
14
|
+
|
|
3
15
|
## 1.6.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -61,7 +61,10 @@ You might like to think first about breaking down a page into `Box` containers,
|
|
|
61
61
|
identifying larger pieces of a design that function in a similar manner or fulfill a singular purpose
|
|
62
62
|
in a layout and grouping them together under a `Box`.
|
|
63
63
|
|
|
64
|
-
<Image
|
|
64
|
+
<Image
|
|
65
|
+
src={boxUsageExample}
|
|
66
|
+
alt="Screenshot of a typical Jira board with swimlanes. Various areas are highlighted as examples of how Box containers are used for layout"
|
|
67
|
+
/>
|
|
65
68
|
|
|
66
69
|
The behavior within and around these boxes can then be broken down into their horizontal `Inline` and vertical `Stack` components.
|
|
67
70
|
|
|
@@ -73,8 +76,14 @@ The behavior within and around these boxes can then be broken down into their ho
|
|
|
73
76
|
offers suggestions for possible primitives to apply in a layout.
|
|
74
77
|
</SectionMessage>
|
|
75
78
|
|
|
76
|
-
<Image
|
|
77
|
-
|
|
79
|
+
<Image
|
|
80
|
+
src={inlineUsageExample}
|
|
81
|
+
alt="Screenshot of a typical Jira board with swimlanes. Various areas are highlighted as examples of how Inline containers are used for layout"
|
|
82
|
+
/>
|
|
83
|
+
<Image
|
|
84
|
+
src={stackUsageExample}
|
|
85
|
+
alt="Screenshot of a typical Jira board with swimlanes. Various areas are highlighted as examples of how Stack containers are used for layout"
|
|
86
|
+
/>
|
|
78
87
|
|
|
79
88
|
## Related
|
|
80
89
|
|
|
@@ -29,7 +29,7 @@ var _excluded = ["as", "children", "backgroundColor", "padding", "paddingBlock",
|
|
|
29
29
|
* - [Code](https://atlassian.design/components/primitives/box/code)
|
|
30
30
|
* - [Usage](https://atlassian.design/components/primitives/box/usage)
|
|
31
31
|
*/
|
|
32
|
-
var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
32
|
+
var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
33
33
|
var _ref$as = _ref.as,
|
|
34
34
|
as = _ref$as === void 0 ? 'div' : _ref$as,
|
|
35
35
|
children = _ref.children,
|
|
@@ -67,9 +67,7 @@ var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
67
67
|
}), children)
|
|
68
68
|
);
|
|
69
69
|
});
|
|
70
|
-
exports.
|
|
71
|
-
var _default = Box;
|
|
72
|
-
exports.default = _default;
|
|
70
|
+
var _default = exports.default = Box;
|
|
73
71
|
var baseStyles = (0, _react2.css)({
|
|
74
72
|
boxSizing: 'border-box',
|
|
75
73
|
appearance: 'none',
|
|
@@ -10,7 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
*
|
|
11
11
|
* A surface context provides context information on the current background (if set).
|
|
12
12
|
*/
|
|
13
|
-
var SurfaceContext = /*#__PURE__*/(0, _react.createContext)('elevation.surface');
|
|
13
|
+
var SurfaceContext = exports.SurfaceContext = /*#__PURE__*/(0, _react.createContext)('elevation.surface');
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* __useSurface__
|
|
@@ -19,9 +19,7 @@ var SurfaceContext = /*#__PURE__*/(0, _react.createContext)('elevation.surface')
|
|
|
19
19
|
*
|
|
20
20
|
* @see SurfaceContext
|
|
21
21
|
*/
|
|
22
|
-
exports.
|
|
23
|
-
var useSurface = function useSurface() {
|
|
22
|
+
var useSurface = exports.useSurface = function useSurface() {
|
|
24
23
|
return (0, _react.useContext)(SurfaceContext);
|
|
25
24
|
};
|
|
26
|
-
exports.useSurface = useSurface;
|
|
27
25
|
SurfaceContext.displayName = 'SurfaceProvider';
|
package/dist/cjs/constants.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.LAYERS = void 0;
|
|
7
|
-
var LAYERS = {
|
|
7
|
+
var LAYERS = exports.LAYERS = {
|
|
8
8
|
card: 100,
|
|
9
9
|
navigation: 200,
|
|
10
10
|
dialog: 300,
|
|
@@ -14,5 +14,4 @@ var LAYERS = {
|
|
|
14
14
|
flag: 600,
|
|
15
15
|
spotlight: 700,
|
|
16
16
|
tooltip: 800
|
|
17
|
-
};
|
|
18
|
-
exports.LAYERS = LAYERS;
|
|
17
|
+
};
|
|
@@ -36,7 +36,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
36
36
|
* }
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
|
-
var UNSAFE_buildAboveMediaQueryCSS = function UNSAFE_buildAboveMediaQueryCSS(input) {
|
|
39
|
+
var UNSAFE_buildAboveMediaQueryCSS = exports.UNSAFE_buildAboveMediaQueryCSS = function UNSAFE_buildAboveMediaQueryCSS(input) {
|
|
40
40
|
return _constants.UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce(function (acc, breakpoint) {
|
|
41
41
|
return _objectSpread(_objectSpread({}, acc), {}, (0, _defineProperty2.default)({}, breakpoint, (0, _react.css)((0, _defineProperty2.default)({}, _mediaHelper.media.above[breakpoint], typeof input === 'function' ? input(breakpoint) : input))));
|
|
42
42
|
}, {});
|
|
@@ -66,13 +66,11 @@ var UNSAFE_buildAboveMediaQueryCSS = function UNSAFE_buildAboveMediaQueryCSS(inp
|
|
|
66
66
|
* }
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
|
-
exports.
|
|
70
|
-
var UNSAFE_buildBelowMediaQueryCSS = function UNSAFE_buildBelowMediaQueryCSS(input) {
|
|
69
|
+
var UNSAFE_buildBelowMediaQueryCSS = exports.UNSAFE_buildBelowMediaQueryCSS = function UNSAFE_buildBelowMediaQueryCSS(input) {
|
|
71
70
|
return _constants.UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce(function (acc, breakpoint) {
|
|
72
71
|
if (breakpoint === 'xxs') {
|
|
73
72
|
return acc;
|
|
74
73
|
}
|
|
75
74
|
return _objectSpread(_objectSpread({}, acc), {}, (0, _defineProperty2.default)({}, breakpoint, (0, _react.css)((0, _defineProperty2.default)({}, _mediaHelper.UNSAFE_media.below[breakpoint], typeof input === 'function' ? input(breakpoint) : input))));
|
|
76
75
|
}, {});
|
|
77
|
-
};
|
|
78
|
-
exports.UNSAFE_buildBelowMediaQueryCSS = UNSAFE_buildBelowMediaQueryCSS;
|
|
76
|
+
};
|
|
@@ -12,7 +12,7 @@ exports.UNSAFE_BREAKPOINTS_ORDERED_LIST = exports.UNSAFE_BREAKPOINTS_CONFIG = ex
|
|
|
12
12
|
*
|
|
13
13
|
* @experimental Unsafe for direct consumption outside of the design system itself; please use our `media` export instead for media queries.
|
|
14
14
|
*/
|
|
15
|
-
var UNSAFE_BREAKPOINTS_CONFIG = {
|
|
15
|
+
var UNSAFE_BREAKPOINTS_CONFIG = exports.UNSAFE_BREAKPOINTS_CONFIG = {
|
|
16
16
|
// mobile
|
|
17
17
|
xxs: {
|
|
18
18
|
gridItemGutter: "var(--ds-space-200, 16px)",
|
|
@@ -65,14 +65,11 @@ var UNSAFE_BREAKPOINTS_CONFIG = {
|
|
|
65
65
|
*
|
|
66
66
|
* @experimental Unsafe for consumption outside of the design system itself.
|
|
67
67
|
*/
|
|
68
|
-
exports.
|
|
69
|
-
var UNSAFE_BREAKPOINTS_ORDERED_LIST = Object.keys(UNSAFE_BREAKPOINTS_CONFIG);
|
|
68
|
+
var UNSAFE_BREAKPOINTS_ORDERED_LIST = exports.UNSAFE_BREAKPOINTS_ORDERED_LIST = Object.keys(UNSAFE_BREAKPOINTS_CONFIG);
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
71
|
* This is our smallest breakpoint with a few nuances to it:
|
|
73
72
|
* 1. It is the default value for shorthands, eg. `<GridItem span={6} />` maps to `{ [SMALLEST_BREAKPOINT]: props.span }`
|
|
74
73
|
* 2. It's omitted in `media.below` as there's nothing below `0px`.
|
|
75
74
|
*/
|
|
76
|
-
exports.
|
|
77
|
-
var SMALLEST_BREAKPOINT = UNSAFE_BREAKPOINTS_ORDERED_LIST[0];
|
|
78
|
-
exports.SMALLEST_BREAKPOINT = SMALLEST_BREAKPOINT;
|
|
75
|
+
var SMALLEST_BREAKPOINT = exports.SMALLEST_BREAKPOINT = UNSAFE_BREAKPOINTS_ORDERED_LIST[0];
|
|
@@ -22,7 +22,7 @@ var hideBelowQueries = (0, _buildMediaQueryCss.UNSAFE_buildBelowMediaQueryCSS)({
|
|
|
22
22
|
* - This only uses `display: none` hide, it does not skip rendering of children trees.
|
|
23
23
|
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
24
24
|
*/
|
|
25
|
-
var Hide = function Hide(_ref) {
|
|
25
|
+
var Hide = exports.Hide = function Hide(_ref) {
|
|
26
26
|
var above = _ref.above,
|
|
27
27
|
below = _ref.below,
|
|
28
28
|
children = _ref.children,
|
|
@@ -31,5 +31,4 @@ var Hide = function Hide(_ref) {
|
|
|
31
31
|
return (0, _react.jsx)(AsElement, {
|
|
32
32
|
css: [above && hideAboveQueries[above], below && hideBelowQueries[below]]
|
|
33
33
|
}, children);
|
|
34
|
-
};
|
|
35
|
-
exports.Hide = Hide;
|
|
34
|
+
};
|
|
@@ -10,7 +10,7 @@ var _constants = require("./constants");
|
|
|
10
10
|
*
|
|
11
11
|
* @internal This explicitly has and should not be used outside of ADS-owned repos (via sourcegraph); to be removed following an internal deprecation and migration.
|
|
12
12
|
*/
|
|
13
|
-
var UNSAFE_media = {
|
|
13
|
+
var UNSAFE_media = exports.UNSAFE_media = {
|
|
14
14
|
/**
|
|
15
15
|
* A media query to target viewports above the min width of a given breakpoint.
|
|
16
16
|
* Note that `media.above.xs` is redundant and should not be used, but it's included for programatic purposes.
|
|
@@ -83,8 +83,6 @@ var UNSAFE_media = {
|
|
|
83
83
|
*
|
|
84
84
|
* We strictly only export `media.above` at this stage as we want makers to build mobile-first.
|
|
85
85
|
*/
|
|
86
|
-
exports.
|
|
87
|
-
var media = {
|
|
86
|
+
var media = exports.media = {
|
|
88
87
|
above: UNSAFE_media.above
|
|
89
|
-
};
|
|
90
|
-
exports.media = media;
|
|
88
|
+
};
|
|
@@ -25,7 +25,7 @@ var defaultHiddenStyles = (0, _react.css)({
|
|
|
25
25
|
* - This only uses `display: none` and `display: revert` to show/hide, it does not skip rendering of children trees.
|
|
26
26
|
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
27
27
|
*/
|
|
28
|
-
var Show = function Show(_ref) {
|
|
28
|
+
var Show = exports.Show = function Show(_ref) {
|
|
29
29
|
var above = _ref.above,
|
|
30
30
|
below = _ref.below,
|
|
31
31
|
children = _ref.children,
|
|
@@ -34,5 +34,4 @@ var Show = function Show(_ref) {
|
|
|
34
34
|
return (0, _react.jsx)(AsElement, {
|
|
35
35
|
css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below]]
|
|
36
36
|
}, children);
|
|
37
|
-
};
|
|
38
|
-
exports.Show = Show;
|
|
37
|
+
};
|
|
@@ -9,17 +9,17 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
9
9
|
var _mediaHelper = require("./media-helper");
|
|
10
10
|
var _window, _window$matchMedia, _window2, _window2$matchMedia, _window3, _window3$matchMedia, _window4, _window4$matchMedia, _window5, _window5$matchMedia, _window6, _window6$matchMedia, _window7, _window7$matchMedia, _window8, _window8$matchMedia, _window9, _window9$matchMedia, _window10, _window10$matchMedia, _window11, _window11$matchMedia;
|
|
11
11
|
var queries = {
|
|
12
|
-
'above.xxs': typeof window === 'undefined' ? undefined : (_window = window) === null || _window === void 0
|
|
13
|
-
'above.xs': typeof window === 'undefined' ? undefined : (_window2 = window) === null || _window2 === void 0
|
|
14
|
-
'above.sm': typeof window === 'undefined' ? undefined : (_window3 = window) === null || _window3 === void 0
|
|
15
|
-
'above.md': typeof window === 'undefined' ? undefined : (_window4 = window) === null || _window4 === void 0
|
|
16
|
-
'above.lg': typeof window === 'undefined' ? undefined : (_window5 = window) === null || _window5 === void 0
|
|
17
|
-
'above.xl': typeof window === 'undefined' ? undefined : (_window6 = window) === null || _window6 === void 0
|
|
18
|
-
'below.xs': typeof window === 'undefined' ? undefined : (_window7 = window) === null || _window7 === void 0
|
|
19
|
-
'below.sm': typeof window === 'undefined' ? undefined : (_window8 = window) === null || _window8 === void 0
|
|
20
|
-
'below.md': typeof window === 'undefined' ? undefined : (_window9 = window) === null || _window9 === void 0
|
|
21
|
-
'below.lg': typeof window === 'undefined' ? undefined : (_window10 = window) === null || _window10 === void 0
|
|
22
|
-
'below.xl': typeof window === 'undefined' ? undefined : (_window11 = window) === null || _window11 === void 0
|
|
12
|
+
'above.xxs': typeof window === 'undefined' ? undefined : (_window = window) === null || _window === void 0 || (_window$matchMedia = _window.matchMedia) === null || _window$matchMedia === void 0 ? void 0 : _window$matchMedia.call(_window, _mediaHelper.UNSAFE_media.above.xxs.replace('@media ', '').trim()),
|
|
13
|
+
'above.xs': typeof window === 'undefined' ? undefined : (_window2 = window) === null || _window2 === void 0 || (_window2$matchMedia = _window2.matchMedia) === null || _window2$matchMedia === void 0 ? void 0 : _window2$matchMedia.call(_window2, _mediaHelper.UNSAFE_media.above.xs.replace('@media ', '').trim()),
|
|
14
|
+
'above.sm': typeof window === 'undefined' ? undefined : (_window3 = window) === null || _window3 === void 0 || (_window3$matchMedia = _window3.matchMedia) === null || _window3$matchMedia === void 0 ? void 0 : _window3$matchMedia.call(_window3, _mediaHelper.UNSAFE_media.above.sm.replace('@media ', '').trim()),
|
|
15
|
+
'above.md': typeof window === 'undefined' ? undefined : (_window4 = window) === null || _window4 === void 0 || (_window4$matchMedia = _window4.matchMedia) === null || _window4$matchMedia === void 0 ? void 0 : _window4$matchMedia.call(_window4, _mediaHelper.UNSAFE_media.above.md.replace('@media ', '').trim()),
|
|
16
|
+
'above.lg': typeof window === 'undefined' ? undefined : (_window5 = window) === null || _window5 === void 0 || (_window5$matchMedia = _window5.matchMedia) === null || _window5$matchMedia === void 0 ? void 0 : _window5$matchMedia.call(_window5, _mediaHelper.UNSAFE_media.above.lg.replace('@media ', '').trim()),
|
|
17
|
+
'above.xl': typeof window === 'undefined' ? undefined : (_window6 = window) === null || _window6 === void 0 || (_window6$matchMedia = _window6.matchMedia) === null || _window6$matchMedia === void 0 ? void 0 : _window6$matchMedia.call(_window6, _mediaHelper.UNSAFE_media.above.xl.replace('@media ', '').trim()),
|
|
18
|
+
'below.xs': typeof window === 'undefined' ? undefined : (_window7 = window) === null || _window7 === void 0 || (_window7$matchMedia = _window7.matchMedia) === null || _window7$matchMedia === void 0 ? void 0 : _window7$matchMedia.call(_window7, _mediaHelper.UNSAFE_media.below.xs.replace('@media ', '').trim()),
|
|
19
|
+
'below.sm': typeof window === 'undefined' ? undefined : (_window8 = window) === null || _window8 === void 0 || (_window8$matchMedia = _window8.matchMedia) === null || _window8$matchMedia === void 0 ? void 0 : _window8$matchMedia.call(_window8, _mediaHelper.UNSAFE_media.below.sm.replace('@media ', '').trim()),
|
|
20
|
+
'below.md': typeof window === 'undefined' ? undefined : (_window9 = window) === null || _window9 === void 0 || (_window9$matchMedia = _window9.matchMedia) === null || _window9$matchMedia === void 0 ? void 0 : _window9$matchMedia.call(_window9, _mediaHelper.UNSAFE_media.below.md.replace('@media ', '').trim()),
|
|
21
|
+
'below.lg': typeof window === 'undefined' ? undefined : (_window10 = window) === null || _window10 === void 0 || (_window10$matchMedia = _window10.matchMedia) === null || _window10$matchMedia === void 0 ? void 0 : _window10$matchMedia.call(_window10, _mediaHelper.UNSAFE_media.below.lg.replace('@media ', '').trim()),
|
|
22
|
+
'below.xl': typeof window === 'undefined' ? undefined : (_window11 = window) === null || _window11 === void 0 || (_window11$matchMedia = _window11.matchMedia) === null || _window11$matchMedia === void 0 ? void 0 : _window11$matchMedia.call(_window11, _mediaHelper.UNSAFE_media.below.xl.replace('@media ', '').trim())
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -41,7 +41,7 @@ var queries = {
|
|
|
41
41
|
* - `MediaQueryList`, primarily used to get if that media query is currently
|
|
42
42
|
* - `null` when `matchMedia` is unavailable, eg. in SSR.
|
|
43
43
|
*/
|
|
44
|
-
var UNSAFE_useMediaQuery = function UNSAFE_useMediaQuery(queryString, listener) {
|
|
44
|
+
var UNSAFE_useMediaQuery = exports.UNSAFE_useMediaQuery = function UNSAFE_useMediaQuery(queryString, listener) {
|
|
45
45
|
var listenerRef = (0, _react.useRef)(listener);
|
|
46
46
|
(0, _react.useEffect)(function () {
|
|
47
47
|
// Bind the listener if changed so it's called on the next change event; no guarantee on timing.
|
|
@@ -74,5 +74,4 @@ var UNSAFE_useMediaQuery = function UNSAFE_useMediaQuery(queryString, listener)
|
|
|
74
74
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- explicitly do not trigger the effect on `listener` reference change, only on a boolean representation of it.
|
|
75
75
|
[mq, hasListener]);
|
|
76
76
|
return mq || null;
|
|
77
|
-
};
|
|
78
|
-
exports.UNSAFE_useMediaQuery = UNSAFE_useMediaQuery;
|
|
77
|
+
};
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.uiTextStylesMap = exports.uiTextMap = exports.textColorStylesMap = exports.textColorMap = exports.surfaceColorStylesMap = exports.surfaceColorMap = exports.spaceStylesMap = exports.spaceMap = exports.shadowMap = exports.paddingStylesMap = exports.negativeSpaceMap = exports.lineHeightStylesMap = exports.lineHeightMap = exports.layerMap = exports.isSurfaceColorToken = exports.
|
|
7
|
+
exports.uiTextStylesMap = exports.uiTextMap = exports.textColorStylesMap = exports.textColorMap = exports.surfaceColorStylesMap = exports.surfaceColorMap = exports.spaceStylesMap = exports.spaceMap = exports.shadowMap = exports.paddingStylesMap = exports.negativeSpaceMap = exports.lineHeightStylesMap = exports.lineHeightMap = exports.layerMap = exports.isSurfaceColorToken = exports.fontWeightStylesMap = exports.fontWeightMap = exports.fontSizeStylesMap = exports.fontSizeMap = exports.fontFamilyStylesMap = exports.fontFamilyMap = exports.fillMap = exports.dimensionMap = exports.borderWidthMap = exports.borderRadiusMap = exports.borderColorMap = exports.bodyTextStylesMap = exports.bodyTextMap = exports.backgroundColorStylesMap = exports.backgroundColorMap = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _tokens = require("@atlaskit/tokens");
|
|
@@ -16,7 +16,7 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
16
16
|
* @codegenParams ["dimensions"]
|
|
17
17
|
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
18
18
|
*/
|
|
19
|
-
var dimensionMap = {
|
|
19
|
+
var dimensionMap = exports.dimensionMap = {
|
|
20
20
|
'100%': '100%',
|
|
21
21
|
'size.100': '1rem',
|
|
22
22
|
'size.200': '1.5rem',
|
|
@@ -26,19 +26,18 @@ var dimensionMap = {
|
|
|
26
26
|
'size.600': '6rem',
|
|
27
27
|
'size.1000': '12rem'
|
|
28
28
|
};
|
|
29
|
-
exports.dimensionMap = dimensionMap;
|
|
30
29
|
/**
|
|
31
30
|
* @codegenEnd
|
|
32
31
|
*/
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
36
|
-
* @codegen <<SignedSource::
|
|
35
|
+
* @codegen <<SignedSource::3cd327a4cd23dce8564f0b76a0d600ce>>
|
|
37
36
|
* @codegenId spacing
|
|
38
37
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
39
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
38
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
40
39
|
*/
|
|
41
|
-
var spaceMap = {
|
|
40
|
+
var spaceMap = exports.spaceMap = {
|
|
42
41
|
'space.0': "var(--ds-space-0, 0px)",
|
|
43
42
|
'space.025': "var(--ds-space-025, 2px)",
|
|
44
43
|
'space.050': "var(--ds-space-050, 4px)",
|
|
@@ -54,8 +53,7 @@ var spaceMap = {
|
|
|
54
53
|
'space.800': "var(--ds-space-800, 64px)",
|
|
55
54
|
'space.1000': "var(--ds-space-1000, 80px)"
|
|
56
55
|
};
|
|
57
|
-
exports.
|
|
58
|
-
var negativeSpaceMap = {
|
|
56
|
+
var negativeSpaceMap = exports.negativeSpaceMap = {
|
|
59
57
|
'space.negative.025': "var(--ds-space-negative-025, -2px)",
|
|
60
58
|
'space.negative.050': "var(--ds-space-negative-050, -4px)",
|
|
61
59
|
'space.negative.075': "var(--ds-space-negative-075, -6px)",
|
|
@@ -66,20 +64,19 @@ var negativeSpaceMap = {
|
|
|
66
64
|
'space.negative.300': "var(--ds-space-negative-300, -24px)",
|
|
67
65
|
'space.negative.400': "var(--ds-space-negative-400, -32px)"
|
|
68
66
|
};
|
|
69
|
-
exports.negativeSpaceMap = negativeSpaceMap;
|
|
70
67
|
/**
|
|
71
68
|
* @codegenEnd
|
|
72
69
|
*/
|
|
73
70
|
|
|
74
71
|
/**
|
|
75
72
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
76
|
-
* @codegen <<SignedSource::
|
|
73
|
+
* @codegen <<SignedSource::b93d845e13422e2b25a860f34dc6882b>>
|
|
77
74
|
* @codegenId colors
|
|
78
75
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
79
76
|
* @codegenParams ["border", "background", "shadow", "text", "fill", "surface"]
|
|
80
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
77
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::5188ac15a9f4d65b80cf12e4eecac815>>
|
|
81
78
|
*/
|
|
82
|
-
var borderColorMap = {
|
|
79
|
+
var borderColorMap = exports.borderColorMap = {
|
|
83
80
|
'color.border': "var(--ds-border, #091e4221)",
|
|
84
81
|
'color.border.accent.lime': "var(--ds-border-accent-lime, #6A9A23)",
|
|
85
82
|
'color.border.accent.red': "var(--ds-border-accent-red, #FF5630)",
|
|
@@ -104,8 +101,7 @@ var borderColorMap = {
|
|
|
104
101
|
'color.border.information': "var(--ds-border-information, #0065FF)",
|
|
105
102
|
'color.border.bold': "var(--ds-border-bold, #344563)"
|
|
106
103
|
};
|
|
107
|
-
exports.
|
|
108
|
-
var backgroundColorMap = {
|
|
104
|
+
var backgroundColorMap = exports.backgroundColorMap = {
|
|
109
105
|
'color.background.accent.lime.subtlest': "var(--ds-background-accent-lime-subtlest, #EEFBDA)",
|
|
110
106
|
'color.background.accent.lime.subtlest.hovered': "var(--ds-background-accent-lime-subtlest-hovered, #D3F1A7)",
|
|
111
107
|
'color.background.accent.lime.subtlest.pressed': "var(--ds-background-accent-lime-subtlest-pressed, #B3DF72)",
|
|
@@ -302,16 +298,14 @@ var backgroundColorMap = {
|
|
|
302
298
|
'elevation.surface.sunken': "var(--ds-surface-sunken, #F4F5F7)",
|
|
303
299
|
'utility.elevation.surface.current': "var(--ds-elevation-surface-current, #FFFFFF)"
|
|
304
300
|
};
|
|
305
|
-
exports.
|
|
306
|
-
var shadowMap = {
|
|
301
|
+
var shadowMap = exports.shadowMap = {
|
|
307
302
|
'elevation.shadow.overflow': "var(--ds-shadow-overflow, 0px 0px 8px #091e423f, 0px 0px 1px #091e424f)",
|
|
308
303
|
'elevation.shadow.overflow.perimeter': "var(--ds-shadow-overflow-perimeter, #091e421f)",
|
|
309
304
|
'elevation.shadow.overflow.spread': "var(--ds-shadow-overflow-spread, #091e4229)",
|
|
310
305
|
'elevation.shadow.overlay': "var(--ds-shadow-overlay, 0px 8px 12px #091e423f, 0px 0px 1px #091e424f)",
|
|
311
306
|
'elevation.shadow.raised': "var(--ds-shadow-raised, 0px 1px 1px #091e423f, 0px 0px 1px #091e4221)"
|
|
312
307
|
};
|
|
313
|
-
exports.
|
|
314
|
-
var textColorMap = {
|
|
308
|
+
var textColorMap = exports.textColorMap = {
|
|
315
309
|
'color.text': "var(--ds-text, #172B4D)",
|
|
316
310
|
'color.text.accent.lime': "var(--ds-text-accent-lime, #4C6B1F)",
|
|
317
311
|
'color.text.accent.lime.bolder': "var(--ds-text-accent-lime-bolder, #37471F)",
|
|
@@ -349,8 +343,7 @@ var textColorMap = {
|
|
|
349
343
|
'color.link.pressed': "var(--ds-link-pressed, #0747A6)",
|
|
350
344
|
'color.link.visited': "var(--ds-link-visited, #403294)"
|
|
351
345
|
};
|
|
352
|
-
exports.
|
|
353
|
-
var fillMap = {
|
|
346
|
+
var fillMap = exports.fillMap = {
|
|
354
347
|
'color.icon': "var(--ds-icon, #505F79)",
|
|
355
348
|
'color.icon.accent.lime': "var(--ds-icon-accent-lime, #6A9A23)",
|
|
356
349
|
'color.icon.accent.red': "var(--ds-icon-accent-red, #FF5630)",
|
|
@@ -374,8 +367,7 @@ var fillMap = {
|
|
|
374
367
|
'color.icon.information': "var(--ds-icon-information, #0747A6)",
|
|
375
368
|
'color.icon.subtle': "var(--ds-icon-subtle, #6B778C)"
|
|
376
369
|
};
|
|
377
|
-
exports.
|
|
378
|
-
var surfaceColorMap = {
|
|
370
|
+
var surfaceColorMap = exports.surfaceColorMap = {
|
|
379
371
|
'elevation.surface': "var(--ds-surface, #FFFFFF)",
|
|
380
372
|
'elevation.surface.hovered': "var(--ds-surface-hovered, #FAFBFC)",
|
|
381
373
|
'elevation.surface.pressed': "var(--ds-surface-pressed, #F4F5F7)",
|
|
@@ -387,7 +379,6 @@ var surfaceColorMap = {
|
|
|
387
379
|
'elevation.surface.raised.pressed': "var(--ds-surface-raised-pressed, #F4F5F7)",
|
|
388
380
|
'elevation.surface.sunken': "var(--ds-surface-sunken, #F4F5F7)"
|
|
389
381
|
};
|
|
390
|
-
exports.surfaceColorMap = surfaceColorMap;
|
|
391
382
|
/**
|
|
392
383
|
* @codegenEnd
|
|
393
384
|
*/
|
|
@@ -401,7 +392,7 @@ exports.surfaceColorMap = surfaceColorMap;
|
|
|
401
392
|
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
402
393
|
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
|
|
403
394
|
*/
|
|
404
|
-
var layerMap = {
|
|
395
|
+
var layerMap = exports.layerMap = {
|
|
405
396
|
card: 100,
|
|
406
397
|
navigation: 200,
|
|
407
398
|
dialog: 300,
|
|
@@ -412,27 +403,25 @@ var layerMap = {
|
|
|
412
403
|
spotlight: 700,
|
|
413
404
|
tooltip: 800
|
|
414
405
|
};
|
|
415
|
-
exports.layerMap = layerMap;
|
|
416
406
|
/**
|
|
417
407
|
* @codegenEnd
|
|
418
408
|
*/
|
|
419
409
|
|
|
420
410
|
/**
|
|
421
411
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
422
|
-
* @codegen <<SignedSource::
|
|
412
|
+
* @codegen <<SignedSource::d44c306cfe2334f9664fc122aa7d9fe6>>
|
|
423
413
|
* @codegenId border
|
|
424
414
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
425
415
|
* @codegenParams ["width", "radius"]
|
|
426
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::
|
|
416
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::80457377fd80c31f5dfcb5cc743d7016>>
|
|
427
417
|
*/
|
|
428
|
-
var borderWidthMap = {
|
|
418
|
+
var borderWidthMap = exports.borderWidthMap = {
|
|
429
419
|
'border.width': "var(--ds-border-width, 1px)",
|
|
430
420
|
'border.width.0': "var(--ds-border-width-0, 0px)",
|
|
431
421
|
'border.width.indicator': "var(--ds-border-width-indicator, 3px)",
|
|
432
422
|
'border.width.outline': "var(--ds-border-width-outline, 2px)"
|
|
433
423
|
};
|
|
434
|
-
exports.
|
|
435
|
-
var borderRadiusMap = {
|
|
424
|
+
var borderRadiusMap = exports.borderRadiusMap = {
|
|
436
425
|
'border.radius.050': "var(--ds-border-radius-050, 2px)",
|
|
437
426
|
'border.radius': "var(--ds-border-radius, 3px)",
|
|
438
427
|
'border.radius.100': "var(--ds-border-radius-100, 3px)",
|
|
@@ -441,21 +430,20 @@ var borderRadiusMap = {
|
|
|
441
430
|
'border.radius.400': "var(--ds-border-radius-400, 16px)",
|
|
442
431
|
'border.radius.circle': "var(--ds-border-radius-circle, 32032px)"
|
|
443
432
|
};
|
|
444
|
-
exports.borderRadiusMap = borderRadiusMap;
|
|
445
433
|
/**
|
|
446
434
|
* @codegenEnd
|
|
447
435
|
*/
|
|
448
436
|
|
|
449
437
|
/**
|
|
450
438
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
451
|
-
* @codegen <<SignedSource::
|
|
439
|
+
* @codegen <<SignedSource::fc5fa2e6300ad8cc69d2ab1af222c4f5>>
|
|
452
440
|
* @codegenId typography
|
|
453
441
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
454
|
-
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "
|
|
442
|
+
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
455
443
|
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
456
444
|
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
|
|
457
445
|
*/
|
|
458
|
-
var fontSizeMap = {
|
|
446
|
+
var fontSizeMap = exports.fontSizeMap = {
|
|
459
447
|
'font.size.050': "var(--ds-font-size-050, 11px)",
|
|
460
448
|
'font.size.075': "var(--ds-font-size-075, 12px)",
|
|
461
449
|
'font.size.100': "var(--ds-font-size-100, 14px)",
|
|
@@ -465,24 +453,21 @@ var fontSizeMap = {
|
|
|
465
453
|
'font.size.500': "var(--ds-font-size-500, 29px)",
|
|
466
454
|
'font.size.600': "var(--ds-font-size-600, 35px)"
|
|
467
455
|
};
|
|
468
|
-
exports.
|
|
469
|
-
var fontWeightMap = {
|
|
456
|
+
var fontWeightMap = exports.fontWeightMap = {
|
|
470
457
|
'font.weight.bold': "var(--ds-font-weight-bold, 700)",
|
|
471
458
|
'font.weight.medium': "var(--ds-font-weight-medium, 500)",
|
|
472
459
|
'font.weight.regular': "var(--ds-font-weight-regular, 400)",
|
|
473
460
|
'font.weight.semibold': "var(--ds-font-weight-semibold, 600)"
|
|
474
461
|
};
|
|
475
|
-
exports.
|
|
476
|
-
var
|
|
477
|
-
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", system-ui, Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
462
|
+
var fontFamilyMap = exports.fontFamilyMap = {
|
|
463
|
+
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
478
464
|
'font.family.brand': "var(--ds-font-family-brand, Charlie Sans)",
|
|
479
465
|
'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
480
|
-
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", system-ui,
|
|
466
|
+
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
481
467
|
'font.family.monospace': "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
482
468
|
'font.family.sans': "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
|
|
483
469
|
};
|
|
484
|
-
exports.
|
|
485
|
-
var lineHeightMap = {
|
|
470
|
+
var lineHeightMap = exports.lineHeightMap = {
|
|
486
471
|
'font.lineHeight.1': "var(--ds-font-lineHeight-1, 1)",
|
|
487
472
|
'font.lineHeight.100': "var(--ds-font-lineHeight-100, 16px)",
|
|
488
473
|
'font.lineHeight.200': "var(--ds-font-lineHeight-200, 20px)",
|
|
@@ -491,32 +476,20 @@ var lineHeightMap = {
|
|
|
491
476
|
'font.lineHeight.500': "var(--ds-font-lineHeight-500, 32px)",
|
|
492
477
|
'font.lineHeight.600': "var(--ds-font-lineHeight-600, 40px)"
|
|
493
478
|
};
|
|
494
|
-
exports.
|
|
495
|
-
var bodyTextMap = {
|
|
479
|
+
var bodyTextMap = exports.bodyTextMap = {
|
|
496
480
|
body: "var(--ds-font-body, normal 400 14px/20px var(--ds-font-family-body))",
|
|
497
|
-
'body.
|
|
498
|
-
'body.
|
|
481
|
+
'body.large': "var(--ds-font-body-large, normal 400 16px/24px var(--ds-font-family-body))",
|
|
482
|
+
'body.small': "var(--ds-font-body-small, normal 400 11px/20px var(--ds-font-family-body))"
|
|
499
483
|
};
|
|
500
|
-
exports.
|
|
501
|
-
var headingTextMap = {
|
|
502
|
-
'heading.lg': "var(--ds-font-heading-lg, normal 500 24px/28px var(--ds-font-family-heading))",
|
|
503
|
-
'heading.md': "var(--ds-font-heading-md, normal 500 20px/24px var(--ds-font-family-heading))",
|
|
504
|
-
'heading.sm': "var(--ds-font-heading-sm, normal 600 16px/20px var(--ds-font-family-heading))",
|
|
505
|
-
'heading.xl': "var(--ds-font-heading-xl, normal 600 29px/32px var(--ds-font-family-heading))",
|
|
506
|
-
'heading.xs': "var(--ds-font-heading-xs, normal 600 14px/16px var(--ds-font-family-heading))",
|
|
507
|
-
'heading.xxl': "var(--ds-font-heading-xxl, normal 500 35px/40px var(--ds-font-family-heading))",
|
|
508
|
-
'heading.xxs': "var(--ds-font-heading-xxs, normal 600 12px/16px var(--ds-font-family-heading))"
|
|
509
|
-
};
|
|
510
|
-
exports.headingTextMap = headingTextMap;
|
|
511
|
-
var uiTextMap = {
|
|
484
|
+
var uiTextMap = exports.uiTextMap = {
|
|
512
485
|
ui: "var(--ds-font-ui, normal 400 14px/1 var(--ds-font-family-body))",
|
|
513
|
-
'ui.
|
|
486
|
+
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 var(--ds-font-family-body))"
|
|
514
487
|
};
|
|
515
488
|
|
|
516
489
|
/**
|
|
517
490
|
* @codegenEnd
|
|
518
491
|
*/
|
|
519
|
-
|
|
492
|
+
|
|
520
493
|
// Generate maps for Box props. backgroundColor, padding, etc
|
|
521
494
|
var spacingProperties = [
|
|
522
495
|
// Used by Box
|
|
@@ -529,37 +502,23 @@ var getSerializedStylesMap = function getSerializedStylesMap(cssProperty, tokenM
|
|
|
529
502
|
return emotionSpacingMap;
|
|
530
503
|
}, {});
|
|
531
504
|
};
|
|
532
|
-
var paddingStylesMap = spacingProperties.reduce(function (styleMap, spacingProperty) {
|
|
505
|
+
var paddingStylesMap = exports.paddingStylesMap = spacingProperties.reduce(function (styleMap, spacingProperty) {
|
|
533
506
|
styleMap[spacingProperty] = getSerializedStylesMap(spacingProperty, spaceMap);
|
|
534
507
|
return styleMap;
|
|
535
508
|
}, {});
|
|
536
|
-
exports.
|
|
537
|
-
var spaceStylesMap = spacingProperties.reduce(function (styleMap, spacingProperty) {
|
|
509
|
+
var spaceStylesMap = exports.spaceStylesMap = spacingProperties.reduce(function (styleMap, spacingProperty) {
|
|
538
510
|
styleMap[spacingProperty] = getSerializedStylesMap(spacingProperty, spaceMap);
|
|
539
511
|
return styleMap;
|
|
540
512
|
}, {});
|
|
541
|
-
exports.
|
|
542
|
-
var
|
|
543
|
-
exports.
|
|
544
|
-
var
|
|
545
|
-
exports.
|
|
546
|
-
var
|
|
547
|
-
exports.
|
|
548
|
-
var
|
|
549
|
-
exports.
|
|
550
|
-
var
|
|
551
|
-
exports.fontFamilyStylesMap = fontFamilyStylesMap;
|
|
552
|
-
var lineHeightStylesMap = getSerializedStylesMap('lineHeight', lineHeightMap);
|
|
553
|
-
exports.lineHeightStylesMap = lineHeightStylesMap;
|
|
554
|
-
var headingTextStylesMap = getSerializedStylesMap('font', headingTextMap);
|
|
555
|
-
exports.headingTextStylesMap = headingTextStylesMap;
|
|
556
|
-
var bodyTextStylesMap = getSerializedStylesMap('font', bodyTextMap);
|
|
557
|
-
exports.bodyTextStylesMap = bodyTextStylesMap;
|
|
558
|
-
var uiTextStylesMap = getSerializedStylesMap('font', uiTextMap);
|
|
559
|
-
exports.uiTextStylesMap = uiTextStylesMap;
|
|
560
|
-
var surfaceColorStylesMap = getSerializedStylesMap(_tokens.CURRENT_SURFACE_CSS_VAR, surfaceColorMap);
|
|
561
|
-
exports.surfaceColorStylesMap = surfaceColorStylesMap;
|
|
562
|
-
var isSurfaceColorToken = function isSurfaceColorToken(color) {
|
|
513
|
+
var backgroundColorStylesMap = exports.backgroundColorStylesMap = getSerializedStylesMap('backgroundColor', backgroundColorMap);
|
|
514
|
+
var textColorStylesMap = exports.textColorStylesMap = getSerializedStylesMap('color', textColorMap);
|
|
515
|
+
var fontSizeStylesMap = exports.fontSizeStylesMap = getSerializedStylesMap('fontSize', fontSizeMap);
|
|
516
|
+
var fontWeightStylesMap = exports.fontWeightStylesMap = getSerializedStylesMap('fontWeight', fontWeightMap);
|
|
517
|
+
var fontFamilyStylesMap = exports.fontFamilyStylesMap = getSerializedStylesMap('fontFamily', fontFamilyMap);
|
|
518
|
+
var lineHeightStylesMap = exports.lineHeightStylesMap = getSerializedStylesMap('lineHeight', lineHeightMap);
|
|
519
|
+
var bodyTextStylesMap = exports.bodyTextStylesMap = getSerializedStylesMap('font', bodyTextMap);
|
|
520
|
+
var uiTextStylesMap = exports.uiTextStylesMap = getSerializedStylesMap('font', uiTextMap);
|
|
521
|
+
var surfaceColorStylesMap = exports.surfaceColorStylesMap = getSerializedStylesMap(_tokens.CURRENT_SURFACE_CSS_VAR, surfaceColorMap);
|
|
522
|
+
var isSurfaceColorToken = exports.isSurfaceColorToken = function isSurfaceColorToken(color) {
|
|
563
523
|
return surfaceColorMap[color] !== undefined;
|
|
564
|
-
};
|
|
565
|
-
exports.isSurfaceColorToken = isSurfaceColorToken;
|
|
524
|
+
};
|
package/dist/cjs/xcss/xcss.js
CHANGED
|
@@ -128,7 +128,7 @@ var baseXcss = function baseXcss(style) {
|
|
|
128
128
|
* @returns a collection of styles that can be applied to the respective primitive
|
|
129
129
|
*/
|
|
130
130
|
|
|
131
|
-
var parseXcss = function parseXcss(args) {
|
|
131
|
+
var parseXcss = exports.parseXcss = function parseXcss(args) {
|
|
132
132
|
if (Array.isArray(args)) {
|
|
133
133
|
return args.map(function (x) {
|
|
134
134
|
return x && parseXcss(x);
|
|
@@ -144,7 +144,7 @@ var parseXcss = function parseXcss(args) {
|
|
|
144
144
|
// Media queries should not contain nested media queries
|
|
145
145
|
|
|
146
146
|
// Pseudos should not contain nested pseudos, or media queries
|
|
147
|
-
|
|
147
|
+
|
|
148
148
|
/**
|
|
149
149
|
* ### xcss
|
|
150
150
|
*
|
|
@@ -24,10 +24,10 @@ export const dimensionMap = {
|
|
|
24
24
|
*/
|
|
25
25
|
/**
|
|
26
26
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
27
|
-
* @codegen <<SignedSource::
|
|
27
|
+
* @codegen <<SignedSource::3cd327a4cd23dce8564f0b76a0d600ce>>
|
|
28
28
|
* @codegenId spacing
|
|
29
29
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
30
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
30
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
31
31
|
*/
|
|
32
32
|
export const spaceMap = {
|
|
33
33
|
'space.0': "var(--ds-space-0, 0px)",
|
|
@@ -61,11 +61,11 @@ export const negativeSpaceMap = {
|
|
|
61
61
|
*/
|
|
62
62
|
/**
|
|
63
63
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
64
|
-
* @codegen <<SignedSource::
|
|
64
|
+
* @codegen <<SignedSource::b93d845e13422e2b25a860f34dc6882b>>
|
|
65
65
|
* @codegenId colors
|
|
66
66
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
67
67
|
* @codegenParams ["border", "background", "shadow", "text", "fill", "surface"]
|
|
68
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
68
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::5188ac15a9f4d65b80cf12e4eecac815>>
|
|
69
69
|
*/
|
|
70
70
|
export const borderColorMap = {
|
|
71
71
|
'color.border': "var(--ds-border, #091e4221)",
|
|
@@ -398,11 +398,11 @@ export const layerMap = {
|
|
|
398
398
|
*/
|
|
399
399
|
/**
|
|
400
400
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
401
|
-
* @codegen <<SignedSource::
|
|
401
|
+
* @codegen <<SignedSource::d44c306cfe2334f9664fc122aa7d9fe6>>
|
|
402
402
|
* @codegenId border
|
|
403
403
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
404
404
|
* @codegenParams ["width", "radius"]
|
|
405
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::
|
|
405
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::80457377fd80c31f5dfcb5cc743d7016>>
|
|
406
406
|
*/
|
|
407
407
|
export const borderWidthMap = {
|
|
408
408
|
'border.width': "var(--ds-border-width, 1px)",
|
|
@@ -424,10 +424,10 @@ export const borderRadiusMap = {
|
|
|
424
424
|
*/
|
|
425
425
|
/**
|
|
426
426
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
427
|
-
* @codegen <<SignedSource::
|
|
427
|
+
* @codegen <<SignedSource::fc5fa2e6300ad8cc69d2ab1af222c4f5>>
|
|
428
428
|
* @codegenId typography
|
|
429
429
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
430
|
-
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "
|
|
430
|
+
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
431
431
|
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
432
432
|
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
|
|
433
433
|
*/
|
|
@@ -448,10 +448,10 @@ export const fontWeightMap = {
|
|
|
448
448
|
'font.weight.semibold': "var(--ds-font-weight-semibold, 600)"
|
|
449
449
|
};
|
|
450
450
|
export const fontFamilyMap = {
|
|
451
|
-
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", system-ui,
|
|
451
|
+
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
452
452
|
'font.family.brand': "var(--ds-font-family-brand, Charlie Sans)",
|
|
453
453
|
'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
454
|
-
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", system-ui,
|
|
454
|
+
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
455
455
|
'font.family.monospace': "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
456
456
|
'font.family.sans': "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
|
|
457
457
|
};
|
|
@@ -466,21 +466,12 @@ export const lineHeightMap = {
|
|
|
466
466
|
};
|
|
467
467
|
export const bodyTextMap = {
|
|
468
468
|
body: "var(--ds-font-body, normal 400 14px/20px var(--ds-font-family-body))",
|
|
469
|
-
'body.
|
|
470
|
-
'body.
|
|
471
|
-
};
|
|
472
|
-
export const headingTextMap = {
|
|
473
|
-
'heading.lg': "var(--ds-font-heading-lg, normal 500 24px/28px var(--ds-font-family-heading))",
|
|
474
|
-
'heading.md': "var(--ds-font-heading-md, normal 500 20px/24px var(--ds-font-family-heading))",
|
|
475
|
-
'heading.sm': "var(--ds-font-heading-sm, normal 600 16px/20px var(--ds-font-family-heading))",
|
|
476
|
-
'heading.xl': "var(--ds-font-heading-xl, normal 600 29px/32px var(--ds-font-family-heading))",
|
|
477
|
-
'heading.xs': "var(--ds-font-heading-xs, normal 600 14px/16px var(--ds-font-family-heading))",
|
|
478
|
-
'heading.xxl': "var(--ds-font-heading-xxl, normal 500 35px/40px var(--ds-font-family-heading))",
|
|
479
|
-
'heading.xxs': "var(--ds-font-heading-xxs, normal 600 12px/16px var(--ds-font-family-heading))"
|
|
469
|
+
'body.large': "var(--ds-font-body-large, normal 400 16px/24px var(--ds-font-family-body))",
|
|
470
|
+
'body.small': "var(--ds-font-body-small, normal 400 11px/20px var(--ds-font-family-body))"
|
|
480
471
|
};
|
|
481
472
|
export const uiTextMap = {
|
|
482
473
|
ui: "var(--ds-font-ui, normal 400 14px/1 var(--ds-font-family-body))",
|
|
483
|
-
'ui.
|
|
474
|
+
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 var(--ds-font-family-body))"
|
|
484
475
|
};
|
|
485
476
|
|
|
486
477
|
/**
|
|
@@ -515,7 +506,6 @@ export const fontSizeStylesMap = getSerializedStylesMap('fontSize', fontSizeMap)
|
|
|
515
506
|
export const fontWeightStylesMap = getSerializedStylesMap('fontWeight', fontWeightMap);
|
|
516
507
|
export const fontFamilyStylesMap = getSerializedStylesMap('fontFamily', fontFamilyMap);
|
|
517
508
|
export const lineHeightStylesMap = getSerializedStylesMap('lineHeight', lineHeightMap);
|
|
518
|
-
export const headingTextStylesMap = getSerializedStylesMap('font', headingTextMap);
|
|
519
509
|
export const bodyTextStylesMap = getSerializedStylesMap('font', bodyTextMap);
|
|
520
510
|
export const uiTextStylesMap = getSerializedStylesMap('font', uiTextMap);
|
|
521
511
|
export const surfaceColorStylesMap = getSerializedStylesMap(CURRENT_SURFACE_CSS_VAR, surfaceColorMap);
|
|
@@ -3,17 +3,17 @@ import { useEffect, useLayoutEffect, useRef } from 'react';
|
|
|
3
3
|
import { bind } from 'bind-event-listener';
|
|
4
4
|
import { UNSAFE_media } from './media-helper';
|
|
5
5
|
var queries = {
|
|
6
|
-
'above.xxs': typeof window === 'undefined' ? undefined : (_window = window) === null || _window === void 0
|
|
7
|
-
'above.xs': typeof window === 'undefined' ? undefined : (_window2 = window) === null || _window2 === void 0
|
|
8
|
-
'above.sm': typeof window === 'undefined' ? undefined : (_window3 = window) === null || _window3 === void 0
|
|
9
|
-
'above.md': typeof window === 'undefined' ? undefined : (_window4 = window) === null || _window4 === void 0
|
|
10
|
-
'above.lg': typeof window === 'undefined' ? undefined : (_window5 = window) === null || _window5 === void 0
|
|
11
|
-
'above.xl': typeof window === 'undefined' ? undefined : (_window6 = window) === null || _window6 === void 0
|
|
12
|
-
'below.xs': typeof window === 'undefined' ? undefined : (_window7 = window) === null || _window7 === void 0
|
|
13
|
-
'below.sm': typeof window === 'undefined' ? undefined : (_window8 = window) === null || _window8 === void 0
|
|
14
|
-
'below.md': typeof window === 'undefined' ? undefined : (_window9 = window) === null || _window9 === void 0
|
|
15
|
-
'below.lg': typeof window === 'undefined' ? undefined : (_window10 = window) === null || _window10 === void 0
|
|
16
|
-
'below.xl': typeof window === 'undefined' ? undefined : (_window11 = window) === null || _window11 === void 0
|
|
6
|
+
'above.xxs': typeof window === 'undefined' ? undefined : (_window = window) === null || _window === void 0 || (_window$matchMedia = _window.matchMedia) === null || _window$matchMedia === void 0 ? void 0 : _window$matchMedia.call(_window, UNSAFE_media.above.xxs.replace('@media ', '').trim()),
|
|
7
|
+
'above.xs': typeof window === 'undefined' ? undefined : (_window2 = window) === null || _window2 === void 0 || (_window2$matchMedia = _window2.matchMedia) === null || _window2$matchMedia === void 0 ? void 0 : _window2$matchMedia.call(_window2, UNSAFE_media.above.xs.replace('@media ', '').trim()),
|
|
8
|
+
'above.sm': typeof window === 'undefined' ? undefined : (_window3 = window) === null || _window3 === void 0 || (_window3$matchMedia = _window3.matchMedia) === null || _window3$matchMedia === void 0 ? void 0 : _window3$matchMedia.call(_window3, UNSAFE_media.above.sm.replace('@media ', '').trim()),
|
|
9
|
+
'above.md': typeof window === 'undefined' ? undefined : (_window4 = window) === null || _window4 === void 0 || (_window4$matchMedia = _window4.matchMedia) === null || _window4$matchMedia === void 0 ? void 0 : _window4$matchMedia.call(_window4, UNSAFE_media.above.md.replace('@media ', '').trim()),
|
|
10
|
+
'above.lg': typeof window === 'undefined' ? undefined : (_window5 = window) === null || _window5 === void 0 || (_window5$matchMedia = _window5.matchMedia) === null || _window5$matchMedia === void 0 ? void 0 : _window5$matchMedia.call(_window5, UNSAFE_media.above.lg.replace('@media ', '').trim()),
|
|
11
|
+
'above.xl': typeof window === 'undefined' ? undefined : (_window6 = window) === null || _window6 === void 0 || (_window6$matchMedia = _window6.matchMedia) === null || _window6$matchMedia === void 0 ? void 0 : _window6$matchMedia.call(_window6, UNSAFE_media.above.xl.replace('@media ', '').trim()),
|
|
12
|
+
'below.xs': typeof window === 'undefined' ? undefined : (_window7 = window) === null || _window7 === void 0 || (_window7$matchMedia = _window7.matchMedia) === null || _window7$matchMedia === void 0 ? void 0 : _window7$matchMedia.call(_window7, UNSAFE_media.below.xs.replace('@media ', '').trim()),
|
|
13
|
+
'below.sm': typeof window === 'undefined' ? undefined : (_window8 = window) === null || _window8 === void 0 || (_window8$matchMedia = _window8.matchMedia) === null || _window8$matchMedia === void 0 ? void 0 : _window8$matchMedia.call(_window8, UNSAFE_media.below.sm.replace('@media ', '').trim()),
|
|
14
|
+
'below.md': typeof window === 'undefined' ? undefined : (_window9 = window) === null || _window9 === void 0 || (_window9$matchMedia = _window9.matchMedia) === null || _window9$matchMedia === void 0 ? void 0 : _window9$matchMedia.call(_window9, UNSAFE_media.below.md.replace('@media ', '').trim()),
|
|
15
|
+
'below.lg': typeof window === 'undefined' ? undefined : (_window10 = window) === null || _window10 === void 0 || (_window10$matchMedia = _window10.matchMedia) === null || _window10$matchMedia === void 0 ? void 0 : _window10$matchMedia.call(_window10, UNSAFE_media.below.lg.replace('@media ', '').trim()),
|
|
16
|
+
'below.xl': typeof window === 'undefined' ? undefined : (_window11 = window) === null || _window11 === void 0 || (_window11$matchMedia = _window11.matchMedia) === null || _window11$matchMedia === void 0 ? void 0 : _window11$matchMedia.call(_window11, UNSAFE_media.below.xl.replace('@media ', '').trim())
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -25,10 +25,10 @@ export var dimensionMap = {
|
|
|
25
25
|
*/
|
|
26
26
|
/**
|
|
27
27
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
28
|
-
* @codegen <<SignedSource::
|
|
28
|
+
* @codegen <<SignedSource::3cd327a4cd23dce8564f0b76a0d600ce>>
|
|
29
29
|
* @codegenId spacing
|
|
30
30
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
31
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
31
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
32
32
|
*/
|
|
33
33
|
export var spaceMap = {
|
|
34
34
|
'space.0': "var(--ds-space-0, 0px)",
|
|
@@ -62,11 +62,11 @@ export var negativeSpaceMap = {
|
|
|
62
62
|
*/
|
|
63
63
|
/**
|
|
64
64
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
65
|
-
* @codegen <<SignedSource::
|
|
65
|
+
* @codegen <<SignedSource::b93d845e13422e2b25a860f34dc6882b>>
|
|
66
66
|
* @codegenId colors
|
|
67
67
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
68
68
|
* @codegenParams ["border", "background", "shadow", "text", "fill", "surface"]
|
|
69
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
69
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::5188ac15a9f4d65b80cf12e4eecac815>>
|
|
70
70
|
*/
|
|
71
71
|
export var borderColorMap = {
|
|
72
72
|
'color.border': "var(--ds-border, #091e4221)",
|
|
@@ -399,11 +399,11 @@ export var layerMap = {
|
|
|
399
399
|
*/
|
|
400
400
|
/**
|
|
401
401
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
402
|
-
* @codegen <<SignedSource::
|
|
402
|
+
* @codegen <<SignedSource::d44c306cfe2334f9664fc122aa7d9fe6>>
|
|
403
403
|
* @codegenId border
|
|
404
404
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
405
405
|
* @codegenParams ["width", "radius"]
|
|
406
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::
|
|
406
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::80457377fd80c31f5dfcb5cc743d7016>>
|
|
407
407
|
*/
|
|
408
408
|
export var borderWidthMap = {
|
|
409
409
|
'border.width': "var(--ds-border-width, 1px)",
|
|
@@ -425,10 +425,10 @@ export var borderRadiusMap = {
|
|
|
425
425
|
*/
|
|
426
426
|
/**
|
|
427
427
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
428
|
-
* @codegen <<SignedSource::
|
|
428
|
+
* @codegen <<SignedSource::fc5fa2e6300ad8cc69d2ab1af222c4f5>>
|
|
429
429
|
* @codegenId typography
|
|
430
430
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
431
|
-
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "
|
|
431
|
+
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
432
432
|
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
433
433
|
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
|
|
434
434
|
*/
|
|
@@ -449,10 +449,10 @@ export var fontWeightMap = {
|
|
|
449
449
|
'font.weight.semibold': "var(--ds-font-weight-semibold, 600)"
|
|
450
450
|
};
|
|
451
451
|
export var fontFamilyMap = {
|
|
452
|
-
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", system-ui,
|
|
452
|
+
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
453
453
|
'font.family.brand': "var(--ds-font-family-brand, Charlie Sans)",
|
|
454
454
|
'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
455
|
-
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", system-ui,
|
|
455
|
+
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
456
456
|
'font.family.monospace': "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
457
457
|
'font.family.sans': "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
|
|
458
458
|
};
|
|
@@ -467,21 +467,12 @@ export var lineHeightMap = {
|
|
|
467
467
|
};
|
|
468
468
|
export var bodyTextMap = {
|
|
469
469
|
body: "var(--ds-font-body, normal 400 14px/20px var(--ds-font-family-body))",
|
|
470
|
-
'body.
|
|
471
|
-
'body.
|
|
472
|
-
};
|
|
473
|
-
export var headingTextMap = {
|
|
474
|
-
'heading.lg': "var(--ds-font-heading-lg, normal 500 24px/28px var(--ds-font-family-heading))",
|
|
475
|
-
'heading.md': "var(--ds-font-heading-md, normal 500 20px/24px var(--ds-font-family-heading))",
|
|
476
|
-
'heading.sm': "var(--ds-font-heading-sm, normal 600 16px/20px var(--ds-font-family-heading))",
|
|
477
|
-
'heading.xl': "var(--ds-font-heading-xl, normal 600 29px/32px var(--ds-font-family-heading))",
|
|
478
|
-
'heading.xs': "var(--ds-font-heading-xs, normal 600 14px/16px var(--ds-font-family-heading))",
|
|
479
|
-
'heading.xxl': "var(--ds-font-heading-xxl, normal 500 35px/40px var(--ds-font-family-heading))",
|
|
480
|
-
'heading.xxs': "var(--ds-font-heading-xxs, normal 600 12px/16px var(--ds-font-family-heading))"
|
|
470
|
+
'body.large': "var(--ds-font-body-large, normal 400 16px/24px var(--ds-font-family-body))",
|
|
471
|
+
'body.small': "var(--ds-font-body-small, normal 400 11px/20px var(--ds-font-family-body))"
|
|
481
472
|
};
|
|
482
473
|
export var uiTextMap = {
|
|
483
474
|
ui: "var(--ds-font-ui, normal 400 14px/1 var(--ds-font-family-body))",
|
|
484
|
-
'ui.
|
|
475
|
+
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 var(--ds-font-family-body))"
|
|
485
476
|
};
|
|
486
477
|
|
|
487
478
|
/**
|
|
@@ -514,7 +505,6 @@ export var fontSizeStylesMap = getSerializedStylesMap('fontSize', fontSizeMap);
|
|
|
514
505
|
export var fontWeightStylesMap = getSerializedStylesMap('fontWeight', fontWeightMap);
|
|
515
506
|
export var fontFamilyStylesMap = getSerializedStylesMap('fontFamily', fontFamilyMap);
|
|
516
507
|
export var lineHeightStylesMap = getSerializedStylesMap('lineHeight', lineHeightMap);
|
|
517
|
-
export var headingTextStylesMap = getSerializedStylesMap('font', headingTextMap);
|
|
518
508
|
export var bodyTextStylesMap = getSerializedStylesMap('font', bodyTextMap);
|
|
519
509
|
export var uiTextStylesMap = getSerializedStylesMap('font', uiTextMap);
|
|
520
510
|
export var surfaceColorStylesMap = getSerializedStylesMap(CURRENT_SURFACE_CSS_VAR, surfaceColorMap);
|
|
@@ -23,10 +23,10 @@ export type Dimension = keyof typeof dimensionMap;
|
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
25
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
26
|
-
* @codegen <<SignedSource::
|
|
26
|
+
* @codegen <<SignedSource::3cd327a4cd23dce8564f0b76a0d600ce>>
|
|
27
27
|
* @codegenId spacing
|
|
28
28
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
29
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
29
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
30
30
|
*/
|
|
31
31
|
export declare const spaceMap: {
|
|
32
32
|
'space.0': "var(--ds-space-0)";
|
|
@@ -62,11 +62,11 @@ export type NegativeSpace = keyof typeof negativeSpaceMap;
|
|
|
62
62
|
*/
|
|
63
63
|
/**
|
|
64
64
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
65
|
-
* @codegen <<SignedSource::
|
|
65
|
+
* @codegen <<SignedSource::b93d845e13422e2b25a860f34dc6882b>>
|
|
66
66
|
* @codegenId colors
|
|
67
67
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
68
68
|
* @codegenParams ["border", "background", "shadow", "text", "fill", "surface"]
|
|
69
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
69
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::5188ac15a9f4d65b80cf12e4eecac815>>
|
|
70
70
|
*/
|
|
71
71
|
export declare const borderColorMap: {
|
|
72
72
|
readonly 'color.border': "var(--ds-border)";
|
|
@@ -406,11 +406,11 @@ export type Layer = keyof typeof layerMap;
|
|
|
406
406
|
*/
|
|
407
407
|
/**
|
|
408
408
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
409
|
-
* @codegen <<SignedSource::
|
|
409
|
+
* @codegen <<SignedSource::d44c306cfe2334f9664fc122aa7d9fe6>>
|
|
410
410
|
* @codegenId border
|
|
411
411
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
412
412
|
* @codegenParams ["width", "radius"]
|
|
413
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::
|
|
413
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::80457377fd80c31f5dfcb5cc743d7016>>
|
|
414
414
|
*/
|
|
415
415
|
export declare const borderWidthMap: {
|
|
416
416
|
readonly 'border.width': "var(--ds-border-width)";
|
|
@@ -434,10 +434,10 @@ export type BorderRadius = keyof typeof borderRadiusMap;
|
|
|
434
434
|
*/
|
|
435
435
|
/**
|
|
436
436
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
437
|
-
* @codegen <<SignedSource::
|
|
437
|
+
* @codegen <<SignedSource::fc5fa2e6300ad8cc69d2ab1af222c4f5>>
|
|
438
438
|
* @codegenId typography
|
|
439
439
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
440
|
-
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "
|
|
440
|
+
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
441
441
|
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
442
442
|
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
|
|
443
443
|
*/
|
|
@@ -480,23 +480,13 @@ export declare const lineHeightMap: {
|
|
|
480
480
|
export type LineHeight = keyof typeof lineHeightMap;
|
|
481
481
|
export declare const bodyTextMap: {
|
|
482
482
|
body: "var(--ds-font-body)";
|
|
483
|
-
'body.
|
|
484
|
-
'body.
|
|
483
|
+
'body.large': "var(--ds-font-body-large)";
|
|
484
|
+
'body.small': "var(--ds-font-body-small)";
|
|
485
485
|
};
|
|
486
486
|
export type BodyText = keyof typeof bodyTextMap;
|
|
487
|
-
export declare const headingTextMap: {
|
|
488
|
-
'heading.lg': "var(--ds-font-heading-lg)";
|
|
489
|
-
'heading.md': "var(--ds-font-heading-md)";
|
|
490
|
-
'heading.sm': "var(--ds-font-heading-sm)";
|
|
491
|
-
'heading.xl': "var(--ds-font-heading-xl)";
|
|
492
|
-
'heading.xs': "var(--ds-font-heading-xs)";
|
|
493
|
-
'heading.xxl': "var(--ds-font-heading-xxl)";
|
|
494
|
-
'heading.xxs': "var(--ds-font-heading-xxs)";
|
|
495
|
-
};
|
|
496
|
-
export type HeadingText = keyof typeof headingTextMap;
|
|
497
487
|
export declare const uiTextMap: {
|
|
498
488
|
ui: "var(--ds-font-ui)";
|
|
499
|
-
'ui.
|
|
489
|
+
'ui.small': "var(--ds-font-ui-small)";
|
|
500
490
|
};
|
|
501
491
|
export type UiText = keyof typeof uiTextMap;
|
|
502
492
|
/**
|
|
@@ -574,7 +564,6 @@ type FontSizeToken = keyof typeof fontSizeMap;
|
|
|
574
564
|
type FontWeightToken = keyof typeof fontWeightMap;
|
|
575
565
|
type FontFamilyToken = keyof typeof fontFamilyMap;
|
|
576
566
|
type LineHeightToken = keyof typeof lineHeightMap;
|
|
577
|
-
type HeadingTextToken = keyof typeof headingTextMap;
|
|
578
567
|
type BodyTextToken = keyof typeof bodyTextMap;
|
|
579
568
|
type UITextToken = keyof typeof uiTextMap;
|
|
580
569
|
type SpacingStyleMap = Record<SpacingProperty, Record<SpacingToken, SerializedStyles>>;
|
|
@@ -585,7 +574,6 @@ type FontSizeStyleMap = Record<FontSizeToken, SerializedStyles>;
|
|
|
585
574
|
type FontWeightStyleMap = Record<FontWeightToken, SerializedStyles>;
|
|
586
575
|
type FontFamilyStyleMap = Record<FontFamilyToken, SerializedStyles>;
|
|
587
576
|
type LineHeightStyleMap = Record<LineHeightToken, SerializedStyles>;
|
|
588
|
-
type HeadingTextStyleMap = Record<HeadingTextToken, SerializedStyles>;
|
|
589
577
|
type BodyTextStyleMap = Record<BodyTextToken, SerializedStyles>;
|
|
590
578
|
type UITextStyleMap = Record<UITextToken, SerializedStyles>;
|
|
591
579
|
export declare const paddingStylesMap: SpacingStyleMap;
|
|
@@ -596,7 +584,6 @@ export declare const fontSizeStylesMap: FontSizeStyleMap;
|
|
|
596
584
|
export declare const fontWeightStylesMap: FontWeightStyleMap;
|
|
597
585
|
export declare const fontFamilyStylesMap: FontFamilyStyleMap;
|
|
598
586
|
export declare const lineHeightStylesMap: LineHeightStyleMap;
|
|
599
|
-
export declare const headingTextStylesMap: HeadingTextStyleMap;
|
|
600
587
|
export declare const bodyTextStylesMap: BodyTextStyleMap;
|
|
601
588
|
export declare const uiTextStylesMap: UITextStyleMap;
|
|
602
589
|
export declare const surfaceColorStylesMap: SurfaceColorStyleMap;
|
|
@@ -23,10 +23,10 @@ export type Dimension = keyof typeof dimensionMap;
|
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
25
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
26
|
-
* @codegen <<SignedSource::
|
|
26
|
+
* @codegen <<SignedSource::3cd327a4cd23dce8564f0b76a0d600ce>>
|
|
27
27
|
* @codegenId spacing
|
|
28
28
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
29
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
29
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
30
30
|
*/
|
|
31
31
|
export declare const spaceMap: {
|
|
32
32
|
'space.0': "var(--ds-space-0)";
|
|
@@ -62,11 +62,11 @@ export type NegativeSpace = keyof typeof negativeSpaceMap;
|
|
|
62
62
|
*/
|
|
63
63
|
/**
|
|
64
64
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
65
|
-
* @codegen <<SignedSource::
|
|
65
|
+
* @codegen <<SignedSource::b93d845e13422e2b25a860f34dc6882b>>
|
|
66
66
|
* @codegenId colors
|
|
67
67
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
68
68
|
* @codegenParams ["border", "background", "shadow", "text", "fill", "surface"]
|
|
69
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
69
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::5188ac15a9f4d65b80cf12e4eecac815>>
|
|
70
70
|
*/
|
|
71
71
|
export declare const borderColorMap: {
|
|
72
72
|
readonly 'color.border': "var(--ds-border)";
|
|
@@ -406,11 +406,11 @@ export type Layer = keyof typeof layerMap;
|
|
|
406
406
|
*/
|
|
407
407
|
/**
|
|
408
408
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
409
|
-
* @codegen <<SignedSource::
|
|
409
|
+
* @codegen <<SignedSource::d44c306cfe2334f9664fc122aa7d9fe6>>
|
|
410
410
|
* @codegenId border
|
|
411
411
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
412
412
|
* @codegenParams ["width", "radius"]
|
|
413
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::
|
|
413
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::80457377fd80c31f5dfcb5cc743d7016>>
|
|
414
414
|
*/
|
|
415
415
|
export declare const borderWidthMap: {
|
|
416
416
|
readonly 'border.width': "var(--ds-border-width)";
|
|
@@ -434,10 +434,10 @@ export type BorderRadius = keyof typeof borderRadiusMap;
|
|
|
434
434
|
*/
|
|
435
435
|
/**
|
|
436
436
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
437
|
-
* @codegen <<SignedSource::
|
|
437
|
+
* @codegen <<SignedSource::fc5fa2e6300ad8cc69d2ab1af222c4f5>>
|
|
438
438
|
* @codegenId typography
|
|
439
439
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
440
|
-
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "
|
|
440
|
+
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
441
441
|
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
|
|
442
442
|
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
|
|
443
443
|
*/
|
|
@@ -480,23 +480,13 @@ export declare const lineHeightMap: {
|
|
|
480
480
|
export type LineHeight = keyof typeof lineHeightMap;
|
|
481
481
|
export declare const bodyTextMap: {
|
|
482
482
|
body: "var(--ds-font-body)";
|
|
483
|
-
'body.
|
|
484
|
-
'body.
|
|
483
|
+
'body.large': "var(--ds-font-body-large)";
|
|
484
|
+
'body.small': "var(--ds-font-body-small)";
|
|
485
485
|
};
|
|
486
486
|
export type BodyText = keyof typeof bodyTextMap;
|
|
487
|
-
export declare const headingTextMap: {
|
|
488
|
-
'heading.lg': "var(--ds-font-heading-lg)";
|
|
489
|
-
'heading.md': "var(--ds-font-heading-md)";
|
|
490
|
-
'heading.sm': "var(--ds-font-heading-sm)";
|
|
491
|
-
'heading.xl': "var(--ds-font-heading-xl)";
|
|
492
|
-
'heading.xs': "var(--ds-font-heading-xs)";
|
|
493
|
-
'heading.xxl': "var(--ds-font-heading-xxl)";
|
|
494
|
-
'heading.xxs': "var(--ds-font-heading-xxs)";
|
|
495
|
-
};
|
|
496
|
-
export type HeadingText = keyof typeof headingTextMap;
|
|
497
487
|
export declare const uiTextMap: {
|
|
498
488
|
ui: "var(--ds-font-ui)";
|
|
499
|
-
'ui.
|
|
489
|
+
'ui.small': "var(--ds-font-ui-small)";
|
|
500
490
|
};
|
|
501
491
|
export type UiText = keyof typeof uiTextMap;
|
|
502
492
|
/**
|
|
@@ -585,7 +575,6 @@ type FontSizeToken = keyof typeof fontSizeMap;
|
|
|
585
575
|
type FontWeightToken = keyof typeof fontWeightMap;
|
|
586
576
|
type FontFamilyToken = keyof typeof fontFamilyMap;
|
|
587
577
|
type LineHeightToken = keyof typeof lineHeightMap;
|
|
588
|
-
type HeadingTextToken = keyof typeof headingTextMap;
|
|
589
578
|
type BodyTextToken = keyof typeof bodyTextMap;
|
|
590
579
|
type UITextToken = keyof typeof uiTextMap;
|
|
591
580
|
type SpacingStyleMap = Record<SpacingProperty, Record<SpacingToken, SerializedStyles>>;
|
|
@@ -596,7 +585,6 @@ type FontSizeStyleMap = Record<FontSizeToken, SerializedStyles>;
|
|
|
596
585
|
type FontWeightStyleMap = Record<FontWeightToken, SerializedStyles>;
|
|
597
586
|
type FontFamilyStyleMap = Record<FontFamilyToken, SerializedStyles>;
|
|
598
587
|
type LineHeightStyleMap = Record<LineHeightToken, SerializedStyles>;
|
|
599
|
-
type HeadingTextStyleMap = Record<HeadingTextToken, SerializedStyles>;
|
|
600
588
|
type BodyTextStyleMap = Record<BodyTextToken, SerializedStyles>;
|
|
601
589
|
type UITextStyleMap = Record<UITextToken, SerializedStyles>;
|
|
602
590
|
export declare const paddingStylesMap: SpacingStyleMap;
|
|
@@ -607,7 +595,6 @@ export declare const fontSizeStylesMap: FontSizeStyleMap;
|
|
|
607
595
|
export declare const fontWeightStylesMap: FontWeightStyleMap;
|
|
608
596
|
export declare const fontFamilyStylesMap: FontFamilyStyleMap;
|
|
609
597
|
export declare const lineHeightStylesMap: LineHeightStyleMap;
|
|
610
|
-
export declare const headingTextStylesMap: HeadingTextStyleMap;
|
|
611
598
|
export declare const bodyTextStylesMap: BodyTextStyleMap;
|
|
612
599
|
export declare const uiTextStylesMap: UITextStyleMap;
|
|
613
600
|
export declare const surfaceColorStylesMap: SurfaceColorStyleMap;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"codegen-styles": "ts-node -r tsconfig-paths/register ./scripts/codegen-styles.tsx"
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@atlaskit/tokens": "^1.
|
|
119
|
+
"@atlaskit/tokens": "^1.26.0",
|
|
120
120
|
"@babel/runtime": "^7.0.0",
|
|
121
121
|
"@emotion/react": "^11.7.1",
|
|
122
122
|
"@emotion/serialize": "^1.1.0",
|