@atlaskit/spotlight 0.10.4 → 0.10.6

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,18 @@
1
1
  # @atlaskit/spotlight
2
2
 
3
+ ## 0.10.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9b038ce3c261e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b038ce3c261e) -
8
+ Create `SpotlightPrimaryLink` and `SpotlightSecondaryLink` components.
9
+
10
+ ## 0.10.5
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 0.10.4
4
17
 
5
18
  ### Patch Changes
@@ -8,6 +8,7 @@ import MultipleStepsExample from '../../examples/constellation/multiple-steps';
8
8
  import MediaExample from '../../examples/constellation/media';
9
9
  import ControlsExample from '../../examples/constellation/controls';
10
10
  import MotionExample from '../../examples/constellation/motion';
11
+ import ActionLinksExample from '../../examples/action-links';
11
12
 
12
13
  ## Single step
13
14
 
@@ -60,3 +61,12 @@ focusable element on the `SpotlightCard` card to provide an accessible experienc
60
61
  create smooth 'enter' or 'exit' transitions.
61
62
 
62
63
  <Example Component={MotionExample} packageName="@atlaskit/spotlight" />
64
+
65
+ ## Action links
66
+
67
+ When the primary or secondary control should navigate to a URL instead of performing an action, use
68
+ `SpotlightPrimaryLink` and `SpotlightSecondaryLink`. They mirror the appearance of
69
+ `SpotlightPrimaryAction` and `SpotlightSecondaryAction` but render as links (e.g. "Get started",
70
+ "Learn more").
71
+
72
+ <Example Component={ActionLinksExample} packageName="@atlaskit/spotlight" />
package/dist/cjs/index.js CHANGED
@@ -81,12 +81,24 @@ Object.defineProperty(exports, "SpotlightPrimaryAction", {
81
81
  return _primaryAction.SpotlightPrimaryAction;
82
82
  }
83
83
  });
84
+ Object.defineProperty(exports, "SpotlightPrimaryLink", {
85
+ enumerable: true,
86
+ get: function get() {
87
+ return _primaryLink.SpotlightPrimaryLink;
88
+ }
89
+ });
84
90
  Object.defineProperty(exports, "SpotlightSecondaryAction", {
85
91
  enumerable: true,
86
92
  get: function get() {
87
93
  return _secondaryAction.SpotlightSecondaryAction;
88
94
  }
89
95
  });
