@transferwise/components 0.0.0-experimental-9fc323f → 0.0.0-experimental-05be136
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/common/closeButton/CloseButton.js.map +1 -1
- package/build/common/closeButton/CloseButton.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js +7 -3
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +7 -3
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/i18n/de.json +5 -0
- package/build/i18n/de.json.js +5 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +5 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/iconButton/IconButton.js +41 -0
- package/build/iconButton/IconButton.js.map +1 -0
- package/build/iconButton/IconButton.mjs +39 -0
- package/build/iconButton/IconButton.mjs.map +1 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -0
- package/build/index.mjs.map +1 -1
- package/build/main.css +82 -32
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js +83 -0
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js.map +1 -0
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs +81 -0
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs.map +1 -0
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js +90 -0
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js.map +1 -0
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs +88 -0
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs.map +1 -0
- package/build/styles/iconButton/IconButton.css +82 -0
- package/build/styles/main.css +82 -32
- package/build/types/common/closeButton/CloseButton.d.ts +3 -0
- package/build/types/common/closeButton/CloseButton.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/iconButton/IconButton.d.ts +15 -0
- package/build/types/iconButton/IconButton.d.ts.map +1 -0
- package/build/types/iconButton/index.d.ts +3 -0
- package/build/types/iconButton/index.d.ts.map +1 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/common/closeButton/CloseButton.tsx +3 -0
- package/src/flowNavigation/FlowNavigation.spec.js +7 -8
- package/src/flowNavigation/FlowNavigation.tsx +10 -2
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +27 -3
- package/src/i18n/de.json +5 -0
- package/src/iconButton/IconButton.css +82 -0
- package/src/iconButton/IconButton.less +55 -0
- package/src/iconButton/IconButton.story.tsx +107 -0
- package/src/iconButton/IconButton.tsx +51 -0
- package/src/iconButton/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/main.css +82 -32
- package/src/main.less +1 -1
- package/build/flowNavigation/backButton/BackButton.js +0 -30
- package/build/flowNavigation/backButton/BackButton.js.map +0 -1
- package/build/flowNavigation/backButton/BackButton.mjs +0 -28
- package/build/flowNavigation/backButton/BackButton.mjs.map +0 -1
- package/build/styles/flowNavigation/backButton/BackButton.css +0 -32
- package/build/types/flowNavigation/backButton/BackButton.d.ts +0 -7
- package/build/types/flowNavigation/backButton/BackButton.d.ts.map +0 -1
- package/build/types/flowNavigation/backButton/index.d.ts +0 -3
- package/build/types/flowNavigation/backButton/index.d.ts.map +0 -1
- package/src/flowNavigation/backButton/BackButton.css +0 -32
- package/src/flowNavigation/backButton/BackButton.less +0 -36
- package/src/flowNavigation/backButton/BackButton.tsx +0 -29
- package/src/flowNavigation/backButton/index.ts +0 -2
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { forwardRef, useCallback } from 'react';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const PrimitiveAnchor = /*#__PURE__*/forwardRef(({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
href,
|
|
9
|
+
id,
|
|
10
|
+
disabled = false,
|
|
11
|
+
testId,
|
|
12
|
+
onClick,
|
|
13
|
+
onFocus,
|
|
14
|
+
onBlur,
|
|
15
|
+
onMouseEnter,
|
|
16
|
+
onMouseLeave,
|
|
17
|
+
onKeyDown,
|
|
18
|
+
...props
|
|
19
|
+
}, ref) => {
|
|
20
|
+
const anchorClasses = clsx('wds-Anchor', {
|
|
21
|
+
'wds-Anchor--disabled': disabled
|
|
22
|
+
}, className);
|
|
23
|
+
const handleClick = useCallback(event => {
|
|
24
|
+
if (disabled) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
} else {
|
|
27
|
+
onClick?.(event);
|
|
28
|
+
}
|
|
29
|
+
}, [disabled, onClick]);
|
|
30
|
+
const handleFocus = useCallback(event => {
|
|
31
|
+
onFocus?.(event);
|
|
32
|
+
}, [onFocus]);
|
|
33
|
+
const handleBlur = useCallback(event => {
|
|
34
|
+
onBlur?.(event);
|
|
35
|
+
}, [onBlur]);
|
|
36
|
+
const handleMouseEnter = useCallback(event => {
|
|
37
|
+
onMouseEnter?.(event);
|
|
38
|
+
}, [onMouseEnter]);
|
|
39
|
+
const handleMouseLeave = useCallback(event => {
|
|
40
|
+
onMouseLeave?.(event);
|
|
41
|
+
}, [onMouseLeave]);
|
|
42
|
+
const handleKeyDown = useCallback(event => {
|
|
43
|
+
onKeyDown?.(event);
|
|
44
|
+
}, [onKeyDown]);
|
|
45
|
+
/**
|
|
46
|
+
* The following props are set to handle the `disabled` state for the link:
|
|
47
|
+
*
|
|
48
|
+
* - `aria-disabled`: Exposes the link as disabled to assistive technologies.
|
|
49
|
+
* - `href`: Removed when `disabled` is true to prevent navigation.
|
|
50
|
+
* - `role`: Set to 'link' when `disabled` is true to ensure the element
|
|
51
|
+
* is still exposed as a link.
|
|
52
|
+
*
|
|
53
|
+
* For more details, refer to Scott O'Hara's article on disabling links:
|
|
54
|
+
* https://www.scottohara.me/blog/2021/05/28/disabled-links.html
|
|
55
|
+
*/
|
|
56
|
+
const anchorProps = {
|
|
57
|
+
'aria-disabled': disabled,
|
|
58
|
+
className: anchorClasses,
|
|
59
|
+
'data-testid': testId,
|
|
60
|
+
href: disabled ? undefined : href,
|
|
61
|
+
id,
|
|
62
|
+
ref,
|
|
63
|
+
role: disabled ? 'link' : undefined,
|
|
64
|
+
rel: props.target === '_blank' ? 'noopener noreferrer' : undefined,
|
|
65
|
+
onClick: handleClick,
|
|
66
|
+
onFocus: handleFocus,
|
|
67
|
+
onBlur: handleBlur,
|
|
68
|
+
onMouseEnter: handleMouseEnter,
|
|
69
|
+
onMouseLeave: handleMouseLeave,
|
|
70
|
+
onKeyDown: handleKeyDown,
|
|
71
|
+
...props
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/jsx("a", {
|
|
74
|
+
...anchorProps,
|
|
75
|
+
children: children
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
PrimitiveAnchor.displayName = 'PrimitiveAnchor';
|
|
79
|
+
|
|
80
|
+
export { PrimitiveAnchor as default };
|
|
81
|
+
//# sourceMappingURL=PrimitiveAnchor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitiveAnchor.mjs","sources":["../../../../src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.tsx"],"sourcesContent":["import React, { forwardRef, useCallback } from 'react';\nimport { clsx } from 'clsx';\nimport type { PrimitiveAnchorProps } from '..';\n\n/**\n * The Primitive `PrimitiveAnchor` component is customisable link element that can be\n * used in various parts of the Wise Design System internally. It supports\n * different states such as disabled and provides event handlers for common\n * interactions like click, focus, blur, mouse enter, mouse leave, and key down.\n *\n * @see {@link PrimitiveAnchor} for further information.\n * @see {@link https://storybook.wise.design/?path=/docs/primitive-anchor--docs|Storybook Wise Design}\n */\nconst PrimitiveAnchor = forwardRef<HTMLAnchorElement, PrimitiveAnchorProps>(\n (\n {\n children,\n className,\n href,\n id,\n disabled = false,\n testId,\n onClick,\n onFocus,\n onBlur,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const anchorClasses = clsx(\n 'wds-Anchor',\n {\n 'wds-Anchor--disabled': disabled,\n },\n className,\n );\n\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLAnchorElement>) => {\n if (disabled) {\n event.preventDefault();\n } else {\n onClick?.(event);\n }\n },\n [disabled, onClick],\n );\n\n const handleFocus = useCallback(\n (event: React.FocusEvent<HTMLAnchorElement>) => {\n onFocus?.(event);\n },\n [onFocus],\n );\n\n const handleBlur = useCallback(\n (event: React.FocusEvent<HTMLAnchorElement>) => {\n onBlur?.(event);\n },\n [onBlur],\n );\n\n const handleMouseEnter = useCallback(\n (event: React.MouseEvent<HTMLAnchorElement>) => {\n onMouseEnter?.(event);\n },\n [onMouseEnter],\n );\n\n const handleMouseLeave = useCallback(\n (event: React.MouseEvent<HTMLAnchorElement>) => {\n onMouseLeave?.(event);\n },\n [onMouseLeave],\n );\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLAnchorElement>) => {\n onKeyDown?.(event);\n },\n [onKeyDown],\n );\n\n /**\n * The following props are set to handle the `disabled` state for the link:\n *\n * - `aria-disabled`: Exposes the link as disabled to assistive technologies.\n * - `href`: Removed when `disabled` is true to prevent navigation.\n * - `role`: Set to 'link' when `disabled` is true to ensure the element\n * is still exposed as a link.\n *\n * For more details, refer to Scott O'Hara's article on disabling links:\n * https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n */\n const anchorProps = {\n 'aria-disabled': disabled,\n className: anchorClasses,\n 'data-testid': testId,\n href: disabled ? undefined : href,\n id,\n ref,\n role: disabled ? 'link' : undefined,\n rel: props.target === '_blank' ? 'noopener noreferrer' : undefined,\n onClick: handleClick,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n onKeyDown: handleKeyDown,\n ...props,\n };\n\n return <a {...anchorProps}>{children}</a>;\n },\n);\n\nPrimitiveAnchor.displayName = 'PrimitiveAnchor';\n\nexport default PrimitiveAnchor;\n"],"names":["PrimitiveAnchor","forwardRef","children","className","href","id","disabled","testId","onClick","onFocus","onBlur","onMouseEnter","onMouseLeave","onKeyDown","props","ref","anchorClasses","clsx","handleClick","useCallback","event","preventDefault","handleFocus","handleBlur","handleMouseEnter","handleMouseLeave","handleKeyDown","anchorProps","undefined","role","rel","target","_jsx","displayName"],"mappings":";;;;AAaA,MAAMA,eAAe,gBAAGC,UAAU,CAChC,CACE;EACEC,QAAQ;EACRC,SAAS;EACTC,IAAI;EACJC,EAAE;AACFC,EAAAA,QAAQ,GAAG,KAAK;EAChBC,MAAM;EACNC,OAAO;EACPC,OAAO;EACPC,MAAM;EACNC,YAAY;EACZC,YAAY;EACZC,SAAS;EACT,GAAGC,KAAAA;CACJ,EACDC,GAAG,KACD;AACF,EAAA,MAAMC,aAAa,GAAGC,IAAI,CACxB,YAAY,EACZ;AACE,IAAA,sBAAsB,EAAEX,QAAAA;GACzB,EACDH,SAAS,CACV,CAAA;AAED,EAAA,MAAMe,WAAW,GAAGC,WAAW,CAC5BC,KAA0C,IAAI;AAC7C,IAAA,IAAId,QAAQ,EAAE;MACZc,KAAK,CAACC,cAAc,EAAE,CAAA;AACxB,KAAC,MAAM;MACLb,OAAO,GAAGY,KAAK,CAAC,CAAA;AAClB,KAAA;AACF,GAAC,EACD,CAACd,QAAQ,EAAEE,OAAO,CAAC,CACpB,CAAA;AAED,EAAA,MAAMc,WAAW,GAAGH,WAAW,CAC5BC,KAA0C,IAAI;IAC7CX,OAAO,GAAGW,KAAK,CAAC,CAAA;AAClB,GAAC,EACD,CAACX,OAAO,CAAC,CACV,CAAA;AAED,EAAA,MAAMc,UAAU,GAAGJ,WAAW,CAC3BC,KAA0C,IAAI;IAC7CV,MAAM,GAAGU,KAAK,CAAC,CAAA;AACjB,GAAC,EACD,CAACV,MAAM,CAAC,CACT,CAAA;AAED,EAAA,MAAMc,gB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iB;;;;"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var reactIntl = require('react-intl');
|
|
6
|
+
var Button_messages = require('../../../i18n/commonMessages/Button.messages.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
/* eslint-disable react/button-has-type */
|
|
10
|
+
const PrimitiveButton = /*#__PURE__*/React.forwardRef(({
|
|
11
|
+
children,
|
|
12
|
+
className,
|
|
13
|
+
id,
|
|
14
|
+
disabled = false,
|
|
15
|
+
loading = false,
|
|
16
|
+
testId,
|
|
17
|
+
type = 'button',
|
|
18
|
+
onClick,
|
|
19
|
+
onFocus,
|
|
20
|
+
onBlur,
|
|
21
|
+
onMouseEnter,
|
|
22
|
+
onMouseLeave,
|
|
23
|
+
onKeyDown,
|
|
24
|
+
...props
|
|
25
|
+
}, ref) => {
|
|
26
|
+
const intl = reactIntl.useIntl();
|
|
27
|
+
const classNames = clsx.clsx('wds-Button', {
|
|
28
|
+
'wds-Button--disabled': disabled,
|
|
29
|
+
'wds-Button--loading': loading
|
|
30
|
+
}, className);
|
|
31
|
+
const handleClick = React.useCallback(event => {
|
|
32
|
+
if (disabled || loading) {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
} else {
|
|
35
|
+
onClick?.(event);
|
|
36
|
+
}
|
|
37
|
+
}, [disabled, loading, onClick]);
|
|
38
|
+
const handleFocus = React.useCallback(event => {
|
|
39
|
+
onFocus?.(event);
|
|
40
|
+
}, [onFocus]);
|
|
41
|
+
const handleBlur = React.useCallback(event => {
|
|
42
|
+
onBlur?.(event);
|
|
43
|
+
}, [onBlur]);
|
|
44
|
+
const handleMouseEnter = React.useCallback(event => {
|
|
45
|
+
onMouseEnter?.(event);
|
|
46
|
+
}, [onMouseEnter]);
|
|
47
|
+
const handleMouseLeave = React.useCallback(event => {
|
|
48
|
+
onMouseLeave?.(event);
|
|
49
|
+
}, [onMouseLeave]);
|
|
50
|
+
const handleKeyDown = React.useCallback(event => {
|
|
51
|
+
onKeyDown?.(event);
|
|
52
|
+
}, [onKeyDown]);
|
|
53
|
+
/**
|
|
54
|
+
* The following props are used to manage the `disabled` and `loading`
|
|
55
|
+
* states for the button:
|
|
56
|
+
*
|
|
57
|
+
* - `aria-disabled`: Communicates to assistive technologies that the button
|
|
58
|
+
* is disabled when it is either disabled or loading.
|
|
59
|
+
* - `aria-label`: Provides an accessible label for the button, using a
|
|
60
|
+
* localized loading message when the button is in a loading state.
|
|
61
|
+
* - `aria-live`: Ensures that updates to the button's content are announced
|
|
62
|
+
* by assistive technologies, set to 'polite' during loading.
|
|
63
|
+
*/
|
|
64
|
+
const buttonProps = {
|
|
65
|
+
'aria-disabled': disabled || loading,
|
|
66
|
+
'aria-label': loading ? intl.formatMessage(Button_messages.loadingAriaLabel) : props['aria-label'],
|
|
67
|
+
'aria-live': loading ? 'polite' : 'off',
|
|
68
|
+
className: classNames,
|
|
69
|
+
'data-testid': testId,
|
|
70
|
+
disabled,
|
|
71
|
+
id,
|
|
72
|
+
ref,
|
|
73
|
+
type,
|
|
74
|
+
onBlur: handleBlur,
|
|
75
|
+
onClick: handleClick,
|
|
76
|
+
onFocus: handleFocus,
|
|
77
|
+
onMouseEnter: handleMouseEnter,
|
|
78
|
+
onMouseLeave: handleMouseLeave,
|
|
79
|
+
onKeyDown: handleKeyDown,
|
|
80
|
+
...props
|
|
81
|
+
};
|
|
82
|
+
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
83
|
+
...buttonProps,
|
|
84
|
+
children: children
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
PrimitiveButton.displayName = 'PrimitiveButton';
|
|
88
|
+
|
|
89
|
+
module.exports = PrimitiveButton;
|
|
90
|
+
//# sourceMappingURL=PrimitiveButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitiveButton.js","sources":["../../../../src/primitives/PrimitiveButton/src/PrimitiveButton.tsx"],"sourcesContent":["/* eslint-disable react/button-has-type */\nimport React, { forwardRef, useCallback } from 'react';\nimport { clsx } from 'clsx';\nimport { useIntl, MessageDescriptor } from 'react-intl';\nimport messages from '../../../i18n/commonMessages/Button.messages';\nimport type { PrimitiveButtonProps } from '..';\n\n/**\n * The Primitive `PrimitiveButton` component can be used in various parts the Wise Design\n * System internally. It supports different states such as disabled and loading,\n * and provides event handlers for common interactions like click, focus, blur,\n * mouse enter, mouse leave, and keydown.\n *\n * @see {@link PrimitiveButton} for further information.\n * @see {@link https://storybook.wise.design/?path=/docs/primitive-button--docs|Storybook Wise Design}\n */\nconst PrimitiveButton = forwardRef<HTMLButtonElement, PrimitiveButtonProps>(\n (\n {\n children,\n className,\n id,\n disabled = false,\n loading = false,\n testId,\n type = 'button',\n onClick,\n onFocus,\n onBlur,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const intl = useIntl();\n const classNames = clsx(\n 'wds-Button',\n {\n 'wds-Button--disabled': disabled,\n 'wds-Button--loading': loading,\n },\n className,\n );\n\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || loading) {\n event.preventDefault();\n } else {\n onClick?.(event);\n }\n },\n [disabled, loading, onClick],\n );\n\n const handleFocus = useCallback(\n (event: React.FocusEvent<HTMLButtonElement>) => {\n onFocus?.(event);\n },\n [onFocus],\n );\n\n const handleBlur = useCallback(\n (event: React.FocusEvent<HTMLButtonElement>) => {\n onBlur?.(event);\n },\n [onBlur],\n );\n\n const handleMouseEnter = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n },\n [onMouseEnter],\n );\n\n const handleMouseLeave = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n },\n [onMouseLeave],\n );\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n },\n [onKeyDown],\n );\n\n /**\n * The following props are used to manage the `disabled` and `loading`\n * states for the button:\n *\n * - `aria-disabled`: Communicates to assistive technologies that the button\n * is disabled when it is either disabled or loading.\n * - `aria-label`: Provides an accessible label for the button, using a\n * localized loading message when the button is in a loading state.\n * - `aria-live`: Ensures that updates to the button's content are announced\n * by assistive technologies, set to 'polite' during loading.\n */\n const buttonProps = {\n 'aria-disabled': disabled || loading,\n 'aria-label': loading\n ? intl.formatMessage(messages.loadingAriaLabel as MessageDescriptor)\n : props['aria-label'],\n 'aria-live': (loading ? 'polite' : 'off') as 'polite' | 'off' | 'assertive' | undefined,\n className: classNames,\n 'data-testid': testId,\n disabled,\n id,\n ref,\n type,\n onBlur: handleBlur,\n onClick: handleClick,\n onFocus: handleFocus,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n onKeyDown: handleKeyDown,\n ...props,\n };\n\n return <button {...buttonProps}>{children}</button>;\n },\n);\n\nPrimitiveButton.displayName = 'PrimitiveButton';\n\nexport default PrimitiveButton;\n"],"names":["PrimitiveButton","forwardRef","children","className","id","disabled","loading","testId","type","onClick","onFocus","onBlur","onMouseEnter","onMouseLeave","onKeyDown","props","ref","intl","useIntl","classNames","clsx","handleClick","useCallback","event","preventDefault","handleFocus","handleBlur","handleMouseEnter","handleMouseLeave","handleKeyDown","buttonProps","formatMessage","messages","loadingAriaLabel","_jsx","displayName"],"mappings":";;;;;;;;AAAA;AAgBA,MAAMA,eAAe,gBAAGC,gBAAU,CAChC,CACE;EACEC,QAAQ;EACRC,SAAS;EACTC,EAAE;AACFC,EAAAA,QAAQ,GAAG,KAAK;AAChBC,EAAAA,OAAO,GAAG,KAAK;EACfC,MAAM;AACNC,EAAAA,IAAI,GAAG,QAAQ;EACfC,OAAO;EACPC,OAAO;EACPC,MAAM;EACNC,YAAY;EACZC,YAAY;EACZC,SAAS;EACT,GAAGC,KAAAA;CACJ,EACDC,GAAG,KACD;AAC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;;;;;AAUG;AACH,EAAA,MAAMgB,WAAW,GAAG;IAClB,eAAe,EAAEzB,QAAQ,IAAIC,OAAO;AACpC,IAAA,YAAY,EAAEA,OAAO,GACjBW,IAAI,CAACc,aAAa,CAACC,eAAQ,CAACC,gBAAqC,CAAC,GAClElB,KAAK,CAAC,YAAY,CAAC;AACvB,IAAA,WAAW,EAAGT,OAAO,GAAG,QAAQ,GAAG,KAAoD;AACvFH,IAAAA,SAAS,EAAEgB,UAAU;AACrB,IAAA,aAAa,EAAEZ,MAAM;IACrBF,QAAQ;IACRD,EAAE;IACFY,GAAG;IACHR,IAAI;AACJG,IAAAA,MAAM,EAAEe,UAAU;AAClBjB,IAAAA,OAAO,EAAEY,WAAW;AACpBX,IAAAA,OAAO,EAAEe,WAAW;AACpBb,IAAAA,YAAY,EAAEe,gBAAgB;AAC9Bd,IAAAA,YAAY,EAAEe,gBAAgB;AAC9Bd,IAAAA,SAAS,EAAEe,aAAa;IACxB,GAAGd,KAAAA;GACJ,CAAA;AAED,EAAA,oBAAOmB,cAAA,CAAA,QAAA,EAAA;AAAA,IAAA,GAAYJ,WAAW;AAAA5B,IAAAA,QAAA,EAAGA,QAAAA;AAAQ,GAAS,CAAC,CAAA;AACrD,CAAC,EACF;AAEDF,eAAe,CAACmC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { forwardRef, useCallback } from 'react';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import messages from '../../../i18n/commonMessages/Button.messages.mjs';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
/* eslint-disable react/button-has-type */
|
|
8
|
+
const PrimitiveButton = /*#__PURE__*/forwardRef(({
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
id,
|
|
12
|
+
disabled = false,
|
|
13
|
+
loading = false,
|
|
14
|
+
testId,
|
|
15
|
+
type = 'button',
|
|
16
|
+
onClick,
|
|
17
|
+
onFocus,
|
|
18
|
+
onBlur,
|
|
19
|
+
onMouseEnter,
|
|
20
|
+
onMouseLeave,
|
|
21
|
+
onKeyDown,
|
|
22
|
+
...props
|
|
23
|
+
}, ref) => {
|
|
24
|
+
const intl = useIntl();
|
|
25
|
+
const classNames = clsx('wds-Button', {
|
|
26
|
+
'wds-Button--disabled': disabled,
|
|
27
|
+
'wds-Button--loading': loading
|
|
28
|
+
}, className);
|
|
29
|
+
const handleClick = useCallback(event => {
|
|
30
|
+
if (disabled || loading) {
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
} else {
|
|
33
|
+
onClick?.(event);
|
|
34
|
+
}
|
|
35
|
+
}, [disabled, loading, onClick]);
|
|
36
|
+
const handleFocus = useCallback(event => {
|
|
37
|
+
onFocus?.(event);
|
|
38
|
+
}, [onFocus]);
|
|
39
|
+
const handleBlur = useCallback(event => {
|
|
40
|
+
onBlur?.(event);
|
|
41
|
+
}, [onBlur]);
|
|
42
|
+
const handleMouseEnter = useCallback(event => {
|
|
43
|
+
onMouseEnter?.(event);
|
|
44
|
+
}, [onMouseEnter]);
|
|
45
|
+
const handleMouseLeave = useCallback(event => {
|
|
46
|
+
onMouseLeave?.(event);
|
|
47
|
+
}, [onMouseLeave]);
|
|
48
|
+
const handleKeyDown = useCallback(event => {
|
|
49
|
+
onKeyDown?.(event);
|
|
50
|
+
}, [onKeyDown]);
|
|
51
|
+
/**
|
|
52
|
+
* The following props are used to manage the `disabled` and `loading`
|
|
53
|
+
* states for the button:
|
|
54
|
+
*
|
|
55
|
+
* - `aria-disabled`: Communicates to assistive technologies that the button
|
|
56
|
+
* is disabled when it is either disabled or loading.
|
|
57
|
+
* - `aria-label`: Provides an accessible label for the button, using a
|
|
58
|
+
* localized loading message when the button is in a loading state.
|
|
59
|
+
* - `aria-live`: Ensures that updates to the button's content are announced
|
|
60
|
+
* by assistive technologies, set to 'polite' during loading.
|
|
61
|
+
*/
|
|
62
|
+
const buttonProps = {
|
|
63
|
+
'aria-disabled': disabled || loading,
|
|
64
|
+
'aria-label': loading ? intl.formatMessage(messages.loadingAriaLabel) : props['aria-label'],
|
|
65
|
+
'aria-live': loading ? 'polite' : 'off',
|
|
66
|
+
className: classNames,
|
|
67
|
+
'data-testid': testId,
|
|
68
|
+
disabled,
|
|
69
|
+
id,
|
|
70
|
+
ref,
|
|
71
|
+
type,
|
|
72
|
+
onBlur: handleBlur,
|
|
73
|
+
onClick: handleClick,
|
|
74
|
+
onFocus: handleFocus,
|
|
75
|
+
onMouseEnter: handleMouseEnter,
|
|
76
|
+
onMouseLeave: handleMouseLeave,
|
|
77
|
+
onKeyDown: handleKeyDown,
|
|
78
|
+
...props
|
|
79
|
+
};
|
|
80
|
+
return /*#__PURE__*/jsx("button", {
|
|
81
|
+
...buttonProps,
|
|
82
|
+
children: children
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
PrimitiveButton.displayName = 'PrimitiveButton';
|
|
86
|
+
|
|
87
|
+
export { PrimitiveButton as default };
|
|
88
|
+
//# sourceMappingURL=PrimitiveButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitiveButton.mjs","sources":["../../../../src/primitives/PrimitiveButton/src/PrimitiveButton.tsx"],"sourcesContent":["/* eslint-disable react/button-has-type */\nimport React, { forwardRef, useCallback } from 'react';\nimport { clsx } from 'clsx';\nimport { useIntl, MessageDescriptor } from 'react-intl';\nimport messages from '../../../i18n/commonMessages/Button.messages';\nimport type { PrimitiveButtonProps } from '..';\n\n/**\n * The Primitive `PrimitiveButton` component can be used in various parts the Wise Design\n * System internally. It supports different states such as disabled and loading,\n * and provides event handlers for common interactions like click, focus, blur,\n * mouse enter, mouse leave, and keydown.\n *\n * @see {@link PrimitiveButton} for further information.\n * @see {@link https://storybook.wise.design/?path=/docs/primitive-button--docs|Storybook Wise Design}\n */\nconst PrimitiveButton = forwardRef<HTMLButtonElement, PrimitiveButtonProps>(\n (\n {\n children,\n className,\n id,\n disabled = false,\n loading = false,\n testId,\n type = 'button',\n onClick,\n onFocus,\n onBlur,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const intl = useIntl();\n const classNames = clsx(\n 'wds-Button',\n {\n 'wds-Button--disabled': disabled,\n 'wds-Button--loading': loading,\n },\n className,\n );\n\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || loading) {\n event.preventDefault();\n } else {\n onClick?.(event);\n }\n },\n [disabled, loading, onClick],\n );\n\n const handleFocus = useCallback(\n (event: React.FocusEvent<HTMLButtonElement>) => {\n onFocus?.(event);\n },\n [onFocus],\n );\n\n const handleBlur = useCallback(\n (event: React.FocusEvent<HTMLButtonElement>) => {\n onBlur?.(event);\n },\n [onBlur],\n );\n\n const handleMouseEnter = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n },\n [onMouseEnter],\n );\n\n const handleMouseLeave = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n },\n [onMouseLeave],\n );\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n },\n [onKeyDown],\n );\n\n /**\n * The following props are used to manage the `disabled` and `loading`\n * states for the button:\n *\n * - `aria-disabled`: Communicates to assistive technologies that the button\n * is disabled when it is either disabled or loading.\n * - `aria-label`: Provides an accessible label for the button, using a\n * localized loading message when the button is in a loading state.\n * - `aria-live`: Ensures that updates to the button's content are announced\n * by assistive technologies, set to 'polite' during loading.\n */\n const buttonProps = {\n 'aria-disabled': disabled || loading,\n 'aria-label': loading\n ? intl.formatMessage(messages.loadingAriaLabel as MessageDescriptor)\n : props['aria-label'],\n 'aria-live': (loading ? 'polite' : 'off') as 'polite' | 'off' | 'assertive' | undefined,\n className: classNames,\n 'data-testid': testId,\n disabled,\n id,\n ref,\n type,\n onBlur: handleBlur,\n onClick: handleClick,\n onFocus: handleFocus,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n onKeyDown: handleKeyDown,\n ...props,\n };\n\n return <button {...buttonProps}>{children}</button>;\n },\n);\n\nPrimitiveButton.displayName = 'PrimitiveButton';\n\nexport default PrimitiveButton;\n"],"names":["PrimitiveButton","forwardRef","children","className","id","disabled","loading","testId","type","onClick","onFocus","onBlur","onMouseEnter","onMouseLeave","onKeyDown","props","ref","intl","useIntl","classNames","clsx","handleClick","useCallback","event","preventDefault","handleFocus","handleBlur","handleMouseEnter","handleMouseLeave","handleKeyDown","buttonProps","formatMessage","messages","loadingAriaLabel","_jsx","displayName"],"mappings":";;;;;;AAAA;AAgBA,MAAMA,eAAe,gBAAGC,UAAU,CAChC,CACE;EACEC,QAAQ;EACRC,SAAS;EACTC,EAAE;AACFC,EAAAA,QAAQ,GAAG,KAAK;AAChBC,EAAAA,OAAO,GAAG,KAAK;EACfC,MAAM;AACNC,EAAAA,IAAI,GAAG,QAAQ;EACfC,OAAO;EACPC,OAAO;EACPC,MAAM;EACNC,YAAY;EACZC,YAAY;EACZC,SAAS;EACT,GAAGC,KAAAA;CACJ,EACDC,GAAG,KACD;AACF,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE,CAAA;AACtB,EAAA,MAAMC,UAAU,GAAGC,IAAI,CACrB,YAAY,EACZ;AACE,IAAA,sBAAsB,EAAEf,QAAQ;AAChC,IAAA,qBAAqB,EAAEC,OAAAA;GACxB,EACDH,SAAS,CACV,CAAA;AAED,EAAA,MAAMkB,WAAW,GAAGC,WAAW,CAC5BC,KAA0C,IAAI;IAC7C,IAAIlB,QAAQ,IAAIC,OAAO,EAAE;MACvBiB,KAAK,CAACC,cAAc,EAAE,CAAA;AACxB,KAAC,MAAM;MACLf,OAAO,GAAGc,KAAK,CAAC,CAAA;AAClB,KAAA;GACD,EACD,CAAClB,QAAQ,EAAEC,OAAO,EAAEG,OAAO,CAAC,CAC7B,CAAA;AA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IAAAA,YAAY,EAAEe,gBAAgB;AAC9Bd,IAAAA,YAAY,EAAEe,gBAAgB;AAC9Bd,IAAAA,SAAS,EAAEe,aAAa;IACxB,GAAGd,KAAAA;GACJ,CAAA;AAED,EAAA,oBAAOmB,GAAA,CAAA,QAAA,EAAA;AAAA,IAAA,GAAYJ,WAAW;AAAA5B,IAAAA,QAAA,EAAGA,QAAAA;AAAQ,GAAS,CAAC,CAAA;AACrD,CAAC,EACF;AAEDF,eAAe,CAACmC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.np-icon-button {
|
|
2
|
+
border: none;
|
|
3
|
+
}
|
|
4
|
+
.np-icon-button-tertiary-default {
|
|
5
|
+
color: var(--color-interactive-primary);
|
|
6
|
+
background-color: rgba(134,167,189,0.10196);
|
|
7
|
+
background-color: var(--color-background-neutral);
|
|
8
|
+
}
|
|
9
|
+
.np-icon-button-tertiary-default:not(.disabled):not(:disabled):hover {
|
|
10
|
+
background-color: var(--color-background-neutral-hover);
|
|
11
|
+
}
|
|
12
|
+
.np-icon-button-tertiary-default:not(.disabled):not(:disabled):active {
|
|
13
|
+
background-color: var(--color-background-neutral-active);
|
|
14
|
+
}
|
|
15
|
+
.np-icon-button-primary-default {
|
|
16
|
+
color: var(--color-interactive-control);
|
|
17
|
+
background-color: #00a2dd;
|
|
18
|
+
background-color: var(--color-interactive-accent);
|
|
19
|
+
}
|
|
20
|
+
.np-icon-button-primary-default:not(.disabled):not(:disabled):hover {
|
|
21
|
+
background-color: #008fc9;
|
|
22
|
+
background-color: var(--color-interactive-accent-hover);
|
|
23
|
+
}
|
|
24
|
+
.np-icon-button-primary-default:not(.disabled):not(:disabled):active {
|
|
25
|
+
background-color: #0081ba;
|
|
26
|
+
background-color: var(--color-interactive-accent-active);
|
|
27
|
+
}
|
|
28
|
+
.np-icon-button-primary-negative {
|
|
29
|
+
color: var(--color-contrast-overlay);
|
|
30
|
+
background-color: var(--color-sentiment-negative-primary);
|
|
31
|
+
}
|
|
32
|
+
.np-icon-button-primary-negative:not(.disabled):not(:disabled):hover {
|
|
33
|
+
background-color: var(--color-sentiment-negative-primary-hover);
|
|
34
|
+
}
|
|
35
|
+
.np-icon-button-primary-negative:not(.disabled):not(:disabled):active {
|
|
36
|
+
background-color: var(--color-sentiment-negative-primary-active);
|
|
37
|
+
}
|
|
38
|
+
.np-theme-personal--bright-green .np-icon-button-primary-negative {
|
|
39
|
+
color: var(--color-white);
|
|
40
|
+
}
|
|
41
|
+
.np-icon-button-minimal-default {
|
|
42
|
+
color: var(--color-interactive-primary);
|
|
43
|
+
background-color: #ffffff;
|
|
44
|
+
background-color: var(--color-background-screen);
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
}
|
|
47
|
+
.np-icon-button-minimal-default:not(.disabled):not(:disabled):hover {
|
|
48
|
+
background-color: var(--color-background-screen-hover);
|
|
49
|
+
}
|
|
50
|
+
.np-icon-button-minimal-default:not(.disabled):not(:disabled):active {
|
|
51
|
+
background-color: var(--color-background-screen-active);
|
|
52
|
+
}
|
|
53
|
+
.np-icon-button-secondary-default {
|
|
54
|
+
color: var(--color-interactive-primary);
|
|
55
|
+
background-color: var(--color-interactive-neutral);
|
|
56
|
+
}
|
|
57
|
+
.np-icon-button-secondary-default:not(.disabled):not(:disabled):hover {
|
|
58
|
+
background-color: var(--color-interactive-neutral-hover);
|
|
59
|
+
}
|
|
60
|
+
.np-icon-button-secondary-default:not(.disabled):not(:disabled):active {
|
|
61
|
+
background-color: var(--color-interactive-neutral-active);
|
|
62
|
+
}
|
|
63
|
+
.np-theme-personal--bright-green .np-icon-button-secondary-default,
|
|
64
|
+
.np-theme-personal--forest-green .np-icon-button-secondary-default {
|
|
65
|
+
color: var(--color-interactive-control);
|
|
66
|
+
}
|
|
67
|
+
.np-icon-button-secondary-negative {
|
|
68
|
+
color: var(--color-sentiment-negative-primary);
|
|
69
|
+
background-color: var(--color-sentiment-negative-secondary);
|
|
70
|
+
}
|
|
71
|
+
.np-icon-button-secondary-negative:not(.disabled):not(:disabled):hover {
|
|
72
|
+
background-color: var(--color-sentiment-negative-secondary-hover);
|
|
73
|
+
}
|
|
74
|
+
.np-icon-button-secondary-negative:not(.disabled):not(:disabled):active {
|
|
75
|
+
background-color: var(--color-sentiment-negative-secondary-active);
|
|
76
|
+
}
|
|
77
|
+
.np-theme-personal--bright-green .np-icon-button-secondary-negative {
|
|
78
|
+
color: var(--color-white);
|
|
79
|
+
}
|
|
80
|
+
.np-theme-personal--forest-green .np-icon-button-secondary-negative {
|
|
81
|
+
color: var(--color-contrast-overlay);
|
|
82
|
+
}
|
package/build/styles/main.css
CHANGED
|
@@ -535,6 +535,88 @@ div.critical-comms .critical-comms-body {
|
|
|
535
535
|
.np-avatar-layout-horizontal-child {
|
|
536
536
|
margin-left: calc(var(--np-avatar-offset) * -1);
|
|
537
537
|
}
|
|
538
|
+
.np-icon-button {
|
|
539
|
+
border: none;
|
|
540
|
+
}
|
|
541
|
+
.np-icon-button-tertiary-default {
|
|
542
|
+
color: var(--color-interactive-primary);
|
|
543
|
+
background-color: rgba(134,167,189,0.10196);
|
|
544
|
+
background-color: var(--color-background-neutral);
|
|
545
|
+
}
|
|
546
|
+
.np-icon-button-tertiary-default:not(.disabled):not(:disabled):hover {
|
|
547
|
+
background-color: var(--color-background-neutral-hover);
|
|
548
|
+
}
|
|
549
|
+
.np-icon-button-tertiary-default:not(.disabled):not(:disabled):active {
|
|
550
|
+
background-color: var(--color-background-neutral-active);
|
|
551
|
+
}
|
|
552
|
+
.np-icon-button-primary-default {
|
|
553
|
+
color: var(--color-interactive-control);
|
|
554
|
+
background-color: #00a2dd;
|
|
555
|
+
background-color: var(--color-interactive-accent);
|
|
556
|
+
}
|
|
557
|
+
.np-icon-button-primary-default:not(.disabled):not(:disabled):hover {
|
|
558
|
+
background-color: #008fc9;
|
|
559
|
+
background-color: var(--color-interactive-accent-hover);
|
|
560
|
+
}
|
|
561
|
+
.np-icon-button-primary-default:not(.disabled):not(:disabled):active {
|
|
562
|
+
background-color: #0081ba;
|
|
563
|
+
background-color: var(--color-interactive-accent-active);
|
|
564
|
+
}
|
|
565
|
+
.np-icon-button-primary-negative {
|
|
566
|
+
color: var(--color-contrast-overlay);
|
|
567
|
+
background-color: var(--color-sentiment-negative-primary);
|
|
568
|
+
}
|
|
569
|
+
.np-icon-button-primary-negative:not(.disabled):not(:disabled):hover {
|
|
570
|
+
background-color: var(--color-sentiment-negative-primary-hover);
|
|
571
|
+
}
|
|
572
|
+
.np-icon-button-primary-negative:not(.disabled):not(:disabled):active {
|
|
573
|
+
background-color: var(--color-sentiment-negative-primary-active);
|
|
574
|
+
}
|
|
575
|
+
.np-theme-personal--bright-green .np-icon-button-primary-negative {
|
|
576
|
+
color: var(--color-white);
|
|
577
|
+
}
|
|
578
|
+
.np-icon-button-minimal-default {
|
|
579
|
+
color: var(--color-interactive-primary);
|
|
580
|
+
background-color: #ffffff;
|
|
581
|
+
background-color: var(--color-background-screen);
|
|
582
|
+
background-color: transparent;
|
|
583
|
+
}
|
|
584
|
+
.np-icon-button-minimal-default:not(.disabled):not(:disabled):hover {
|
|
585
|
+
background-color: var(--color-background-screen-hover);
|
|
586
|
+
}
|
|
587
|
+
.np-icon-button-minimal-default:not(.disabled):not(:disabled):active {
|
|
588
|
+
background-color: var(--color-background-screen-active);
|
|
589
|
+
}
|
|
590
|
+
.np-icon-button-secondary-default {
|
|
591
|
+
color: var(--color-interactive-primary);
|
|
592
|
+
background-color: var(--color-interactive-neutral);
|
|
593
|
+
}
|
|
594
|
+
.np-icon-button-secondary-default:not(.disabled):not(:disabled):hover {
|
|
595
|
+
background-color: var(--color-interactive-neutral-hover);
|
|
596
|
+
}
|
|
597
|
+
.np-icon-button-secondary-default:not(.disabled):not(:disabled):active {
|
|
598
|
+
background-color: var(--color-interactive-neutral-active);
|
|
599
|
+
}
|
|
600
|
+
.np-theme-personal--bright-green .np-icon-button-secondary-default,
|
|
601
|
+
.np-theme-personal--forest-green .np-icon-button-secondary-default {
|
|
602
|
+
color: var(--color-interactive-control);
|
|
603
|
+
}
|
|
604
|
+
.np-icon-button-secondary-negative {
|
|
605
|
+
color: var(--color-sentiment-negative-primary);
|
|
606
|
+
background-color: var(--color-sentiment-negative-secondary);
|
|
607
|
+
}
|
|
608
|
+
.np-icon-button-secondary-negative:not(.disabled):not(:disabled):hover {
|
|
609
|
+
background-color: var(--color-sentiment-negative-secondary-hover);
|
|
610
|
+
}
|
|
611
|
+
.np-icon-button-secondary-negative:not(.disabled):not(:disabled):active {
|
|
612
|
+
background-color: var(--color-sentiment-negative-secondary-active);
|
|
613
|
+
}
|
|
614
|
+
.np-theme-personal--bright-green .np-icon-button-secondary-negative {
|
|
615
|
+
color: var(--color-white);
|
|
616
|
+
}
|
|
617
|
+
.np-theme-personal--forest-green .np-icon-button-secondary-negative {
|
|
618
|
+
color: var(--color-contrast-overlay);
|
|
619
|
+
}
|
|
538
620
|
.tw-badge {
|
|
539
621
|
position: relative;
|
|
540
622
|
display: inline-block;
|
|
@@ -2201,38 +2283,6 @@ button.np-option {
|
|
|
2201
2283
|
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
2202
2284
|
outline-offset: var(--ring-outline-offset);
|
|
2203
2285
|
}
|
|
2204
|
-
.np-back-button {
|
|
2205
|
-
color: #00a2dd;
|
|
2206
|
-
color: var(--color-interactive-accent);
|
|
2207
|
-
display: flex !important;
|
|
2208
|
-
}
|
|
2209
|
-
.np-back-button:hover {
|
|
2210
|
-
color: #008fc9;
|
|
2211
|
-
color: var(--color-interactive-accent-hover);
|
|
2212
|
-
}
|
|
2213
|
-
.np-back-button:active {
|
|
2214
|
-
color: #0081ba;
|
|
2215
|
-
color: var(--color-interactive-accent-active);
|
|
2216
|
-
}
|
|
2217
|
-
.np-theme-personal .np-back-button {
|
|
2218
|
-
color: #37517e;
|
|
2219
|
-
color: var(--color-content-primary);
|
|
2220
|
-
}
|
|
2221
|
-
.np-theme-personal .np-back-button:hover {
|
|
2222
|
-
color: var(--color-content-primary-hover);
|
|
2223
|
-
}
|
|
2224
|
-
.np-theme-personal .np-back-button:active {
|
|
2225
|
-
color: var(--color-content-primary-active);
|
|
2226
|
-
}
|
|
2227
|
-
.np-theme-personal .np-back-button .tw-icon {
|
|
2228
|
-
color: var(--color-interactive-primary);
|
|
2229
|
-
}
|
|
2230
|
-
.np-theme-personal .np-back-button .tw-icon:hover {
|
|
2231
|
-
color: var(--color-interactive-primary-hover);
|
|
2232
|
-
}
|
|
2233
|
-
.np-theme-personal .np-back-button .tw-icon:active {
|
|
2234
|
-
color: var(--color-interactive-primary-active);
|
|
2235
|
-
}
|
|
2236
2286
|
.np-flow-navigation {
|
|
2237
2287
|
width: 100%;
|
|
2238
2288
|
min-height: 97px;
|
|
@@ -5,6 +5,9 @@ export type CloseButtonProps = Pick<React.ComponentPropsWithoutRef<'button'>, 'a
|
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
testId?: string;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `<IconButton />` component instead
|
|
10
|
+
*/
|
|
8
11
|
export declare const CloseButton: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "className" | "aria-label" | "onClick"> & {
|
|
9
12
|
size?: SizeSmall | SizeMedium | SizeLarge;
|
|
10
13
|
filled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloseButton.d.ts","sourceRoot":"","sources":["../../../../src/common/closeButton/CloseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAI7E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EACxC,YAAY,GAAG,WAAW,GAAG,SAAS,CACvC,GAAG;IACF,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"CloseButton.d.ts","sourceRoot":"","sources":["../../../../src/common/closeButton/CloseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAI7E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EACxC,YAAY,GAAG,WAAW,GAAG,SAAS,CACvC,GAAG;IACF,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;WATf,SAAS,GAAG,UAAU,GAAG,SAAS;aAChC,OAAO;iBACH,OAAO;aACX,MAAM;4DA6Cf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowNavigation.d.ts","sourceRoot":"","sources":["../../../src/flowNavigation/FlowNavigation.tsx"],"names":[],"mappings":"AAOA,OAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"FlowNavigation.d.ts","sourceRoot":"","sources":["../../../src/flowNavigation/FlowNavigation.tsx"],"names":[],"mappings":"AAOA,OAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAQxD,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sIAAsI;IACtI,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,wGAAwG;IACxG,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACxB;AAED,QAAA,MAAM,cAAc,kEAQjB,mBAAmB,gCAqErB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
+
export type Props = {
|
|
3
|
+
size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
4
|
+
priority?: 'primary' | 'secondary' | 'tertiary' | 'minimal';
|
|
5
|
+
type?: 'default' | 'negative';
|
|
6
|
+
'data-testid'?: string;
|
|
7
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick'> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'disabled'> & Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'role' | 'children' | 'aria-label'>;
|
|
8
|
+
declare const IconButton: import("react").ForwardRefExoticComponent<{
|
|
9
|
+
size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
10
|
+
priority?: "primary" | "secondary" | "tertiary" | "minimal";
|
|
11
|
+
type?: "default" | "negative";
|
|
12
|
+
'data-testid'?: string;
|
|
13
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "disabled"> & Pick<HTMLAttributes<HTMLDivElement>, "className" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
|
|
14
|
+
export default IconButton;
|
|
15
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/iconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAc,cAAc,EAAE,MAAM,OAAO,CAAC;AAK/F,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5D,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,GAC9E,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,GACrE,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC,CAAC;AAEzF,QAAA,MAAM,UAAU;WARP,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;eAC5B,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS;WACpD,SAAS,GAAG,UAAU;oBACb,MAAM;2RAuCtB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/iconButton/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export type { TypeaheadOption, TypeaheadProps } from './typeahead';
|
|
|
68
68
|
export type { UploadProps } from './upload';
|
|
69
69
|
export type { UploadError, UploadResponse, UploadedFile } from './uploadInput/types';
|
|
70
70
|
export type { WithIdProps } from './withId';
|
|
71
|
+
export type { IconButtonProps } from './iconButton';
|
|
71
72
|
/**
|
|
72
73
|
* Components
|
|
73
74
|
*/
|
|
@@ -83,6 +84,7 @@ export { default as AvatarWrapper } from './avatarWrapper';
|
|
|
83
84
|
export { default as Badge } from './badge';
|
|
84
85
|
export { default as Body } from './body';
|
|
85
86
|
export { default as Button } from './button';
|
|
87
|
+
export { default as IconButton } from './iconButton';
|
|
86
88
|
export { default as Carousel } from './carousel';
|
|
87
89
|
export { default as Card } from './card';
|
|
88
90
|
export { default as Checkbox } from './checkbox';
|
|
@@ -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,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,aAAa,EA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E,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEjD;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-05be136",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"rollup": "^4.18.1",
|
|
92
92
|
"rollup-preserve-directives": "^1.1.1",
|
|
93
93
|
"storybook": "^8.2.2",
|
|
94
|
-
"@transferwise/less-config": "3.1.0",
|
|
95
94
|
"@transferwise/neptune-css": "14.20.1",
|
|
96
|
-
"@wise/components-theming": "1.6.1"
|
|
95
|
+
"@wise/components-theming": "1.6.1",
|
|
96
|
+
"@transferwise/less-config": "3.1.0"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"@transferwise/icons": "^3.13.1",
|