@atlaskit/primitives 14.1.0 → 14.1.2

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,21 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 14.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#119650](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119650)
8
+ [`51704d016e269`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51704d016e269) -
9
+ Fix typo in documentation.
10
+
11
+ ## 14.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#119116](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119116)
16
+ [`96ff1753a7299`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/96ff1753a7299) -
17
+ Update dependencies and remove unused internal exports.
18
+
3
19
  ## 14.1.0
4
20
 
5
21
  ### Minor Changes
@@ -70,7 +70,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
70
70
  action: 'clicked',
71
71
  componentName: componentName || 'Anchor',
72
72
  packageName: "@atlaskit/primitives",
73
- packageVersion: "14.1.0",
73
+ packageVersion: "14.1.2",
74
74
  analyticsData: analyticsContext,
75
75
  actionSubject: 'link'
76
76
  });
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
6
6
  Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
- exports.default = exports.Box = void 0;
9
+ exports.default = void 0;
10
10
  require("./box.compiled.css");
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var React = _react;
@@ -311,7 +311,7 @@ var paddingInlineEndMap = {
311
311
  * - [Code](https://atlassian.design/components/primitives/box/code)
312
312
  * - [Usage](https://atlassian.design/components/primitives/box/usage)
313
313
  */
314
- var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
314
+ var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
315
315
  var _ref$as = _ref.as,
316
316
  Component = _ref$as === void 0 ? 'div' : _ref$as,
317
317
  children = _ref.children,
@@ -60,7 +60,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
60
60
  action: 'clicked',
61
61
  componentName: componentName || 'Pressable',
62
62
  packageName: "@atlaskit/primitives",
63
- packageVersion: "14.1.0",
63
+ packageVersion: "14.1.2",
64
64
  analyticsData: analyticsContext,
65
65
  actionSubject: 'button'
66
66
  });
@@ -100,7 +100,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
100
100
  action: 'clicked',
101
101
  componentName: componentName || 'Anchor',
102
102
  packageName: "@atlaskit/primitives",
103
- packageVersion: "14.1.0",
103
+ packageVersion: "14.1.2",
104
104
  analyticsData: analyticsContext,
105
105
  actionSubject: 'link'
106
106
  });
@@ -95,7 +95,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
95
95
  action: 'clicked',
96
96
  componentName: componentName || 'Pressable',
97
97
  packageName: "@atlaskit/primitives",
98
- packageVersion: "14.1.0",
98
+ packageVersion: "14.1.2",
99
99
  analyticsData: analyticsContext,
100
100
  actionSubject: 'button'
101
101
  });
@@ -55,7 +55,7 @@ const AnchorNoRef = ({
55
55
  action: 'clicked',
56
56
  componentName: componentName || 'Anchor',
57
57
  packageName: "@atlaskit/primitives",
58
- packageVersion: "14.1.0",
58
+ packageVersion: "14.1.2",
59
59
  analyticsData: analyticsContext,
60
60
  actionSubject: 'link'
61
61
  });
