@atlaskit/quick-search 8.1.10 → 8.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +261 -114
  2. package/compass.yml +0 -1
  3. package/dist/cjs/components/ResultItem/styled.js +69 -13
  4. package/dist/cjs/components/Search/Search.js +8 -4
  5. package/dist/cjs/components/Search/styled.js +59 -10
  6. package/dist/es2019/components/ResultItem/styled.js +62 -47
  7. package/dist/es2019/components/Search/Search.js +8 -5
  8. package/dist/es2019/components/Search/styled.js +85 -66
  9. package/dist/esm/components/ResultItem/styled.js +68 -13
  10. package/dist/esm/components/Search/Search.js +8 -3
  11. package/dist/esm/components/Search/styled.js +60 -10
  12. package/dist/types/components/QuickSearch.d.ts +3 -3
  13. package/dist/types/components/Results/ContainerResult.d.ts +1 -1
  14. package/dist/types/components/Results/ObjectResult.d.ts +1 -1
  15. package/dist/types/components/Results/PersonResult.d.ts +1 -1
  16. package/dist/types/components/Results/ResultBase.d.ts +2 -2
  17. package/dist/types/components/Results/types.d.ts +1 -1
  18. package/dist/types/components/context.d.ts +3 -3
  19. package/dist/types/components/decorateWithAnalyticsData.d.ts +1 -1
  20. package/dist/types-ts4.5/components/QuickSearch.d.ts +3 -3
  21. package/dist/types-ts4.5/components/Results/ContainerResult.d.ts +1 -1
  22. package/dist/types-ts4.5/components/Results/ObjectResult.d.ts +1 -1
  23. package/dist/types-ts4.5/components/Results/PersonResult.d.ts +1 -1
  24. package/dist/types-ts4.5/components/Results/ResultBase.d.ts +2 -2
  25. package/dist/types-ts4.5/components/Results/types.d.ts +1 -1
  26. package/dist/types-ts4.5/components/context.d.ts +3 -3
  27. package/dist/types-ts4.5/components/decorateWithAnalyticsData.d.ts +1 -1
  28. package/docs/0-intro.tsx +8 -18
  29. package/package.json +55 -57
  30. package/report.api.md +152 -156
@@ -1,17 +1,67 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
2
+ var _templateObject, _templateObject2;
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import styled, { css } from 'styled-components';
4
5
  import { N0, N200, N500, B200, N50 } from '@atlaskit/theme/colors';
5
6
  var inputRightPadding = "var(--ds-space-200, 16px)";
6
- export var SearchBox = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: sticky;\n top: 0;\n background-color: ", ";\n color: ", ";\n display: flex;\n height: 36px;\n z-index: 10; /* required to keep the search box on top of icons in results when sticky */\n"])), N0, N500);
7
- export var SearchFieldBaseOuter = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n margin-right: auto;\n padding-bottom: ", ";\n border-bottom: 2px solid ", ";\n"])), "var(--ds-space-025, 2px)", B200);
8
- export var SearchFieldBaseInner = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding-right: ", "; /* pad search text from FieldBase's isLoading spinner */\n display: flex;\n flex-grow: 1;\n"])), inputRightPadding);
9
- export var SearchInner = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-right: ", ";\n"])), "var(--ds-space-300, 24px)");
7
+
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
9
+ export var SearchBox = styled.div({
10
+ position: 'sticky',
11
+ top: 0,
12
+ backgroundColor: N0,
13
+ color: N500,
14
+ display: 'flex',
15
+ height: '36px',
16
+ zIndex: 10 /* required to keep the search box on top of icons in results when sticky */
17
+ });
18
+
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
20
+ export var SearchFieldBaseOuter = styled.div({
21
+ display: 'flex',
22
+ flex: 1,
23
+ marginRight: 'auto',
24
+ paddingBottom: "var(--ds-space-025, 2px)",
25
+ borderBottom: "2px solid ".concat(B200)
26
+ });
27
+
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
29
+ export var SearchFieldBaseInner = styled.div({
30
+ position: 'relative',
31
+ alignItems: 'center',
32
+ paddingRight: inputRightPadding /* pad search text from FieldBase's isLoading spinner */,
33
+ display: 'flex',
34
+ flexGrow: 1
35
+ });
36
+
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
38
+ export var SearchInner = styled.div({
39
+ paddingRight: "var(--ds-space-300, 24px)"
40
+ });
41
+
42
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
10
43
  export var getPlaceholderStyle = function getPlaceholderStyle(style) {
11
- return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &::-webkit-input-placeholder {\n ", ";\n }\n &::-moz-placeholder {\n /* Mozilla Firefox 19+ */\n ", " opacity: 1;\n }\n &::-ms-input-placeholder {\n /* Microsoft Edge */\n ", ";\n }\n &:-moz-placeholder {\n /* Mozilla Firefox 4 to 18 */\n ", " opacity: 1;\n }\n &:-ms-input-placeholder {\n /* Internet Explorer 10-11 */\n ", ";\n }\n"])), style, style, style, style, style);
44
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t&::-webkit-input-placeholder {\n\t\t", ";\n\t}\n\t&::-moz-placeholder {\n\t\t/* Mozilla Firefox 19+ */\n\t\t", " opacity: 1;\n\t}\n\t&::-ms-input-placeholder {\n\t\t/* Microsoft Edge */\n\t\t", ";\n\t}\n\t&:-moz-placeholder {\n\t\t/* Mozilla Firefox 4 to 18 */\n\t\t", " opacity: 1;\n\t}\n\t&:-ms-input-placeholder {\n\t\t/* Internet Explorer 10-11 */\n\t\t", ";\n\t}\n"])), style, style, style, style, style);
12
45
  };
