@atlaskit/spotlight 0.0.11 → 0.0.13

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,19 @@
1
1
  # @atlaskit/spotlight
2
2
 
3
+ ## 0.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [`15963c2a4fb01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/15963c2a4fb01) -
8
+ Create StepCount component.
9
+
10
+ ## 0.0.12
11
+
12
+ ### Patch Changes
13
+
14
+ - [`7121a32fb1613`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7121a32fb1613) -
15
+ Create ShowMoreControl component.
16
+
3
17
  ## 0.0.11
4
18
 
5
19
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -87,6 +87,18 @@ Object.defineProperty(exports, "SpotlightSecondaryAction", {
87
87
  return _secondaryAction.SpotlightSecondaryAction;
88
88
  }
89
89
  });
90
+ Object.defineProperty(exports, "SpotlightShowMoreControl", {
91
+ enumerable: true,
92
+ get: function get() {
93
+ return _showMoreControl.SpotlightShowMoreControl;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "SpotlightStepCount", {
97
+ enumerable: true,
98
+ get: function get() {
99
+ return _stepCount.SpotlightStepCount;
100
+ }
101
+ });
90
102
  Object.defineProperty(exports, "TourContext", {
91
103
  enumerable: true,
92
104
  get: function get() {
@@ -105,10 +117,12 @@ var _header = require("./ui/header");
105
117
  var _headline = require("./ui/headline");
106
118
  var _footer = require("./ui/footer");
107
119
  var _actions = require("./ui/actions");
120
+ var _stepCount = require("./ui/step-count");
108
121
  var _primaryAction = require("./ui/primary-action");
109
122
  var _secondaryAction = require("./ui/secondary-action");
110
123
  var _controls = require("./ui/controls");
111
124
  var _dismissControl = require("./ui/dismiss-control");
125
+ var _showMoreControl = require("./ui/show-more-control");
112
126
  var _media = require("./ui/media");
113
127
  var _popoverProvider = require("./ui/popover-provider");
114
128
  var _popoverContent = require("./ui/popover-content");
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.SpotlightShowMoreControl = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _new = require("@atlaskit/button/new");
11
+ var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
12
+ 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); }
13
+ /**
14
+ * __SpotlightShowMoreControl__
15
+ *
16
+ * SpotlightShowMoreControl allows the user to close the `Spotlight`.
17
+ *
18
+ */
19
+ var SpotlightShowMoreControl = exports.SpotlightShowMoreControl = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
20
+ var onClick = _ref.onClick,
21
+ testId = _ref.testId;
22
+ return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
23
+ appearance: "default",
24
+ icon: _showMoreHorizontal.default,
25
+ label: "Close",
26
+ onClick: onClick,
27
+ ref: ref,
28
+ spacing: "compact",
29
+ testId: testId
30
+ });
31
+ });
@@ -0,0 +1 @@
1
+ ._1ul91ris{min-width:max-content}
@@ -0,0 +1,32 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ "use strict";
3
+
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.SpotlightStepCount = void 0;
9
+ require("./index.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _compiled = require("@atlaskit/primitives/compiled");
13
+ 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); }
14
+ var styles = {
15
+ root: "_1ul91ris"
16
+ };
17
+ /**
18
+ * __Spotlight StepCount__
19
+ *
20
+ * `SpotlightStepCount` groups `SpotlightAction` components.
21
+ *
22
+ */
23
+ var SpotlightStepCount = exports.SpotlightStepCount = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
24
+ var children = _ref.children,
25
+ testId = _ref.testId;
26
+ return /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
27
+ xcss: styles.root
28
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
29
+ ref: ref,
30
+ testId: testId
31
+ }, children));
32
+ });
@@ -4,10 +4,12 @@ export { SpotlightHeader } from './ui/header';
4
4
  export { SpotlightHeadline } from './ui/headline';
5
5
  export { SpotlightFooter } from './ui/footer';
6
6
  export { SpotlightActions } from './ui/actions';
7
+ export { SpotlightStepCount } from './ui/step-count';
7
8
  export { SpotlightPrimaryAction } from './ui/primary-action';
8
9
  export { SpotlightSecondaryAction } from './ui/secondary-action';
9
10
  export { SpotlightControls } from './ui/controls';
10
11
  export { SpotlightDismissControl } from './ui/dismiss-control';
12
+ export { SpotlightShowMoreControl } from './ui/show-more-control';
11
13
  export { SpotlightMedia } from './ui/media';
12
14
  export { PopoverProvider } from './ui/popover-provider';
13
15
  export { PopoverContent } from './ui/popover-content';