@@ -299,7 +299,7 @@ const paddingInlineEndMap = {
299
299
  * - [Code](https://atlassian.design/components/primitives/box/code)
300
300
  * - [Usage](https://atlassian.design/components/primitives/box/usage)
301
301
  */
302
- export const Box = /*#__PURE__*/forwardRef(({
302
+ const Box = /*#__PURE__*/forwardRef(({
303
303
  as: Component = 'div',
304
304
  children,
305
305
  backgroundColor,
@@ -46,7 +46,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
46
46
  action: 'clicked',
47
47
  componentName: componentName || 'Pressable',
48
48
  packageName: "@atlaskit/primitives",
49
- packageVersion: "14.1.0",
49
+ packageVersion: "14.1.2",
50
50
  analyticsData: analyticsContext,
51
51
  actionSubject: 'button'
52
52
  });
@@ -90,7 +90,7 @@ const AnchorNoRef = ({
90
90
  action: 'clicked',
91
91
  componentName: componentName || 'Anchor',
92
92
  packageName: "@atlaskit/primitives",
93
- packageVersion: "14.1.0",
93
+ packageVersion: "14.1.2",
94
94
  analyticsData: analyticsContext,
95
95
  actionSubject: 'link'
96
96
  });
@@ -85,7 +85,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
85
85
  action: 'clicked',
86
86
  componentName: componentName || 'Pressable',
87
87
  packageName: "@atlaskit/primitives",
88
- packageVersion: "14.1.0",
88
+ packageVersion: "14.1.2",
89
89
  analyticsData: analyticsContext,
90
90
  actionSubject: 'button'
91
91
  });
@@ -60,7 +60,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
60
60
  action: 'clicked',
61
61
  componentName: componentName || 'Anchor',
62
62
  packageName: "@atlaskit/primitives",
63
- packageVersion: "14.1.0",
63
+ packageVersion: "14.1.2",
64
64
  analyticsData: analyticsContext,
65
65
  actionSubject: 'link'
66
66
  });
@@ -302,7 +302,7 @@ var paddingInlineEndMap = {
302
302
  * - [Code](https://atlassian.design/components/primitives/box/code)
303
303
  * - [Usage](https://atlassian.design/components/primitives/box/usage)
304
304
  */
305
- export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
305
+ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
306
306
  var _ref$as = _ref.as,
307
307
  Component = _ref$as === void 0 ? 'div' : _ref$as,
308
308
  children = _ref.children,
@@ -50,7 +50,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
50
50
  action: 'clicked',
51
51
  componentName: componentName || 'Pressable',
52
52
  packageName: "@atlaskit/primitives",
53
- packageVersion: "14.1.0",
53
+ packageVersion: "14.1.2",
54
54
  analyticsData: analyticsContext,
55
55
  actionSubject: 'button'
56
56
  });
@@ -94,7 +94,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
94
94
  action: 'clicked',
95
95
  componentName: componentName || 'Anchor',
96
96
  packageName: "@atlaskit/primitives",
97
- packageVersion: "14.1.0",
97
+ packageVersion: "14.1.2",
98
98
  analyticsData: analyticsContext,
99
99
  actionSubject: 'link'
100
100
  });
@@ -89,7 +89,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
89
89
  action: 'clicked',
90
90
  componentName: componentName || 'Pressable',
91
91
  packageName: "@atlaskit/primitives",
92
- packageVersion: "14.1.0",
92
+ packageVersion: "14.1.2",
93
93
  analyticsData: analyticsContext,
94
94
  actionSubject: 'button'
95
95
  });
