@transferwise/components 0.0.0-experimental-b2dc1ea → 0.0.0-experimental-1fd4714
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/build/header/Header.js +34 -89
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +31 -85
- package/build/header/Header.mjs.map +1 -1
- package/build/index.js +1 -1
- package/build/index.mjs +1 -1
- package/build/link/Link.js +3 -5
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +3 -5
- package/build/link/Link.mjs.map +1 -1
- package/build/main.css +0 -3
- package/build/selectOption/SelectOption.js +1 -1
- package/build/selectOption/SelectOption.js.map +1 -1
- package/build/selectOption/SelectOption.mjs +1 -1
- package/build/styles/header/Header.css +0 -3
- package/build/styles/main.css +0 -3
- package/build/title/Title.js +3 -6
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +3 -6
- package/build/title/Title.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +1 -1
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +1 -1
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.js +6 -4
- package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs +7 -5
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -1
- package/build/typeahead/util/highlight.js +8 -3
- package/build/typeahead/util/highlight.js.map +1 -1
- package/build/typeahead/util/highlight.mjs +9 -4
- package/build/typeahead/util/highlight.mjs.map +1 -1
- package/build/types/header/Header.d.ts +10 -34
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/header/index.d.ts +0 -1
- package/build/types/header/index.d.ts.map +1 -1
- package/build/types/index.d.ts +0 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/link/Link.d.ts +1 -3
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/title/Title.d.ts +4 -3
- package/build/types/title/Title.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
- package/build/types/typeahead/util/highlight.d.ts +5 -1
- package/build/types/typeahead/util/highlight.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/header/Header.css +0 -3
- package/src/header/Header.less +0 -4
- package/src/header/Header.spec.tsx +0 -33
- package/src/header/Header.story.tsx +40 -54
- package/src/header/Header.tsx +60 -126
- package/src/header/index.ts +0 -1
- package/src/index.ts +0 -1
- package/src/link/Link.tsx +27 -29
- package/src/main.css +0 -3
- package/src/title/Title.tsx +11 -25
- package/src/typeahead/Typeahead.rtl.spec.tsx +26 -0
- package/src/typeahead/Typeahead.tsx +2 -2
- package/src/typeahead/typeaheadOption/TypeaheadOption.spec.js +5 -4
- package/src/typeahead/typeaheadOption/TypeaheadOption.tsx +7 -3
- package/src/typeahead/util/highlight.spec.js +5 -5
- package/src/typeahead/util/highlight.tsx +11 -3
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function Highlight({
|
|
6
|
+
className,
|
|
7
|
+
value,
|
|
8
|
+
query
|
|
9
|
+
}) {
|
|
6
10
|
if (value && query) {
|
|
7
11
|
const highlightStart = value.toUpperCase().indexOf(query.trim().toUpperCase());
|
|
8
12
|
const highlightEnd = highlightStart + query.trim().length;
|
|
9
13
|
if (highlightStart !== -1) {
|
|
10
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
14
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
15
|
+
className: className,
|
|
11
16
|
children: [value.slice(0, Math.max(0, highlightStart)), /*#__PURE__*/jsxRuntime.jsx("strong", {
|
|
12
17
|
children: value.slice(highlightStart, highlightEnd)
|
|
13
18
|
}), value.slice(Math.max(0, highlightEnd))]
|
|
@@ -17,5 +22,5 @@ function highlight(value, query) {
|
|
|
17
22
|
return value;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
|
-
module.exports =
|
|
25
|
+
module.exports = Highlight;
|
|
21
26
|
//# sourceMappingURL=highlight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.js","sources":["../../../src/typeahead/util/highlight.tsx"],"sourcesContent":["export default function
|
|
1
|
+
{"version":3,"file":"highlight.js","sources":["../../../src/typeahead/util/highlight.tsx"],"sourcesContent":["export default function Highlight({\n className,\n value,\n query,\n}: {\n className?: string;\n value: string;\n query: string;\n}) {\n if (value && query) {\n const highlightStart = value.toUpperCase().indexOf(query.trim().toUpperCase());\n const highlightEnd = highlightStart + query.trim().length;\n if (highlightStart !== -1) {\n return (\n <span className={className}>\n {value.slice(0, Math.max(0, highlightStart))}\n <strong>{value.slice(highlightStart, highlightEnd)}</strong>\n {value.slice(Math.max(0, highlightEnd))}\n </span>\n );\n }\n }\n return value;\n}\n"],"names":["Highlight","className","value","query","highlightStart","toUpperCase","indexOf","trim","highlightEnd","length","_jsxs","children","slice","Math","max","_jsx"],"mappings":";;;;AAAc,SAAUA,SAASA,CAAC;EAChCC,SAAS;EACTC,KAAK;AACLC,EAAAA,KAAAA;AAKD,CAAA,EAAA;EACC,IAAID,KAAK,IAAIC,KAAK,EAAE;AAClB,IAAA,MAAMC,cAAc,GAAGF,KAAK,CAACG,WAAW,EAAE,CAACC,OAAO,CAACH,KAAK,CAACI,IAAI,EAAE,CAACF,WAAW,EAAE,CAAC,CAAA;IAC9E,MAAMG,YAAY,GAAGJ,cAAc,GAAGD,KAAK,CAACI,IAAI,EAAE,CAACE,MAAM,CAAA;AACzD,IAAA,IAAIL,cAAc,KAAK,CAAC,CAAC,EAAE;AACzB,MAAA,oBACEM,eAAA,CAAA,MAAA,EAAA;AAAMT,QAAAA,SAAS,EAAEA,SAAU;AAAAU,QAAAA,QAAA,GACxBT,KAAK,CAACU,KAAK,CAAC,CAAC,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEV,cAAc,CAAC,CAAC,eAC5CW,cAAA,CAAA,QAAA,EAAA;AAAAJ,UAAAA,QAAA,EAAST,KAAK,CAACU,KAAK,CAACR,cAAc,EAAEI,YAAY,CAAA;AAAC,SAAS,CAC3D,EAACN,KAAK,CAACU,KAAK,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEN,YAAY,CAAC,CAAC,CAAA;AAAA,OACnC,CAAC,CAAA;AAEX,KAAA;AACF,GAAA;AACA,EAAA,OAAON,KAAK,CAAA;AACd;;;;"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function Highlight({
|
|
4
|
+
className,
|
|
5
|
+
value,
|
|
6
|
+
query
|
|
7
|
+
}) {
|
|
4
8
|
if (value && query) {
|
|
5
9
|
const highlightStart = value.toUpperCase().indexOf(query.trim().toUpperCase());
|
|
6
10
|
const highlightEnd = highlightStart + query.trim().length;
|
|
7
11
|
if (highlightStart !== -1) {
|
|
8
|
-
return /*#__PURE__*/jsxs(
|
|
12
|
+
return /*#__PURE__*/jsxs("span", {
|
|
13
|
+
className: className,
|
|
9
14
|
children: [value.slice(0, Math.max(0, highlightStart)), /*#__PURE__*/jsx("strong", {
|
|
10
15
|
children: value.slice(highlightStart, highlightEnd)
|
|
11
16
|
}), value.slice(Math.max(0, highlightEnd))]
|
|
@@ -15,5 +20,5 @@ function highlight(value, query) {
|
|
|
15
20
|
return value;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
|
-
export {
|
|
23
|
+
export { Highlight as default };
|
|
19
24
|
//# sourceMappingURL=highlight.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.mjs","sources":["../../../src/typeahead/util/highlight.tsx"],"sourcesContent":["export default function
|
|
1
|
+
{"version":3,"file":"highlight.mjs","sources":["../../../src/typeahead/util/highlight.tsx"],"sourcesContent":["export default function Highlight({\n className,\n value,\n query,\n}: {\n className?: string;\n value: string;\n query: string;\n}) {\n if (value && query) {\n const highlightStart = value.toUpperCase().indexOf(query.trim().toUpperCase());\n const highlightEnd = highlightStart + query.trim().length;\n if (highlightStart !== -1) {\n return (\n <span className={className}>\n {value.slice(0, Math.max(0, highlightStart))}\n <strong>{value.slice(highlightStart, highlightEnd)}</strong>\n {value.slice(Math.max(0, highlightEnd))}\n </span>\n );\n }\n }\n return value;\n}\n"],"names":["Highlight","className","value","query","highlightStart","toUpperCase","indexOf","trim","highlightEnd","length","_jsxs","children","slice","Math","max","_jsx"],"mappings":";;AAAc,SAAUA,SAASA,CAAC;EAChCC,SAAS;EACTC,KAAK;AACLC,EAAAA,KAAAA;AAKD,CAAA,EAAA;EACC,IAAID,KAAK,IAAIC,KAAK,EAAE;AAClB,IAAA,MAAMC,cAAc,GAAGF,KAAK,CAACG,WAAW,EAAE,CAACC,OAAO,CAACH,KAAK,CAACI,IAAI,EAAE,CAACF,WAAW,EAAE,CAAC,CAAA;IAC9E,MAAMG,YAAY,GAAGJ,cAAc,GAAGD,KAAK,CAACI,IAAI,EAAE,CAACE,MAAM,CAAA;AACzD,IAAA,IAAIL,cAAc,KAAK,CAAC,CAAC,EAAE;AACzB,MAAA,oBACEM,IAAA,CAAA,MAAA,EAAA;AAAMT,QAAAA,SAAS,EAAEA,SAAU;AAAAU,QAAAA,QAAA,GACxBT,KAAK,CAACU,KAAK,CAAC,CAAC,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEV,cAAc,CAAC,CAAC,eAC5CW,GAAA,CAAA,QAAA,EAAA;AAAAJ,UAAAA,QAAA,EAAST,KAAK,CAACU,KAAK,CAACR,cAAc,EAAEI,YAAY,CAAA;AAAC,SAAS,CAC3D,EAACN,KAAK,CAACU,KAAK,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEN,YAAY,CAAC,CAAC,CAAA;AAAA,OACnC,CAAC,CAAA;AAEX,KAAA;AACF,GAAA;AACA,EAAA,OAAON,KAAK,CAAA;AACd;;;;"}
|
|
@@ -1,52 +1,28 @@
|
|
|
1
1
|
import { ActionButtonProps } from '../actionButton/ActionButton';
|
|
2
2
|
import { AriaLabelProperty, CommonProps, Heading, LinkProps } from '../common';
|
|
3
|
-
import { FunctionComponent } from 'react';
|
|
4
3
|
type ActionProps = AriaLabelProperty & {
|
|
5
4
|
text: string;
|
|
6
5
|
};
|
|
7
6
|
type ButtonActionProps = ActionProps & ActionButtonProps;
|
|
8
7
|
type LinkActionProps = ActionProps & LinkProps;
|
|
9
|
-
export
|
|
8
|
+
export type HeaderProps = CommonProps & {
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
12
|
-
* is provided, a `Link` will be rendered instead of an `ActionButton`.
|
|
10
|
+
* When the `href` property is provided to the `action`, we will render a `Link` instead of a `ActionButton`.
|
|
13
11
|
*/
|
|
14
12
|
action?: ButtonActionProps | LinkActionProps;
|
|
15
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Override the heading element rendered for the title, useful to specify the semantics of your header.
|
|
15
|
+
*
|
|
16
|
+
* @default "h5"
|
|
17
|
+
*/
|
|
16
18
|
as?: Heading | 'legend';
|
|
17
|
-
/** Optional prop to specify classNames onto the Header */
|
|
18
|
-
className?: string;
|
|
19
|
-
/** Optional prop to specify the ID used for testing */
|
|
20
|
-
testId?: string;
|
|
21
|
-
/** Required prop to set the title of the Header. */
|
|
22
19
|
title: string;
|
|
23
|
-
|
|
24
|
-
variant?: 'section' | 'group';
|
|
25
|
-
}
|
|
20
|
+
};
|
|
26
21
|
/**
|
|
27
|
-
* Header component
|
|
28
|
-
*
|
|
29
|
-
* The header component is used to render a section header with an optional action button or link.
|
|
30
|
-
* The header component can be rendered as a `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, or `legend` element.
|
|
31
|
-
*
|
|
32
|
-
* @component
|
|
33
|
-
* @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.
|
|
34
|
-
* @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.
|
|
35
|
-
* @param {string} title - Required prop to set the title of the section header.
|
|
36
|
-
* @param {'group' | 'section'} [variant='group'] - Optional prop to specify the variant of the section header.
|
|
37
|
-
* @param {string} [className] - Optional prop to specify classNames onto the Header.
|
|
38
|
-
* @param {string} [testId] - Optional prop to specify the ID used for testing.
|
|
39
22
|
*
|
|
40
|
-
*
|
|
41
|
-
* // Example usage:
|
|
42
|
-
* import Header from './Header';
|
|
23
|
+
* Neptune Web: https://transferwise.github.io/neptune-web/components/content/Header
|
|
43
24
|
*
|
|
44
|
-
* function App() {
|
|
45
|
-
* return (
|
|
46
|
-
* <Header title="Header" />
|
|
47
|
-
* );
|
|
48
|
-
* }
|
|
49
25
|
*/
|
|
50
|
-
declare const Header:
|
|
26
|
+
export declare const Header: ({ action, as, title, className }: HeaderProps) => import("react").JSX.Element;
|
|
51
27
|
export default Header;
|
|
52
28
|
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/header/Header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/header/Header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAI3F,KAAK,WAAW,GAAG,iBAAiB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAEzD,KAAK,eAAe,GAAG,WAAW,GAAG,SAAS,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,GAAG,eAAe,CAAC;IAC7C;;;;OAIG;IACH,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4BF;;;;GAIG;AACH,eAAO,MAAM,MAAM,qCAA6C,WAAW,gCA4B1E,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ export type { DecisionProps } from './decision/Decision';
|
|
|
19
19
|
export type { DefinitionListProps, DefinitionListDefinition } from './definitionList';
|
|
20
20
|
export type { DimmerProps } from './dimmer';
|
|
21
21
|
export type { DrawerProps } from './drawer';
|
|
22
|
-
export type { HeaderProps } from './header';
|
|
23
22
|
export type { EmphasisProps } from './emphasis';
|
|
24
23
|
export type { FieldProps } from './field/Field';
|
|
25
24
|
export type { InfoProps } from './info';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACjG,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CA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EAAE,MAAM,QAAQ,CAAC;AAEjD;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -8,8 +8,6 @@ export type Props = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
8
8
|
*
|
|
9
9
|
* Documentation: https://transferwise.github.io/neptune-web/components/content/Link
|
|
10
10
|
*/
|
|
11
|
-
declare const Link: import("react").
|
|
12
|
-
type?: LinkLarge | LinkDefault;
|
|
13
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
declare const Link: ({ className, children, href, target, type, "aria-label": ariaLabel, onClick, ...props }: Props) => import("react").JSX.Element;
|
|
14
12
|
export default Link;
|
|
15
13
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAInD,MAAM,MAAM,KAAK,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,CAAC;AAEjG;;;;GAIG;AACH,QAAA,MAAM,IAAI,4FASP,KAAK,gCAkBP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { LabelHTMLAttributes, LiHTMLAttributes } from 'react';
|
|
2
2
|
import { TitleTypes, Heading } from '../common';
|
|
3
|
-
|
|
3
|
+
type Props = LabelHTMLAttributes<HTMLHeadingElement | HTMLSpanElement | HTMLLabelElement> & LiHTMLAttributes<HTMLLIElement> & {
|
|
4
4
|
/**
|
|
5
5
|
* Default value will based one `type` prop
|
|
6
6
|
*/
|
|
7
|
-
as?:
|
|
7
|
+
as?: 'span' | 'label' | 'li' | 'legend' | Heading;
|
|
8
8
|
/**
|
|
9
9
|
* Default value: {@link DEFAULT_TYPE}
|
|
10
10
|
*/
|
|
11
11
|
type?: TitleTypes;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
declare function Title({ as, type, className, ...props }: Props): import("react").JSX.Element;
|
|
13
14
|
export default Title;
|
|
14
15
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/title/Title.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAc,OAAO,EAAE,MAAM,WAAW,CAAC;AAY5D,KAAK,KAAK,GAAG,mBAAmB,CAAC,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAC,GACvF,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAChC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEJ,iBAAS,KAAK,CAAC,EAAE,EAAE,EAAE,IAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,+BASrE;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeaheadOption.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadOption/TypeaheadOption.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI;IACpC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"TypeaheadOption.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadOption/TypeaheadOption.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI;IACpC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,QAAA,MAAM,MAAM,qHA2BV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function Highlight({ className, value, query, }: {
|
|
2
|
+
className?: string;
|
|
3
|
+
value: string;
|
|
4
|
+
query: string;
|
|
5
|
+
}): string | import("react").JSX.Element;
|
|
2
6
|
//# sourceMappingURL=highlight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/util/highlight.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/util/highlight.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,SAAS,EACT,KAAK,EACL,KAAK,GACN,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,wCAeA"}
|
package/package.json
CHANGED
package/src/header/Header.css
CHANGED
package/src/header/Header.less
CHANGED
|
@@ -75,39 +75,6 @@ describe('Header', () => {
|
|
|
75
75
|
expect(screen.getByRole('heading', { name: 'Header title', level: 3 })).toBeInTheDocument();
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
it('renders header with section variant', () => {
|
|
79
|
-
render(<Header title="Header title" variant="section" />);
|
|
80
|
-
|
|
81
|
-
const header = screen.getByRole('heading', { name: 'Header title' });
|
|
82
|
-
expect(header).toHaveClass('np-header--section');
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it('warns if Header as legend is not inside a fieldset', () => {
|
|
86
|
-
const consoleWarnMock = jest.spyOn(console, 'warn').mockImplementation();
|
|
87
|
-
|
|
88
|
-
render(<Header as="legend" title="Header title" />);
|
|
89
|
-
|
|
90
|
-
expect(consoleWarnMock).toHaveBeenCalledWith(
|
|
91
|
-
'Legends should be the first child in a fieldset, and this is not possible when including an action',
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
consoleWarnMock.mockRestore();
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it('does not warn if Header as legend is inside a fieldset', () => {
|
|
98
|
-
const consoleWarnMock = jest.spyOn(console, 'warn').mockImplementation();
|
|
99
|
-
|
|
100
|
-
render(
|
|
101
|
-
<fieldset>
|
|
102
|
-
<Header as="legend" title="Header title" />
|
|
103
|
-
</fieldset>,
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
expect(consoleWarnMock).not.toHaveBeenCalled();
|
|
107
|
-
|
|
108
|
-
consoleWarnMock.mockRestore();
|
|
109
|
-
});
|
|
110
|
-
|
|
111
78
|
it('runs onClick if specified even when it got href prop', async () => {
|
|
112
79
|
const callback = jest.fn();
|
|
113
80
|
render(
|
|
@@ -1,67 +1,53 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
1
|
import Header from './Header';
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
export default {
|
|
6
4
|
component: Header,
|
|
7
5
|
title: 'Typography/Header',
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {
|
|
10
|
-
actions: { argTypesRegex: null },
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof Header>;
|
|
16
|
-
|
|
17
|
-
export const Basic: Story = {
|
|
18
|
-
args: {
|
|
19
|
-
title: 'Group header',
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const WithAction: Story = {
|
|
24
|
-
args: {
|
|
25
|
-
...Basic.args,
|
|
26
|
-
action: {
|
|
27
|
-
'aria-label': 'Magic',
|
|
28
|
-
text: 'Action',
|
|
29
|
-
onClick: () => alert('Action!'),
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
6
|
};
|
|
33
7
|
|
|
34
|
-
export const
|
|
35
|
-
|
|
36
|
-
...Basic.args,
|
|
37
|
-
action: {
|
|
38
|
-
text: 'Link',
|
|
39
|
-
href: 'https://wise.com',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
8
|
+
export const Basic = () => {
|
|
9
|
+
return <Header title="Header title" />;
|
|
42
10
|
};
|
|
43
11
|
|
|
44
|
-
export const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
12
|
+
export const WithAction = () => {
|
|
13
|
+
return (
|
|
14
|
+
<Header
|
|
15
|
+
title="Header title"
|
|
16
|
+
action={{
|
|
17
|
+
'aria-label': 'Magic',
|
|
18
|
+
text: 'Click me!',
|
|
19
|
+
onClick: () => alert('Action!'),
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
49
23
|
};
|
|
50
24
|
|
|
51
|
-
export const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
25
|
+
export const WithActionAsLink = () => {
|
|
26
|
+
return (
|
|
27
|
+
<Header
|
|
28
|
+
title="Header title"
|
|
29
|
+
action={{
|
|
30
|
+
text: 'This is a link',
|
|
31
|
+
href: 'https://wise.com',
|
|
32
|
+
}}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
56
35
|
};
|
|
57
36
|
|
|
58
|
-
export const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
37
|
+
export const WithActionAsLinkPreventingNavigationWithTracking = () => {
|
|
38
|
+
return (
|
|
39
|
+
<Header
|
|
40
|
+
title="Header title"
|
|
41
|
+
action={{
|
|
42
|
+
text: 'This is a link',
|
|
43
|
+
href: 'https://wise.com',
|
|
44
|
+
onClick: (event: React.MouseEvent<HTMLElement>) => {
|
|
45
|
+
alert('Running onClick handler');
|
|
46
|
+
|
|
47
|
+
// we can stop the navigation from happening as onClick will always run before href redirect
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
},
|
|
50
|
+
}}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
67
53
|
};
|