@atlaskit/icon-file-type 7.0.7 → 7.0.9

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.
Files changed (155) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/afm-cc/tsconfig.json +6 -2
  3. package/afm-jira/tsconfig.json +7 -3
  4. package/afm-products/tsconfig.json +6 -2
  5. package/dist/cjs/index.js +2 -2
  6. package/dist/cjs/internal/icon.compiled.css +30 -0
  7. package/dist/cjs/internal/icon.js +88 -0
  8. package/dist/es2019/index.js +1 -1
  9. package/dist/es2019/internal/icon.compiled.css +30 -0
  10. package/dist/es2019/internal/icon.js +79 -0
  11. package/dist/esm/index.js +1 -1
  12. package/dist/esm/internal/icon.compiled.css +30 -0
  13. package/dist/esm/internal/icon.js +80 -0
  14. package/dist/types/index.d.ts +1 -1
  15. package/dist/types/internal/icon.d.ts +9 -0
  16. package/dist/types-ts4.5/index.d.ts +1 -1
  17. package/dist/types-ts4.5/internal/icon.d.ts +9 -0
  18. package/docs/0-intro.tsx +2 -1
  19. package/docs/content/props-definition.tsx +2 -1
  20. package/docs/content/usage.tsx +2 -1
  21. package/glyph/archive/16.d.ts +2 -3
  22. package/glyph/archive/16.js +12 -22
  23. package/glyph/archive/24.d.ts +2 -3
  24. package/glyph/archive/24.js +12 -22
  25. package/glyph/archive/48.d.ts +2 -3
  26. package/glyph/archive/48.js +13 -23
  27. package/glyph/audio/16.d.ts +2 -3
  28. package/glyph/audio/16.js +12 -22
  29. package/glyph/audio/24.d.ts +2 -3
  30. package/glyph/audio/24.js +12 -22
  31. package/glyph/audio/48.d.ts +2 -3
  32. package/glyph/audio/48.js +13 -23
  33. package/glyph/document/16.d.ts +2 -3
  34. package/glyph/document/16.js +12 -22
  35. package/glyph/document/24.d.ts +2 -3
  36. package/glyph/document/24.js +12 -22
  37. package/glyph/document/48.d.ts +2 -3
  38. package/glyph/document/48.js +13 -23
  39. package/glyph/excel-spreadsheet/16.d.ts +2 -3
  40. package/glyph/excel-spreadsheet/16.js +12 -22
  41. package/glyph/excel-spreadsheet/24.d.ts +2 -3
  42. package/glyph/excel-spreadsheet/24.js +12 -22
  43. package/glyph/excel-spreadsheet/48.d.ts +2 -3
  44. package/glyph/excel-spreadsheet/48.js +13 -23
  45. package/glyph/executable/16.d.ts +2 -3
  46. package/glyph/executable/16.js +12 -22
  47. package/glyph/executable/24.d.ts +2 -3
  48. package/glyph/executable/24.js +12 -22
  49. package/glyph/executable/48.d.ts +2 -3
  50. package/glyph/executable/48.js +13 -23
  51. package/glyph/figma/16.d.ts +2 -3
  52. package/glyph/figma/16.js +12 -22
  53. package/glyph/figma/24.d.ts +2 -3
  54. package/glyph/figma/24.js +12 -22
  55. package/glyph/figma/48.d.ts +2 -3
  56. package/glyph/figma/48.js +13 -23
  57. package/glyph/folder/16.d.ts +2 -3
  58. package/glyph/folder/16.js +12 -22
  59. package/glyph/folder/24.d.ts +2 -3
  60. package/glyph/folder/24.js +12 -22
  61. package/glyph/folder/48.d.ts +2 -3
  62. package/glyph/folder/48.js +13 -23
  63. package/glyph/generic/16.d.ts +2 -3
  64. package/glyph/generic/16.js +12 -22
  65. package/glyph/generic/24.d.ts +2 -3
  66. package/glyph/generic/24.js +12 -22
  67. package/glyph/generic/48.d.ts +2 -3
  68. package/glyph/generic/48.js +13 -23
  69. package/glyph/gif/16.d.ts +2 -3
  70. package/glyph/gif/16.js +12 -22
  71. package/glyph/gif/24.d.ts +2 -3
  72. package/glyph/gif/24.js +12 -22
  73. package/glyph/gif/48.d.ts +2 -3
  74. package/glyph/gif/48.js +13 -23
  75. package/glyph/google-doc/16.d.ts +2 -3
  76. package/glyph/google-doc/16.js +12 -22
  77. package/glyph/google-doc/24.d.ts +2 -3
  78. package/glyph/google-doc/24.js +12 -22
  79. package/glyph/google-doc/48.d.ts +2 -3
  80. package/glyph/google-doc/48.js +13 -23
  81. package/glyph/google-form/16.d.ts +2 -3
  82. package/glyph/google-form/16.js +12 -22
  83. package/glyph/google-form/24.d.ts +2 -3
  84. package/glyph/google-form/24.js +12 -22
  85. package/glyph/google-form/48.d.ts +2 -3
  86. package/glyph/google-form/48.js +13 -23
  87. package/glyph/google-sheet/16.d.ts +2 -3
  88. package/glyph/google-sheet/16.js +12 -22
  89. package/glyph/google-sheet/24.d.ts +2 -3
  90. package/glyph/google-sheet/24.js +12 -22
  91. package/glyph/google-sheet/48.d.ts +2 -3
  92. package/glyph/google-sheet/48.js +13 -23
  93. package/glyph/google-slide/16.d.ts +2 -3
  94. package/glyph/google-slide/16.js +12 -22
  95. package/glyph/google-slide/24.d.ts +2 -3
  96. package/glyph/google-slide/24.js +12 -22
  97. package/glyph/google-slide/48.d.ts +2 -3
  98. package/glyph/google-slide/48.js +13 -23
  99. package/glyph/image/16.d.ts +2 -3
  100. package/glyph/image/16.js +12 -22
  101. package/glyph/image/24.d.ts +2 -3
  102. package/glyph/image/24.js +12 -22
  103. package/glyph/image/48.d.ts +2 -3
  104. package/glyph/image/48.js +13 -23
  105. package/glyph/pdf-document/16.d.ts +2 -3
  106. package/glyph/pdf-document/16.js +12 -22
  107. package/glyph/pdf-document/24.d.ts +2 -3
  108. package/glyph/pdf-document/24.js +12 -22
  109. package/glyph/pdf-document/48.d.ts +2 -3
  110. package/glyph/pdf-document/48.js +13 -23
  111. package/glyph/powerpoint-presentation/16.d.ts +2 -3
  112. package/glyph/powerpoint-presentation/16.js +12 -22
  113. package/glyph/powerpoint-presentation/24.d.ts +2 -3
  114. package/glyph/powerpoint-presentation/24.js +12 -22
  115. package/glyph/powerpoint-presentation/48.d.ts +2 -3
  116. package/glyph/powerpoint-presentation/48.js +13 -23
  117. package/glyph/presentation/16.d.ts +2 -3
  118. package/glyph/presentation/16.js +12 -22
  119. package/glyph/presentation/24.d.ts +2 -3
  120. package/glyph/presentation/24.js +12 -22
  121. package/glyph/presentation/48.d.ts +2 -3
  122. package/glyph/presentation/48.js +13 -23
  123. package/glyph/sketch/16.d.ts +2 -3
  124. package/glyph/sketch/16.js +12 -22
  125. package/glyph/sketch/24.d.ts +2 -3
  126. package/glyph/sketch/24.js +12 -22
  127. package/glyph/sketch/48.d.ts +2 -3
  128. package/glyph/sketch/48.js +13 -23
  129. package/glyph/source-code/16.d.ts +2 -3
  130. package/glyph/source-code/16.js +12 -22
  131. package/glyph/source-code/24.d.ts +2 -3
  132. package/glyph/source-code/24.js +12 -22
  133. package/glyph/source-code/48.d.ts +2 -3
  134. package/glyph/source-code/48.js +13 -23
  135. package/glyph/spreadsheet/16.d.ts +2 -3
  136. package/glyph/spreadsheet/16.js +12 -22
  137. package/glyph/spreadsheet/24.d.ts +2 -3
  138. package/glyph/spreadsheet/24.js +12 -22
  139. package/glyph/spreadsheet/48.d.ts +2 -3
  140. package/glyph/spreadsheet/48.js +13 -23
  141. package/glyph/video/16.d.ts +2 -3
  142. package/glyph/video/16.js +12 -22
  143. package/glyph/video/24.d.ts +2 -3
  144. package/glyph/video/24.js +12 -22
  145. package/glyph/video/48.d.ts +2 -3
  146. package/glyph/video/48.js +13 -23
  147. package/glyph/word-document/16.d.ts +2 -3
  148. package/glyph/word-document/16.js +12 -22
  149. package/glyph/word-document/24.d.ts +2 -3
  150. package/glyph/word-document/24.js +12 -22
  151. package/glyph/word-document/48.d.ts +2 -3
  152. package/glyph/word-document/48.js +13 -23
  153. package/package.json +5 -3
  154. package/tsconfig.json +18 -19
  155. package/build/tsconfig.json +0 -23
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/icon-file-type
2
2
 