@@ -101,5 +101,5 @@ type BoxComponent = <T extends CustomElementType>(props: BoxProps<T>) => ReactEl
101
101
  * - [Code](https://atlassian.design/components/primitives/box/code)
102
102
  * - [Usage](https://atlassian.design/components/primitives/box/usage)
103
103
  */
104
- export declare const Box: BoxComponent;
104
+ declare const Box: BoxComponent;
105
105
  export default Box;
@@ -47,10 +47,10 @@ export type FlexProps<T extends ElementType = 'div'> = {
47
47
  */
48
48
  ref?: React.ComponentPropsWithRef<T>['ref'];
49
49
  } & BasePrimitiveProps;
50
- export type AlignItems = keyof typeof alignItemsMap;
51
- export type JustifyContent = keyof typeof justifyContentMap;
52
- export type Direction = keyof typeof flexDirectionMap;
53
- export type Wrap = keyof typeof flexWrapMap;
50
+ type AlignItems = keyof typeof alignItemsMap;
51
+ type JustifyContent = keyof typeof justifyContentMap;
52
+ type Direction = keyof typeof flexDirectionMap;
53
+ type Wrap = keyof typeof flexWrapMap;
54
54
  declare const justifyContentMap: {
55
55
  readonly start: import("@emotion/react").SerializedStyles;
56
56
  readonly center: import("@emotion/react").SerializedStyles;
@@ -7,7 +7,7 @@ import { type Space } from '../xcss/style-maps.partial';
7
7
  import type { BasePrimitiveProps } from './types';
8
8
  export type GridProps<T extends ElementType = 'div'> = {
9
9
  /**
10
- * The DOM element to render as the Flex. Defaults to `div`.
10
+ * The DOM element to render as the Grid. Defaults to `div`.
11
11
  */
12
12
  as?: 'div' | 'span' | 'ul' | 'ol';
13
13
  /**
@@ -1,5 +1,4 @@
1
1
  import { type SerializedStyles } from '@emotion/react';
2
- import { type token } from '@atlaskit/tokens';
3
2
  import { type media } from './media-helper';
4
3
  /**
5
4
  * The breakpoints we have for responsiveness.
@@ -31,24 +30,3 @@ export type ResponsiveObject<T> = Partial<Record<Breakpoint, T>>;
31
30
  * ```
32
31
  */
33
32
  export type ResponsiveCSSObject = ResponsiveObject<SerializedStyles>;
34
- /**
35
- * Our internal breakpoint config used to build media queries and define attributes for certain components.
36
- */
37
- export type BreakpointConfig = {
38
- /**
39
- * The gap between a `GridItem`.
40
- */
41
- gridItemGutter: ReturnType<typeof token>;
42
- /**
43
- * The outer whitespace of a `Grid` item.
44
- */
45
- gridMargin: ReturnType<typeof token>;
46
- /**
47
- * The min-width used in media queries.
48
- */
49
- min: `${number}rem`;
50
- /**
51
- * The max-width used in media queries; if set to `null`, it has no max-width (should strictly only be on the largest breakpoint).
52
- */
53
- max: `${number}rem` | null;
54
- };
@@ -101,5 +101,5 @@ type BoxComponent = <T extends CustomElementType>(props: BoxProps<T>) => ReactEl
101
101
  * - [Code](https://atlassian.design/components/primitives/box/code)
102
102
  * - [Usage](https://atlassian.design/components/primitives/box/usage)
103
103
  */
104
- export declare const Box: BoxComponent;
104
+ declare const Box: BoxComponent;
105
105
  export default Box;
@@ -47,10 +47,10 @@ export type FlexProps<T extends ElementType = 'div'> = {
47
47
  */
48
48
  ref?: React.ComponentPropsWithRef<T>['ref'];
49
49
  } & BasePrimitiveProps;
50
- export type AlignItems = keyof typeof alignItemsMap;
51
- export type JustifyContent = keyof typeof justifyContentMap;
52
- export type Direction = keyof typeof flexDirectionMap;
53
- export type Wrap = keyof typeof flexWrapMap;
50
+ type AlignItems = keyof typeof alignItemsMap;
51
+ type JustifyContent = keyof typeof justifyContentMap;
52
+ type Direction = keyof typeof flexDirectionMap;
53
+ type Wrap = keyof typeof flexWrapMap;
54
54
  declare const justifyContentMap: {
55
55
  readonly start: import("@emotion/react").SerializedStyles;
56
56
  readonly center: import("@emotion/react").SerializedStyles;
@@ -7,7 +7,7 @@ import { type Space } from '../xcss/style-maps.partial';
7
7
  import type { BasePrimitiveProps } from './types';
8
8
  export type GridProps<T extends ElementType = 'div'> = {
9
9
  /**
10
- * The DOM element to render as the Flex. Defaults to `div`.
10
+ * The DOM element to render as the Grid. Defaults to `div`.
11
11
  */
12
12
  as?: 'div' | 'span' | 'ul' | 'ol';
13
13
  /**
@@ -1,5 +1,4 @@
1
1
  import { type SerializedStyles } from '@emotion/react';
2
- import { type token } from '@atlaskit/tokens';
3
2
  import { type media } from './media-helper';
4
3
  /**
5
4
  * The breakpoints we have for responsiveness.
@@ -31,24 +30,3 @@ export type ResponsiveObject<T> = Partial<Record<Breakpoint, T>>;
31
30
  * ```
32
31
  */
33
32
  export type ResponsiveCSSObject = ResponsiveObject<SerializedStyles>;
34
- /**
35
- * Our internal breakpoint config used to build media queries and define attributes for certain components.
36
- */
37
- export type BreakpointConfig = {
38
- /**
39
- * The gap between a `GridItem`.
40
- */
41
- gridItemGutter: ReturnType<typeof token>;
42
- /**
43
- * The outer whitespace of a `Grid` item.
44
- */
45
- gridMargin: ReturnType<typeof token>;
46
- /**
47
- * The min-width used in media queries.
48
- */
49
- min: `${number}rem`;
50
- /**
51
- * The max-width used in media queries; if set to `null`, it has no max-width (should strictly only be on the largest breakpoint).
52
- */
53
- max: `${number}rem` | null;
54
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "14.1.0",
3
+ "version": "14.1.2",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -147,15 +147,36 @@
147
147
  "@af/formatting": "*",
148
148
  "@af/integration-testing": "*",
149
149
  "@af/visual-regression": "*",
150
+ "@atlaskit/avatar": "^23.0.0",
151
+ "@atlaskit/button": "^21.1.0",
152
+ "@atlaskit/checkbox": "^16.0.0",
153
+ "@atlaskit/code": "^16.0.0",
154
+ "@atlaskit/docs": "*",
155
+ "@atlaskit/dropdown-menu": "^13.0.0",
156
+ "@atlaskit/flag": "^16.1.0",
157
+ "@atlaskit/form": "^12.0.0",
158
+ "@atlaskit/heading": "^5.1.0",
159
+ "@atlaskit/icon": "^24.1.0",
160
+ "@atlaskit/icon-object": "^7.0.0",
161
+ "@atlaskit/image": "^2.0.0",
162
+ "@atlaskit/link": "^3.0.0",
163
+ "@atlaskit/logo": "^16.0.0",
164
+ "@atlaskit/lozenge": "^12.0.0",
165
+ "@atlaskit/motion": "^5.0.0",
166
+ "@atlaskit/range": "^9.0.0",
167
+ "@atlaskit/section-message": "*",
150
168
  "@atlaskit/ssr": "*",
169
+ "@atlaskit/textfield": "^8.0.0",
151
170
  "@atlaskit/toggle": "^15.0.0",
152
171
  "@atlaskit/tooltip": "^20.0.0",
153
172
  "@atlaskit/visual-regression": "*",
173
+ "@atlassian/analytics-bridge": "^0.7.0",
154
174
  "@atlassian/codegen": "^0.1.0",
155
175
  "@testing-library/react": "^13.4.0",
156
176
  "@testing-library/react-hooks": "^8.0.1",
157
177
  "csstype": "^3.1.0",
158
178
  "react-dom": "^18.2.0",
179
+ "react-resource-router": "^0.20.0",
159
180
  "ts-node": "^10.9.1",
160
181
  "typescript": "~5.4.2"
161
182
  },
package/scripts/utils.tsx CHANGED
@@ -1,19 +1,3 @@
1
- import type { CSSProperties } from 'react';
2
-
3
- export const tokenCall = (token: string, fallback: string | ShadowDefinition) =>
4
- `token('${token}', '${fallback}')`;
5
-
6
- export const tokenToStyle = (
7
- prop: keyof CSSProperties,
8
- token: string,
9
- fallback: string | ShadowDefinition,
10
- ) => {
11
- if (Array.isArray(fallback)) {
12
- fallback = constructShadow(fallback);
13
- }
14
- return `css({\n\t${prop}: ${tokenCall(token, fallback)}\n})`;
15
- };
16
-
17
1
  export const constructTokenFunctionCall = (token: string, fallback: string | ShadowDefinition) => {
18
2
  if (Array.isArray(fallback)) {
19
3
  fallback = constructShadow(fallback);