@atlaskit/primitives 0.9.4 → 0.10.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 0.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`313d71fce9c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/313d71fce9c) - Allow media queries at predefined breakpoints to be applied through xCSS.
8
+
9
+ ## 0.9.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
14
+
3
15
  ## 0.9.4
4
16
 
5
17
  ### Patch Changes
@@ -55,7 +55,7 @@ var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
55
55
  style: style,
56
56
  testId: testId,
57
57
  ref: ref
58
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
58
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
59
59
  ,
60
60
  css: className
61
61
  }, safeHtmlAttributes), children);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.9.4",
3
+ "version": "0.10.0",
4
4
  "sideEffects": false
5
5
  }
@@ -8,9 +8,11 @@ exports.parseXcss = void 0;
8
8
  exports.xcss = xcss;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
12
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
12
13
  var _react = require("@emotion/react");
13
14
  var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
15
+ var _responsive = require("../helpers/responsive");
14
16
  var _styleMaps = require("./style-maps.partial");
15
17
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
16
18
 
@@ -81,6 +83,11 @@ var isSafeEnvToThrow = function isSafeEnvToThrow() {
81
83
  };
82
84
  var reNestedSelectors = /(\.|\s|&+|\*\>|#|\[.*\])/;
83
85
  var rePseudos = /^::?.*$/;
86
+ var reMediaQuery = /^@media .*$/;
87
+ var reValidMediaQuery = new RegExp("^(".concat([].concat((0, _toConsumableArray2.default)(Object.values(_responsive.UNSAFE_media.above)), (0, _toConsumableArray2.default)(Object.values(_responsive.UNSAFE_media.below))).map(function (mediaQuery) {
88
+ return mediaQuery.replace(/[.()]/g, '\\$&');
89
+ } // Escape the ".", "(", and ")" in the media query syntax.
90
+ ).join('|'), ")$"));
84
91
  var transformStyles = function transformStyles(styleObj) {
85
92
  if (!styleObj || (0, _typeof2.default)(styleObj) !== 'object') {
86
93
  return styleObj;
@@ -98,7 +105,7 @@ var transformStyles = function transformStyles(styleObj) {
98
105
  value = _ref2[1];
99
106
  if (isSafeEnvToThrow()) {
100
107
  // We don't support `.class`, `[data-testid]`, `> *`, `#some-id`
101
- if (reNestedSelectors.test(key)) {
108
+ if (reNestedSelectors.test(key) && !reValidMediaQuery.test(key)) {
102
109
  throw new Error("Styles not supported for key '".concat(key, "'."));
103
110
  }
104
111
  }
@@ -109,8 +116,10 @@ var transformStyles = function transformStyles(styleObj) {
109
116
  styleObj[key] = transformStyles(value);
110
117
  return;
111
118
  }
112
-
113
- // TODO: Deal with media queries
119
+ if (reMediaQuery.test(key)) {
120
+ styleObj[key] = transformStyles(value);
121
+ return;
122
+ }
114
123
 
115
124
  // We have now dealt with all the special cases, so,
116
125
  // check whether what remains is a style property
@@ -149,6 +158,10 @@ var parseXcss = function parseXcss(args) {
149
158
  }
150
159
  return styles;
151
160
  };
161
+
162
+ // Media queries should not contain nested media queries
163
+
164
+ // Pseudos should not contain nested pseudos, or media queries
152
165
  exports.parseXcss = parseXcss;
153
166
  // unused private functions only so we can extract the return type from a generic function