13
- export var getPlaceholderColor = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
14
- export var SearchInput = styled.input(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background-color: transparent;\n border: 0;\n color: ", ";\n flex-grow: 1;\n font-size: 1.4em;\n outline: 0;\n // Safari adds 2px margin-left\n margin-left: 0;\n ", ";\n"])), N500, getPlaceholderStyle(getPlaceholderColor));
15
- export var SearchInputTypeAhead = styled(SearchInput)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n position: absolute;\n width: calc(100% - ", ");\n z-index: -1;\n"])), N50, inputRightPadding);
16
- export var SearchInputControlsContainer = styled.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding-left: ", ";\n"])), "var(--ds-space-300, 24px)");
46
+
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
48
+ export var getPlaceholderColor = css({
49
+ color: "var(--ds-text-subtlest, ".concat(N200, ")")
50
+ });
51
+
52
+ // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
53
+ export var SearchInput = styled.input(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tbackground-color: transparent;\n\tborder: 0;\n\tcolor: ", ";\n\tflex-grow: 1;\n\tfont-size: 1.4em;\n\toutline: 0;\n\t// Safari adds 2px margin-left\n\tmargin-left: 0;\n\t", ";\n"])), N500, getPlaceholderStyle(getPlaceholderColor));
54
+
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
56
+ export var SearchInputTypeAhead = styled(SearchInput)({
57
+ color: N50,
58
+ position: 'absolute',
59
+ width: "calc(100% - ".concat(inputRightPadding, ")"),
60
+ zIndex: -1
61
+ });
62
+
63
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
64
+ export var SearchInputControlsContainer = styled.span({
65
+ paddingLeft: "var(--ds-space-300, 24px)"
66
+ });
17
67
  SearchInputControlsContainer.displayName = 'SearchInputControlsContainer'; // required for testing
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { ResultData, SelectedResultId } from './Results/types';
3
- import { ResultContextType } from './context';
4
- import { ResultBase } from './Results/ResultBase';
2
+ import { type ResultData, type SelectedResultId } from './Results/types';
3
+ import { type ResultContextType } from './context';
4
+ import { type ResultBase } from './Results/ResultBase';
5
5
  export type Props = {
6
6
  /** Search results in the form of ResultItemGroups containing Result components */
7
7
  children: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonResultProps } from './types';
2
+ import { type CommonResultProps } from './types';
3
3
  export type Props = CommonResultProps & {
4
4
  /** Name of the container. Provides the main text to be displayed as the item. */
5
5
  name: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonResultProps } from './types';
2
+ import { type CommonResultProps } from './types';
3
3
  export type Props = CommonResultProps & {
4
4
  /** Name of the container. Provides the main text to be displayed as the item. */
5
5
  name: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonResultProps } from './types';
2
+ import { type CommonResultProps } from './types';
3
3
  export type Props = CommonResultProps & {
4
4
  /** Name of the container. Provides the main text to be displayed as the item. */
5
5
  name: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { AnalyticsData, CommonResultProps } from './types';
3
- import { ResultContextType } from '../context';
2
+ import { type AnalyticsData, type CommonResultProps } from './types';
3
+ import { type ResultContextType } from '../context';
4
4
  export type Props = CommonResultProps & {
5
5
  /** Type of the result. This is passed as a parameter to certain callbacks. */
6
6
  type: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  export type AnalyticsData = Object;
3
3
  export type ResultId = string | number;
4
4
  export type SelectedResultId = ResultId | null;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { ComponentType } from 'react';
3
- import { ResultData, ResultId, SelectedResultId } from './Results/types';
4
- import { ResultBase } from './Results/ResultBase';
2
+ import { type ComponentType } from 'react';
3
+ import { type ResultData, type ResultId, type SelectedResultId } from './Results/types';
4
+ import { type ResultBase } from './Results/ResultBase';
5
5
  export type ResultContextType = {
6
6
  /** Register result as keyboard navigation target */
7
7
  registerResult: (result: ResultBase) => void;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { Props } from './QuickSearch';
2
+ import { type Props } from './QuickSearch';
3
3
  export default function decorateWithAnalyticsData(WrappedQuickSearch: React.ComponentClass<Props>): React.ComponentClass<Props>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { ResultData, SelectedResultId } from './Results/types';
3
- import { ResultContextType } from './context';
4
- import { ResultBase } from './Results/ResultBase';
2
+ import { type ResultData, type SelectedResultId } from './Results/types';
3
+ import { type ResultContextType } from './context';
4
+ import { type ResultBase } from './Results/ResultBase';
5
5
  export type Props = {
6
6
  /** Search results in the form of ResultItemGroups containing Result components */
7
7
  children: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonResultProps } from './types';
2
+ import { type CommonResultProps } from './types';
3
3
  export type Props = CommonResultProps & {
4
4
  /** Name of the container. Provides the main text to be displayed as the item. */
5
5
  name: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonResultProps } from './types';
2
+ import { type CommonResultProps } from './types';
3
3
  export type Props = CommonResultProps & {
4
4
  /** Name of the container. Provides the main text to be displayed as the item. */
5
5
  name: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonResultProps } from './types';
2
+ import { type CommonResultProps } from './types';
3
3
  export type Props = CommonResultProps & {
4
4
  /** Name of the container. Provides the main text to be displayed as the item. */
5
5
  name: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { AnalyticsData, CommonResultProps } from './types';
3
- import { ResultContextType } from '../context';
2
+ import { type AnalyticsData, type CommonResultProps } from './types';
3
+ import { type ResultContextType } from '../context';
4
4
  export type Props = CommonResultProps & {
5
5
  /** Type of the result. This is passed as a parameter to certain callbacks. */
6
6
  type: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  export type AnalyticsData = Object;
3
3
  export type ResultId = string | number;
4
4
  export type SelectedResultId = ResultId | null;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { ComponentType } from 'react';
3
- import { ResultData, ResultId, SelectedResultId } from './Results/types';
4
- import { ResultBase } from './Results/ResultBase';
2
+ import { type ComponentType } from 'react';
3
+ import { type ResultData, type ResultId, type SelectedResultId } from './Results/types';
4
+ import { type ResultBase } from './Results/ResultBase';
5
5
  export type ResultContextType = {
6
6
  /** Register result as keyboard navigation target */
7
7
  registerResult: (result: ResultBase) => void;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { Props } from './QuickSearch';
2
+ import { type Props } from './QuickSearch';
3
3
  export default function decorateWithAnalyticsData(WrappedQuickSearch: React.ComponentClass<Props>): React.ComponentClass<Props>;
package/docs/0-intro.tsx CHANGED
@@ -1,11 +1,5 @@
1
1
  import React from 'react';
2
- import {
3
- md,
4
- Example,
5
- Props,
6
- code,
7
- AtlassianInternalWarning,
8
- } from '@atlaskit/docs';
2
+ import { md, Example, Props, code, AtlassianInternalWarning } from '@atlaskit/docs';
9
3
 
10
4
  export default md`
11
5
  ${(<AtlassianInternalWarning />)}
@@ -37,17 +31,13 @@ export default md`
37
31
  `}
38
32
 
39
33
  ${(
40
- <Example
41
- Component={require('../examples/1-Object-Results').default}
42
- title="Objects"
43
- source={require('!!raw-loader!../examples/1-Object-Results')}
44
- />
45
- )}
34
+ <Example
35
+ Component={require('../examples/1-Object-Results').default}
36
+ title="Objects"
37
+ source={require('!!raw-loader!../examples/1-Object-Results')}
38
+ />
39
+ )}
46
40
 
47
- ${(
48
- <Props
49
- props={require('!!extract-react-types-loader!../src/components/QuickSearch')}
50
- />
51
- )}
41
+ ${(<Props props={require('!!extract-react-types-loader!../src/components/QuickSearch')} />)}
52
42
 
53
43
  `;
package/package.json CHANGED
@@ -1,58 +1,56 @@
1
1
  {
2
- "name": "@atlaskit/quick-search",
3
- "version": "8.1.10",
4
- "description": "A quick-search component",
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org/"
7
- },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
- "author": "Atlassian Pty Ltd",
10
- "license": "Apache-2.0",
11
- "main": "dist/cjs/index.js",
12
- "module": "dist/esm/index.js",
13
- "module:es2019": "dist/es2019/index.js",
14
- "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
- "atlaskit:src": "src/index.ts",
24
- "atlassian": {
25
- "team": "Search Platform: Search Experience",
26
- "releaseModel": "continuous",
27
- "website": {
28
- "name": "Quick Search"
29
- }
30
- },
31
- "dependencies": {
32
- "@atlaskit/analytics": "^8.1.0",
33
- "@atlaskit/avatar": "^21.5.0",
34
- "@atlaskit/item": "^12.1.0",
35
- "@atlaskit/spinner": "^16.0.0",
36
- "@atlaskit/theme": "^12.6.0",
37
- "@atlaskit/tokens": "^1.42.0",
38
- "@babel/runtime": "^7.0.0",
39
- "keycode": "^2.1.7"
40
- },
41
- "peerDependencies": {
42
- "react": "^16.8.0",
43
- "styled-components": "^3.2.6"
44
- },
45
- "devDependencies": {
46
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
47
- "enzyme": "^3.10.0",
48
- "prop-types": "^15.5.10",
49
- "react": "^16.8.0",
50
- "sinon": "^2.2.0",
51
- "typescript": "~5.4.2",
52
- "uuid": "^3.1.0"
53
- },
54
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
55
- "af:exports": {
56
- ".": "./src/index.ts"
57
- }
58
- }
2
+ "name": "@atlaskit/quick-search",
3
+ "version": "8.1.11",
4
+ "description": "A quick-search component",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
23
+ "atlaskit:src": "src/index.ts",
24
+ "atlassian": {
25
+ "team": "Search Platform: Search Experience",
26
+ "releaseModel": "continuous",
27
+ "website": {
28
+ "name": "Quick Search"
29
+ }
30
+ },
31
+ "dependencies": {
32
+ "@atlaskit/analytics": "^8.1.0",
33
+ "@atlaskit/avatar": "^21.14.0",
34
+ "@atlaskit/item": "^12.1.0",
35
+ "@atlaskit/spinner": "^16.3.0",
36
+ "@atlaskit/theme": "^13.0.0",
37
+ "@atlaskit/tokens": "^1.58.0",
38
+ "@babel/runtime": "^7.0.0",
39
+ "keycode": "^2.1.7"
40
+ },
41
+ "peerDependencies": {
42
+ "react": "^16.8.0",
43
+ "styled-components": "^3.2.6"
44
+ },
45
+ "devDependencies": {
46
+ "enzyme": "^3.10.0",
47
+ "prop-types": "^15.5.10",
48
+ "react": "^16.8.0",
49
+ "sinon": "^2.2.0",
50
+ "typescript": "~5.4.2",
51
+ "uuid": "^3.1.0"
52
+ },
53
+ "af:exports": {
54
+ ".": "./src/index.ts"
55
+ }
56
+ }