@atlaskit/spotlight 0.0.11 → 0.0.12

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,12 @@
1
1
  # @atlaskit/spotlight
2
2
 
3
+ ## 0.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7121a32fb1613`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7121a32fb1613) -
8
+ Create ShowMoreControl component.
9
+
3
10
  ## 0.0.11
4
11
 
5
12
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -87,6 +87,12 @@ 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
+ });
90
96
  Object.defineProperty(exports, "TourContext", {
91
97
  enumerable: true,
92
98
  get: function get() {
@@ -109,6 +115,7 @@ var _primaryAction = require("./ui/primary-action");
109
115
  var _secondaryAction = require("./ui/secondary-action");
110
116
  var _controls = require("./ui/controls");
111
117
  var _dismissControl = require("./ui/dismiss-control");
118
+ var _showMoreControl = require("./ui/show-more-control");
112
119
  var _media = require("./ui/media");
113
120
  var _popoverProvider = require("./ui/popover-provider");
114
121
  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
+ });
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction } from './ui/primary-action';
8
8
  export { SpotlightSecondaryAction } from './ui/secondary-action';
9
9
  export { SpotlightControls } from './ui/controls';
10
10
  export { SpotlightDismissControl } from './ui/dismiss-control';
11
+ export { SpotlightShowMoreControl } from './ui/show-more-control';
11
12
  export { SpotlightMedia } from './ui/media';
12
13
  export { PopoverProvider } from './ui/popover-provider';
13
14
  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
+ });
package/dist/esm/index.js CHANGED
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction } from './ui/primary-action';
8
8
  export { SpotlightSecondaryAction } from './ui/secondary-action';
9
9
  export { SpotlightControls } from './ui/controls';
10
10
  export { SpotlightDismissControl } from './ui/dismiss-control';
11
+ export { SpotlightShowMoreControl } from './ui/show-more-control';
11
12
  export { SpotlightMedia } from './ui/media';
12
13
  export { PopoverProvider } from './ui/popover-provider';
13
14
  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
+ });
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/p
8
8
  export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
9
9
  export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
10
10
  export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
11
+ export { SpotlightShowMoreControl, type SpotlightShowMoreControlProps } from './ui/show-more-control';
11
12
  export { SpotlightMedia, type SpotlightMediaProps } from './ui/media';
12
13
  export { PopoverProvider } from './ui/popover-provider';
13
14
  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>>;
@@ -8,6 +8,7 @@ export { SpotlightPrimaryAction, type SpotlightPrimaryActionProps } from './ui/p
8
8
  export { SpotlightSecondaryAction, type SpotlightSecondaryActionProps, } from './ui/secondary-action';
9
9
  export { SpotlightControls, type SpotlightControlsProps } from './ui/controls';
10
10
  export { SpotlightDismissControl, type SpotlightDismissControlProps } from './ui/dismiss-control';
11
+ export { SpotlightShowMoreControl, type SpotlightShowMoreControlProps } from './ui/show-more-control';
11
12
  export { SpotlightMedia, type SpotlightMediaProps } from './ui/media';
12
13
  export { PopoverProvider } from './ui/popover-provider';
13
14
  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>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/spotlight",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
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",