@@ -0,0 +1,23 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { IconButton } from '@atlaskit/button/new';
3
+ import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
4
+ /**
5
+ * __SpotlightShowMoreControl__
6
+ *
7
+ * SpotlightShowMoreControl allows the user to close the `Spotlight`.
8
+ *
9
+ */
10
+ export const SpotlightShowMoreControl = /*#__PURE__*/forwardRef(({
11
+ onClick,
12
+ testId
13
+ }, ref) => {
14
+ return /*#__PURE__*/React.createElement(IconButton, {
15
+ appearance: "default",
16
+ icon: ShowMoreHorizontalIcon,
17
+ label: "Close",
18
+ onClick: onClick,
19
+ ref: ref,
20
+ spacing: "compact",
21
+ testId: testId
22
+ });
23
+ });
@@ -0,0 +1 @@
1
+ ._1ul91ris{min-width:max-content}
@@ -0,0 +1,25 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./index.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React, { forwardRef } from 'react';
5
+ import { Flex, Text } from '@atlaskit/primitives/compiled';
6
+ const styles = {
7
+ root: "_1ul91ris"
8
+ };
9
+ /**
10
+ * __Spotlight StepCount__
11
+ *
12
+ * `SpotlightStepCount` groups `SpotlightAction` components.
13
+ *
14
+ */
15
+ export const SpotlightStepCount = /*#__PURE__*/forwardRef(({
16
+ children,
17
+ testId
18
+ }, ref) => {
19
+ return /*#__PURE__*/React.createElement(Flex, {
20
+ xcss: styles.root
21
+ }, /*#__PURE__*/React.createElement(Text, {
22
+ ref: ref,
23
+ testId: testId
24
+ }, children));
25
+ });
package/dist/esm/index.js CHANGED
@@ -4,10 +4,12 @@ export { SpotlightHeader } from './ui/header';
4
4
  export { SpotlightHeadline } from './ui/headline';
5
5
  export { SpotlightFooter } from './ui/footer';
6
6
  export { SpotlightActions } from './ui/actions';
7
+ export { SpotlightStepCount } from './ui/step-count';
7
8
  export { SpotlightPrimaryAction } from './ui/primary-action';
8
9
  export { SpotlightSecondaryAction } from './ui/secondary-action';
9
10
  export { SpotlightControls } from './ui/controls';
10
11
  export { SpotlightDismissControl } from './ui/dismiss-control';
12
+ export { SpotlightShowMoreControl } from './ui/show-more-control';
11
13
  export { SpotlightMedia } from './ui/media';
12
14
  export { PopoverProvider } from './ui/popover-provider';
13
15
  export { PopoverContent } from './ui/popover-content';
@@ -0,0 +1,22 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { IconButton } from '@atlaskit/button/new';
3
+ import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
4
+ /**
5
+ * __SpotlightShowMoreControl__
6
+ *
7
+ * SpotlightShowMoreControl allows the user to close the `Spotlight`.
8
+ *
9
+ */
10
+ export var SpotlightShowMoreControl = /*#__PURE__*/forwardRef(function (_ref, ref) {
11
+ var onClick = _ref.onClick,
12
+ testId = _ref.testId;
13
+ return /*#__PURE__*/React.createElement(IconButton, {
14
+ appearance: "default",
15
+ icon: ShowMoreHorizontalIcon,
16
+ label: "Close",
17
+ onClick: onClick,
18
+ ref: ref,
19
+ spacing: "compact",
20
+ testId: testId
21
+ });
22
+ });
@@ -0,0 +1 @@
1
+ ._1ul91ris{min-width:max-content}
@@ -0,0 +1,24 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./index.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React, { forwardRef } from 'react';
5
+ import { Flex, Text } from '@atlaskit/primitives/compiled';
6
+ var styles = {
7
+ root: "_1ul91ris"
8
+ };
9
+ /**
10
+ * __Spotlight StepCount__
11
+ *
12
+ * `SpotlightStepCount` groups `SpotlightAction` components.
13
+ *
14
+ */
15
+ export var SpotlightStepCount = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
+ var children = _ref.children,
17
+ testId = _ref.testId;
18
+ return /*#__PURE__*/React.createElement(Flex, {
19
+ xcss: styles.root
20
+ }, /*#__PURE__*/React.createElement(Text, {
21
+ ref: ref,
22
+ testId: testId
23
+ }, children));
24
+ });
@@ -4,10 +4,12 @@ export { SpotlightHeader, type SpotlightHeaderProps } from './ui/header';
4
4
  export { SpotlightHeadline, type SpotlightHeadlineProps } from './ui/headline';
5
5
  export { SpotlightFooter, type SpotlightFooterProps } from './ui/footer';
6
6
  export { SpotlightActions, type SpotlightActionsProps } from './ui/actions';
7
+ export { SpotlightStepCount, type SpotlightStepCountProps } from './ui/step-count';
7
8
  export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/primary-action';
8
9
  export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
9
10
  export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
10
11
  export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
12
+ export { SpotlightShowMoreControl, type SpotlightShowMoreControlProps, } from './ui/show-more-control';
11
13
  export { SpotlightMedia, type SpotlightMediaProps } from './ui/media';
12
14
  export { PopoverProvider } from './ui/popover-provider';