3
+ ## 7.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cba951d9c882d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cba951d9c882d) -
8
+ Remove icon/base dependency. Uses local version of icon base.
9
+ - Updated dependencies
10
+
11
+ ## 7.0.8
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 7.0.7
4
18
 
5
19
  ### Patch Changes
@@ -1,11 +1,12 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.confluence.json",
2
+ "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../confluence/tsDist/@atlaskit__icon-file-type",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -25,6 +26,9 @@
25
26
  "references": [
26
27
  {
27
28
  "path": "../../../design-system/icon/afm-cc/tsconfig.json"
29
+ },
30
+ {
31
+ "path": "../../../design-system/tokens/afm-cc/tsconfig.json"
28
32
  }
29
33
  ]
30
34
  }
@@ -1,11 +1,12 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
2
+ "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__icon-file-type/app",
6
+ "outDir": "../../../../../jira/tsDist/@atlaskit__icon-file-type/app",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -25,6 +26,9 @@
25
26
  "references": [
26
27
  {
27
28
  "path": "../../../design-system/icon/afm-jira/tsconfig.json"
29
+ },
30
+ {
31
+ "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
28
32
  }
29
33
  ]
30
34
  }
@@ -1,11 +1,12 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.products.json",
2
+ "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../tsDist/@atlaskit__icon-file-type/app",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -25,6 +26,9 @@
25
26
  "references": [
26
27
  {
27
28
  "path": "../../../design-system/icon/afm-products/tsconfig.json"
29
+ },
30
+ {
31
+ "path": "../../../design-system/tokens/afm-products/tsconfig.json"
28
32
  }
29
33
  ]
