@atlaskit/textarea 5.6.3 → 5.7.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,29 @@
1
1
  # @atlaskit/textarea
2
2
 
3
+ ## 5.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#173737](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/173737)
8
+ [`667640085e5c7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/667640085e5c7) -
9
+ Update the font size for the textarea and select components at the `xs` breakpoint. The font size
10
+ will be increased to 16px to prevent IOS Safari from zooming in on the text field when it is
11
+ focused. Styles for larger breakpoints will remain unchanged.
12
+
13
+ Apply a fix to the textfield component to ensure monospace is correctly applied to the input at
14
+ the `media.above.xs` breakpoint.
15
+
16
+ These changes are currently behind a feature gate and will be evaluated for effectiveness. If
17
+ successful, they will be included in a future release.
18
+
19
+ ## 5.6.4
20
+
21
+ ### Patch Changes
22
+
23
+ - [#166026](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166026)
24
+ [`962b5e77810fb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b5e77810fb) -
25
+ Adds side-effect config to support Compiled css extraction in third-party apps
26
+
3
27
  ## 5.6.3
4
28
 
5
29
  ### Patch Changes
@@ -3,7 +3,9 @@
3
3
  "main": "../dist/cjs/component-tokens.js",
4
4
  "module": "../dist/esm/component-tokens.js",
5
5
  "module:es2019": "../dist/es2019/component-tokens.js",
6
- "sideEffects": false,
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
7
9
  "types": "../dist/types/component-tokens.d.ts",
