@atlaskit/spotlight 0.10.5 → 0.10.7

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,20 @@
1
1
  # @atlaskit/spotlight
2
2
 
3
+ ## 0.10.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5db9e3f21a52f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5db9e3f21a52f) -
8
+ Internal refactoring
9
+ - Updated dependencies
10
+
11
+ ## 0.10.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [`9b038ce3c261e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b038ce3c261e) -
16
+ Create `SpotlightPrimaryLink` and `SpotlightSecondaryLink` components.
17
+
3
18
  ## 0.10.5
4
19
 
5
20
  ### 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" />
@@ -51,25 +51,26 @@ A tour is a series of spotlights that point to multiple areas of the UI. <br />
51
51
  Tours should be used sparingly. Before designing a tour, assess if you can combine or eliminate
52
52
  steps to keep the experience as lightweight as possible, as seen below.
53
53
 
54
- <DoDont
55
- type="do"
56
- image={{
57
- url: tourUseDo,
58
- alt: 'Example of a single-step spotlight with content that combines the example content of the multi-step tour next to it.',
59
- }}
60
- >
61
- Keep things lightweight. Aim for one step with active and concise messaging.
62
- </DoDont>
63
-
64
- <DoDont
65
- type="dont"
66
- image={{
67
- url: tourUseDont,
68
- alt: 'Example of a multi-step spotlight with content that that can be combined into a single step.',
69
- }}
70
- >
71
- Avoid tours unless the steps are crucial. Consolidate information first.
72
- </DoDont>
54
+ <DoDontGrid>
55
+ <DoDont
56
+ type="do"
57
+ image={{
58
+ url: tourUseDo,
59
+ alt: 'Example of a single-step spotlight with content that combines the example content of the multi-step tour next to it.',
60
+ }}
61
+ >
62
+ Keep things lightweight. Aim for one step with active and concise messaging.
63
+ </DoDont>
64
+ <DoDont
65
+ type="dont"
66
+ image={{
67
+ url: tourUseDont,
68
+ alt: 'Example of a multi-step spotlight with content that that can be combined into a single step.',
69
+ }}
70
+ >
71
+ Avoid tours unless the steps are crucial. Consolidate information first.
72
+ </DoDont>
73
+ </DoDontGrid>
73
74
 
74
75
  ### Triggered spotlights
75
76
 
@@ -98,25 +99,26 @@ also activate UI.
98
99
 
99
100
  ## Principles of use
100
101
 
101
- <DoDont
102
- type="do"
103
- image={{
104
- url: principlesDo,
105
- alt: 'Example of spotlight with content that explains what Rovo is.',
106
- }}
107
- >
108
- Use spotlights to educate users or introduce them to something new.
109
- </DoDont>
110
-
111
- <DoDont
112
- type="dont"
113
- image={{
114
- url: principlesDont,
115
- alt: 'Example of a spotlight with content that promotes purchasing collections to get Rovo.',
116
- }}
117
- >
118
- Use spotlights for upsells or other transactional messaging.
119
- </DoDont>
102
+ <DoDontGrid>
103
+ <DoDont
104
+ type="do"
105
+ image={{
106
+ url: principlesDo,
107
+ alt: 'Example of spotlight with content that explains what Rovo is.',
108
+ }}
109
+ >
110
+ Use spotlights to educate users or introduce them to something new.
111
+ </DoDont>
112
+ <DoDont
113
+ type="dont"
114
+ image={{
115
+ url: principlesDont,
116
+ alt: 'Example of a spotlight with content that promotes purchasing collections to get Rovo.',
117
+ }}
118
+ >
119
+ Use spotlights for upsells or other transactional messaging.
120
+ </DoDont>
121
+ </DoDontGrid>
120
122
 
121
123
  ## Anatomy and specifications
122
124
 
@@ -179,7 +181,7 @@ concise as possible, easy to scan, and only communicate essential information.
179
181
 
180
182
  - 75 characters max
181
183
  - Brief and direct
182
- - Elaborate value
184
+ - Elaborate value
183
185
 
184
186
  #### Primary CTA
185
187
 
@@ -190,7 +192,7 @@ concise as possible, easy to scan, and only communicate essential information.
190
192
  - Let them know where they’re going next when navigating to another screen “Go to Jira”
191
193
  - Be explicit when activating UI components “Chat with Rovo” opens the Rovo panel
192
194
  - Use “Learn more” when navigating to more detailed information
193
- - For tours: start with “Next” and conclude the flow with “Done”
195
+ - For tours: start with “Next” and conclude the flow with “Done”
194
196
 
195
197
  #### Secondary CTA
196
198
 
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");
@@ -155,9 +155,7 @@ var PopoverContent = exports.PopoverContent = function PopoverContent(props) {
155
155
  role: "dialog",
156
156
  "data-testid": testId,
157
157
  "aria-labelledby": heading.id,
158
- ref: (0, _mergeRefs.default)([ref, localRef])
159
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
160
- ,
158
+ ref: (0, _mergeRefs.default)([ref, localRef]),
161
159
  style: style,
162
160
  className: (0, _runtime.ax)([styles.root])
163
161
  }, children);
@@ -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';
@@ -141,9 +141,7 @@ export const PopoverContent = props => {
141
141
  role: "dialog",
142
142
  "data-testid": testId,
143
143
  "aria-labelledby": heading.id,
144
- ref: mergeRefs([ref, localRef])
145
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
146
- ,
144
+ ref: mergeRefs([ref, localRef]),
147
145
  style: style,
148
146
  className: ax([styles.root])
149
147
  }, children);
@@ -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';
@@ -146,9 +146,7 @@ export var PopoverContent = function PopoverContent(props) {
146
146
  role: "dialog",
147
147
  "data-testid": testId,
148
148
  "aria-labelledby": heading.id,
149
- ref: mergeRefs([ref, localRef])
150
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
151
- ,
149
+ ref: mergeRefs([ref, localRef]),
152
150
  style: style,
153
151
  className: ax([styles.root])
154
152
  }, children);
@@ -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
+ });
@@ -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>>;
@@ -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.5",
3
+ "version": "0.10.7",
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",