96
+ Object.defineProperty(exports, "SpotlightSecondaryLink", {
97
+ enumerable: true,
98
+ get: function get() {
99
+ return _secondaryLink.SpotlightSecondaryLink;
100
+ }
101
+ });
90
102
  Object.defineProperty(exports, "SpotlightShowMoreControl", {
91
103
  enumerable: true,
92
104
  get: function get() {
@@ -119,7 +131,9 @@ var _footer = require("./ui/footer");
119
131
  var _actions = require("./ui/actions");
120
132
  var _stepCount = require("./ui/step-count");
121
133
  var _primaryAction = require("./ui/primary-action");
134
+ var _primaryLink = require("./ui/primary-link");
122
135
  var _secondaryAction = require("./ui/secondary-action");
136
+ var _secondaryLink = require("./ui/secondary-link");
123
137
  var _controls = require("./ui/controls");
124
138
  var _dismissControl = require("./ui/dismiss-control");
125
139
  var _showMoreControl = require("./ui/show-more-control");
@@ -0,0 +1,21 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
3
+ ._18zr12x7{padding-inline:var(--ds-space-075,6px)}
4
+ ._1dqonqa1{border-style:solid}
5
+ ._1h6d8yml{border-color:var(--ds-border-accent-gray,#7d818a)}
6
+ ._1e0c1txw{display:flex}
7
+ ._1hmsglyw{text-decoration-line:none}
8
+ ._4bfu1r31{text-decoration-color:currentColor}
9
+ ._4cvr1h6o{align-items:center}
10
+ ._ajmmnqa1{text-decoration-style:solid}
11
+ ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
12
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
13
+ ._vchhusvi{box-sizing:border-box}
14
+ ._1bnxglyw:hover{text-decoration-line:none}
15
+ ._9oik1r31:hover{text-decoration-color:currentColor}
16
+ ._irr31ibz:hover{background-color:var(--ds-background-neutral-bold-hovered,#3b3d42)}
17
+ ._jf4cnqa1:hover{text-decoration-style:solid}
18
+ ._1di6of27:active{background-color:var(--ds-background-neutral-bold-pressed,#505258)}
19
+ ._1iohnqa1:active{text-decoration-style:solid}
20
+ ._1nrm1r31:active{text-decoration-color:currentColor}
21
+ ._c2waglyw:active{text-decoration-line:none}
@@ -0,0 +1,48 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ "use strict";
3
+
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.SpotlightPrimaryLink = void 0;
9
+ require("./index.compiled.css");
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var React = _react;
12
+ var _runtime = require("@compiled/react/runtime");
13
+ var _compiled = require("@atlaskit/primitives/compiled");
14
+ 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); }
15
+ var styles = {
16
+ root: "_2rko12b0 _4bfu1r31 _1hmsglyw _ajmmnqa1 _1dqonqa1 _189ee4h9 _1h6d8yml _18zr12x7 _vchhusvi _1e0c1txw _4cvr1h6o _syaz15cr _bfhk1aqn _9oik1r31 _1bnxglyw _jf4cnqa1 _irr31ibz _1nrm1r31 _c2waglyw _1iohnqa1 _1di6of27"
17
+ };
18
+ /**
19
+ * __Spotlight primary link__
20
+ *
21
+ * `SpotlightPrimaryLink` is a link-styled primary control that mirrors the appearance of `SpotlightPrimaryAction`.
22
+ * Use it when the primary control should navigate to a URL instead of performing an action (e.g. "Get started", "View guide").
23
+ *
24
+ */
25
+ var SpotlightPrimaryLink = exports.SpotlightPrimaryLink = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
26
+ var ariaLabel = _ref['aria-label'],
27
+ onClick = _ref.onClick,
28
+ children = _ref.children,
29
+ testId = _ref.testId,
30
+ href = _ref.href,
31
+ target = _ref.target,
32
+ rel = _ref.rel;
33
+ return /*#__PURE__*/React.createElement(_compiled.Anchor, {
34
+ "aria-label": ariaLabel,
35
+ ref: ref,
36
+ testId: testId,
37
+ xcss: styles.root,
38
+ href: href,
39
+ target: target,
40
+ rel: rel,
41
+ onClick: onClick ? function (e, _analyticsEvent) {
42
+ return onClick(e);
43
+ } : undefined,
44
+ componentName: "SpotlightPrimaryLink"
45
+ }, /*#__PURE__*/React.createElement(_compiled.Text, {
46
+ as: "span"
47
+ }, children));
48
+ });
@@ -0,0 +1,19 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._18zr12x7{padding-inline:var(--ds-space-075,6px)}
3
+ ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
4
+ ._1e0c1txw{display:flex}
5
+ ._1hmsglyw{text-decoration-line:none}
6
+ ._4bfu1r31{text-decoration-color:currentColor}
7
+ ._4cvr1h6o{align-items:center}
8
+ ._ajmmnqa1{text-decoration-style:solid}
9
+ ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
10
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
11
+ ._vchhusvi{box-sizing:border-box}
12
+ ._1bnxglyw:hover{text-decoration-line:none}
13
+ ._9oik1r31:hover{text-decoration-color:currentColor}
14
+ ._irr31ibz:hover{background-color:var(--ds-background-neutral-bold-hovered,#3b3d42)}
15
+ ._jf4cnqa1:hover{text-decoration-style:solid}
16
+ ._1di6of27:active{background-color:var(--ds-background-neutral-bold-pressed,#505258)}
17
+ ._1iohnqa1:active{text-decoration-style:solid}
18
+ ._1nrm1r31:active{text-decoration-color:currentColor}
19
+ ._c2waglyw:active{text-decoration-line:none}
@@ -0,0 +1,48 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ "use strict";
3
+
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.SpotlightSecondaryLink = void 0;
9
+ require("./index.compiled.css");
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var React = _react;
12
+ var _runtime = require("@compiled/react/runtime");
13
+ var _compiled = require("@atlaskit/primitives/compiled");
14
+ 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); }
15
+ var styles = {
16
+ root: "_2rko12b0 _4bfu1r31 _1hmsglyw _ajmmnqa1 _18zr12x7 _1rjcv77o _vchhusvi _1e0c1txw _4cvr1h6o _syaz15cr _bfhk1aqn _9oik1r31 _1bnxglyw _jf4cnqa1 _irr31ibz _1nrm1r31 _c2waglyw _1iohnqa1 _1di6of27"
17
+ };
18
+ /**
19
+ * __Spotlight secondary link__
20
+ *
21
+ * `SpotlightSecondaryLink` is a link-styled secondary control that mirrors the appearance of `SpotlightSecondaryAction`.
22
+ * Use it when the secondary control should navigate to a URL instead of performing an action (e.g. "Learn more", "View docs").
23
+ *
24
+ */
25
+ var SpotlightSecondaryLink = exports.SpotlightSecondaryLink = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
26
+ var ariaLabel = _ref['aria-label'],
27
+ onClick = _ref.onClick,
28
+ children = _ref.children,
29
+ testId = _ref.testId,
30
+ href = _ref.href,
31
+ target = _ref.target,
32
+ rel = _ref.rel;
33
+ return /*#__PURE__*/React.createElement(_compiled.Anchor, {
34
+ "aria-label": ariaLabel,
35
+ ref: ref,
36
+ testId: testId,
37
+ xcss: styles.root,
38
+ href: href,
39
+ target: target,
40
+ rel: rel,
41
+ onClick: onClick ? function (e, _analyticsEvent) {
42
+ return onClick(e);
43
+ } : undefined,
44
+ componentName: "SpotlightSecondaryLink"
45
+ }, /*#__PURE__*/React.createElement(_compiled.Text, {
46
+ as: "span"
47
+ }, children));
48
+ });
@@ -6,7 +6,9 @@ export { SpotlightFooter } from './ui/footer';
6
6
  export { SpotlightActions } from './ui/actions';
7
7
  export { SpotlightStepCount } from './ui/step-count';
8
8
  export { SpotlightPrimaryAction } from './ui/primary-action';
9
+ export { SpotlightPrimaryLink } from './ui/primary-link';
9
10
  export { SpotlightSecondaryAction } from './ui/secondary-action';
11
+ export { SpotlightSecondaryLink } from './ui/secondary-link';
10
12
  export { SpotlightControls } from './ui/controls';
11
13
  export { SpotlightDismissControl } from './ui/dismiss-control';
12
14
  export { SpotlightShowMoreControl } from './ui/show-more-control';
@@ -0,0 +1,21 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
3
+ ._18zr12x7{padding-inline:var(--ds-space-075,6px)}
4
+ ._1dqonqa1{border-style:solid}
5
+ ._1h6d8yml{border-color:var(--ds-border-accent-gray,#7d818a)}
6
+ ._1e0c1txw{display:flex}
7
+ ._1hmsglyw{text-decoration-line:none}
8
+ ._4bfu1r31{text-decoration-color:currentColor}
9
+ ._4cvr1h6o{align-items:center}
10
+ ._ajmmnqa1{text-decoration-style:solid}
11
+ ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
12
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
13
+ ._vchhusvi{box-sizing:border-box}
14
+ ._1bnxglyw:hover{text-decoration-line:none}
15
+ ._9oik1r31:hover{text-decoration-color:currentColor}
16
+ ._irr31ibz:hover{background-color:var(--ds-background-neutral-bold-hovered,#3b3d42)}
17
+ ._jf4cnqa1:hover{text-decoration-style:solid}
18
+ ._1di6of27:active{background-color:var(--ds-background-neutral-bold-pressed,#505258)}
19
+ ._1iohnqa1:active{text-decoration-style:solid}
20
+ ._1nrm1r31:active{text-decoration-color:currentColor}
21
+ ._c2waglyw:active{text-decoration-line:none}
@@ -0,0 +1,37 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import "./index.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { forwardRef } from 'react';
6
+ import { Anchor, Text } from '@atlaskit/primitives/compiled';
7
+ const styles = {
8
+ root: "_2rko12b0 _4bfu1r31 _1hmsglyw _ajmmnqa1 _1dqonqa1 _189ee4h9 _1h6d8yml _18zr12x7 _vchhusvi _1e0c1txw _4cvr1h6o _syaz15cr _bfhk1aqn _9oik1r31 _1bnxglyw _jf4cnqa1 _irr31ibz _1nrm1r31 _c2waglyw _1iohnqa1 _1di6of27"
9
+ };
10
+ /**
11
+ * __Spotlight primary link__
12
+ *
13
+ * `SpotlightPrimaryLink` is a link-styled primary control that mirrors the appearance of `SpotlightPrimaryAction`.
14
+ * Use it when the primary control should navigate to a URL instead of performing an action (e.g. "Get started", "View guide").
15
+ *
16
+ */
17
+ export const SpotlightPrimaryLink = /*#__PURE__*/forwardRef(({
18
+ 'aria-label': ariaLabel,
19
+ onClick,
20
+ children,
21
+ testId,
22
+ href,
23
+ target,
24
+ rel
25
+ }, ref) => /*#__PURE__*/React.createElement(Anchor, {
26
+ "aria-label": ariaLabel,
27
+ ref: ref,
28
+ testId: testId,
29
+ xcss: styles.root,
30
+ href: href,
31
+ target: target,
32
+ rel: rel,
33
+ onClick: onClick ? (e, _analyticsEvent) => onClick(e) : undefined,
34
+ componentName: "SpotlightPrimaryLink"
35
+ }, /*#__PURE__*/React.createElement(Text, {
36
+ as: "span"
37
+ }, children)));
@@ -0,0 +1,19 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._18zr12x7{padding-inline:var(--ds-space-075,6px)}
3
+ ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
4
+ ._1e0c1txw{display:flex}
5
+ ._1hmsglyw{text-decoration-line:none}
6
+ ._4bfu1r31{text-decoration-color:currentColor}
7
+ ._4cvr1h6o{align-items:center}
8
+ ._ajmmnqa1{text-decoration-style:solid}
9
+ ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
10
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
11
+ ._vchhusvi{box-sizing:border-box}
12
+ ._1bnxglyw:hover{text-decoration-line:none}
13
+ ._9oik1r31:hover{text-decoration-color:currentColor}
14
+ ._irr31ibz:hover{background-color:var(--ds-background-neutral-bold-hovered,#3b3d42)}
15
+ ._jf4cnqa1:hover{text-decoration-style:solid}
16
+ ._1di6of27:active{background-color:var(--ds-background-neutral-bold-pressed,#505258)}
17
+ ._1iohnqa1:active{text-decoration-style:solid}
18
+ ._1nrm1r31:active{text-decoration-color:currentColor}
19
+ ._c2waglyw:active{text-decoration-line:none}
@@ -0,0 +1,37 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import "./index.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { forwardRef } from 'react';
6
+ import { Anchor, Text } from '@atlaskit/primitives/compiled';
7
+ const styles = {
8
+ root: "_2rko12b0 _4bfu1r31 _1hmsglyw _ajmmnqa1 _18zr12x7 _1rjcv77o _vchhusvi _1e0c1txw _4cvr1h6o _syaz15cr _bfhk1aqn _9oik1r31 _1bnxglyw _jf4cnqa1 _irr31ibz _1nrm1r31 _c2waglyw _1iohnqa1 _1di6of27"
9
+ };
10
+ /**
11
+ * __Spotlight secondary link__
12
+ *
13
+ * `SpotlightSecondaryLink` is a link-styled secondary control that mirrors the appearance of `SpotlightSecondaryAction`.
14
+ * Use it when the secondary control should navigate to a URL instead of performing an action (e.g. "Learn more", "View docs").
15
+ *
16
+ */
17
+ export const SpotlightSecondaryLink = /*#__PURE__*/forwardRef(({
18
+ 'aria-label': ariaLabel,
19
+ onClick,
20
+ children,
21
+ testId,
22
+ href,
23
+ target,
24
+ rel
25
+ }, ref) => /*#__PURE__*/React.createElement(Anchor, {
26
+ "aria-label": ariaLabel,
27
+ ref: ref,
28
+ testId: testId,
29
+ xcss: styles.root,
30
+ href: href,
31
+ target: target,
32
+ rel: rel,
33
+ onClick: onClick ? (e, _analyticsEvent) => onClick(e) : undefined,
34
+ componentName: "SpotlightSecondaryLink"
35
+ }, /*#__PURE__*/React.createElement(Text, {
36
+ as: "span"
37
+ }, children)));
package/dist/esm/index.js CHANGED
@@ -6,7 +6,9 @@ export { SpotlightFooter } from './ui/footer';
6
6
  export { SpotlightActions } from './ui/actions';
7
7
  export { SpotlightStepCount } from './ui/step-count';
8
8
  export { SpotlightPrimaryAction } from './ui/primary-action';
9
+ export { SpotlightPrimaryLink } from './ui/primary-link';
9
10
  export { SpotlightSecondaryAction } from './ui/secondary-action';
11
+ export { SpotlightSecondaryLink } from './ui/secondary-link';
10
12
  export { SpotlightControls } from './ui/controls';
11
13
  export { SpotlightDismissControl } from './ui/dismiss-control';
12
14
  export { SpotlightShowMoreControl } from './ui/show-more-control';
@@ -0,0 +1,21 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._189ee4h9{border-width:var(--ds-border-width,1px)}
3
+ ._18zr12x7{padding-inline:var(--ds-space-075,6px)}
4
+ ._1dqonqa1{border-style:solid}
5
+ ._1h6d8yml{border-color:var(--ds-border-accent-gray,#7d818a)}
6
+ ._1e0c1txw{display:flex}
7
+ ._1hmsglyw{text-decoration-line:none}
8
+ ._4bfu1r31{text-decoration-color:currentColor}
9
+ ._4cvr1h6o{align-items:center}
10
+ ._ajmmnqa1{text-decoration-style:solid}
11
+ ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
12
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
13
+ ._vchhusvi{box-sizing:border-box}
14
+ ._1bnxglyw:hover{text-decoration-line:none}
15
+ ._9oik1r31:hover{text-decoration-color:currentColor}
16
+ ._irr31ibz:hover{background-color:var(--ds-background-neutral-bold-hovered,#3b3d42)}
17
+ ._jf4cnqa1:hover{text-decoration-style:solid}
18
+ ._1di6of27:active{background-color:var(--ds-background-neutral-bold-pressed,#505258)}
19
+ ._1iohnqa1:active{text-decoration-style:solid}
20
+ ._1nrm1r31:active{text-decoration-color:currentColor}
21
+ ._c2waglyw:active{text-decoration-line:none}
@@ -0,0 +1,40 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import "./index.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { forwardRef } from 'react';
6
+ import { Anchor, Text } from '@atlaskit/primitives/compiled';
7
+ var styles = {
8
+ root: "_2rko12b0 _4bfu1r31 _1hmsglyw _ajmmnqa1 _1dqonqa1 _189ee4h9 _1h6d8yml _18zr12x7 _vchhusvi _1e0c1txw _4cvr1h6o _syaz15cr _bfhk1aqn _9oik1r31 _1bnxglyw _jf4cnqa1 _irr31ibz _1nrm1r31 _c2waglyw _1iohnqa1 _1di6of27"
9
+ };
10
+ /**
11
+ * __Spotlight primary link__
12
+ *
13
+ * `SpotlightPrimaryLink` is a link-styled primary control that mirrors the appearance of `SpotlightPrimaryAction`.
14
+ * Use it when the primary control should navigate to a URL instead of performing an action (e.g. "Get started", "View guide").
15
+ *
16
+ */
17
+ export var SpotlightPrimaryLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
+ var ariaLabel = _ref['aria-label'],
19
+ onClick = _ref.onClick,
20
+ children = _ref.children,
21
+ testId = _ref.testId,
22
+ href = _ref.href,
23
+ target = _ref.target,
24
+ rel = _ref.rel;
25
+ return /*#__PURE__*/React.createElement(Anchor, {
26
+ "aria-label": ariaLabel,
27
+ ref: ref,
28
+ testId: testId,
29
+ xcss: styles.root,
30
+ href: href,
31
+ target: target,
32
+ rel: rel,
33
+ onClick: onClick ? function (e, _analyticsEvent) {
34
+ return onClick(e);
35
+ } : undefined,
36
+ componentName: "SpotlightPrimaryLink"
37
+ }, /*#__PURE__*/React.createElement(Text, {
38
+ as: "span"
39
+ }, children));
40
+ });
@@ -0,0 +1,19 @@
1
+
2
+ ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._18zr12x7{padding-inline:var(--ds-space-075,6px)}
3
+ ._1rjcv77o{padding-block:var(--ds-space-025,2px)}
4
+ ._1e0c1txw{display:flex}
5
+ ._1hmsglyw{text-decoration-line:none}
6
+ ._4bfu1r31{text-decoration-color:currentColor}
7
+ ._4cvr1h6o{align-items:center}
8
+ ._ajmmnqa1{text-decoration-style:solid}
9
+ ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
10
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
11
+ ._vchhusvi{box-sizing:border-box}
12
+ ._1bnxglyw:hover{text-decoration-line:none}
13
+ ._9oik1r31:hover{text-decoration-color:currentColor}
14
+ ._irr31ibz:hover{background-color:var(--ds-background-neutral-bold-hovered,#3b3d42)}
15
+ ._jf4cnqa1:hover{text-decoration-style:solid}
16
+ ._1di6of27:active{background-color:var(--ds-background-neutral-bold-pressed,#505258)}
17
+ ._1iohnqa1:active{text-decoration-style:solid}
18
+ ._1nrm1r31:active{text-decoration-color:currentColor}
19
+ ._c2waglyw:active{text-decoration-line:none}
@@ -0,0 +1,40 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import "./index.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { forwardRef } from 'react';
6
+ import { Anchor, Text } from '@atlaskit/primitives/compiled';
7
+ var styles = {
8
+ root: "_2rko12b0 _4bfu1r31 _1hmsglyw _ajmmnqa1 _18zr12x7 _1rjcv77o _vchhusvi _1e0c1txw _4cvr1h6o _syaz15cr _bfhk1aqn _9oik1r31 _1bnxglyw _jf4cnqa1 _irr31ibz _1nrm1r31 _c2waglyw _1iohnqa1 _1di6of27"
9
+ };
10
+ /**
11
+ * __Spotlight secondary link__
12
+ *
13
+ * `SpotlightSecondaryLink` is a link-styled secondary control that mirrors the appearance of `SpotlightSecondaryAction`.
14
+ * Use it when the secondary control should navigate to a URL instead of performing an action (e.g. "Learn more", "View docs").
15
+ *
16
+ */
17
+ export var SpotlightSecondaryLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
+ var ariaLabel = _ref['aria-label'],
19
+ onClick = _ref.onClick,
20
+ children = _ref.children,
21
+ testId = _ref.testId,
22
+ href = _ref.href,
23
+ target = _ref.target,
24
+ rel = _ref.rel;
25
+ return /*#__PURE__*/React.createElement(Anchor, {
26
+ "aria-label": ariaLabel,
27
+ ref: ref,
28
+ testId: testId,
29
+ xcss: styles.root,
30
+ href: href,
31
+ target: target,
32
+ rel: rel,
33
+ onClick: onClick ? function (e, _analyticsEvent) {
34
+ return onClick(e);
35
+ } : undefined,
36
+ componentName: "SpotlightSecondaryLink"
37
+ }, /*#__PURE__*/React.createElement(Text, {
38
+ as: "span"
39
+ }, children));
40
+ });
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { type Dispatch, type MutableRefObject, type ReactNode, type SetStateAction } from 'react';
5
+ import { type Context, type Dispatch, type MutableRefObject, type ReactNode, type SetStateAction } from 'react';
6
6
  import type { BackEvent, DismissEvent, DoneEvent, Placement } from '../types';
7
7
  export interface SpotlightContextType {
8
8
  card: {
@@ -32,7 +32,7 @@ export interface SpotlightContextType {
32
32
  setAction: (backFn: (_event: BackEvent) => void) => void;
33
33
  };
34
34
  }
35
- export declare const SpotlightContext: import("react").Context<SpotlightContextType>;
35
+ export declare const SpotlightContext: Context<SpotlightContextType>;
36
36
  export declare const SpotlightContextProvider: ({ children }: {
37
37
  children: ReactNode;
38
38
  }) => JSX.Element;
@@ -6,7 +6,9 @@ export { SpotlightFooter, type SpotlightFooterProps } from './ui/footer';
6
6
  export { SpotlightActions, type SpotlightActionsProps } from './ui/actions';
7
7
  export { SpotlightStepCount, type SpotlightStepCountProps } from './ui/step-count';
8
8
  export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/primary-action';
9
+ export { SpotlightPrimaryLink, type SpotlightPrimaryLinkProps, } from './ui/primary-link';
9
10
  export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
11
+ export { SpotlightSecondaryLink, type SpotlightSecondaryLinkProps, } from './ui/secondary-link';
10
12
  export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
11
13
  export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
12
14
  export { SpotlightShowMoreControl, type SpotlightShowMoreControlProps, } from './ui/show-more-control';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ export interface SpotlightPrimaryLinkProps {
7
+ /**
8
+ * A `testId` prop is provided for specified elements, which is a unique
9
+ * string that appears as a data attribute `data-testid` in the rendered code,
10
+ * serving as a hook for automated tests
11
+ */
12
+ testId?: string;
13
+ /**
14
+ * Text to be rendered inside the link.
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * The destination URL. Accepts a URL string, or a router config object when using AppProvider's router link.
19
+ */
20
+ href: string;
21
+ /**
22
+ * Target attribute for the link (e.g. `_blank`).
23
+ */
24
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
25
+ /**
26
+ * Rel attribute for the link (e.g. `noopener noreferrer` for `target="_blank"`).
27
+ */
28
+ rel?: string;
29
+ /**
30
+ * Handler called when the link is clicked. The second argument provides an Atlaskit UI analytics event when using Anchor.
31
+ */
32
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
33
+ /**
34
+ * An accessible label to read out in the event that the displayed text does not provide enough context.
35
+ */
36
+ 'aria-label'?: string;
37
+ }
38
+ /**
39
+ * __Spotlight primary link__
40
+ *
41
+ * `SpotlightPrimaryLink` is a link-styled primary control that mirrors the appearance of `SpotlightPrimaryAction`.
42
+ * Use it when the primary control should navigate to a URL instead of performing an action (e.g. "Get started", "View guide").
43
+ *
44
+ */
45
+ export declare const SpotlightPrimaryLink: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightPrimaryLinkProps> & React.RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ export interface SpotlightSecondaryLinkProps {
7
+ /**
8
+ * A `testId` prop is provided for specified elements, which is a unique
9
+ * string that appears as a data attribute `data-testid` in the rendered code,
10
+ * serving as a hook for automated tests
11
+ */
12
+ testId?: string;
13
+ /**
14
+ * Text to be rendered inside the link.
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * The destination URL. Accepts a URL string, or a router config object when using AppProvider's router link.
19
+ */
20
+ href: string;
21
+ /**
22
+ * Target attribute for the link (e.g. `_blank`).
23
+ */
24
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
25
+ /**
26
+ * Rel attribute for the link (e.g. `noopener noreferrer` for `target="_blank"`).
27
+ */
28
+ rel?: string;
29
+ /**
30
+ * Handler called when the link is clicked. The second argument provides an Atlaskit UI analytics event when using Anchor.
31
+ */
32
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
33
+ /**
34
+ * An accessible label to read out in the event that the displayed text does not provide enough context.
35
+ */
36
+ 'aria-label'?: string;
37
+ }
38
+ /**
39
+ * __Spotlight secondary link__
40
+ *
41
+ * `SpotlightSecondaryLink` is a link-styled secondary control that mirrors the appearance of `SpotlightSecondaryAction`.
42
+ * Use it when the secondary control should navigate to a URL instead of performing an action (e.g. "Learn more", "View docs").
43
+ *
44
+ */
45
+ export declare const SpotlightSecondaryLink: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightSecondaryLinkProps> & React.RefAttributes<HTMLAnchorElement>>;
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { type Dispatch, type MutableRefObject, type ReactNode, type SetStateAction } from 'react';
5
+ import { type Context, type Dispatch, type MutableRefObject, type ReactNode, type SetStateAction } from 'react';
6
6
  import type { BackEvent, DismissEvent, DoneEvent, Placement } from '../types';
7
7
  export interface SpotlightContextType {
8
8
  card: {
@@ -32,7 +32,7 @@ export interface SpotlightContextType {
32
32
  setAction: (backFn: (_event: BackEvent) => void) => void;
33
33
  };
34
34
  }
35
- export declare const SpotlightContext: import("react").Context<SpotlightContextType>;
35
+ export declare const SpotlightContext: Context<SpotlightContextType>;
36
36
  export declare const SpotlightContextProvider: ({ children }: {
37
37
  children: ReactNode;
38
38
  }) => JSX.Element;
@@ -6,7 +6,9 @@ export { SpotlightFooter, type SpotlightFooterProps } from './ui/footer';
6
6
  export { SpotlightActions, type SpotlightActionsProps } from './ui/actions';
7
7
  export { SpotlightStepCount, type SpotlightStepCountProps } from './ui/step-count';
8
8
  export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/primary-action';
9
+ export { SpotlightPrimaryLink, type SpotlightPrimaryLinkProps, } from './ui/primary-link';
9
10
  export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
11
+ export { SpotlightSecondaryLink, type SpotlightSecondaryLinkProps, } from './ui/secondary-link';
10
12
  export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
11
13
  export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
12
14
  export { SpotlightShowMoreControl, type SpotlightShowMoreControlProps, } from './ui/show-more-control';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ export interface SpotlightPrimaryLinkProps {
7
+ /**
8
+ * A `testId` prop is provided for specified elements, which is a unique
9
+ * string that appears as a data attribute `data-testid` in the rendered code,
10
+ * serving as a hook for automated tests
11
+ */
12
+ testId?: string;
13
+ /**
14
+ * Text to be rendered inside the link.
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * The destination URL. Accepts a URL string, or a router config object when using AppProvider's router link.
19
+ */
20
+ href: string;
21
+ /**
22
+ * Target attribute for the link (e.g. `_blank`).
23
+ */
24
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
25
+ /**
26
+ * Rel attribute for the link (e.g. `noopener noreferrer` for `target="_blank"`).
27
+ */
28
+ rel?: string;
29
+ /**
30
+ * Handler called when the link is clicked. The second argument provides an Atlaskit UI analytics event when using Anchor.
31
+ */
32
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
33
+ /**
34
+ * An accessible label to read out in the event that the displayed text does not provide enough context.
35
+ */
36
+ 'aria-label'?: string;
37
+ }
38
+ /**
39
+ * __Spotlight primary link__
40
+ *
41
+ * `SpotlightPrimaryLink` is a link-styled primary control that mirrors the appearance of `SpotlightPrimaryAction`.
42
+ * Use it when the primary control should navigate to a URL instead of performing an action (e.g. "Get started", "View guide").
43
+ *
44
+ */
45
+ export declare const SpotlightPrimaryLink: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightPrimaryLinkProps> & React.RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ export interface SpotlightSecondaryLinkProps {
7
+ /**
8
+ * A `testId` prop is provided for specified elements, which is a unique
9
+ * string that appears as a data attribute `data-testid` in the rendered code,
10
+ * serving as a hook for automated tests
11
+ */
12
+ testId?: string;
13
+ /**
14
+ * Text to be rendered inside the link.
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * The destination URL. Accepts a URL string, or a router config object when using AppProvider's router link.
19
+ */
20
+ href: string;
21
+ /**
22
+ * Target attribute for the link (e.g. `_blank`).
23
+ */
24
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
25
+ /**
26
+ * Rel attribute for the link (e.g. `noopener noreferrer` for `target="_blank"`).
27
+ */
28
+ rel?: string;
29
+ /**
30
+ * Handler called when the link is clicked. The second argument provides an Atlaskit UI analytics event when using Anchor.
31
+ */
32
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
33
+ /**
34
+ * An accessible label to read out in the event that the displayed text does not provide enough context.
35
+ */
36
+ 'aria-label'?: string;
37
+ }
38
+ /**
39
+ * __Spotlight secondary link__
40
+ *
41
+ * `SpotlightSecondaryLink` is a link-styled secondary control that mirrors the appearance of `SpotlightSecondaryAction`.
42
+ * Use it when the secondary control should navigate to a URL instead of performing an action (e.g. "Learn more", "View docs").
43
+ *
44
+ */
45
+ export declare const SpotlightSecondaryLink: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightSecondaryLinkProps> & React.RefAttributes<HTMLAnchorElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/spotlight",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "A spotlight introduces users to points of interest, from focused messages to multi-step tours.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,8 +36,8 @@
36
36
  "@atlaskit/button": "^23.9.0",
37
37
  "@atlaskit/css": "^0.19.0",
38
38
  "@atlaskit/ds-lib": "^5.3.0",
39
- "@atlaskit/heading": "^5.2.0",
40
- "@atlaskit/icon": "^30.0.0",
39
+ "@atlaskit/heading": "^5.3.0",
40
+ "@atlaskit/icon": "^31.0.0",
41
41
  "@atlaskit/image": "^3.0.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
43
  "@atlaskit/popper": "^7.1.0",
@@ -57,7 +57,7 @@
57
57
  "@af/visual-regression": "workspace:^",
58
58
  "@atlaskit/dropdown-menu": "^16.4.0",
59
59
  "@atlaskit/ssr": "workspace:^",
60
- "@atlassian/a11y-jest-testing": "^0.8.0",
60
+ "@atlassian/a11y-jest-testing": "^0.10.0",
61
61
  "@testing-library/react": "^16.3.0",
62
62
  "react-dom": "^18.2.0"
63
63
  },