8
10
  "typesVersions": {
9
11
  ">=4.5 <5.4": {
@@ -8,6 +8,8 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.getBaseStyles = exports.dynamicStyles = exports.borderWidth = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _react = require("@emotion/react");
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
+ var _primitives = require("@atlaskit/primitives");
11
13
  var componentTokens = _interopRequireWildcard(require("./component-tokens"));
12
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -248,6 +250,19 @@ var staticStyles = (0, _react.css)({
248
250
  boxShadow: 'none'
249
251
  }
250
252
  });
253
+
254
+ // suggestion: these two could be merged into cssMap during @compiled rewrite
255
+ var newFontStyles = (0, _react.css)((0, _defineProperty2.default)({
256
+ font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
257
+ }, _primitives.media.above.xs, {
258
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
259
+ }));
260
+ var monospacedFontFamilyStyles = (0, _react.css)((0, _defineProperty2.default)({
261
+ fontFamily: codeFontFamily
262
+ }, _primitives.media.above.xs, {
263
+ // Reapply the monospaced font family as the font declaration used in the breakpoint in newFontStyles overrides it otherwise
264
+ fontFamily: codeFontFamily
265
+ }));
251
266
  var getBaseStyles = exports.getBaseStyles = function getBaseStyles(_ref) {
252
267
  var minimumRows = _ref.minimumRows,
253
268
  resize = _ref.resize,
@@ -265,8 +280,13 @@ var getBaseStyles = exports.getBaseStyles = function getBaseStyles(_ref) {
265
280
  resizeStyle(resize),
266
281
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
267
282
  borderStyle(appearance),
283
+ // @todo: remove in `platform_design_system_team_safari_input_fix` cleanup
268
284
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
269
285
  fontFamilyStyle(isMonospaced),
286
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
287
+ (0, _platformFeatureFlags.fg)('platform_design_system_team_safari_input_fix') ? newFontStyles : undefined,
288
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
289
+ isMonospaced && (0, _platformFeatureFlags.fg)('platform_design_system_team_safari_input_fix') ? monospacedFontFamilyStyles : undefined,
270
290
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
271
291
  {
272
292
  maxHeight: maxHeight
@@ -25,7 +25,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
25
25
  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; }
26
26
  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; }
27
27
  var packageName = "@atlaskit/textarea";
28
- var packageVersion = "5.6.3";
28
+ var packageVersion = "5.7.0";
29
29
  var analyticsParams = {
30
30
  componentName: 'textArea',
31
31
  packageName: packageName,
@@ -4,6 +4,8 @@
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css } from '@emotion/react';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { media } from '@atlaskit/primitives';
7
9
  import * as componentTokens from './component-tokens';
8
10
  const disabledRules = {
9
11
  backgroundColor: componentTokens.disabledBackground,
@@ -234,6 +236,21 @@ const staticStyles = css({
234
236
  boxShadow: 'none'
235
237
  }
236
238
  });
239
+
240
+ // suggestion: these two could be merged into cssMap during @compiled rewrite
241
+ const newFontStyles = css({
242
+ font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
243
+ [media.above.xs]: {
244
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
245
+ }
246
+ });
247
+ const monospacedFontFamilyStyles = css({
248
+ fontFamily: codeFontFamily,
249
+ [media.above.xs]: {
250
+ // Reapply the monospaced font family as the font declaration used in the breakpoint in newFontStyles overrides it otherwise
251
+ fontFamily: codeFontFamily
252
+ }
253
+ });
237
254
  export const getBaseStyles = ({
238
255
  minimumRows,
239
256
  resize,
@@ -251,8 +268,13 @@ borderPaddingAndHeightStyles(minimumRows, appearance),
251
268
  resizeStyle(resize),
252
269
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
253
270
  borderStyle(appearance),
271
+ // @todo: remove in `platform_design_system_team_safari_input_fix` cleanup
254
272
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
255
273
  fontFamilyStyle(isMonospaced),
274
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
275
+ fg('platform_design_system_team_safari_input_fix') ? newFontStyles : undefined,
276
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
277
+ isMonospaced && fg('platform_design_system_team_safari_input_fix') ? monospacedFontFamilyStyles : undefined,
256
278
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
257
279
  {
258
280
  maxHeight
@@ -10,7 +10,7 @@ import { css, jsx } from '@emotion/react';
10
10
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
11
11
  import { borderWidth, dynamicStyles, getBaseStyles } from './styles';
12
12
  const packageName = "@atlaskit/textarea";
13
- const packageVersion = "5.6.3";
13
+ const packageVersion = "5.7.0";
14
14
  const analyticsParams = {
15
15
  componentName: 'textArea',
16
16
  packageName,
@@ -7,6 +7,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  */
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css } from '@emotion/react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { media } from '@atlaskit/primitives';
10
12
  import * as componentTokens from './component-tokens';
11
13
  var disabledRules = {
12
14
  backgroundColor: componentTokens.disabledBackground,
@@ -240,6 +242,19 @@ var staticStyles = css({
240
242
  boxShadow: 'none'
241
243
  }
242
244
  });
245
+
246
+ // suggestion: these two could be merged into cssMap during @compiled rewrite
247
+ var newFontStyles = css(_defineProperty({
248
+ font: "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
249
+ }, media.above.xs, {
250
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
251
+ }));
252
+ var monospacedFontFamilyStyles = css(_defineProperty({
253
+ fontFamily: codeFontFamily
254
+ }, media.above.xs, {
255
+ // Reapply the monospaced font family as the font declaration used in the breakpoint in newFontStyles overrides it otherwise
256
+ fontFamily: codeFontFamily
257
+ }));
243
258
  export var getBaseStyles = function getBaseStyles(_ref) {
244
259
  var minimumRows = _ref.minimumRows,
245
260
  resize = _ref.resize,
@@ -257,8 +272,13 @@ export var getBaseStyles = function getBaseStyles(_ref) {
257
272
  resizeStyle(resize),
258
273
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
259
274
  borderStyle(appearance),
275
+ // @todo: remove in `platform_design_system_team_safari_input_fix` cleanup
260
276
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
261
277
  fontFamilyStyle(isMonospaced),
278
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
279
+ fg('platform_design_system_team_safari_input_fix') ? newFontStyles : undefined,
280
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
281
+ isMonospaced && fg('platform_design_system_team_safari_input_fix') ? monospacedFontFamilyStyles : undefined,
262
282
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
263
283
  {
264
284
  maxHeight: maxHeight
@@ -16,7 +16,7 @@ import { css, jsx } from '@emotion/react';
16
16
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
17
17
  import { borderWidth, dynamicStyles, getBaseStyles } from './styles';
18
18
  var packageName = "@atlaskit/textarea";
19
- var packageVersion = "5.6.3";
19
+ var packageVersion = "5.7.0";
20
20
  var analyticsParams = {
21
21
  componentName: 'textArea',
22
22
  packageName: packageName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "5.6.3",
3
+ "version": "5.7.0",
4
4
  "description": "A text area lets users enter long form text which spans over multiple lines.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -20,7 +20,9 @@
20
20
  ]
21
21
  }
22
22
  },
23
- "sideEffects": false,
23
+ "sideEffects": [
24
+ "**/*.compiled.css"
25
+ ],
24
26
  "atlaskit:src": "src/index.tsx",
25
27
  "homepage": "https://atlassian.design/components/textarea/",
26
28
  "atlassian": {
@@ -28,7 +30,7 @@
28
30
  "runReact18": true,
29
31
  "website": {
30
32
  "name": "Text area",
31
- "category": "Components"
33
+ "category": "Forms and input"
32
34
  }
33
35
  },
34
36
  "af:exports": {
@@ -39,8 +41,10 @@
39
41
  },
40
42
  "dependencies": {
41
43
  "@atlaskit/analytics-next": "^10.1.0",
44
+ "@atlaskit/platform-feature-flags": "^0.3.0",
45
+ "@atlaskit/primitives": "^13.3.0",
42
46
  "@atlaskit/theme": "^14.0.0",
43
- "@atlaskit/tokens": "^2.0.0",
47
+ "@atlaskit/tokens": "^2.4.0",
44
48
  "@babel/runtime": "^7.0.0",
45
49
  "@emotion/react": "^11.7.1"
46
50
  },
@@ -51,7 +55,7 @@
51
55
  "@af/accessibility-testing": "*",
52
56
  "@af/integration-testing": "*",
53
57
  "@af/visual-regression": "*",
54
- "@atlaskit/ds-lib": "^3.1.0",
58
+ "@atlaskit/ds-lib": "^3.3.0",
55
59
  "@atlaskit/ssr": "*",
56
60
  "@atlaskit/visual-regression": "*",
57
61
  "@atlassian/feature-flags-test-utils": "*",
@@ -60,7 +64,7 @@
60
64
  "jest-in-case": "^1.0.2",
61
65
  "jscodeshift": "^0.13.0",
62
66
  "react-dom": "^16.8.0",
63
- "storybook-addon-performance": "^0.16.0",
67
+ "storybook-addon-performance": "^0.17.3",
64
68
  "typescript": "~5.4.2",
65
69
  "wait-for-expect": "^1.2.0"
66
70
  },
@@ -88,5 +92,10 @@
88
92
  ],
89
93
  "deprecation": "no-deprecated-imports"
90
94
  }
95
+ },
96
+ "platform-feature-flags": {
97
+ "platform_design_system_team_safari_input_fix": {
98
+ "type": "boolean"
99
+ }
91
100
  }
92
101
  }
@@ -3,7 +3,9 @@
3
3
  "main": "../dist/cjs/styles.js",
4
4
  "module": "../dist/esm/styles.js",
5
5
  "module:es2019": "../dist/es2019/styles.js",
6
- "sideEffects": false,
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
7
9
  "types": "../dist/types/styles.d.ts",
8
10
  "typesVersions": {
9
11
  ">=4.5 <5.4": {
@@ -3,7 +3,9 @@
3
3
  "main": "../dist/cjs/text-area.js",
4
4
  "module": "../dist/esm/text-area.js",
5
5
  "module:es2019": "../dist/es2019/text-area.js",
6
- "sideEffects": false,
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
7
9
  "types": "../dist/types/text-area.d.ts",
8
10
  "typesVersions": {
9
11
  ">=4.5 <5.4": {