13
15
  export { PopoverContent } from './ui/popover-content';
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { type IconButtonProps } from '@atlaskit/button/new';
3
+ export interface SpotlightShowMoreControlProps {
4
+ /**
5
+ * A `testId` prop is provided for specified elements, which is a unique
6
+ * string that appears as a data attribute `data-testid` in the rendered code,
7
+ * serving as a hook for automated tests
8
+ */
9
+ testId?: string;
10
+ /**
11
+ * The action to take when the button is clicked.
12
+ */
13
+ onClick?: IconButtonProps['onClick'];
14
+ }
15
+ /**
16
+ * __SpotlightShowMoreControl__
17
+ *
18
+ * SpotlightShowMoreControl allows the user to close the `Spotlight`.
19
+ *
20
+ */
21
+ export declare const SpotlightShowMoreControl: React.ForwardRefExoticComponent<SpotlightShowMoreControlProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,20 @@
1
+ import React, { type ReactNode } from 'react';
2
+ export interface SpotlightStepCountProps {
3
+ /**
4
+ * A `testId` prop is provided for specified elements, which is a unique
5
+ * string that appears as a data attribute `data-testid` in the rendered code,
6
+ * serving as a hook for automated tests
7
+ */
8
+ testId?: string;
9
+ /**
10
+ * Elements to be rendered inside the `SpotlightStepCount`.
11
+ */
12
+ children?: ReactNode;
13
+ }
14
+ /**
15
+ * __Spotlight StepCount__
16
+ *
17
+ * `SpotlightStepCount` groups `SpotlightAction` components.
18
+ *
19
+ */
20
+ export declare const SpotlightStepCount: React.ForwardRefExoticComponent<SpotlightStepCountProps & React.RefAttributes<HTMLSpanElement>>;
@@ -4,10 +4,12 @@ export { SpotlightHeader, type SpotlightHeaderProps } from './ui/header';
4
4
  export { SpotlightHeadline, type SpotlightHeadlineProps } from './ui/headline';
5
5
  export { SpotlightFooter, type SpotlightFooterProps } from './ui/footer';
6
6
  export { SpotlightActions, type SpotlightActionsProps } from './ui/actions';
7
+ export { SpotlightStepCount, type SpotlightStepCountProps } from './ui/step-count';
7
8
  export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/primary-action';
8
9
  export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
9
10
  export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
10
11
  export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
12
+ export { SpotlightShowMoreControl, type SpotlightShowMoreControlProps, } from './ui/show-more-control';
11
13
  export { SpotlightMedia, type SpotlightMediaProps } from './ui/media';
12
14
  export { PopoverProvider } from './ui/popover-provider';
13
15
  export { PopoverContent } from './ui/popover-content';
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { type IconButtonProps } from '@atlaskit/button/new';
3
+ export interface SpotlightShowMoreControlProps {
4
+ /**
5
+ * A `testId` prop is provided for specified elements, which is a unique
6
+ * string that appears as a data attribute `data-testid` in the rendered code,
7
+ * serving as a hook for automated tests
8
+ */
9
+ testId?: string;
10
+ /**
11
+ * The action to take when the button is clicked.
12
+ */
13
+ onClick?: IconButtonProps['onClick'];
14
+ }
15
+ /**
16
+ * __SpotlightShowMoreControl__
17
+ *
18
+ * SpotlightShowMoreControl allows the user to close the `Spotlight`.
19
+ *
20
+ */
21
+ export declare const SpotlightShowMoreControl: React.ForwardRefExoticComponent<SpotlightShowMoreControlProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,20 @@
1
+ import React, { type ReactNode } from 'react';
2
+ export interface SpotlightStepCountProps {
3
+ /**
4
+ * A `testId` prop is provided for specified elements, which is a unique
5
+ * string that appears as a data attribute `data-testid` in the rendered code,
6
+ * serving as a hook for automated tests
7
+ */
8
+ testId?: string;
9
+ /**
10
+ * Elements to be rendered inside the `SpotlightStepCount`.
11
+ */
12
+ children?: ReactNode;
13
+ }
14
+ /**
15
+ * __Spotlight StepCount__
16
+ *
17
+ * `SpotlightStepCount` groups `SpotlightAction` components.
18
+ *
19
+ */
20
+ export declare const SpotlightStepCount: React.ForwardRefExoticComponent<SpotlightStepCountProps & React.RefAttributes<HTMLSpanElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/spotlight",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "A spotlight introduces users to various points of interest across Atlassian through focused messages or multi-step tours.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/button": "^23.3.0",
33
33
  "@atlaskit/css": "^0.12.0",
34
34
  "@atlaskit/heading": "^5.2.0",
35
- "@atlaskit/icon": "^27.11.0",
35
+ "@atlaskit/icon": "^27.12.0",
36
36
  "@atlaskit/image": "^3.0.0",
37
37
  "@atlaskit/popper": "^7.1.0",
38
38
  "@atlaskit/primitives": "^14.11.0",
@@ -46,6 +46,7 @@
46
46
  "devDependencies": {
47
47
  "@af/integration-testing": "workspace:^",
48
48
  "@af/visual-regression": "workspace:^",
49
+ "@atlaskit/dropdown-menu": "^16.3.0",
49
50
  "@atlaskit/ssr": "workspace:^",
50
51
  "@atlaskit/visual-regression": "workspace:^",
51
52
  "@testing-library/react": "^13.4.0",