154
167
  var boxWrapper = function boxWrapper(style) {
@@ -48,7 +48,7 @@ const Box = /*#__PURE__*/forwardRef(({
48
48
  style: style,
49
49
  testId: testId,
50
50
  ref: ref
51
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
51
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
52
52
  ,
53
53
  css: className
54
54
  }, safeHtmlAttributes), children);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.9.4",
3
+ "version": "0.10.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +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 { UNSAFE_media } from '../helpers/responsive';
4
5
  import { alignSelfMap, backgroundColorMap, borderColorMap, borderRadiusMap, borderStyleMap, borderWidthMap, dimensionMap, displayMap, fillMap, flexDirectionMap, flexGrowMap, flexMap, flexShrinkMap, layerMap, overflowBlockMap, overflowInlineMap, overflowMap, positionMap, shadowMap, spaceMap, textColorMap } from './style-maps.partial';
5
6
  const tokensMap = {
6
7
  alignSelf: alignSelfMap,
@@ -67,6 +68,9 @@ const uniqueSymbol = Symbol('UNSAFE_INTERNAL_styles');
67
68
  const isSafeEnvToThrow = () => typeof process === 'object' && typeof process.env === 'object' && process.env.NODE_ENV !== 'production';
68
69
  const reNestedSelectors = /(\.|\s|&+|\*\>|#|\[.*\])/;
69
70
  const rePseudos = /^::?.*$/;
71
+ const reMediaQuery = /^@media .*$/;
72
+ const reValidMediaQuery = new RegExp(`^(${[...Object.values(UNSAFE_media.above), ...Object.values(UNSAFE_media.below)].map(mediaQuery => mediaQuery.replace(/[.()]/g, '\\$&') // Escape the ".", "(", and ")" in the media query syntax.
73
+ ).join('|')})$`);
70
74
  const transformStyles = styleObj => {
71
75
  if (!styleObj || typeof styleObj !== 'object') {
72
76
  return styleObj;
@@ -81,7 +85,7 @@ const transformStyles = styleObj => {
81
85
  Object.entries(styleObj).forEach(([key, value]) => {
82
86
  if (isSafeEnvToThrow()) {
83
87
  // We don't support `.class`, `[data-testid]`, `> *`, `#some-id`
84
- if (reNestedSelectors.test(key)) {
88
+ if (reNestedSelectors.test(key) && !reValidMediaQuery.test(key)) {
85
89
  throw new Error(`Styles not supported for key '${key}'.`);
86
90
  }
87
91
  }
@@ -92,8 +96,10 @@ const transformStyles = styleObj => {
92
96
  styleObj[key] = transformStyles(value);
93
97
  return;
94
98
  }
95
-
96
- // TODO: Deal with media queries
99
+ if (reMediaQuery.test(key)) {
100
+ styleObj[key] = transformStyles(value);
101
+ return;
102
+ }
97
103
 
98
104
  // We have now dealt with all the special cases, so,
99
105
  // check whether what remains is a style property
@@ -134,6 +140,11 @@ export const parseXcss = args => {
134
140
  }
135
141
  return styles;
136
142
  };
143
+
144
+ // Media queries should not contain nested media queries
145
+
146
+ // Pseudos should not contain nested pseudos, or media queries
147
+
137
148
  // unused private functions only so we can extract the return type from a generic function
138
149
  const boxWrapper = style => xcss(style);
139
150
  const inlineWrapper = style => xcss(style);
@@ -48,7 +48,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
48
48
  style: style,
49
49
  testId: testId,
50
50
  ref: ref
51
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
51
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
52
52
  ,
53
53
  css: className
54
54
  }, safeHtmlAttributes), children);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.9.4",
3
+ "version": "0.10.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,9 +1,11 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
4
  import _typeof from "@babel/runtime/helpers/typeof";
4
5
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
5
6
  import { css as cssEmotion } from '@emotion/react';
6
7
  import warnOnce from '@atlaskit/ds-lib/warn-once';
8
+ import { UNSAFE_media } from '../helpers/responsive';
7
9
  import { alignSelfMap, backgroundColorMap, borderColorMap, borderRadiusMap, borderStyleMap, borderWidthMap, dimensionMap, displayMap, fillMap, flexDirectionMap, flexGrowMap, flexMap, flexShrinkMap, layerMap, overflowBlockMap, overflowInlineMap, overflowMap, positionMap, shadowMap, spaceMap, textColorMap } from './style-maps.partial';
8
10
  var tokensMap = {
9
11
  alignSelf: alignSelfMap,
@@ -72,6 +74,11 @@ var isSafeEnvToThrow = function isSafeEnvToThrow() {
72
74
  };
73
75
  var reNestedSelectors = /(\.|\s|&+|\*\>|#|\[.*\])/;
74
76
  var rePseudos = /^::?.*$/;
77
+ var reMediaQuery = /^@media .*$/;
78
+ var reValidMediaQuery = new RegExp("^(".concat([].concat(_toConsumableArray(Object.values(UNSAFE_media.above)), _toConsumableArray(Object.values(UNSAFE_media.below))).map(function (mediaQuery) {
79
+ return mediaQuery.replace(/[.()]/g, '\\$&');
80
+ } // Escape the ".", "(", and ")" in the media query syntax.
81
+ ).join('|'), ")$"));
75
82
  var transformStyles = function transformStyles(styleObj) {
76
83
  if (!styleObj || _typeof(styleObj) !== 'object') {
77
84
  return styleObj;
@@ -89,7 +96,7 @@ var transformStyles = function transformStyles(styleObj) {
89
96
  value = _ref2[1];
90
97
  if (isSafeEnvToThrow()) {
91
98
  // We don't support `.class`, `[data-testid]`, `> *`, `#some-id`
92
- if (reNestedSelectors.test(key)) {
99
+ if (reNestedSelectors.test(key) && !reValidMediaQuery.test(key)) {
93
100
  throw new Error("Styles not supported for key '".concat(key, "'."));
94
101
  }
95
102
  }
@@ -100,8 +107,10 @@ var transformStyles = function transformStyles(styleObj) {
100
107
  styleObj[key] = transformStyles(value);
101
108
  return;
102
109
  }
103
-
104
- // TODO: Deal with media queries
110
+ if (reMediaQuery.test(key)) {
111
+ styleObj[key] = transformStyles(value);
112
+ return;
113
+ }
105
114
 
106
115
  // We have now dealt with all the special cases, so,
107
116
  // check whether what remains is a style property
@@ -140,6 +149,11 @@ export var parseXcss = function parseXcss(args) {
140
149
  }
141
150
  return styles;
142
151
  };
152
+
153
+ // Media queries should not contain nested media queries
154
+
155
+ // Pseudos should not contain nested pseudos, or media queries
156
+
143
157
  // unused private functions only so we can extract the return type from a generic function
144
158
  var boxWrapper = function boxWrapper(style) {
145
159
  return xcss(style);
@@ -1,9 +1,11 @@
1
1
  import { SerializedStyles } from '@emotion/react';
2
2
  import { token } from '@atlaskit/tokens';
3
+ import { UNSAFE_media } from './media-helper';
3
4
  /**
4
5
  * The breakpoints we have for responsiveness.
5
6
  */
6
7
  export type Breakpoint = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
8
+ export type MediaQuery = (typeof UNSAFE_media.above)[Breakpoint] | (typeof UNSAFE_media.below)[Exclude<Breakpoint, 'xxs'>];
7
9
  /**
8
10
  * An object type mapping a value to each breakpoint (optionally)
9
11
  */
@@ -2,6 +2,7 @@
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';
5
6
  import { Box, Inline } from '../index';
6
7
  import { TokenisedProps } from './style-maps.partial';
7
8
  declare const uniqueSymbol: unique symbol;
@@ -11,10 +12,13 @@ declare const uniqueSymbol: unique symbol;
11
12
  */
12
13
  type ParsedXcss = ReturnType<typeof cssEmotion> | ReturnType<typeof cssEmotion>[];
13
14
  export declare const parseXcss: (args: XCSS | Array<XCSS | false | undefined>) => ParsedXcss;
15
+ type CSSMediaQueries = {
16
+ [MQ in MediaQuery]?: Omit<SafeCSSObject, MediaQuery>;
17
+ };
14
18
  type CSSPseudos = {
15
- [Pseudo in CSS.Pseudos]?: SafeCSSObject;
19
+ [Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject, CSS.Pseudos | MediaQuery>;
16
20
  };
17
- type SafeCSSObject = CSSPseudos & TokenisedProps & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
21
+ type SafeCSSObject = CSSPseudos & TokenisedProps & CSSMediaQueries & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
18
22
  type ScopedSafeCSSObject<T extends keyof SafeCSSObject> = Pick<SafeCSSObject, T>;
19
23
  declare const boxWrapper: (style: any) => {
20
24
  readonly [uniqueSymbol]: BoxStyles;
@@ -1,9 +1,11 @@
1
1
  import { SerializedStyles } from '@emotion/react';
2
2
  import { token } from '@atlaskit/tokens';
3
+ import { UNSAFE_media } from './media-helper';
3
4
  /**
4
5
  * The breakpoints we have for responsiveness.
5
6
  */
6
7
  export type Breakpoint = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
8
+ export type MediaQuery = (typeof UNSAFE_media.above)[Breakpoint] | (typeof UNSAFE_media.below)[Exclude<Breakpoint, 'xxs'>];
7
9
  /**
8
10
  * An object type mapping a value to each breakpoint (optionally)
9
11
  */
@@ -2,6 +2,7 @@
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';
5
6
  import { Box, Inline } from '../index';
6
7
  import { TokenisedProps } from './style-maps.partial';
7
8
  declare const uniqueSymbol: unique symbol;
@@ -11,10 +12,13 @@ declare const uniqueSymbol: unique symbol;
11
12
  */
12
13
  type ParsedXcss = ReturnType<typeof cssEmotion> | ReturnType<typeof cssEmotion>[];
13
14
  export declare const parseXcss: (args: XCSS | Array<XCSS | false | undefined>) => ParsedXcss;
15
+ type CSSMediaQueries = {
16
+ [MQ in MediaQuery]?: Omit<SafeCSSObject, MediaQuery>;
17
+ };
14
18
  type CSSPseudos = {
15
- [Pseudo in CSS.Pseudos]?: SafeCSSObject;
19
+ [Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject, CSS.Pseudos | MediaQuery>;
16
20
  };
17
- type SafeCSSObject = CSSPseudos & TokenisedProps & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
21
+ type SafeCSSObject = CSSPseudos & TokenisedProps & CSSMediaQueries & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
18
22
  type ScopedSafeCSSObject<T extends keyof SafeCSSObject> = Pick<SafeCSSObject, T>;
19
23
  declare const boxWrapper: (style: any) => {
20
24
  readonly [uniqueSymbol]: BoxStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.9.4",
3
+ "version": "0.10.0",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -118,13 +118,11 @@
118
118
  "@atlaskit/radio": "^5.6.0",
119
119
  "@atlaskit/range": "^7.1.0",
120
120
  "@atlaskit/ssr": "*",
121
- "@atlaskit/tag": "*",
122
121
  "@atlaskit/theme": "*",
123
122
  "@atlaskit/visual-regression": "*",
124
- "@atlaskit/webdriver-runner": "*",
125
123
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
126
124
  "@atlassian/codegen": "^0.1.0",
127
- "@atlassian/gemini-visual-regression": "^0.0.22",
125
+ "@atlassian/gemini-visual-regression": "^0.0.27",
128
126
  "@testing-library/react": "^12.1.5",
129
127
  "csstype": "^3.1.0",
130
128
  "prettier": "^2.8.0",
package/report.api.md CHANGED
@@ -316,9 +316,17 @@ type BoxXCSS = {
316
316
  readonly [uniqueSymbol]: BoxStyles;
317
317
  };
318
318
 
319
+ // @public
320
+ type Breakpoint = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxs';
321
+
322
+ // @public (undocumented)
323
+ type CSSMediaQueries = {
324
+ [MQ in MediaQuery]?: Omit<SafeCSSObject, MediaQuery>;
325
+ };
326
+
319
327
  // @public (undocumented)
320
328
  type CSSPseudos = {
321
- [Pseudo in CSS_2.Pseudos]?: SafeCSSObject;
329
+ [Pseudo in CSS_2.Pseudos]?: Omit<SafeCSSObject, CSS_2.Pseudos | MediaQuery>;
322
330
  };
323
331
 
324
332
  // @public (undocumented)
@@ -499,6 +507,11 @@ type MaxInlineSize = Dimension;
499
507
  // @public (undocumented)
500
508
  type MaxWidth = Dimension;
501
509
 
510
+ // @public (undocumented)
511
+ type MediaQuery =
512
+ | (typeof UNSAFE_media.above)[Breakpoint]
513
+ | (typeof UNSAFE_media.below)[Exclude<Breakpoint, 'xxs'>];
514
+
502
515
  // @public (undocumented)
503
516
  type MinBlockSize = Dimension;
504
517
 
@@ -560,6 +573,7 @@ type Right = Dimension;
560
573
  // @public (undocumented)
561
574
  type SafeCSSObject = CSSPseudos &
562
575
  TokenisedProps &
576
+ CSSMediaQueries &
563
577
  Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
564
578
 
565
579
  // @public (undocumented)
@@ -741,6 +755,27 @@ type Top = Dimension;
741
755
  // @public (undocumented)
742
756
  const uniqueSymbol: unique symbol;
743
757
 
758
+ // @public
759
+ const UNSAFE_media: {
760
+ readonly above: {
761
+ readonly xxs: `@media (min-width: ${number}rem)`;
762
+ readonly xs: `@media (min-width: ${number}rem)`;
763
+ readonly sm: `@media (min-width: ${number}rem)`;
764
+ readonly md: `@media (min-width: ${number}rem)`;
765
+ readonly lg: `@media (min-width: ${number}rem)`;
766
+ readonly xl: `@media (min-width: ${number}rem)`;
767
+ readonly xxl: `@media (min-width: ${number}rem)`;
768
+ };
769
+ readonly below: {
770
+ readonly xs: `@media (max-width: ${number}rem)`;
771
+ readonly sm: `@media (max-width: ${number}rem)`;
772
+ readonly md: `@media (max-width: ${number}rem)`;
773
+ readonly lg: `@media (max-width: ${number}rem)`;
774
+ readonly xl: `@media (max-width: ${number}rem)`;
775
+ readonly xxl: `@media (max-width: ${number}rem)`;
776
+ };
777
+ };
778
+
744
779
  // @public (undocumented)
745
780
  type Width = Dimension;
746
781
 
@@ -278,9 +278,17 @@ type BoxXCSS = {
278
278
  readonly [uniqueSymbol]: BoxStyles;
279
279
  };
280
280
 
281
+ // @public
282
+ type Breakpoint = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxs';
283
+
284
+ // @public (undocumented)
285
+ type CSSMediaQueries = {
286
+ [MQ in MediaQuery]?: Omit<SafeCSSObject, MediaQuery>;
287
+ };
288
+
281
289
  // @public (undocumented)
282
290
  type CSSPseudos = {
283
- [Pseudo in CSS_2.Pseudos]?: SafeCSSObject;
291
+ [Pseudo in CSS_2.Pseudos]?: Omit<SafeCSSObject, CSS_2.Pseudos | MediaQuery>;
284
292
  };
285
293
 
286
294
  // @public (undocumented)
@@ -443,6 +451,9 @@ type MaxInlineSize = Dimension;
443
451
  // @public (undocumented)
444
452
  type MaxWidth = Dimension;
445
453
 
454
+ // @public (undocumented)
455
+ type MediaQuery = (typeof UNSAFE_media.above)[Breakpoint] | (typeof UNSAFE_media.below)[Exclude<Breakpoint, 'xxs'>];
456
+
446
457
  // @public (undocumented)
447
458
  type MinBlockSize = Dimension;
448
459
 
@@ -502,7 +513,7 @@ type PublicBoxPropsBase = {
502
513
  type Right = Dimension;
503
514
 
504
515
  // @public (undocumented)
505
- type SafeCSSObject = CSSPseudos & TokenisedProps & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
516
+ type SafeCSSObject = CSSPseudos & TokenisedProps & CSSMediaQueries & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
506
517
 
507
518
  // @public (undocumented)
508
519
  type ScopedSafeCSSObject<T extends keyof SafeCSSObject> = Pick<SafeCSSObject, T>;
@@ -665,6 +676,27 @@ type Top = Dimension;
665
676
  // @public (undocumented)
666
677
  const uniqueSymbol: unique symbol;
667
678
 
679
+ // @public
680
+ const UNSAFE_media: {
681
+ readonly above: {
682
+ readonly xxs: `@media (min-width: ${number}rem)`;
683
+ readonly xs: `@media (min-width: ${number}rem)`;
684
+ readonly sm: `@media (min-width: ${number}rem)`;
685
+ readonly md: `@media (min-width: ${number}rem)`;
686
+ readonly lg: `@media (min-width: ${number}rem)`;
687
+ readonly xl: `@media (min-width: ${number}rem)`;
688
+ readonly xxl: `@media (min-width: ${number}rem)`;
689
+ };
690
+ readonly below: {
691
+ readonly xs: `@media (max-width: ${number}rem)`;
692
+ readonly sm: `@media (max-width: ${number}rem)`;
693
+ readonly md: `@media (max-width: ${number}rem)`;
694
+ readonly lg: `@media (max-width: ${number}rem)`;
695
+ readonly xl: `@media (max-width: ${number}rem)`;
696
+ readonly xxl: `@media (max-width: ${number}rem)`;
697
+ };
698
+ };
699
+
668
700
  // @public (undocumented)
669
701
  type Width = Dimension;
670
702