@atlaskit/section-message 6.5.0 → 6.5.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.
@@ -1,5 +1,5 @@
1
- import { JSCodeshift } from 'jscodeshift';
2
- import { Collection } from 'jscodeshift/src/Collection';
1
+ import { type JSCodeshift } from 'jscodeshift';
2
+ import { type Collection } from 'jscodeshift/src/Collection';
3
3
 
4
4
  import {
5
5
  createTransformer,
@@ -1,5 +1,10 @@
1
- import core, { ASTPath, JSXAttribute, JSXElement } from 'jscodeshift';
2
- import { Collection } from 'jscodeshift/src/Collection';
1
+ import {
2
+ type ASTPath,
3
+ type default as core,
4
+ type JSXAttribute,
5
+ type JSXElement,
6
+ } from 'jscodeshift';
7
+ import { type Collection } from 'jscodeshift/src/Collection';
3
8
 
4
9
  import {
5
10
  addCommentBefore,
@@ -1,12 +1,13 @@
1
- import core, {
2
- ASTPath,
3
- ImportDeclaration,
4
- JSXAttribute,
5
- JSXElement,
6
- JSXExpressionContainer,
7
- VariableDeclaration,
1
+ import {
2
+ type ASTPath,
3
+ type default as core,
4
+ type ImportDeclaration,
5
+ type JSXAttribute,
6
+ type JSXElement,
7
+ type JSXExpressionContainer,
8
+ type VariableDeclaration,
8
9
  } from 'jscodeshift';
9
- import { Collection } from 'jscodeshift/src/Collection';
10
+ import { type Collection } from 'jscodeshift/src/Collection';
10
11
 
11
12
  import {
12
13
  addCommentBefore,
@@ -1,5 +1,5 @@
1
- import core, { CallExpression } from 'jscodeshift';
2
- import { Collection } from 'jscodeshift/src/Collection';
1
+ import { type CallExpression, type default as core } from 'jscodeshift';
2
+ import { type Collection } from 'jscodeshift/src/Collection';
3
3
 
4
4
  export function doesIdentifierExist({
5
5
  j,
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.appearanceIconSchema = void 0;
8
8
  exports.getAppearanceIconStyles = getAppearanceIconStyles;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _react = _interopRequireDefault(require("react"));
10
11
  var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
11
12
  var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
12
13
  var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/info"));
@@ -44,7 +45,18 @@ var appearanceIconSchema = exports.appearanceIconSchema = {
44
45
  };
45
46
  function getAppearanceIconStyles(appearance, icon) {
46
47
  var appearanceIconStyles = appearanceIconSchema[appearance] || appearanceIconSchema.information;
47
- var Icon = icon || appearanceIconStyles.Icon;
48
+ var AppearanceIcon = function AppearanceIcon(_ref) {
49
+ var size = _ref.size,
50
+ primaryColor = _ref.primaryColor,
51
+ secondaryColor = _ref.secondaryColor;
52
+ return /*#__PURE__*/_react.default.createElement(appearanceIconStyles.Icon, {
53
+ size: size,
54
+ primaryColor: primaryColor,
55
+ secondaryColor: secondaryColor,
56
+ label: appearance
57
+ });
58
+ };
59
+ var Icon = icon || AppearanceIcon;
48
60
  return _objectSpread(_objectSpread({}, appearanceIconStyles), {}, {
49
61
  Icon: Icon
50
62
  });
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
2
3
  import ErrorIcon from '@atlaskit/icon/glyph/error';
3
4
  import InfoIcon from '@atlaskit/icon/glyph/info';
@@ -33,7 +34,17 @@ export const appearanceIconSchema = {
33
34
  };
34
35
  export function getAppearanceIconStyles(appearance, icon) {
35
36
  const appearanceIconStyles = appearanceIconSchema[appearance] || appearanceIconSchema.information;
36
- const Icon = icon || appearanceIconStyles.Icon;
37
+ const AppearanceIcon = ({
38
+ size,
39
+ primaryColor,
40
+ secondaryColor
41
+ }) => /*#__PURE__*/React.createElement(appearanceIconStyles.Icon, {
42
+ size: size,
43
+ primaryColor: primaryColor,
44
+ secondaryColor: secondaryColor,
45
+ label: appearance
46
+ });
47
+ const Icon = icon || AppearanceIcon;
37
48
  return {
38
49
  ...appearanceIconStyles,
39
50
  Icon
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ import React from 'react';
4
5
  import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
5
6
  import ErrorIcon from '@atlaskit/icon/glyph/error';
6
7
  import InfoIcon from '@atlaskit/icon/glyph/info';
@@ -36,7 +37,18 @@ export var appearanceIconSchema = {
36
37
  };
37
38
  export function getAppearanceIconStyles(appearance, icon) {
38
39
  var appearanceIconStyles = appearanceIconSchema[appearance] || appearanceIconSchema.information;
39
- var Icon = icon || appearanceIconStyles.Icon;
40
+ var AppearanceIcon = function AppearanceIcon(_ref) {
41
+ var size = _ref.size,
42
+ primaryColor = _ref.primaryColor,
43
+ secondaryColor = _ref.secondaryColor;
44
+ return /*#__PURE__*/React.createElement(appearanceIconStyles.Icon, {
45
+ size: size,
46
+ primaryColor: primaryColor,
47
+ secondaryColor: secondaryColor,
48
+ label: appearance
49
+ });
50
+ };
51
+ var Icon = icon || AppearanceIcon;
40
52
  return _objectSpread(_objectSpread({}, appearanceIconStyles), {}, {
41
53
  Icon: Icon
42
54
  });
@@ -1,4 +1,4 @@
1
- import { ComponentType } from 'react';
1
+ import React, { type ComponentType } from 'react';
2
2
  import type { Appearance, SectionMessageProps } from '../types';
3
3
  interface AppearanceIconSchema {
4
4
  backgroundColor: string;
@@ -9,7 +9,11 @@ export declare const appearanceIconSchema: {
9
9
  [key in Appearance]: AppearanceIconSchema;
10
10
  };
11
11
  export declare function getAppearanceIconStyles(appearance: Appearance, icon: SectionMessageProps['icon']): {
12
- Icon: "symbol" | "object" | "head" | "link" | "source" | "body" | "path" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any>;
12
+ Icon: React.ElementType<any> | (({ size, primaryColor, secondaryColor, }: {
13
+ size: string;
14
+ primaryColor: string;
15
+ secondaryColor: string;
16
+ }) => JSX.Element);
13
17
  backgroundColor: string;
14
18
  primaryIconColor: string;
15
19
  };
@@ -1,4 +1,4 @@
1
- import { ComponentType } from 'react';
1
+ import React, { type ComponentType } from 'react';
2
2
  import type { Appearance, SectionMessageProps } from '../types';
3
3
  interface AppearanceIconSchema {
4
4
  backgroundColor: string;
@@ -9,7 +9,11 @@ export declare const appearanceIconSchema: {
9
9
  [key in Appearance]: AppearanceIconSchema;
10
10
  };
11
11
  export declare function getAppearanceIconStyles(appearance: Appearance, icon: SectionMessageProps['icon']): {
12
- Icon: "symbol" | "object" | "head" | "link" | "source" | "body" | "path" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any>;
12
+ Icon: React.ElementType<any> | (({ size, primaryColor, secondaryColor, }: {
13
+ size: string;
14
+ primaryColor: string;
15
+ secondaryColor: string;
16
+ }) => JSX.Element);
13
17
  backgroundColor: string;
14
18
  primaryIconColor: string;
15
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/section-message",
3
- "version": "6.5.0",
3
+ "version": "6.5.2",
4
4
  "description": "A section message is used to alert users to a particular section of the screen.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,13 +41,13 @@
41
41
  ".": "./src/index.tsx"
42
42
  },
43
43
  "dependencies": {
44
- "@atlaskit/button": "^17.14.0",
44
+ "@atlaskit/button": "^17.17.0",
45
45
  "@atlaskit/codemod-utils": "^4.2.0",
46
- "@atlaskit/heading": "^2.2.0",
47
- "@atlaskit/icon": "^22.1.0",
48
- "@atlaskit/primitives": "^5.7.0",
49
- "@atlaskit/theme": "^12.7.0",
50
- "@atlaskit/tokens": "^1.44.0",
46
+ "@atlaskit/heading": "^2.3.0",
47
+ "@atlaskit/icon": "^22.3.0",
48
+ "@atlaskit/primitives": "^6.4.0",
49
+ "@atlaskit/theme": "^12.8.0",
50
+ "@atlaskit/tokens": "^1.49.0",
51
51
  "@babel/runtime": "^7.0.0"
52
52
  },
53
53
  "peerDependencies": {
@@ -60,7 +60,6 @@
60
60
  "@atlaskit/ds-lib": "^2.3.0",
61
61
  "@atlaskit/ssr": "*",
62
62
  "@atlaskit/visual-regression": "*",
63
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
64
63
  "@testing-library/react": "^12.1.5",
65
64
  "exenv": "^1.2.2",
66
65
  "jest-in-case": "^1.0.2",
@@ -92,6 +91,5 @@
92
91
  "deprecation": "no-deprecated-imports"
93
92
  }
94
93
  },
95
- "homepage": "https://atlassian.design/components/section-message/",
96
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
94
+ "homepage": "https://atlassian.design/components/section-message/"
97
95
  }