30
34
  }
package/dist/cjs/index.js CHANGED
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  Object.defineProperty(exports, "default", {
8
8
  enumerable: true,
9
9
  get: function get() {
10
- return _base.default;
10
+ return _icon.default;
11
11
  }
12
12
  });
13
- var _base = _interopRequireDefault(require("@atlaskit/icon/base"));
13
+ var _icon = _interopRequireDefault(require("./internal/icon"));
@@ -0,0 +1,30 @@
1
+ ._17jb1osq >svg{max-height:100%}
2
+ ._1bsb1tcg{width:24px}
3
+ ._1bsb7vkz{width:1pc}
4
+ ._1bsbckbl{width:3pc}
5
+ ._1bsbzwfg{width:2pc}
6
+ ._1e0c1o8l{display:inline-block}
7
+ ._1kg81r31 >svg stop{stop-color:currentColor}
8
+ ._1ksvoz0e >svg{color:var(--icon-primary-color)}
9
+ ._1o9zidpf{flex-shrink:0}
10
+ ._1szv15vq >svg{overflow-x:hidden}
11
+ ._1tly15vq >svg{overflow-y:hidden}
12
+ ._1veoyfq0 >svg{vertical-align:bottom}
13
+ ._3se1x1jp >svg{fill:var(--icon-secondary-color)}
14
+ ._4t3i1tcg{height:24px}
15
+ ._4t3i7vkz{height:1pc}
16
+ ._4t3ickbl{height:3pc}
17
+ ._4t3izwfg{height:2pc}
18
+ ._5fdi1tcg >svg{width:24px}
19
+ ._5fdi7vkz >svg{width:1pc}
20
+ ._5fdickbl >svg{width:3pc}
21
+ ._5fdizwfg >svg{width:2pc}
22
+ ._re2rglyw >svg{pointer-events:none}
23
+ ._rzyw1osq >svg{max-width:100%}
24
+ ._vwz4kb7n{line-height:1}
25
+ ._vyfuvuon{--icon-secondary-color:var(--ds-surface,#fff)}
26
+ ._zbji1tcg >svg{height:24px}
27
+ ._zbji7vkz >svg{height:1pc}
28
+ ._zbjickbl >svg{height:3pc}
29
+ ._zbjizwfg >svg{height:2pc}
30
+ @media screen and (forced-colors:active){._18hbwc43 >svg{--icon-primary-color:Canvas}._4fyi1j28 >svg{--icon-secondary-color:transparent}._jcxd1r8n{filter:grayscale(1)}._gq0g1onz{--icon-primary-color:CanvasText}._1trkwc43{--icon-secondary-color:Canvas}}
@@ -0,0 +1,88 @@
1
+ /* icon.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.default = exports.Icon = void 0;
10
+ require("./icon.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
14
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
+ 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; }
18
+ 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) { (0, _defineProperty2.default)(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; }
19
+ /**
20
+ * We are hiding these props from consumers as they're used to
21
+ * hack around icon sizing specifically for icon-file-type.
22
+ */
23
+
24
+ var iconStyles = null;
25
+ var sizeStyles = {
26
+ small: "_1bsb7vkz _4t3i7vkz _5fdi7vkz _zbji7vkz",
27
+ medium: "_1bsb1tcg _4t3i1tcg _5fdi1tcg _zbji1tcg",
28
+ large: "_1bsbzwfg _4t3izwfg _5fdizwfg _zbjizwfg",
29
+ xlarge: "_1bsbckbl _4t3ickbl _5fdickbl _zbjickbl"
30
+ };
31
+
32
+ /**
33
+ * For windows high contrast mode
34
+ */
35
+ var baseHcmStyles = null;
36
+ var primaryEqualsSecondaryHcmStyles = null;
37
+ var secondaryTransparentHcmStyles = null;
38
+
39
+ /**
40
+ * __Icon__
41
+ *
42
+ * Replica of deprecated legacy icon/base
43
+ *
44
+ */
45
+ var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
46
+ var _ref = props,
47
+ Glyph = _ref.glyph,
48
+ dangerouslySetGlyph = _ref.dangerouslySetGlyph,
49
+ _ref$primaryColor = _ref.primaryColor,
50
+ primaryColor = _ref$primaryColor === void 0 ? 'currentColor' : _ref$primaryColor,
51
+ secondaryColor = _ref.secondaryColor,
52
+ size = _ref.size,
53
+ testId = _ref.testId,
54
+ label = _ref.label,
55
+ width = _ref.width,
56
+ height = _ref.height,
57
+ UNSAFE_margin = _ref.UNSAFE_margin;
58
+ var glyphProps = dangerouslySetGlyph ? {
59
+ dangerouslySetInnerHTML: {
60
+ __html: dangerouslySetGlyph
61
+ }
62
+ } : {
63
+ children: Glyph ? /*#__PURE__*/React.createElement(Glyph, {
64
+ role: "presentation"
65
+ }) : null
66
+ };
67
+ var customDimensions = width && height ? {
68
+ width: width + 'px',
69
+ height: height + 'px'
70
+ } : null;
71
+ return /*#__PURE__*/React.createElement("span", (0, _extends2.default)({
72
+ "data-testid": testId,
73
+ "data-vc": "icon-".concat(testId),
74
+ role: label ? 'img' : undefined,
75
+ "aria-label": label ? label : undefined,
76
+ "aria-hidden": label ? undefined : true,
77
+ style: _objectSpread(_objectSpread({}, customDimensions), {}, {
78
+ '--icon-primary-color': primaryColor,
79
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
80
+ '--icon-secondary-color': secondaryColor,
81
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
82
+ margin: UNSAFE_margin
83
+ })
84
+ }, glyphProps, {
85
+ className: (0, _runtime.ax)(["_1e0c1o8l _1o9zidpf _vyfuvuon _vwz4kb7n _1szv15vq _1tly15vq _rzyw1osq _17jb1osq _1ksvoz0e _3se1x1jp _re2rglyw _1veoyfq0 _1kg81r31", "_jcxd1r8n _gq0g1onz _1trkwc43", primaryColor === secondaryColor && "_18hbwc43", secondaryColor === 'transparent' && "_4fyi1j28", size && sizeStyles[size]])
86
+ }));
87
+ });
88
+ var _default = exports.default = Icon;
@@ -1 +1 @@
1
- export { default } from '@atlaskit/icon/base';
1
+ export { default } from './internal/icon';
@@ -0,0 +1,30 @@
1
+ ._17jb1osq >svg{max-height:100%}
2
+ ._1bsb1tcg{width:24px}
3
+ ._1bsb7vkz{width:1pc}
4
+ ._1bsbckbl{width:3pc}
5
+ ._1bsbzwfg{width:2pc}
6
+ ._1e0c1o8l{display:inline-block}
7
+ ._1kg81r31 >svg stop{stop-color:currentColor}
8
+ ._1ksvoz0e >svg{color:var(--icon-primary-color)}
9
+ ._1o9zidpf{flex-shrink:0}
10
+ ._1szv15vq >svg{overflow-x:hidden}
11
+ ._1tly15vq >svg{overflow-y:hidden}
12
+ ._1veoyfq0 >svg{vertical-align:bottom}
13
+ ._3se1x1jp >svg{fill:var(--icon-secondary-color)}
14
+ ._4t3i1tcg{height:24px}
15
+ ._4t3i7vkz{height:1pc}
16
+ ._4t3ickbl{height:3pc}
17
+ ._4t3izwfg{height:2pc}
18
+ ._5fdi1tcg >svg{width:24px}
19
+ ._5fdi7vkz >svg{width:1pc}
20
+ ._5fdickbl >svg{width:3pc}
21
+ ._5fdizwfg >svg{width:2pc}
22
+ ._re2rglyw >svg{pointer-events:none}
23
+ ._rzyw1osq >svg{max-width:100%}
24
+ ._vwz4kb7n{line-height:1}
25
+ ._vyfuvuon{--icon-secondary-color:var(--ds-surface,#fff)}
26
+ ._zbji1tcg >svg{height:24px}
27
+ ._zbji7vkz >svg{height:1pc}
28
+ ._zbjickbl >svg{height:3pc}
29
+ ._zbjizwfg >svg{height:2pc}
30
+ @media screen and (forced-colors:active){._18hbwc43 >svg{--icon-primary-color:Canvas}._4fyi1j28 >svg{--icon-secondary-color:transparent}._jcxd1r8n{filter:grayscale(1)}._gq0g1onz{--icon-primary-color:CanvasText}._1trkwc43{--icon-secondary-color:Canvas}}
@@ -0,0 +1,79 @@
1
+ /* icon.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import "./icon.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ import { memo } from 'react';
7
+
8
+ /**
9
+ * We are hiding these props from consumers as they're used to
10
+ * hack around icon sizing specifically for icon-file-type.
11
+ */
12
+
13
+ const iconStyles = null;
14
+ const sizeStyles = {
15
+ small: "_1bsb7vkz _4t3i7vkz _5fdi7vkz _zbji7vkz",
16
+ medium: "_1bsb1tcg _4t3i1tcg _5fdi1tcg _zbji1tcg",
17
+ large: "_1bsbzwfg _4t3izwfg _5fdizwfg _zbjizwfg",
18
+ xlarge: "_1bsbckbl _4t3ickbl _5fdickbl _zbjickbl"
19
+ };
20
+
21
+ /**
22
+ * For windows high contrast mode
23
+ */
24
+ const baseHcmStyles = null;
25
+ const primaryEqualsSecondaryHcmStyles = null;
26
+ const secondaryTransparentHcmStyles = null;
27
+
28
+ /**
29
+ * __Icon__
30
+ *
31
+ * Replica of deprecated legacy icon/base
32
+ *
33
+ */
34
+ export const Icon = /*#__PURE__*/memo(function Icon(props) {
35
+ const {
36
+ glyph: Glyph,
37
+ dangerouslySetGlyph,
38
+ primaryColor = 'currentColor',
39
+ secondaryColor,
40
+ size,
41
+ testId,
42
+ label,
43
+ width,
44
+ height,
45
+ UNSAFE_margin
46
+ } = props;
47
+ const glyphProps = dangerouslySetGlyph ? {
48
+ dangerouslySetInnerHTML: {
49
+ __html: dangerouslySetGlyph
50
+ }
51
+ } : {
52
+ children: Glyph ? /*#__PURE__*/React.createElement(Glyph, {
53
+ role: "presentation"
54
+ }) : null
55
+ };
56
+ const customDimensions = width && height ? {
57
+ width: width + 'px',
58
+ height: height + 'px'
59
+ } : null;
60
+ return /*#__PURE__*/React.createElement("span", _extends({
61
+ "data-testid": testId,
62
+ "data-vc": `icon-${testId}`,
63
+ role: label ? 'img' : undefined,
64
+ "aria-label": label ? label : undefined,
65
+ "aria-hidden": label ? undefined : true,
66
+ style: {
67
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
68
+ ...customDimensions,
69
+ '--icon-primary-color': primaryColor,
70
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
71
+ '--icon-secondary-color': secondaryColor,
72
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
73
+ margin: UNSAFE_margin
74
+ }
75
+ }, glyphProps, {
76
+ className: ax(["_1e0c1o8l _1o9zidpf _vyfuvuon _vwz4kb7n _1szv15vq _1tly15vq _rzyw1osq _17jb1osq _1ksvoz0e _3se1x1jp _re2rglyw _1veoyfq0 _1kg81r31", "_jcxd1r8n _gq0g1onz _1trkwc43", primaryColor === secondaryColor && "_18hbwc43", secondaryColor === 'transparent' && "_4fyi1j28", size && sizeStyles[size]])
77
+ }));
78
+ });
79
+ export default Icon;
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { default } from '@atlaskit/icon/base';
1
+ export { default } from './internal/icon';
@@ -0,0 +1,30 @@
1
+ ._17jb1osq >svg{max-height:100%}
2
+ ._1bsb1tcg{width:24px}
3
+ ._1bsb7vkz{width:1pc}
4
+ ._1bsbckbl{width:3pc}
5
+ ._1bsbzwfg{width:2pc}
6
+ ._1e0c1o8l{display:inline-block}
7
+ ._1kg81r31 >svg stop{stop-color:currentColor}
8
+ ._1ksvoz0e >svg{color:var(--icon-primary-color)}
9
+ ._1o9zidpf{flex-shrink:0}
10
+ ._1szv15vq >svg{overflow-x:hidden}
11
+ ._1tly15vq >svg{overflow-y:hidden}
12
+ ._1veoyfq0 >svg{vertical-align:bottom}
13
+ ._3se1x1jp >svg{fill:var(--icon-secondary-color)}
14
+ ._4t3i1tcg{height:24px}
15
+ ._4t3i7vkz{height:1pc}
16
+ ._4t3ickbl{height:3pc}
17
+ ._4t3izwfg{height:2pc}
18
+ ._5fdi1tcg >svg{width:24px}
19
+ ._5fdi7vkz >svg{width:1pc}
20
+ ._5fdickbl >svg{width:3pc}
21
+ ._5fdizwfg >svg{width:2pc}
22
+ ._re2rglyw >svg{pointer-events:none}
23
+ ._rzyw1osq >svg{max-width:100%}
24
+ ._vwz4kb7n{line-height:1}
25
+ ._vyfuvuon{--icon-secondary-color:var(--ds-surface,#fff)}
26
+ ._zbji1tcg >svg{height:24px}
27
+ ._zbji7vkz >svg{height:1pc}
28
+ ._zbjickbl >svg{height:3pc}
29
+ ._zbjizwfg >svg{height:2pc}
30
+ @media screen and (forced-colors:active){._18hbwc43 >svg{--icon-primary-color:Canvas}._4fyi1j28 >svg{--icon-secondary-color:transparent}._jcxd1r8n{filter:grayscale(1)}._gq0g1onz{--icon-primary-color:CanvasText}._1trkwc43{--icon-secondary-color:Canvas}}
@@ -0,0 +1,80 @@
1
+ /* icon.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import "./icon.compiled.css";
5
+ import * as React from 'react';
6
+ import { ax, ix } from "@compiled/react/runtime";
7
+ 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; }
8
+ 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; }
9
+ import { memo } from 'react';
10
+
11
+ /**
12
+ * We are hiding these props from consumers as they're used to
13
+ * hack around icon sizing specifically for icon-file-type.
14
+ */
15
+
16
+ var iconStyles = null;
17
+ var sizeStyles = {
18
+ small: "_1bsb7vkz _4t3i7vkz _5fdi7vkz _zbji7vkz",
19
+ medium: "_1bsb1tcg _4t3i1tcg _5fdi1tcg _zbji1tcg",
20
+ large: "_1bsbzwfg _4t3izwfg _5fdizwfg _zbjizwfg",
21
+ xlarge: "_1bsbckbl _4t3ickbl _5fdickbl _zbjickbl"
22
+ };
23
+
24
+ /**
25
+ * For windows high contrast mode
26
+ */
27
+ var baseHcmStyles = null;
28
+ var primaryEqualsSecondaryHcmStyles = null;
29
+ var secondaryTransparentHcmStyles = null;
30
+
31
+ /**
32
+ * __Icon__
33
+ *
34
+ * Replica of deprecated legacy icon/base
35
+ *
36
+ */
37
+ export var Icon = /*#__PURE__*/memo(function Icon(props) {
38
+ var _ref = props,
39
+ Glyph = _ref.glyph,
40
+ dangerouslySetGlyph = _ref.dangerouslySetGlyph,
41
+ _ref$primaryColor = _ref.primaryColor,
42
+ primaryColor = _ref$primaryColor === void 0 ? 'currentColor' : _ref$primaryColor,
43
+ secondaryColor = _ref.secondaryColor,
44
+ size = _ref.size,
45
+ testId = _ref.testId,
46
+ label = _ref.label,
47
+ width = _ref.width,
48
+ height = _ref.height,
49
+ UNSAFE_margin = _ref.UNSAFE_margin;
50
+ var glyphProps = dangerouslySetGlyph ? {
51
+ dangerouslySetInnerHTML: {
52
+ __html: dangerouslySetGlyph
53
+ }
54
+ } : {
55
+ children: Glyph ? /*#__PURE__*/React.createElement(Glyph, {
56
+ role: "presentation"
57
+ }) : null
58
+ };
59
+ var customDimensions = width && height ? {
60
+ width: width + 'px',
61
+ height: height + 'px'
62
+ } : null;
63
+ return /*#__PURE__*/React.createElement("span", _extends({
64
+ "data-testid": testId,
65
+ "data-vc": "icon-".concat(testId),
66
+ role: label ? 'img' : undefined,
67
+ "aria-label": label ? label : undefined,
68
+ "aria-hidden": label ? undefined : true,
69
+ style: _objectSpread(_objectSpread({}, customDimensions), {}, {
70
+ '--icon-primary-color': primaryColor,
71
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
72
+ '--icon-secondary-color': secondaryColor,
73
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
74
+ margin: UNSAFE_margin
75
+ })
76
+ }, glyphProps, {
77
+ className: ax(["_1e0c1o8l _1o9zidpf _vyfuvuon _vwz4kb7n _1szv15vq _1tly15vq _rzyw1osq _17jb1osq _1ksvoz0e _3se1x1jp _re2rglyw _1veoyfq0 _1kg81r31", "_jcxd1r8n _gq0g1onz _1trkwc43", primaryColor === secondaryColor && "_18hbwc43", secondaryColor === 'transparent' && "_4fyi1j28", size && sizeStyles[size]])
78
+ }));
79
+ });
80
+ export default Icon;
@@ -1 +1 @@
1
- export { default } from '@atlaskit/icon/base';
1
+ export { default } from './internal/icon';
@@ -0,0 +1,9 @@
1
+ import type { IconProps } from '@atlaskit/icon/types';
2
+ /**
3
+ * __Icon__
4
+ *
5
+ * Replica of deprecated legacy icon/base
6
+ *
7
+ */
8
+ export declare const Icon: import('react').NamedExoticComponent<IconProps>;
9
+ export default Icon;
@@ -1 +1 @@
1
- export { default } from '@atlaskit/icon/base';
1
+ export { default } from './internal/icon';
@@ -0,0 +1,9 @@
1
+ import type { IconProps } from '@atlaskit/icon/types';
2
+ /**
3
+ * __Icon__
4
+ *
5
+ * Replica of deprecated legacy icon/base
6
+ *
7
+ */
8
+ export declare const Icon: import('react').NamedExoticComponent<IconProps>;
9
+ export default Icon;
package/docs/0-intro.tsx CHANGED
@@ -4,7 +4,7 @@ import { DocsContentTabs } from '@atlaskit/media-test-helpers';
4
4
  import UsageTab from './content/usage';
5
5
  import PropsDefinitionTab from './content/props-definition';
6
6
 
7
- export default md`
7
+ const _default_1: any = md`
8
8
  ### Description
9
9
  This package provides the collections of icons for the different types of content used across Atlassian products.
10
10
 
@@ -17,3 +17,4 @@ This package provides the collections of icons for the different types of conten
17
17
  />
18
18
  )}
19
19
  `;
20
+ export default _default_1;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { md, PropsTable } from '@atlaskit/docs';
3
3
 
4
- export default md`
4
+ const _default_1: any = md`
5
5
  # Props
6
6
 
7
7
  This package utilizes the \`@atlaskit/icon\` component and accepts the following props:
@@ -26,3 +26,4 @@ This package utilizes the \`@atlaskit/icon\` component and accepts the following
26
26
  )}
27
27
 
28
28
  `;
29
+ export default _default_1;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { md } from '@atlaskit/docs';
3
3
  import IconExplorer from '../../examples/icon-explorer';
4
4
 
5
- export default md`
5
+ const _default_1: any = md`
6
6
  ##
7
7
  ## Icon Explorer
8
8
  ${
@@ -15,3 +15,4 @@ export default md`
15
15
  }
16
16
 
17
17
  `;
18
+ export default _default_1;
@@ -1,6 +1,5 @@
1
1
  import { PureComponent } from 'react';
2
2
  import type { GlyphProps } from '@atlaskit/icon/types';
3
3
 
4
- export default class extends PureComponent<
5
- Omit<GlyphProps, 'primaryColor' | 'secondaryColor' | 'size'>
6
- > {}
4
+
5
+ export default class extends PureComponent<Omit<GlyphProps, 'primaryColor' | 'secondaryColor' | 'size'>> {}
@@ -1,26 +1,16 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true,
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = _interopRequireDefault(require('react'));
8
- var _base = require('@atlaskit/icon/base');
9
- function _interopRequireDefault(e) {
10
- return e && e.__esModule ? e : { default: e };
11
- }
12
- const Archive16Icon = (props) =>
13
- /*#__PURE__*/ _react.default.createElement(
14
- _base.Icon,
15
- Object.assign(
16
- {
17
- dangerouslySetGlyph: `<svg width="16" height="16" viewBox="0 0 16 16" role="presentation"><path fill="#758195" fill-rule="evenodd" d="M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m4 3v2h2V3zm2 2v2h2V5zM6 7v2h2V7zm2 2v2h2V9zm-2.307 2v2h2v-2z"/></svg>`,
18
- },
19
- props,
20
- {
21
- size: 'small',
22
- },
23
- ),
24
- );
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _icon = require("../../src/internal/icon.tsx");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const Archive16Icon = props => /*#__PURE__*/_react.default.createElement(_icon.Icon, Object.assign({
11
+ dangerouslySetGlyph: `<svg width="16" height="16" viewBox="0 0 16 16" role="presentation"><path fill="#758195" fill-rule="evenodd" d="M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m4 3v2h2V3zm2 2v2h2V5zM6 7v2h2V7zm2 2v2h2V9zm-2.307 2v2h2v-2z"/></svg>`
12
+ }, props, {
13
+ size: "small"
14
+ }));
25
15
  Archive16Icon.displayName = 'Archive16Icon';
26
- var _default = (exports.default = Archive16Icon);
16
+ var _default = exports.default = Archive16Icon;
@@ -1,6 +1,5 @@
1
1
  import { PureComponent } from 'react';
2
2
  import type { GlyphProps } from '@atlaskit/icon/types';
3
3
 
4
- export default class extends PureComponent<
5
- Omit<GlyphProps, 'primaryColor' | 'secondaryColor' | 'size'>
6
- > {}
4
+
5
+ export default class extends PureComponent<Omit<GlyphProps, 'primaryColor' | 'secondaryColor' | 'size'>> {}
@@ -1,26 +1,16 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true,
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = _interopRequireDefault(require('react'));
8
- var _base = require('@atlaskit/icon/base');
9
- function _interopRequireDefault(e) {
10
- return e && e.__esModule ? e : { default: e };
11
- }
12
- const Archive24Icon = (props) =>
13
- /*#__PURE__*/ _react.default.createElement(
14
- _base.Icon,
15
- Object.assign(
16
- {
17
- dangerouslySetGlyph: `<svg width="24" height="24" viewBox="0 0 24 24" role="presentation"><path fill="#758195" fill-rule="evenodd" d="M3 0h18a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3m6 3v3h3V3zm3 3v3h3V6zM9 9v3h3V9zm3 3v3h3v-3zm-3 3v3h3v-3zm3 3v3h3v-3z"/></svg>`,
18
- },
19
- props,
20
- {
21
- size: 'medium',
22
- },
23
- ),
24
- );
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _icon = require("../../src/internal/icon.tsx");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const Archive24Icon = props => /*#__PURE__*/_react.default.createElement(_icon.Icon, Object.assign({
11
+ dangerouslySetGlyph: `<svg width="24" height="24" viewBox="0 0 24 24" role="presentation"><path fill="#758195" fill-rule="evenodd" d="M3 0h18a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3m6 3v3h3V3zm3 3v3h3V6zM9 9v3h3V9zm3 3v3h3v-3zm-3 3v3h3v-3zm3 3v3h3v-3z"/></svg>`
12
+ }, props, {
13
+ size: "medium"
14
+ }));
25
15
  Archive24Icon.displayName = 'Archive24Icon';
26
- var _default = (exports.default = Archive24Icon);
16
+ var _default = exports.default = Archive24Icon;
@@ -1,6 +1,5 @@
1
1
  import { PureComponent } from 'react';
2
2
  import type { GlyphProps } from '@atlaskit/icon/types';
3
3
 
4
- export default class extends PureComponent<
5
- Omit<GlyphProps, 'primaryColor' | 'secondaryColor' | 'size'>
6
- > {}
4
+
5
+ export default class extends PureComponent<Omit<GlyphProps, 'primaryColor' | 'secondaryColor' | 'size'>> {}