@atlaskit/primitives 0.14.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/constellation/responsive/examples.mdx +51 -0
- package/constellation/responsive/usage.mdx +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{helpers/responsive → responsive}/build-media-query-css.js +41 -6
- package/dist/cjs/responsive/hide.js +35 -0
- package/dist/cjs/{helpers/responsive → responsive}/index.js +15 -1
- package/dist/cjs/responsive/show.js +38 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/xcss/xcss.js +2 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/responsive/build-media-query-css.js +76 -0
- package/dist/es2019/responsive/hide.js +28 -0
- package/dist/es2019/{helpers/responsive → responsive}/index.js +3 -1
- package/dist/es2019/responsive/show.js +31 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/xcss/xcss.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{helpers/responsive → responsive}/build-media-query-css.js +39 -5
- package/dist/esm/responsive/hide.js +28 -0
- package/dist/esm/{helpers/responsive → responsive}/index.js +3 -1
- package/dist/esm/responsive/show.js +31 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/xcss/xcss.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/responsive/build-media-query-css.d.ts +53 -0
- package/dist/types/responsive/hide.d.ts +39 -0
- package/dist/types/{helpers/responsive → responsive}/index.d.ts +2 -0
- package/dist/types/responsive/show.d.ts +39 -0
- package/dist/types/xcss/xcss.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/responsive/build-media-query-css.d.ts +53 -0
- package/dist/types-ts4.5/responsive/hide.d.ts +39 -0
- package/dist/types-ts4.5/{helpers/responsive → responsive}/index.d.ts +2 -0
- package/dist/types-ts4.5/responsive/show.d.ts +39 -0
- package/dist/types-ts4.5/xcss/xcss.d.ts +1 -1
- package/package.json +3 -3
- package/responsive/package.json +5 -5
- package/dist/es2019/helpers/responsive/build-media-query-css.js +0 -36
- package/dist/types/helpers/responsive/build-media-query-css.d.ts +0 -27
- package/dist/types-ts4.5/helpers/responsive/build-media-query-css.d.ts +0 -27
- /package/dist/cjs/{helpers/responsive → responsive}/constants.js +0 -0
- /package/dist/cjs/{helpers/responsive → responsive}/media-helper.js +0 -0
- /package/dist/cjs/{helpers/responsive → responsive}/types.js +0 -0
- /package/dist/cjs/{helpers/responsive → responsive}/use-media-query.js +0 -0
- /package/dist/es2019/{helpers/responsive → responsive}/constants.js +0 -0
- /package/dist/es2019/{helpers/responsive → responsive}/media-helper.js +0 -0
- /package/dist/es2019/{helpers/responsive → responsive}/types.js +0 -0
- /package/dist/es2019/{helpers/responsive → responsive}/use-media-query.js +0 -0
- /package/dist/esm/{helpers/responsive → responsive}/constants.js +0 -0
- /package/dist/esm/{helpers/responsive → responsive}/media-helper.js +0 -0
- /package/dist/esm/{helpers/responsive → responsive}/types.js +0 -0
- /package/dist/esm/{helpers/responsive → responsive}/use-media-query.js +0 -0
- /package/dist/types/{helpers/responsive → responsive}/constants.d.ts +0 -0
- /package/dist/types/{helpers/responsive → responsive}/media-helper.d.ts +0 -0
- /package/dist/types/{helpers/responsive → responsive}/types.d.ts +0 -0
- /package/dist/types/{helpers/responsive → responsive}/use-media-query.d.ts +0 -0
- /package/dist/types-ts4.5/{helpers/responsive → responsive}/constants.d.ts +0 -0
- /package/dist/types-ts4.5/{helpers/responsive → responsive}/media-helper.d.ts +0 -0
- /package/dist/types-ts4.5/{helpers/responsive → responsive}/types.d.ts +0 -0
- /package/dist/types-ts4.5/{helpers/responsive → responsive}/use-media-query.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8b04f3e78bd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b04f3e78bd) - Adds basic `<Show>` and `<Hide>` responsive primitive components to make consistent, composable UIs without writing a dozen lines for just one `display: none` css rule.
|
|
8
|
+
|
|
9
|
+
Additionally:
|
|
10
|
+
|
|
11
|
+
- Adds some further examples, tests, and VRs.
|
|
12
|
+
- Tweaks some internals around building these reusable media query maps.
|
|
13
|
+
|
|
3
14
|
## 0.14.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Responsive
|
|
3
|
+
description: Responsive helpers and primitives to build responsive UIs with
|
|
4
|
+
order: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import CSSExample from '../../examples/constellation/responsive/css';
|
|
8
|
+
import XCSSExample from '../../examples/constellation/responsive/xcss';
|
|
9
|
+
import ShowExample from '../../examples/constellation/responsive/show';
|
|
10
|
+
import HideExample from '../../examples/constellation/responsive/hide';
|
|
11
|
+
import ShowHideExample from '../../examples/constellation/responsive/show-hide';
|
|
12
|
+
|
|
13
|
+
## Responsive `css` or `xcss`
|
|
14
|
+
|
|
15
|
+
Utilize our media queries exposed in `css`, `styled`, or `xcss` as computed keys to build responsive UIs. Learn more about these media query exports in [usage](/components/primitives/responsive/usage).
|
|
16
|
+
|
|
17
|
+
### Using with `xcss`
|
|
18
|
+
|
|
19
|
+
Please use `xcss` whenever possible to ensure consistency and safety with style overrides. Read more at [xcss](/components/primitives/xcss)
|
|
20
|
+
|
|
21
|
+
<Example Component={XCSSExample} packageName="@atlaskit/primitives/responsive" />
|
|
22
|
+
|
|
23
|
+
### Using with `css`
|
|
24
|
+
<Example Component={CSSExample} packageName="@atlaskit/primitives/responsive" />
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Responsive primitives
|
|
28
|
+
|
|
29
|
+
Consider these shortcuts to writing your own custom media queries. Composing with our primitives will be far quicker and consistent to implement, but may result in excess DOM nodes.
|
|
30
|
+
|
|
31
|
+
### Show
|
|
32
|
+
|
|
33
|
+
This allows you to Show the children using CSS `display: …` either above or below a breakpoint. By default, unless the breakpoint is met, contents are hidden.
|
|
34
|
+
|
|
35
|
+
Note that this does not skip rendering of your children; the contents are rendered into the DOM at all times, so there is typically little performance savings—primarily that this is not painted.
|
|
36
|
+
|
|
37
|
+
<Example Component={ShowExample} packageName="@atlaskit/primitives/responsive" />
|
|
38
|
+
|
|
39
|
+
### Hide
|
|
40
|
+
|
|
41
|
+
This allows you to Hide the children using CSS `display: none` either above or below a breakpoint. By default, unless the breakpoint is met, contents are hidden.
|
|
42
|
+
|
|
43
|
+
When hidden, this does not skip rendering of your children; the contents are rendered into the DOM at all times so there is typically little performance savings—primarily that this is not painted.
|
|
44
|
+
|
|
45
|
+
<Example Component={HideExample} packageName="@atlaskit/primitives/responsive" />
|
|
46
|
+
|
|
47
|
+
### Mixing Show and Hide
|
|
48
|
+
|
|
49
|
+
Prefer using consistent `above` or `below` for readability and consistency.
|
|
50
|
+
|
|
51
|
+
<Example Component={ShowHideExample} packageName="@atlaskit/primitives/responsive" />
|
package/dist/cjs/index.js
CHANGED
|
@@ -44,4 +44,4 @@ var _box = _interopRequireDefault(require("./components/box"));
|
|
|
44
44
|
var _inline = _interopRequireDefault(require("./components/inline"));
|
|
45
45
|
var _xcss = require("./xcss/xcss");
|
|
46
46
|
var _stack = _interopRequireDefault(require("./components/stack"));
|
|
47
|
-
var _responsive = require("./
|
|
47
|
+
var _responsive = require("./responsive");
|
|
@@ -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.UNSAFE_buildAboveMediaQueryCSS = void 0;
|
|
7
|
+
exports.UNSAFE_buildBelowMediaQueryCSS = exports.UNSAFE_buildAboveMediaQueryCSS = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _constants = require("./constants");
|
|
@@ -14,7 +14,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
14
14
|
/**
|
|
15
15
|
* Build a map of breakpoints to css with media queries and nested styles.
|
|
16
16
|
*
|
|
17
|
-
* @
|
|
17
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
18
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
18
19
|
*
|
|
19
20
|
* @example
|
|
20
21
|
* A map to build optional `display:none` for consumption on a div.
|
|
@@ -29,9 +30,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
29
30
|
* This roughly builds a map that will look roughly like this (if done manually):
|
|
30
31
|
* ```ts
|
|
31
32
|
* {
|
|
32
|
-
* xxs: css({ '@media
|
|
33
|
-
* xs: css({ '@media (min-width:
|
|
34
|
-
* sm: css({ '@media (min-width:
|
|
33
|
+
* xxs: css({ '@media all': { display: 'none' } }),
|
|
34
|
+
* xs: css({ '@media (min-width: 30rem)': { display: 'none' } }),
|
|
35
|
+
* sm: css({ '@media (min-width: 48rem)': { display: 'none' } }),
|
|
35
36
|
* }
|
|
36
37
|
* ```
|
|
37
38
|
*/
|
|
@@ -40,4 +41,38 @@ var UNSAFE_buildAboveMediaQueryCSS = function UNSAFE_buildAboveMediaQueryCSS(inp
|
|
|
40
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))));
|
|
41
42
|
}, {});
|
|
42
43
|
};
|
|
43
|
-
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
47
|
+
*
|
|
48
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
49
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
53
|
+
* ```ts
|
|
54
|
+
* const hideMediaQueries = buildBelowMediaQueryCSS({ display: 'none' });
|
|
55
|
+
*
|
|
56
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
57
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
62
|
+
* ```ts
|
|
63
|
+
* {
|
|
64
|
+
* xs: css({ '@media not all and (min-width: 30rem)': { display: 'none' } }),
|
|
65
|
+
* sm: css({ '@media not all and (min-width: 48rem)': { display: 'none' } }),
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
exports.UNSAFE_buildAboveMediaQueryCSS = UNSAFE_buildAboveMediaQueryCSS;
|
|
70
|
+
var UNSAFE_buildBelowMediaQueryCSS = function UNSAFE_buildBelowMediaQueryCSS(input) {
|
|
71
|
+
return _constants.UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce(function (acc, breakpoint) {
|
|
72
|
+
if (breakpoint === 'xxs') {
|
|
73
|
+
return acc;
|
|
74
|
+
}
|
|
75
|
+
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
|
+
}, {});
|
|
77
|
+
};
|
|
78
|
+
exports.UNSAFE_buildBelowMediaQueryCSS = UNSAFE_buildBelowMediaQueryCSS;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Hide = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _buildMediaQueryCss = require("./build-media-query-css");
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
|
|
11
|
+
var hideAboveQueries = (0, _buildMediaQueryCss.UNSAFE_buildAboveMediaQueryCSS)({
|
|
12
|
+
display: 'none'
|
|
13
|
+
});
|
|
14
|
+
var hideBelowQueries = (0, _buildMediaQueryCss.UNSAFE_buildBelowMediaQueryCSS)({
|
|
15
|
+
display: 'none'
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Hides the content at a given breakpoint. By default, content is shown. The primary use case is for visual presentation.
|
|
19
|
+
* Mix `<Hide above="md">` with `<Show above="md">` to achieve content that shifts at a breakpoint.
|
|
20
|
+
*
|
|
21
|
+
* Please note:
|
|
22
|
+
* - This only uses `display: none` hide, it does not skip rendering of children trees.
|
|
23
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
24
|
+
*/
|
|
25
|
+
var Hide = function Hide(_ref) {
|
|
26
|
+
var above = _ref.above,
|
|
27
|
+
below = _ref.below,
|
|
28
|
+
children = _ref.children,
|
|
29
|
+
_ref$as = _ref.as,
|
|
30
|
+
AsElement = _ref$as === void 0 ? 'div' : _ref$as;
|
|
31
|
+
return (0, _react.jsx)(AsElement, {
|
|
32
|
+
css: [above && hideAboveQueries[above], below && hideBelowQueries[below]]
|
|
33
|
+
}, children);
|
|
34
|
+
};
|
|
35
|
+
exports.Hide = Hide;
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "Hide", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _hide.Hide;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Show", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _show.Show;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
6
18
|
Object.defineProperty(exports, "UNSAFE_BREAKPOINTS_CONFIG", {
|
|
7
19
|
enumerable: true,
|
|
8
20
|
get: function get() {
|
|
@@ -42,4 +54,6 @@ Object.defineProperty(exports, "media", {
|
|
|
42
54
|
var _mediaHelper = require("./media-helper");
|
|
43
55
|
var _buildMediaQueryCss = require("./build-media-query-css");
|
|
44
56
|
var _constants = require("./constants");
|
|
45
|
-
var _useMediaQuery = require("./use-media-query");
|
|
57
|
+
var _useMediaQuery = require("./use-media-query");
|
|
58
|
+
var _show = require("./show");
|
|
59
|
+
var _hide = require("./hide");
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Show = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _buildMediaQueryCss = require("./build-media-query-css");
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
|
|
11
|
+
var showAboveQueries = (0, _buildMediaQueryCss.UNSAFE_buildAboveMediaQueryCSS)({
|
|
12
|
+
display: 'revert'
|
|
13
|
+
});
|
|
14
|
+
var showBelowQueries = (0, _buildMediaQueryCss.UNSAFE_buildBelowMediaQueryCSS)({
|
|
15
|
+
display: 'revert'
|
|
16
|
+
});
|
|
17
|
+
var defaultHiddenStyles = (0, _react.css)({
|
|
18
|
+
display: 'none'
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Shows the content at a given breakpoint. By default, content is hidden. The primary use case is for visual presentation.
|
|
22
|
+
* Mix `<Show above="md">` with `<Hide above="md">` to achieve content that shifts at a breakpoint.
|
|
23
|
+
*
|
|
24
|
+
* Please note:
|
|
25
|
+
* - This only uses `display: none` and `display: revert` to show/hide, it does not skip rendering of children trees.
|
|
26
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
27
|
+
*/
|
|
28
|
+
var Show = function Show(_ref) {
|
|
29
|
+
var above = _ref.above,
|
|
30
|
+
below = _ref.below,
|
|
31
|
+
children = _ref.children,
|
|
32
|
+
_ref$as = _ref.as,
|
|
33
|
+
AsElement = _ref$as === void 0 ? 'div' : _ref$as;
|
|
34
|
+
return (0, _react.jsx)(AsElement, {
|
|
35
|
+
css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below]]
|
|
36
|
+
}, children);
|
|
37
|
+
};
|
|
38
|
+
exports.Show = Show;
|
package/dist/cjs/version.json
CHANGED
package/dist/cjs/xcss/xcss.js
CHANGED
|
@@ -11,7 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
12
12
|
var _react = require("@emotion/react");
|
|
13
13
|
var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
14
|
-
var
|
|
14
|
+
var _mediaHelper = require("../responsive/media-helper");
|
|
15
15
|
var _styleMaps = require("./style-maps.partial");
|
|
16
16
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
17
17
|
|
|
@@ -82,7 +82,7 @@ var reMediaQuery = /^@media .*$/;
|
|
|
82
82
|
/**
|
|
83
83
|
* Reduce our media queries into a safe string for regex comparison.
|
|
84
84
|
*/
|
|
85
|
-
var reValidMediaQuery = new RegExp("^(".concat(Object.values(
|
|
85
|
+
var reValidMediaQuery = new RegExp("^(".concat(Object.values(_mediaHelper.media.above).map(function (mediaQuery) {
|
|
86
86
|
return mediaQuery.replace(/[.()]/g, '\\$&');
|
|
87
87
|
} // Escape the ".", "(", and ")" in the media query syntax.
|
|
88
88
|
).join('|'), ")$"));
|
package/dist/es2019/index.js
CHANGED
|
@@ -2,4 +2,4 @@ export { default as Box } from './components/box';
|
|
|
2
2
|
export { default as Inline } from './components/inline';
|
|
3
3
|
export { xcss } from './xcss/xcss';
|
|
4
4
|
export { default as Stack } from './components/stack';
|
|
5
|
-
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './
|
|
5
|
+
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { UNSAFE_BREAKPOINTS_ORDERED_LIST } from './constants';
|
|
3
|
+
import { media, UNSAFE_media } from './media-helper';
|
|
4
|
+
/**
|
|
5
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
6
|
+
*
|
|
7
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
8
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
12
|
+
* ```ts
|
|
13
|
+
* const hideMediaQueries = buildAboveMediaQueryCSS({ display: 'none' });
|
|
14
|
+
*
|
|
15
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
16
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
21
|
+
* ```ts
|
|
22
|
+
* {
|
|
23
|
+
* xxs: css({ '@media all': { display: 'none' } }),
|
|
24
|
+
* xs: css({ '@media (min-width: 30rem)': { display: 'none' } }),
|
|
25
|
+
* sm: css({ '@media (min-width: 48rem)': { display: 'none' } }),
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export const UNSAFE_buildAboveMediaQueryCSS = input => {
|
|
30
|
+
return UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce((acc, breakpoint) => ({
|
|
31
|
+
...acc,
|
|
32
|
+
[breakpoint]: css({
|
|
33
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
34
|
+
[media.above[breakpoint]]: typeof input === 'function' ? input(breakpoint) : input
|
|
35
|
+
})
|
|
36
|
+
}), {});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
41
|
+
*
|
|
42
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
43
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
47
|
+
* ```ts
|
|
48
|
+
* const hideMediaQueries = buildBelowMediaQueryCSS({ display: 'none' });
|
|
49
|
+
*
|
|
50
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
51
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
56
|
+
* ```ts
|
|
57
|
+
* {
|
|
58
|
+
* xs: css({ '@media not all and (min-width: 30rem)': { display: 'none' } }),
|
|
59
|
+
* sm: css({ '@media not all and (min-width: 48rem)': { display: 'none' } }),
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export const UNSAFE_buildBelowMediaQueryCSS = input => {
|
|
64
|
+
return UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce((acc, breakpoint) => {
|
|
65
|
+
if (breakpoint === 'xxs') {
|
|
66
|
+
return acc;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
...acc,
|
|
70
|
+
[breakpoint]: css({
|
|
71
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
72
|
+
[UNSAFE_media.below[breakpoint]]: typeof input === 'function' ? input(breakpoint) : input
|
|
73
|
+
})
|
|
74
|
+
};
|
|
75
|
+
}, {});
|
|
76
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { UNSAFE_buildAboveMediaQueryCSS, UNSAFE_buildBelowMediaQueryCSS } from './build-media-query-css';
|
|
5
|
+
const hideAboveQueries = UNSAFE_buildAboveMediaQueryCSS({
|
|
6
|
+
display: 'none'
|
|
7
|
+
});
|
|
8
|
+
const hideBelowQueries = UNSAFE_buildBelowMediaQueryCSS({
|
|
9
|
+
display: 'none'
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Hides the content at a given breakpoint. By default, content is shown. The primary use case is for visual presentation.
|
|
13
|
+
* Mix `<Hide above="md">` with `<Show above="md">` to achieve content that shifts at a breakpoint.
|
|
14
|
+
*
|
|
15
|
+
* Please note:
|
|
16
|
+
* - This only uses `display: none` hide, it does not skip rendering of children trees.
|
|
17
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
18
|
+
*/
|
|
19
|
+
export const Hide = ({
|
|
20
|
+
above,
|
|
21
|
+
below,
|
|
22
|
+
children,
|
|
23
|
+
as: AsElement = 'div'
|
|
24
|
+
}) => {
|
|
25
|
+
return jsx(AsElement, {
|
|
26
|
+
css: [above && hideAboveQueries[above], below && hideBelowQueries[below]]
|
|
27
|
+
}, children);
|
|
28
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { media, UNSAFE_media } from './media-helper';
|
|
2
2
|
export { UNSAFE_buildAboveMediaQueryCSS } from './build-media-query-css';
|
|
3
3
|
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG } from './constants';
|
|
4
|
-
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
4
|
+
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
5
|
+
export { Show } from './show';
|
|
6
|
+
export { Hide } from './hide';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import { UNSAFE_buildAboveMediaQueryCSS, UNSAFE_buildBelowMediaQueryCSS } from './build-media-query-css';
|
|
5
|
+
const showAboveQueries = UNSAFE_buildAboveMediaQueryCSS({
|
|
6
|
+
display: 'revert'
|
|
7
|
+
});
|
|
8
|
+
const showBelowQueries = UNSAFE_buildBelowMediaQueryCSS({
|
|
9
|
+
display: 'revert'
|
|
10
|
+
});
|
|
11
|
+
const defaultHiddenStyles = css({
|
|
12
|
+
display: 'none'
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Shows the content at a given breakpoint. By default, content is hidden. The primary use case is for visual presentation.
|
|
16
|
+
* Mix `<Show above="md">` with `<Hide above="md">` to achieve content that shifts at a breakpoint.
|
|
17
|
+
*
|
|
18
|
+
* Please note:
|
|
19
|
+
* - This only uses `display: none` and `display: revert` to show/hide, it does not skip rendering of children trees.
|
|
20
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
21
|
+
*/
|
|
22
|
+
export const Show = ({
|
|
23
|
+
above,
|
|
24
|
+
below,
|
|
25
|
+
children,
|
|
26
|
+
as: AsElement = 'div'
|
|
27
|
+
}) => {
|
|
28
|
+
return jsx(AsElement, {
|
|
29
|
+
css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below]]
|
|
30
|
+
}, children);
|
|
31
|
+
};
|
package/dist/es2019/version.json
CHANGED
package/dist/es2019/xcss/xcss.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
2
|
import { css as cssEmotion } from '@emotion/react';
|
|
3
3
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
4
|
-
import { media } from '../
|
|
4
|
+
import { media } from '../responsive/media-helper';
|
|
5
5
|
import { backgroundColorMap, borderColorMap, borderRadiusMap, borderWidthMap, dimensionMap, layerMap, shadowMap, spaceMap, textColorMap } from './style-maps.partial';
|
|
6
6
|
const tokensMap = {
|
|
7
7
|
backgroundColor: backgroundColorMap,
|
package/dist/esm/index.js
CHANGED
|
@@ -2,4 +2,4 @@ export { default as Box } from './components/box';
|
|
|
2
2
|
export { default as Inline } from './components/inline';
|
|
3
3
|
export { xcss } from './xcss/xcss';
|
|
4
4
|
export { default as Stack } from './components/stack';
|
|
5
|
-
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './
|
|
5
|
+
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
@@ -3,11 +3,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { UNSAFE_BREAKPOINTS_ORDERED_LIST } from './constants';
|
|
6
|
-
import { media } from './media-helper';
|
|
6
|
+
import { media, UNSAFE_media } from './media-helper';
|
|
7
7
|
/**
|
|
8
8
|
* Build a map of breakpoints to css with media queries and nested styles.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
11
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* A map to build optional `display:none` for consumption on a div.
|
|
@@ -22,9 +23,9 @@ import { media } from './media-helper';
|
|
|
22
23
|
* This roughly builds a map that will look roughly like this (if done manually):
|
|
23
24
|
* ```ts
|
|
24
25
|
* {
|
|
25
|
-
* xxs: css({ '@media
|
|
26
|
-
* xs: css({ '@media (min-width:
|
|
27
|
-
* sm: css({ '@media (min-width:
|
|
26
|
+
* xxs: css({ '@media all': { display: 'none' } }),
|
|
27
|
+
* xs: css({ '@media (min-width: 30rem)': { display: 'none' } }),
|
|
28
|
+
* sm: css({ '@media (min-width: 48rem)': { display: 'none' } }),
|
|
28
29
|
* }
|
|
29
30
|
* ```
|
|
30
31
|
*/
|
|
@@ -32,4 +33,37 @@ export var UNSAFE_buildAboveMediaQueryCSS = function UNSAFE_buildAboveMediaQuery
|
|
|
32
33
|
return UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce(function (acc, breakpoint) {
|
|
33
34
|
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, breakpoint, css(_defineProperty({}, media.above[breakpoint], typeof input === 'function' ? input(breakpoint) : input))));
|
|
34
35
|
}, {});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
40
|
+
*
|
|
41
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
42
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
46
|
+
* ```ts
|
|
47
|
+
* const hideMediaQueries = buildBelowMediaQueryCSS({ display: 'none' });
|
|
48
|
+
*
|
|
49
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
50
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
55
|
+
* ```ts
|
|
56
|
+
* {
|
|
57
|
+
* xs: css({ '@media not all and (min-width: 30rem)': { display: 'none' } }),
|
|
58
|
+
* sm: css({ '@media not all and (min-width: 48rem)': { display: 'none' } }),
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export var UNSAFE_buildBelowMediaQueryCSS = function UNSAFE_buildBelowMediaQueryCSS(input) {
|
|
63
|
+
return UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce(function (acc, breakpoint) {
|
|
64
|
+
if (breakpoint === 'xxs') {
|
|
65
|
+
return acc;
|
|
66
|
+
}
|
|
67
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, breakpoint, css(_defineProperty({}, UNSAFE_media.below[breakpoint], typeof input === 'function' ? input(breakpoint) : input))));
|
|
68
|
+
}, {});
|
|
35
69
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { UNSAFE_buildAboveMediaQueryCSS, UNSAFE_buildBelowMediaQueryCSS } from './build-media-query-css';
|
|
5
|
+
var hideAboveQueries = UNSAFE_buildAboveMediaQueryCSS({
|
|
6
|
+
display: 'none'
|
|
7
|
+
});
|
|
8
|
+
var hideBelowQueries = UNSAFE_buildBelowMediaQueryCSS({
|
|
9
|
+
display: 'none'
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Hides the content at a given breakpoint. By default, content is shown. The primary use case is for visual presentation.
|
|
13
|
+
* Mix `<Hide above="md">` with `<Show above="md">` to achieve content that shifts at a breakpoint.
|
|
14
|
+
*
|
|
15
|
+
* Please note:
|
|
16
|
+
* - This only uses `display: none` hide, it does not skip rendering of children trees.
|
|
17
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
18
|
+
*/
|
|
19
|
+
export var Hide = function Hide(_ref) {
|
|
20
|
+
var above = _ref.above,
|
|
21
|
+
below = _ref.below,
|
|
22
|
+
children = _ref.children,
|
|
23
|
+
_ref$as = _ref.as,
|
|
24
|
+
AsElement = _ref$as === void 0 ? 'div' : _ref$as;
|
|
25
|
+
return jsx(AsElement, {
|
|
26
|
+
css: [above && hideAboveQueries[above], below && hideBelowQueries[below]]
|
|
27
|
+
}, children);
|
|
28
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { media, UNSAFE_media } from './media-helper';
|
|
2
2
|
export { UNSAFE_buildAboveMediaQueryCSS } from './build-media-query-css';
|
|
3
3
|
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG } from './constants';
|
|
4
|
-
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
4
|
+
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
5
|
+
export { Show } from './show';
|
|
6
|
+
export { Hide } from './hide';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import { UNSAFE_buildAboveMediaQueryCSS, UNSAFE_buildBelowMediaQueryCSS } from './build-media-query-css';
|
|
5
|
+
var showAboveQueries = UNSAFE_buildAboveMediaQueryCSS({
|
|
6
|
+
display: 'revert'
|
|
7
|
+
});
|
|
8
|
+
var showBelowQueries = UNSAFE_buildBelowMediaQueryCSS({
|
|
9
|
+
display: 'revert'
|
|
10
|
+
});
|
|
11
|
+
var defaultHiddenStyles = css({
|
|
12
|
+
display: 'none'
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Shows the content at a given breakpoint. By default, content is hidden. The primary use case is for visual presentation.
|
|
16
|
+
* Mix `<Show above="md">` with `<Hide above="md">` to achieve content that shifts at a breakpoint.
|
|
17
|
+
*
|
|
18
|
+
* Please note:
|
|
19
|
+
* - This only uses `display: none` and `display: revert` to show/hide, it does not skip rendering of children trees.
|
|
20
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
21
|
+
*/
|
|
22
|
+
export var Show = function Show(_ref) {
|
|
23
|
+
var above = _ref.above,
|
|
24
|
+
below = _ref.below,
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
_ref$as = _ref.as,
|
|
27
|
+
AsElement = _ref$as === void 0 ? 'div' : _ref$as;
|
|
28
|
+
return jsx(AsElement, {
|
|
29
|
+
css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below]]
|
|
30
|
+
}, children);
|
|
31
|
+
};
|
package/dist/esm/version.json
CHANGED
package/dist/esm/xcss/xcss.js
CHANGED
|
@@ -4,7 +4,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
4
4
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
5
5
|
import { css as cssEmotion } from '@emotion/react';
|
|
6
6
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
7
|
-
import { media } from '../
|
|
7
|
+
import { media } from '../responsive/media-helper';
|
|
8
8
|
import { backgroundColorMap, borderColorMap, borderRadiusMap, borderWidthMap, dimensionMap, layerMap, shadowMap, spaceMap, textColorMap } from './style-maps.partial';
|
|
9
9
|
var tokensMap = {
|
|
10
10
|
backgroundColor: backgroundColorMap,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { default as Box, type BoxProps } from './components/box';
|
|
|
2
2
|
export { default as Inline, type InlineProps } from './components/inline';
|
|
3
3
|
export { xcss } from './xcss/xcss';
|
|
4
4
|
export { default as Stack, type StackProps } from './components/stack';
|
|
5
|
-
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG, type Breakpoint, } from './
|
|
5
|
+
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG, type Breakpoint, } from './responsive';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
2
|
+
import type { Breakpoint } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
5
|
+
*
|
|
6
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
7
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
11
|
+
* ```ts
|
|
12
|
+
* const hideMediaQueries = buildAboveMediaQueryCSS({ display: 'none' });
|
|
13
|
+
*
|
|
14
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
15
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
20
|
+
* ```ts
|
|
21
|
+
* {
|
|
22
|
+
* xxs: css({ '@media all': { display: 'none' } }),
|
|
23
|
+
* xs: css({ '@media (min-width: 30rem)': { display: 'none' } }),
|
|
24
|
+
* sm: css({ '@media (min-width: 48rem)': { display: 'none' } }),
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const UNSAFE_buildAboveMediaQueryCSS: (input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, import("@emotion/react").SerializedStyles>>>;
|
|
29
|
+
/**
|
|
30
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
31
|
+
*
|
|
32
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
33
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
37
|
+
* ```ts
|
|
38
|
+
* const hideMediaQueries = buildBelowMediaQueryCSS({ display: 'none' });
|
|
39
|
+
*
|
|
40
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
41
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
46
|
+
* ```ts
|
|
47
|
+
* {
|
|
48
|
+
* xs: css({ '@media not all and (min-width: 30rem)': { display: 'none' } }),
|
|
49
|
+
* sm: css({ '@media not all and (min-width: 48rem)': { display: 'none' } }),
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const UNSAFE_buildBelowMediaQueryCSS: (input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, import("@emotion/react").SerializedStyles>>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { Breakpoint } from './types';
|
|
5
|
+
type As = 'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul';
|
|
6
|
+
type ResponsiveHideProps = {
|
|
7
|
+
as?: As;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Apply CSS to hide this specifically **above** this breakpoint.
|
|
11
|
+
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
12
|
+
*
|
|
13
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
14
|
+
*/
|
|
15
|
+
above?: Exclude<Breakpoint, 'xxs'>;
|
|
16
|
+
/**
|
|
17
|
+
* Apply CSS to hide this specifically **below** this breakpoint.
|
|
18
|
+
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
19
|
+
*
|
|
20
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
21
|
+
*/
|
|
22
|
+
below?: Exclude<Breakpoint, 'xxs'>;
|
|
23
|
+
} & ({
|
|
24
|
+
above?: never;
|
|
25
|
+
below: Exclude<Breakpoint, 'xxs'>;
|
|
26
|
+
} | {
|
|
27
|
+
above: Exclude<Breakpoint, 'xxs'>;
|
|
28
|
+
below?: never;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Hides the content at a given breakpoint. By default, content is shown. The primary use case is for visual presentation.
|
|
32
|
+
* Mix `<Hide above="md">` with `<Show above="md">` to achieve content that shifts at a breakpoint.
|
|
33
|
+
*
|
|
34
|
+
* Please note:
|
|
35
|
+
* - This only uses `display: none` hide, it does not skip rendering of children trees.
|
|
36
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
37
|
+
*/
|
|
38
|
+
export declare const Hide: ({ above, below, children, as: AsElement, }: ResponsiveHideProps) => jsx.JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -3,3 +3,5 @@ export { UNSAFE_buildAboveMediaQueryCSS } from './build-media-query-css';
|
|
|
3
3
|
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG, } from './constants';
|
|
4
4
|
export type { Breakpoint, ResponsiveObject, ResponsiveCSSObject, } from './types';
|
|
5
5
|
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
6
|
+
export { Show } from './show';
|
|
7
|
+
export { Hide } from './hide';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { Breakpoint } from './types';
|
|
5
|
+
type As = 'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul';
|
|
6
|
+
type ResponsiveShowProps = {
|
|
7
|
+
as?: As;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Apply CSS to show this specifically **above** this breakpoint.
|
|
11
|
+
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
12
|
+
*
|
|
13
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
14
|
+
*/
|
|
15
|
+
above?: Exclude<Breakpoint, 'xxs'>;
|
|
16
|
+
/**
|
|
17
|
+
* Apply CSS to show this specifically **below** this breakpoint.
|
|
18
|
+
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
19
|
+
*
|
|
20
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
21
|
+
*/
|
|
22
|
+
below?: Exclude<Breakpoint, 'xxs'>;
|
|
23
|
+
} & ({
|
|
24
|
+
above?: never;
|
|
25
|
+
below: Exclude<Breakpoint, 'xxs'>;
|
|
26
|
+
} | {
|
|
27
|
+
above: Exclude<Breakpoint, 'xxs'>;
|
|
28
|
+
below?: never;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Shows the content at a given breakpoint. By default, content is hidden. The primary use case is for visual presentation.
|
|
32
|
+
* Mix `<Show above="md">` with `<Hide above="md">` to achieve content that shifts at a breakpoint.
|
|
33
|
+
*
|
|
34
|
+
* Please note:
|
|
35
|
+
* - This only uses `display: none` and `display: revert` to show/hide, it does not skip rendering of children trees.
|
|
36
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
37
|
+
*/
|
|
38
|
+
export declare const Show: ({ above, below, children, as: AsElement, }: ResponsiveShowProps) => jsx.JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { css as cssEmotion } from '@emotion/react';
|
|
3
3
|
import { CSSPropertiesWithMultiValues, SerializedStyles } from '@emotion/serialize';
|
|
4
4
|
import type * as CSS from 'csstype';
|
|
5
|
-
import { MediaQuery } from '../helpers/responsive/types';
|
|
6
5
|
import { Box, Inline } from '../index';
|
|
6
|
+
import type { MediaQuery } from '../responsive/types';
|
|
7
7
|
import { TokenisedProps } from './style-maps.partial';
|
|
8
8
|
declare const uniqueSymbol: unique symbol;
|
|
9
9
|
/**
|
|
@@ -2,4 +2,4 @@ export { default as Box, type BoxProps } from './components/box';
|
|
|
2
2
|
export { default as Inline, type InlineProps } from './components/inline';
|
|
3
3
|
export { xcss } from './xcss/xcss';
|
|
4
4
|
export { default as Stack, type StackProps } from './components/stack';
|
|
5
|
-
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG, type Breakpoint, } from './
|
|
5
|
+
export { UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG, type Breakpoint, } from './responsive';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
2
|
+
import type { Breakpoint } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
5
|
+
*
|
|
6
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
7
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
11
|
+
* ```ts
|
|
12
|
+
* const hideMediaQueries = buildAboveMediaQueryCSS({ display: 'none' });
|
|
13
|
+
*
|
|
14
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
15
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
20
|
+
* ```ts
|
|
21
|
+
* {
|
|
22
|
+
* xxs: css({ '@media all': { display: 'none' } }),
|
|
23
|
+
* xs: css({ '@media (min-width: 30rem)': { display: 'none' } }),
|
|
24
|
+
* sm: css({ '@media (min-width: 48rem)': { display: 'none' } }),
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const UNSAFE_buildAboveMediaQueryCSS: (input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, import("@emotion/react").SerializedStyles>>>;
|
|
29
|
+
/**
|
|
30
|
+
* Build a map of breakpoints to css with media queries and nested styles.
|
|
31
|
+
*
|
|
32
|
+
* @internal Not intended to be used outside of DST at this stage.
|
|
33
|
+
* @experimental Not intended to be used outside of DST at this stage.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* A map to build optional `display:none` for consumption on a div.
|
|
37
|
+
* ```ts
|
|
38
|
+
* const hideMediaQueries = buildBelowMediaQueryCSS({ display: 'none' });
|
|
39
|
+
*
|
|
40
|
+
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
41
|
+
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* This roughly builds a map that will look roughly like this (if done manually):
|
|
46
|
+
* ```ts
|
|
47
|
+
* {
|
|
48
|
+
* xs: css({ '@media not all and (min-width: 30rem)': { display: 'none' } }),
|
|
49
|
+
* sm: css({ '@media not all and (min-width: 48rem)': { display: 'none' } }),
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const UNSAFE_buildBelowMediaQueryCSS: (input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, import("@emotion/react").SerializedStyles>>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { Breakpoint } from './types';
|
|
5
|
+
type As = 'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul';
|
|
6
|
+
type ResponsiveHideProps = {
|
|
7
|
+
as?: As;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Apply CSS to hide this specifically **above** this breakpoint.
|
|
11
|
+
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
12
|
+
*
|
|
13
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
14
|
+
*/
|
|
15
|
+
above?: Exclude<Breakpoint, 'xxs'>;
|
|
16
|
+
/**
|
|
17
|
+
* Apply CSS to hide this specifically **below** this breakpoint.
|
|
18
|
+
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
19
|
+
*
|
|
20
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
21
|
+
*/
|
|
22
|
+
below?: Exclude<Breakpoint, 'xxs'>;
|
|
23
|
+
} & ({
|
|
24
|
+
above?: never;
|
|
25
|
+
below: Exclude<Breakpoint, 'xxs'>;
|
|
26
|
+
} | {
|
|
27
|
+
above: Exclude<Breakpoint, 'xxs'>;
|
|
28
|
+
below?: never;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Hides the content at a given breakpoint. By default, content is shown. The primary use case is for visual presentation.
|
|
32
|
+
* Mix `<Hide above="md">` with `<Show above="md">` to achieve content that shifts at a breakpoint.
|
|
33
|
+
*
|
|
34
|
+
* Please note:
|
|
35
|
+
* - This only uses `display: none` hide, it does not skip rendering of children trees.
|
|
36
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
37
|
+
*/
|
|
38
|
+
export declare const Hide: ({ above, below, children, as: AsElement, }: ResponsiveHideProps) => jsx.JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -3,3 +3,5 @@ export { UNSAFE_buildAboveMediaQueryCSS } from './build-media-query-css';
|
|
|
3
3
|
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG, } from './constants';
|
|
4
4
|
export type { Breakpoint, ResponsiveObject, ResponsiveCSSObject, } from './types';
|
|
5
5
|
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
6
|
+
export { Show } from './show';
|
|
7
|
+
export { Hide } from './hide';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { Breakpoint } from './types';
|
|
5
|
+
type As = 'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul';
|
|
6
|
+
type ResponsiveShowProps = {
|
|
7
|
+
as?: As;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Apply CSS to show this specifically **above** this breakpoint.
|
|
11
|
+
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
12
|
+
*
|
|
13
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
14
|
+
*/
|
|
15
|
+
above?: Exclude<Breakpoint, 'xxs'>;
|
|
16
|
+
/**
|
|
17
|
+
* Apply CSS to show this specifically **below** this breakpoint.
|
|
18
|
+
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
19
|
+
*
|
|
20
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
21
|
+
*/
|
|
22
|
+
below?: Exclude<Breakpoint, 'xxs'>;
|
|
23
|
+
} & ({
|
|
24
|
+
above?: never;
|
|
25
|
+
below: Exclude<Breakpoint, 'xxs'>;
|
|
26
|
+
} | {
|
|
27
|
+
above: Exclude<Breakpoint, 'xxs'>;
|
|
28
|
+
below?: never;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Shows the content at a given breakpoint. By default, content is hidden. The primary use case is for visual presentation.
|
|
32
|
+
* Mix `<Show above="md">` with `<Hide above="md">` to achieve content that shifts at a breakpoint.
|
|
33
|
+
*
|
|
34
|
+
* Please note:
|
|
35
|
+
* - This only uses `display: none` and `display: revert` to show/hide, it does not skip rendering of children trees.
|
|
36
|
+
* - As this is rendered at all times, there is little performance savings here (just that this is not painted).
|
|
37
|
+
*/
|
|
38
|
+
export declare const Show: ({ above, below, children, as: AsElement, }: ResponsiveShowProps) => jsx.JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { css as cssEmotion } from '@emotion/react';
|
|
3
3
|
import { CSSPropertiesWithMultiValues, SerializedStyles } from '@emotion/serialize';
|
|
4
4
|
import type * as CSS from 'csstype';
|
|
5
|
-
import { MediaQuery } from '../helpers/responsive/types';
|
|
6
5
|
import { Box, Inline } from '../index';
|
|
6
|
+
import type { MediaQuery } from '../responsive/types';
|
|
7
7
|
import { TokenisedProps } from './style-maps.partial';
|
|
8
8
|
declare const uniqueSymbol: unique symbol;
|
|
9
9
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"./box": "./src/components/box.tsx",
|
|
100
100
|
"./stack": "./src/components/stack.tsx",
|
|
101
101
|
"./inline": "./src/components/inline.tsx",
|
|
102
|
-
"./responsive": "./src/
|
|
102
|
+
"./responsive": "./src/responsive/index.tsx"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@atlaskit/visual-regression": "*",
|
|
133
133
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
134
134
|
"@atlassian/codegen": "^0.1.0",
|
|
135
|
-
"@atlassian/gemini-visual-regression": "^0.0.
|
|
135
|
+
"@atlassian/gemini-visual-regression": "^0.0.35",
|
|
136
136
|
"@testing-library/react": "^12.1.5",
|
|
137
137
|
"@testing-library/react-hooks": "^8.0.1",
|
|
138
138
|
"csstype": "^3.1.0",
|
package/responsive/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives/responsive",
|
|
3
|
-
"main": "../dist/cjs/
|
|
4
|
-
"module": "../dist/esm/
|
|
5
|
-
"module:es2019": "../dist/es2019/
|
|
3
|
+
"main": "../dist/cjs/responsive/index.js",
|
|
4
|
+
"module": "../dist/esm/responsive/index.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/responsive/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/
|
|
7
|
+
"types": "../dist/types/responsive/index.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
9
|
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.5/
|
|
11
|
+
"../dist/types-ts4.5/responsive/index.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { UNSAFE_BREAKPOINTS_ORDERED_LIST } from './constants';
|
|
3
|
-
import { media } from './media-helper';
|
|
4
|
-
/**
|
|
5
|
-
* Build a map of breakpoints to css with media queries and nested styles.
|
|
6
|
-
*
|
|
7
|
-
* @experimental Unsafe for usage as the API is not finalized.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* A map to build optional `display:none` for consumption on a div.
|
|
11
|
-
* ```ts
|
|
12
|
-
* const hideMediaQueries = buildAboveMediaQueryCSS({ display: 'none' });
|
|
13
|
-
*
|
|
14
|
-
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
15
|
-
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
16
|
-
* }
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* This roughly builds a map that will look roughly like this (if done manually):
|
|
20
|
-
* ```ts
|
|
21
|
-
* {
|
|
22
|
-
* xxs: css({ '@media (min-width: 0px)': { display: 'none' } }),
|
|
23
|
-
* xs: css({ '@media (min-width: …px)': { display: 'none' } }),
|
|
24
|
-
* sm: css({ '@media (min-width: …px)': { display: 'none' } }),
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export const UNSAFE_buildAboveMediaQueryCSS = input => {
|
|
29
|
-
return UNSAFE_BREAKPOINTS_ORDERED_LIST.reduce((acc, breakpoint) => ({
|
|
30
|
-
...acc,
|
|
31
|
-
[breakpoint]: css({
|
|
32
|
-
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
33
|
-
[media.above[breakpoint]]: typeof input === 'function' ? input(breakpoint) : input
|
|
34
|
-
})
|
|
35
|
-
}), {});
|
|
36
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import type { Breakpoint } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Build a map of breakpoints to css with media queries and nested styles.
|
|
5
|
-
*
|
|
6
|
-
* @experimental Unsafe for usage as the API is not finalized.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* A map to build optional `display:none` for consumption on a div.
|
|
10
|
-
* ```ts
|
|
11
|
-
* const hideMediaQueries = buildAboveMediaQueryCSS({ display: 'none' });
|
|
12
|
-
*
|
|
13
|
-
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
14
|
-
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
15
|
-
* }
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* This roughly builds a map that will look roughly like this (if done manually):
|
|
19
|
-
* ```ts
|
|
20
|
-
* {
|
|
21
|
-
* xxs: css({ '@media (min-width: 0px)': { display: 'none' } }),
|
|
22
|
-
* xs: css({ '@media (min-width: …px)': { display: 'none' } }),
|
|
23
|
-
* sm: css({ '@media (min-width: …px)': { display: 'none' } }),
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare const UNSAFE_buildAboveMediaQueryCSS: (input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, import("@emotion/react").SerializedStyles>>>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import type { Breakpoint } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Build a map of breakpoints to css with media queries and nested styles.
|
|
5
|
-
*
|
|
6
|
-
* @experimental Unsafe for usage as the API is not finalized.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* A map to build optional `display:none` for consumption on a div.
|
|
10
|
-
* ```ts
|
|
11
|
-
* const hideMediaQueries = buildAboveMediaQueryCSS({ display: 'none' });
|
|
12
|
-
*
|
|
13
|
-
* const Component = ({ hideAtBreakpoints: ('xs' | 'sm')[], children: ReactNode }) => {
|
|
14
|
-
* return <div css={hideAtBreakpoints.map(b => hideMediaQueries[b])}>{children}</div>;
|
|
15
|
-
* }
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* This roughly builds a map that will look roughly like this (if done manually):
|
|
19
|
-
* ```ts
|
|
20
|
-
* {
|
|
21
|
-
* xxs: css({ '@media (min-width: 0px)': { display: 'none' } }),
|
|
22
|
-
* xs: css({ '@media (min-width: …px)': { display: 'none' } }),
|
|
23
|
-
* sm: css({ '@media (min-width: …px)': { display: 'none' } }),
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare const UNSAFE_buildAboveMediaQueryCSS: (input: CSSObject | ((breakpoint: Breakpoint) => CSSObject)) => Required<Partial<Record<Breakpoint, import("@emotion/react").SerializedStyles>>>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|