@atlaskit/link-picker 3.9.3 → 3.9.5

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 (43) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/ui/link-picker/index.js +2 -1
  3. package/dist/cjs/ui/link-picker/text-input/index.compiled.css +3 -0
  4. package/dist/cjs/ui/link-picker/text-input/index.js +18 -4
  5. package/dist/cjs/ui/main.js +1 -1
  6. package/dist/es2019/ui/link-picker/index.js +2 -1
  7. package/dist/es2019/ui/link-picker/text-input/index.compiled.css +3 -0
  8. package/dist/es2019/ui/link-picker/text-input/index.js +17 -4
  9. package/dist/es2019/ui/main.js +1 -1
  10. package/dist/esm/ui/link-picker/index.js +2 -1
  11. package/dist/esm/ui/link-picker/text-input/index.compiled.css +3 -0
  12. package/dist/esm/ui/link-picker/text-input/index.js +19 -5
  13. package/dist/esm/ui/main.js +1 -1
  14. package/dist/types/common/analytics/input-field-tracking.d.ts +4 -4
  15. package/dist/types/common/generic-error-svg/index.d.ts +0 -1
  16. package/dist/types/common/ui/empty-state/index.d.ts +0 -1
  17. package/dist/types/services/use-plugins/reducer.d.ts +0 -1
  18. package/dist/types/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -1
  19. package/dist/types/ui/index.d.ts +0 -1
  20. package/dist/types/ui/lazy.d.ts +0 -1
  21. package/dist/types/ui/link-picker/form-footer/index.d.ts +0 -1
  22. package/dist/types/ui/link-picker/index.d.ts +0 -1
  23. package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.d.ts +0 -1
  24. package/dist/types/ui/link-picker/search-results/scrolling-tabs/index.d.ts +0 -1
  25. package/dist/types/ui/link-picker/search-results/search-results-container/index.d.ts +0 -1
  26. package/dist/types/ui/link-picker/text-input/index.d.ts +1 -1
  27. package/dist/types/ui/loader-fallback/index.d.ts +0 -1
  28. package/dist/types-ts4.5/common/analytics/input-field-tracking.d.ts +4 -4
  29. package/dist/types-ts4.5/common/generic-error-svg/index.d.ts +0 -1
  30. package/dist/types-ts4.5/common/ui/empty-state/index.d.ts +0 -1
  31. package/dist/types-ts4.5/services/use-plugins/reducer.d.ts +0 -1
  32. package/dist/types-ts4.5/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -1
  33. package/dist/types-ts4.5/ui/index.d.ts +0 -1
  34. package/dist/types-ts4.5/ui/lazy.d.ts +0 -1
  35. package/dist/types-ts4.5/ui/link-picker/form-footer/index.d.ts +0 -1
  36. package/dist/types-ts4.5/ui/link-picker/index.d.ts +0 -1
  37. package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.d.ts +0 -1
  38. package/dist/types-ts4.5/ui/link-picker/search-results/scrolling-tabs/index.d.ts +0 -1
  39. package/dist/types-ts4.5/ui/link-picker/search-results/search-results-container/index.d.ts +0 -1
  40. package/dist/types-ts4.5/ui/link-picker/text-input/index.d.ts +1 -1
  41. package/dist/types-ts4.5/ui/loader-fallback/index.d.ts +0 -1
  42. package/lazy/package.json +1 -1
  43. package/package.json +12 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 3.9.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.9.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`65822cbb7d2df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/65822cbb7d2df) -
14
+ [ux] NAVX-1368 Adding required field and corresponding aria-describedby label for link-picker
15
+ label
16
+ - Updated dependencies
17
+
3
18
  ## 3.9.3
4
19
 
5
20
  ### Patch Changes
@@ -444,7 +444,8 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
444
444
  onClear: handleUrlClear,
445
445
  onKeyDown: handleKeyDown,
446
446
  onChange: handleChangeUrl,
447
- inputRef: inputRef
447
+ inputRef: inputRef,
448
+ isRequired: true
448
449
  })), !hideDisplayText && /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement(DisplayTextInputField, {
449
450
  autoComplete: "off",
450
451
  name: "displayText",
@@ -4,8 +4,11 @@
4
4
  ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
5
5
  ._7yjtidpf >div{margin-top:0}
6
6
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
7
+ ._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
7
8
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
9
+ ._ect41gqc{font-family:var(--ds-font-family-body,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
8
10
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
9
11
  ._onzypxbi+._onzypxbi{margin-top:var(--ds-space-200,1pc)}
10
12
  ._s7n4nkob{vertical-align:middle}
13
+ ._syaz1tmw{color:var(--ds-text-danger,#ae2e24)}
11
14
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -15,15 +15,17 @@ var _react = _interopRequireWildcard(require("react"));
15
15
  var _useCallbackRef = require("use-callback-ref");
16
16
  var _form = require("@atlaskit/form");
17
17
  var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross-circle--select-clear"));
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  var _compiled = require("@atlaskit/primitives/compiled");
19
20
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
20
21
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
21
22
  var _conditionalSpotlightTargetWrapper = require("./conditional-spotlight-target-wrapper");
22
23
  var _utils = require("./utils");
23
- var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName", "inputRef"];
24
+ var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName", "inputRef", "isRequired"];
24
25
  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); }
25
26
  var styles = {
26
- clearTextButton: "_19itglyw _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _2hwx1b66 _bfhksm61 _s7n4nkob"
27
+ clearTextButton: "_19itglyw _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _2hwx1b66 _bfhksm61 _s7n4nkob",
28
+ requiredIndicatorStyles: "_syaz1tmw _ect41gqc _bozgv77o"
27
29
  };
28
30
 
29
31
  /**
@@ -32,6 +34,13 @@ var styles = {
32
34
  */
33
35
  var baseFieldStyles = null;
34
36
  var newFieldStyles = null;
37
+ var RequiredAsterisk = function RequiredAsterisk() {
38
+ return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
39
+ as: "span",
40
+ "aria-hidden": "true",
41
+ xcss: styles.requiredIndicatorStyles
42
+ }, "*");
43
+ };
35
44
  var testIds = exports.testIds = {
36
45
  urlError: 'link-error',
37
46
  clearUrlButton: 'clear-text'
@@ -48,6 +57,8 @@ var TextInput = exports.TextInput = function TextInput(_ref) {
48
57
  error = _ref.error,
49
58
  spotlightTargetName = _ref.spotlightTargetName,
50
59
  inputRefProp = _ref.inputRef,
60
+ _ref$isRequired = _ref.isRequired,
61
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
51
62
  restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
52
63
  var inputRef = (0, _react.useRef)(null);
53
64
  var handleRef = (0, _react.useCallback)(function (input) {
@@ -100,7 +111,8 @@ var TextInput = exports.TextInput = function TextInput(_ref) {
100
111
  className: (0, _runtime.ax)(["_7yjtidpf _onzypxbi", "_11c81vhk"])
101
112
  }, /*#__PURE__*/_react.default.createElement(_form.Field, {
102
113
  label: label,
103
- name: name
114
+ name: name,
115
+ elementAfterLabel: isRequired && (0, _platformFeatureFlags.fg)('navx-1368-link-picker-a11y-mandatory-states') ? /*#__PURE__*/_react.default.createElement(RequiredAsterisk, null) : undefined
104
116
  }, function (_ref2) {
105
117
  var fieldProps = _ref2.fieldProps;
106
118
  return /*#__PURE__*/_react.default.createElement(_conditionalSpotlightTargetWrapper.ConditionalSpotlightTargetWrapper, {
@@ -110,7 +122,9 @@ var TextInput = exports.TextInput = function TextInput(_ref) {
110
122
  ref: textfieldRef,
111
123
  elemAfterInput: clearText,
112
124
  isInvalid: !!error
113
- })), error && /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, {
125
+ }, (0, _platformFeatureFlags.fg)('navx-1368-link-picker-a11y-mandatory-states') ? {
126
+ 'aria-describedby': "".concat(restProps['aria-describedby'], " ").concat(fieldProps.id, "-error")
127
+ } : {})), error && /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, {
114
128
  testId: testIds.urlError
115
129
  }, error)));
116
130
  }));
@@ -25,7 +25,7 @@ var testIds = exports.testIds = {
25
25
  };
26
26
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
27
27
  packageName: "@atlaskit/link-picker" || '',
28
- packageVersion: "3.9.2" || '',
28
+ packageVersion: "3.9.4" || '',
29
29
  componentName: _constants.COMPONENT_NAME,
30
30
  source: _constants.COMPONENT_NAME
31
31
  };
@@ -399,7 +399,8 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
399
399
  onClear: handleUrlClear,
400
400
  onKeyDown: handleKeyDown,
401
401
  onChange: handleChangeUrl,
402
- inputRef: inputRef
402
+ inputRef: inputRef,
403
+ isRequired: true
403
404
  })), !hideDisplayText && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(DisplayTextInputField, {
404
405
  autoComplete: "off",
405
406
  name: "displayText",
@@ -4,8 +4,11 @@
4
4
  ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
5
5
  ._7yjtidpf >div{margin-top:0}
6
6
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
7
+ ._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
7
8
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
9
+ ._ect41gqc{font-family:var(--ds-font-family-body,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
8
10
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
9
11
  ._onzypxbi+._onzypxbi{margin-top:var(--ds-space-200,1pc)}
10
12
  ._s7n4nkob{vertical-align:middle}
13
+ ._syaz1tmw{color:var(--ds-text-danger,#ae2e24)}
11
14
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -6,13 +6,15 @@ import React, { Fragment, useCallback, useMemo, useRef } from 'react';
6
6
  import { useMergeRefs } from 'use-callback-ref';
7
7
  import { ErrorMessage, Field } from '@atlaskit/form';
8
8
  import Selectclear from '@atlaskit/icon/core/migration/cross-circle--select-clear';
9
- import { Pressable } from '@atlaskit/primitives/compiled';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
10
+ import { Box, Pressable } from '@atlaskit/primitives/compiled';
10
11
  import Textfield from '@atlaskit/textfield';
11
12
  import Tooltip from '@atlaskit/tooltip';
12
13
  import { ConditionalSpotlightTargetWrapper } from './conditional-spotlight-target-wrapper';
13
14
  import { isRedoEvent, isUndoEvent } from './utils';
14
15
  const styles = {
15
- clearTextButton: "_19itglyw _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _2hwx1b66 _bfhksm61 _s7n4nkob"
16
+ clearTextButton: "_19itglyw _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _2hwx1b66 _bfhksm61 _s7n4nkob",
17
+ requiredIndicatorStyles: "_syaz1tmw _ect41gqc _bozgv77o"
16
18
  };
17
19
 
18
20
  /**
@@ -21,6 +23,13 @@ const styles = {
21
23
  */
22
24
  const baseFieldStyles = null;
23
25
  const newFieldStyles = null;
26
+ const RequiredAsterisk = () => {
27
+ return /*#__PURE__*/React.createElement(Box, {
28
+ as: "span",
29
+ "aria-hidden": "true",
30
+ xcss: styles.requiredIndicatorStyles
31
+ }, "*");
32
+ };
24
33
  export const testIds = {
25
34
  urlError: 'link-error',
26
35
  clearUrlButton: 'clear-text'
@@ -37,6 +46,7 @@ export const TextInput = ({
37
46
  error,
38
47
  spotlightTargetName,
39
48
  inputRef: inputRefProp,
49
+ isRequired = false,
40
50
  ...restProps
41
51
  }) => {
42
52
  const inputRef = useRef(null);
@@ -88,7 +98,8 @@ export const TextInput = ({
88
98
  className: ax(["_7yjtidpf _onzypxbi", "_11c81vhk"])
89
99
  }, /*#__PURE__*/React.createElement(Field, {
90
100
  label: label,
91
- name: name
101
+ name: name,
102
+ elementAfterLabel: isRequired && fg('navx-1368-link-picker-a11y-mandatory-states') ? /*#__PURE__*/React.createElement(RequiredAsterisk, null) : undefined
92
103
  }, ({
93
104
  fieldProps
94
105
  }) => {
@@ -99,7 +110,9 @@ export const TextInput = ({
99
110
  ref: textfieldRef,
100
111
  elemAfterInput: clearText,
101
112
  isInvalid: !!error
102
- })), error && /*#__PURE__*/React.createElement(ErrorMessage, {
113
+ }, fg('navx-1368-link-picker-a11y-mandatory-states') ? {
114
+ 'aria-describedby': `${restProps['aria-describedby']} ${fieldProps.id}-error`
115
+ } : {})), error && /*#__PURE__*/React.createElement(ErrorMessage, {
103
116
  testId: testIds.urlError
104
117
  }, error)));
105
118
  }));
@@ -15,7 +15,7 @@ export const testIds = {
15
15
  };
16
16
  export const PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/link-picker" || '',
18
- packageVersion: "3.9.2" || '',
18
+ packageVersion: "3.9.4" || '',
19
19
  componentName: COMPONENT_NAME,
20
20
  source: COMPONENT_NAME
21
21
  };
@@ -435,7 +435,8 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
435
435
  onClear: handleUrlClear,
436
436
  onKeyDown: handleKeyDown,
437
437
  onChange: handleChangeUrl,
438
- inputRef: inputRef
438
+ inputRef: inputRef,
439
+ isRequired: true
439
440
  })), !hideDisplayText && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(DisplayTextInputField, {
440
441
  autoComplete: "off",
441
442
  name: "displayText",
@@ -4,8 +4,11 @@
4
4
  ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
5
5
  ._7yjtidpf >div{margin-top:0}
6
6
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
7
+ ._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
7
8
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
9
+ ._ect41gqc{font-family:var(--ds-font-family-body,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
8
10
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
9
11
  ._onzypxbi+._onzypxbi{margin-top:var(--ds-space-200,1pc)}
10
12
  ._s7n4nkob{vertical-align:middle}
13
+ ._syaz1tmw{color:var(--ds-text-danger,#ae2e24)}
11
14
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -1,20 +1,22 @@
1
1
  /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName", "inputRef"];
4
+ var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName", "inputRef", "isRequired"];
5
5
  import "./index.compiled.css";
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
7
  import React, { Fragment, useCallback, useMemo, useRef } from 'react';
8
8
  import { useMergeRefs } from 'use-callback-ref';
9
9
  import { ErrorMessage, Field } from '@atlaskit/form';
10
10
  import Selectclear from '@atlaskit/icon/core/migration/cross-circle--select-clear';
11
- import { Pressable } from '@atlaskit/primitives/compiled';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import { Box, Pressable } from '@atlaskit/primitives/compiled';
12
13
  import Textfield from '@atlaskit/textfield';
13
14
  import Tooltip from '@atlaskit/tooltip';
14
15
  import { ConditionalSpotlightTargetWrapper } from './conditional-spotlight-target-wrapper';
15
16
  import { isRedoEvent, isUndoEvent } from './utils';
16
17
  var styles = {
17
- clearTextButton: "_19itglyw _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _2hwx1b66 _bfhksm61 _s7n4nkob"
18
+ clearTextButton: "_19itglyw _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _2hwx1b66 _bfhksm61 _s7n4nkob",
19
+ requiredIndicatorStyles: "_syaz1tmw _ect41gqc _bozgv77o"
18
20
  };
19
21
 
20
22
  /**
@@ -23,6 +25,13 @@ var styles = {
23
25
  */
24
26
  var baseFieldStyles = null;
25
27
  var newFieldStyles = null;
28
+ var RequiredAsterisk = function RequiredAsterisk() {
29
+ return /*#__PURE__*/React.createElement(Box, {
30
+ as: "span",
31
+ "aria-hidden": "true",
32
+ xcss: styles.requiredIndicatorStyles
33
+ }, "*");
34
+ };
26
35
  export var testIds = {
27
36
  urlError: 'link-error',
28
37
  clearUrlButton: 'clear-text'
@@ -39,6 +48,8 @@ export var TextInput = function TextInput(_ref) {
39
48
  error = _ref.error,
40
49
  spotlightTargetName = _ref.spotlightTargetName,
41
50
  inputRefProp = _ref.inputRef,
51
+ _ref$isRequired = _ref.isRequired,
52
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
42
53
  restProps = _objectWithoutProperties(_ref, _excluded);
43
54
  var inputRef = useRef(null);
44
55
  var handleRef = useCallback(function (input) {
@@ -91,7 +102,8 @@ export var TextInput = function TextInput(_ref) {
91
102
  className: ax(["_7yjtidpf _onzypxbi", "_11c81vhk"])
92
103
  }, /*#__PURE__*/React.createElement(Field, {
93
104
  label: label,
94
- name: name
105
+ name: name,
106
+ elementAfterLabel: isRequired && fg('navx-1368-link-picker-a11y-mandatory-states') ? /*#__PURE__*/React.createElement(RequiredAsterisk, null) : undefined
95
107
  }, function (_ref2) {
96
108
  var fieldProps = _ref2.fieldProps;
97
109
  return /*#__PURE__*/React.createElement(ConditionalSpotlightTargetWrapper, {
@@ -101,7 +113,9 @@ export var TextInput = function TextInput(_ref) {
101
113
  ref: textfieldRef,
102
114
  elemAfterInput: clearText,
103
115
  isInvalid: !!error
104
- })), error && /*#__PURE__*/React.createElement(ErrorMessage, {
116
+ }, fg('navx-1368-link-picker-a11y-mandatory-states') ? {
117
+ 'aria-describedby': "".concat(restProps['aria-describedby'], " ").concat(fieldProps.id, "-error")
118
+ } : {})), error && /*#__PURE__*/React.createElement(ErrorMessage, {
105
119
  testId: testIds.urlError
106
120
  }, error)));
107
121
  }));
@@ -16,7 +16,7 @@ export var testIds = {
16
16
  };
17
17
  export var PACKAGE_DATA = {
18
18
  packageName: "@atlaskit/link-picker" || '',
19
- packageVersion: "3.9.2" || '',
19
+ packageVersion: "3.9.4" || '',
20
20
  componentName: COMPONENT_NAME,
21
21
  source: COMPONENT_NAME
22
22
  };
@@ -9,9 +9,9 @@ type InputFields = 'link' | 'displayText';
9
9
  * @returns HOC Input field with tracking
10
10
  */
11
11
  export declare const withInputFieldTracking: <P extends {
12
- onBlur?: ((e: React.FocusEvent<HTMLInputElement>) => void) | undefined;
13
- onChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
14
- onClear?: Function | undefined;
15
- onFocus?: ((e: React.FocusEvent<HTMLInputElement>) => void) | undefined;
12
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
13
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
14
+ onClear?: Function;
15
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
16
16
  }, Field extends InputFields>(WrappedComponent: React.ComponentType<P>, field: Field, filterOnChangeEventAttrs?: <OnChangeAttributes extends Partial<LinkPickerAnalyticsContextType>>(event: React.ChangeEvent<HTMLInputElement>, attributes: OnChangeAttributes) => OnChangeAttributes) => React.ComponentType<P>;
17
17
  export {};
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const GenericErrorSVG: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type EmptyStateProps = {
3
2
  header: string;
4
3
  testId?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type LinkSearchListItemData } from '../../common/types';
3
2
  export interface PluginState {
4
3
  items: LinkSearchListItemData[] | null;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ErrorBoundaryFallback: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @deprecated A `/lazy` entrypoint has been added.
4
3
  * @example Prefer the default export from the default entrypoint if you do not want a lazy-loaded version.
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: import("react").MemoExoticComponent<(props: import("..").LinkPickerProps) => JSX.Element>;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type MessageDescriptor } from 'react-intl-next';
3
2
  import { type LinkPickerPluginAction, type LinkPickerState, type LinkSearchListItemData } from '../../../common/types';
4
3
  export declare const messages: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { LinkPickerProps } from '../../common/types';
3
2
  export declare const testIds: {
4
3
  readonly urlError: string;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const NoResultsSVG: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type ScrollingTabListProps = {
3
2
  children: JSX.Element;
4
3
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type SearchResultsContainerProps = {
3
2
  adaptiveHeight: boolean;
4
3
  isLoadingResults: boolean;
@@ -21,4 +21,4 @@ export declare const testIds: {
21
21
  urlError: string;
22
22
  clearUrlButton: string;
23
23
  };
24
- export declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, inputRef: inputRefProp, ...restProps }: TextInputProps) => JSX.Element;
24
+ export declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, inputRef: inputRefProp, isRequired, ...restProps }: TextInputProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type LoaderFallbackProps = {
3
2
  url?: string;
4
3
  hideDisplayText?: boolean;
@@ -9,9 +9,9 @@ type InputFields = 'link' | 'displayText';
9
9
  * @returns HOC Input field with tracking
10
10
  */
11
11
  export declare const withInputFieldTracking: <P extends {
12
- onBlur?: ((e: React.FocusEvent<HTMLInputElement>) => void) | undefined;
13
- onChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
14
- onClear?: Function | undefined;
15
- onFocus?: ((e: React.FocusEvent<HTMLInputElement>) => void) | undefined;
12
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
13
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
14
+ onClear?: Function;
15
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
16
16
  }, Field extends InputFields>(WrappedComponent: React.ComponentType<P>, field: Field, filterOnChangeEventAttrs?: <OnChangeAttributes extends Partial<LinkPickerAnalyticsContextType>>(event: React.ChangeEvent<HTMLInputElement>, attributes: OnChangeAttributes) => OnChangeAttributes) => React.ComponentType<P>;
17
17
  export {};
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const GenericErrorSVG: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type EmptyStateProps = {
3
2
  header: string;
4
3
  testId?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type LinkSearchListItemData } from '../../common/types';
3
2
  export interface PluginState {
4
3
  items: LinkSearchListItemData[] | null;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ErrorBoundaryFallback: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @deprecated A `/lazy` entrypoint has been added.
4
3
  * @example Prefer the default export from the default entrypoint if you do not want a lazy-loaded version.
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: import("react").MemoExoticComponent<(props: import("..").LinkPickerProps) => JSX.Element>;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type MessageDescriptor } from 'react-intl-next';
3
2
  import { type LinkPickerPluginAction, type LinkPickerState, type LinkSearchListItemData } from '../../../common/types';
4
3
  export declare const messages: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { LinkPickerProps } from '../../common/types';
3
2
  export declare const testIds: {
4
3
  readonly urlError: string;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const NoResultsSVG: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type ScrollingTabListProps = {
3
2
  children: JSX.Element;
4
3
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type SearchResultsContainerProps = {
3
2
  adaptiveHeight: boolean;
4
3
  isLoadingResults: boolean;
@@ -21,4 +21,4 @@ export declare const testIds: {
21
21
  urlError: string;
22
22
  clearUrlButton: string;
23
23
  };
24
- export declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, inputRef: inputRefProp, ...restProps }: TextInputProps) => JSX.Element;
24
+ export declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, inputRef: inputRefProp, isRequired, ...restProps }: TextInputProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type LoaderFallbackProps = {
3
2
  url?: string;
4
3
  hideDisplayText?: boolean;
package/lazy/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/lazy.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/lazy.d.ts"
14
14
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "3.9.3",
3
+ "version": "3.9.5",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -39,20 +39,17 @@
39
39
  "platform-linking-link-picker-previewable-only": {
40
40
  "type": "boolean"
41
41
  },
42
- "icon-object-migration": {
43
- "type": "boolean"
44
- },
45
42
  "platform-visual-refresh-icons": {
46
43
  "type": "boolean"
47
44
  },
48
- "platform_support_live_doc_icons_in_link_picker": {
49
- "type": "boolean"
50
- },
51
45
  "dst-a11y__replace-anchor-with-link__linking-platfo": {
52
46
  "type": "boolean"
53
47
  },
54
48
  "should-render-to-parent-should-be-true-linking-pla": {
55
49
  "type": "boolean"
50
+ },
51
+ "navx-1368-link-picker-a11y-mandatory-states": {
52
+ "type": "boolean"
56
53
  }
57
54
  },
58
55
  "scripts": {
@@ -60,21 +57,21 @@
60
57
  },
61
58
  "dependencies": {
62
59
  "@atlaskit/analytics-next": "^11.1.0",
63
- "@atlaskit/atlassian-context": "^0.4.0",
64
- "@atlaskit/button": "^23.3.0",
60
+ "@atlaskit/atlassian-context": "^0.5.0",
61
+ "@atlaskit/button": "^23.4.0",
65
62
  "@atlaskit/css": "^0.12.0",
66
- "@atlaskit/form": "^12.0.0",
63
+ "@atlaskit/form": "^12.1.0",
67
64
  "@atlaskit/frontend-utilities": "^3.1.0",
68
65
  "@atlaskit/heading": "^5.2.0",
69
- "@atlaskit/icon": "^27.9.0",
66
+ "@atlaskit/icon": "^27.12.0",
70
67
  "@atlaskit/intl-messages-provider": "^2.0.0",
71
68
  "@atlaskit/link": "^3.2.0",
72
- "@atlaskit/link-provider": "^3.4.0",
73
- "@atlaskit/linking-common": "^9.2.0",
69
+ "@atlaskit/link-provider": "^3.7.0",
70
+ "@atlaskit/linking-common": "^9.5.0",
74
71
  "@atlaskit/onboarding": "^14.3.0",
75
72
  "@atlaskit/platform-feature-flags": "^1.1.0",
76
73
  "@atlaskit/primitives": "^14.11.0",
77
- "@atlaskit/smart-card": "^40.7.0",
74
+ "@atlaskit/smart-card": "^40.10.0",
78
75
  "@atlaskit/spinner": "^19.0.0",
79
76
  "@atlaskit/tabs": "^18.1.0",
80
77
  "@atlaskit/textfield": "^8.0.0",
@@ -116,8 +113,7 @@
116
113
  "node-fetch": "^2.6.7",
117
114
  "prettier": "^3.2.5",
118
115
  "react-dom": "^18.2.0",
119
- "sinon": "^2.2.0",
120
- "typescript": "~5.4.2"
116
+ "sinon": "^2.2.0"
121
117
  },
122
118
  "techstack": {
123
119
  "@atlassian/frontend": {