@transferwise/components 0.0.0-experimental-c239b44 → 0.0.0-experimental-e0993c8
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 +79 -41
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +76 -41
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/es.json +2 -0
- package/build/i18n/es.json.js +2 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +2 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/index.js +1 -1
- package/build/index.mjs +1 -1
- package/build/inputs/SelectInput.js +1 -1
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs +1 -1
- package/build/listItem/IconButton/ListItemIconButton.js +1 -1
- package/build/listItem/IconButton/ListItemIconButton.js.map +1 -1
- package/build/listItem/IconButton/ListItemIconButton.mjs +1 -1
- package/build/listItem/IconButton/ListItemIconButton.mjs.map +1 -1
- package/build/listItem/ListItem.js +18 -18
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +18 -18
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/ListItemContext.js.map +1 -1
- package/build/listItem/ListItemContext.mjs.map +1 -1
- package/build/main.css +32 -14
- package/build/styles/header/Header.css +32 -14
- package/build/styles/main.css +32 -14
- package/build/title/Title.js +10 -4
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +6 -4
- package/build/title/Title.mjs.map +1 -1
- package/build/types/header/Header.d.ts +28 -11
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/header/index.d.ts +1 -0
- package/build/types/header/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +3 -3
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/listItem/ListItemContext.d.ts +2 -2
- package/build/types/listItem/ListItemContext.d.ts.map +1 -1
- package/build/types/title/Title.d.ts +4 -5
- package/build/types/title/Title.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/header/Header.accessibility.docs.mdx +85 -0
- package/src/header/Header.css +32 -14
- package/src/header/Header.less +28 -9
- package/src/header/Header.spec.tsx +68 -50
- package/src/header/Header.story.tsx +190 -36
- package/src/header/Header.tsx +122 -70
- package/src/header/index.ts +1 -0
- package/src/i18n/es.json +2 -0
- package/src/index.ts +1 -0
- package/src/listItem/IconButton/ListItemIconButton.story.tsx +2 -2
- package/src/listItem/IconButton/ListItemIconButton.tsx +2 -2
- package/src/listItem/ListItem.spec.tsx +279 -221
- package/src/listItem/ListItem.tsx +20 -19
- package/src/listItem/ListItemContext.tsx +2 -2
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +6 -6
- package/src/listItem/_stories/ListItem.story.tsx +19 -12
- package/src/listItem/_stories/ListItem.variants.test.story.tsx +43 -43
- package/src/listItem/test-utils.tsx +1 -1
- package/src/main.css +32 -14
- package/src/title/Title.tsx +25 -12
package/build/header/Header.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
|
-
var Button_resolver = require('../button/Button.resolver.js');
|
|
7
6
|
require('../common/theme.js');
|
|
8
7
|
require('../common/direction.js');
|
|
9
8
|
require('../common/propsValues/control.js');
|
|
@@ -24,78 +23,117 @@ require('../common/propsValues/scroll.js');
|
|
|
24
23
|
require('../common/propsValues/markdownNodeType.js');
|
|
25
24
|
require('../common/fileType.js');
|
|
26
25
|
require('@transferwise/icons');
|
|
27
|
-
require('react');
|
|
26
|
+
var React = require('react');
|
|
28
27
|
require('react-intl');
|
|
29
28
|
require('../common/closeButton/CloseButton.messages.js');
|
|
30
29
|
var jsxRuntime = require('react/jsx-runtime');
|
|
31
30
|
var Link = require('../link/Link.js');
|
|
31
|
+
var Button_resolver = require('../button/Button.resolver.js');
|
|
32
32
|
var Title = require('../title/Title.js');
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
35
|
+
|
|
36
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
37
|
+
|
|
38
|
+
const HeaderAction = /*#__PURE__*/React__default.default.forwardRef(({
|
|
35
39
|
action
|
|
36
|
-
}) => {
|
|
37
|
-
const
|
|
38
|
-
'aria-label':
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
}, ref) => {
|
|
41
|
+
const {
|
|
42
|
+
'aria-label': ariaLabel,
|
|
43
|
+
text,
|
|
44
|
+
onClick
|
|
45
|
+
} = action;
|
|
46
|
+
const inner = 'href' in action ? /*#__PURE__*/jsxRuntime.jsx(Link.default, {
|
|
47
|
+
ref: ref,
|
|
48
|
+
className: "np-header__action-link",
|
|
49
|
+
href: action.href,
|
|
50
|
+
target: action.target,
|
|
51
|
+
"aria-label": action['aria-label'],
|
|
52
|
+
onClick: action.onClick,
|
|
53
|
+
children: action.text
|
|
54
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Button_resolver.default, {
|
|
55
|
+
ref: ref,
|
|
56
|
+
className: "np-header__action-button",
|
|
51
57
|
priority: "tertiary",
|
|
52
58
|
size: "sm",
|
|
59
|
+
"aria-label": action['aria-label'],
|
|
53
60
|
onClick: action.onClick,
|
|
54
|
-
...props,
|
|
55
61
|
children: action.text
|
|
56
62
|
});
|
|
57
|
-
|
|
63
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
64
|
+
className: "np-header__action",
|
|
65
|
+
children: inner
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
HeaderAction.displayName = 'HeaderAction';
|
|
58
69
|
/**
|
|
70
|
+
* @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.
|
|
71
|
+
* @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.
|
|
72
|
+
* @param {string} title - Required prop to set the title of the section header.
|
|
73
|
+
* @param {'group' | 'section'} [level='group'] - Optional prop to specify the level of the section header.
|
|
74
|
+
* @param {string} [className]
|
|
75
|
+
* @param {string} [testId]
|
|
59
76
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
77
|
+
* @see {@link Header } for further information.
|
|
78
|
+
* @see {@link https://storybook.wise.design/?path=/docs/typography-header--docs|Storybook Wise Design}
|
|
62
79
|
*/
|
|
63
|
-
const Header = ({
|
|
64
|
-
id,
|
|
65
|
-
action,
|
|
80
|
+
const Header = /*#__PURE__*/React__default.default.forwardRef(({
|
|
66
81
|
as = 'h5',
|
|
67
|
-
|
|
82
|
+
action,
|
|
68
83
|
className,
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
testId,
|
|
85
|
+
title,
|
|
86
|
+
level = 'group',
|
|
87
|
+
...props
|
|
88
|
+
}, ref) => {
|
|
89
|
+
const internalRef = React.useRef(null);
|
|
90
|
+
const actionRef = React.useRef(null);
|
|
91
|
+
const levelTypography = level === 'group' ? typography.Typography.TITLE_GROUP : typography.Typography.TITLE_SUBSECTION;
|
|
92
|
+
const isLegendOrNoAction = !action || as === 'legend';
|
|
93
|
+
const headerClasses = clsx.clsx('np-header', className, {
|
|
94
|
+
'np-header--group': level === 'group',
|
|
95
|
+
'np-header__title': isLegendOrNoAction
|
|
96
|
+
});
|
|
97
|
+
const commonProps = {
|
|
98
|
+
className: headerClasses,
|
|
99
|
+
'data-testid': testId
|
|
100
|
+
};
|
|
101
|
+
React.useEffect(() => {
|
|
102
|
+
if (as === 'legend' && internalRef.current) {
|
|
103
|
+
const {
|
|
104
|
+
parentElement
|
|
105
|
+
} = internalRef.current;
|
|
106
|
+
if (!parentElement || parentElement.tagName.toLowerCase() !== 'fieldset') {
|
|
107
|
+
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, [as]);
|
|
71
111
|
if (!action) {
|
|
72
112
|
return /*#__PURE__*/jsxRuntime.jsx(Title.default, {
|
|
113
|
+
ref: internalRef,
|
|
73
114
|
as: as,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
className: clsx.clsx('np-header', 'np-header__title', className),
|
|
115
|
+
type: levelTypography,
|
|
116
|
+
...commonProps,
|
|
117
|
+
...props,
|
|
78
118
|
children: title
|
|
79
119
|
});
|
|
80
120
|
}
|
|
81
|
-
if (as === 'legend') {
|
|
82
|
-
// eslint-disable-next-line no-console
|
|
83
|
-
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
84
|
-
}
|
|
85
121
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
86
|
-
|
|
122
|
+
...commonProps,
|
|
123
|
+
...props,
|
|
124
|
+
ref: ref,
|
|
87
125
|
children: [/*#__PURE__*/jsxRuntime.jsx(Title.default, {
|
|
88
126
|
as: as,
|
|
89
|
-
type:
|
|
90
|
-
id: id,
|
|
127
|
+
type: levelTypography,
|
|
91
128
|
className: "np-header__title",
|
|
92
129
|
children: title
|
|
93
130
|
}), /*#__PURE__*/jsxRuntime.jsx(HeaderAction, {
|
|
131
|
+
ref: actionRef,
|
|
94
132
|
action: action
|
|
95
133
|
})]
|
|
96
134
|
});
|
|
97
|
-
};
|
|
135
|
+
});
|
|
136
|
+
Header.displayName = 'Header';
|
|
98
137
|
|
|
99
|
-
exports.Header = Header;
|
|
100
138
|
exports.default = Header;
|
|
101
139
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { AriaLabelProperty, CommonProps, Heading, LinkProps, Typography } from '../common';\nimport Link from '../link';\nimport Button from '../button';\nimport Title from '../title';\nimport React, { useEffect, useRef, FunctionComponent } from 'react';\n\ntype ActionProps = AriaLabelProperty & {\n text: string;\n onClick?: () => void;\n};\n\ntype ButtonActionProps = ActionProps;\ntype LinkActionProps = ActionProps & LinkProps;\n\nexport interface HeaderProps extends CommonProps {\n /**\n * Optional prop to define the action for the header. If the `href` property\n * is provided, a `Link` will be rendered instead of a `Button`.\n */\n action?: ButtonActionProps | LinkActionProps;\n\n /**\n * Option prop to specify DOM render element of the title\n *\n * - When `as=\"legend\"`, the `Header` will render as a `<legend>` element.\n * **Note:** `<legend>` elements must be the first child of a `<fieldset>` to comply with HTML semantics.\n * If this condition is not met, a warning will be logged to the console.\n * Additionally, the `action` prop is not supported when `as=\"legend\"`.\n *\n * - Other valid values include standard heading tags (`h1` to `h6`) or `header`.\n */\n as?: Heading | 'legend' | 'header';\n\n /** Required prop to set the title of the Header. */\n title: string;\n\n /** Optional prop to specify the level of the Header */\n level?: 'section' | 'group';\n\n className?: string;\n testId?: string;\n}\n\n/**\n * Renders a header action which can be either a button or a link.\n *\n * @param {Object} props - The properties object.\n * @param {ButtonActionProps | LinkActionProps} props.action - The action object which can be either a button or a link.\n * @returns {JSX.Element} The rendered header action component.\n */\nconst HeaderAction = React.forwardRef(\n (\n { action }: { action: ButtonActionProps | LinkActionProps },\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n ) => {\n const { 'aria-label': ariaLabel, text, onClick } = action;\n\n const inner =\n 'href' in action ? (\n <Link\n ref={ref as React.Ref<HTMLAnchorElement>}\n className=\"np-header__action-link\"\n href={action.href}\n target={action.target}\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\n ) : (\n <Button\n ref={ref as React.Ref<HTMLButtonElement>}\n className=\"np-header__action-button\"\n priority=\"tertiary\"\n size=\"sm\"\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Button>\n );\n\n return <div className=\"np-header__action\">{inner}</div>;\n },\n);\n\nHeaderAction.displayName = 'HeaderAction';\n\n/**\n * @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.\n * @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.\n * @param {string} title - Required prop to set the title of the section header.\n * @param {'group' | 'section'} [level='group'] - Optional prop to specify the level of the section header.\n * @param {string} [className]\n * @param {string} [testId]\n *\n * @see {@link Header } for further information.\n * @see {@link https://storybook.wise.design/?path=/docs/typography-header--docs|Storybook Wise Design}\n */\nconst Header: FunctionComponent<HeaderProps> = React.forwardRef(\n (\n { as = 'h5', action, className, testId, title, level = 'group', ...props },\n ref: React.Ref<HTMLDivElement | HTMLHeadingElement | HTMLLegendElement>,\n ) => {\n const internalRef = useRef<HTMLLegendElement>(null);\n const actionRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const levelTypography =\n level === 'group' ? Typography.TITLE_GROUP : Typography.TITLE_SUBSECTION;\n const isLegendOrNoAction = !action || as === 'legend';\n const headerClasses = clsx('np-header', className, {\n 'np-header--group': level === 'group',\n 'np-header__title': isLegendOrNoAction,\n });\n\n const commonProps = {\n className: headerClasses,\n 'data-testid': testId,\n };\n\n useEffect(() => {\n if (as === 'legend' && internalRef.current) {\n const { parentElement } = internalRef.current;\n if (!parentElement || parentElement.tagName.toLowerCase() !== 'fieldset') {\n console.warn(\n 'Legends should be the first child in a fieldset, and this is not possible when including an action',\n );\n }\n }\n }, [as]);\n\n if (!action) {\n return (\n <Title ref={internalRef} as={as} type={levelTypography} {...commonProps} {...props}>\n {title}\n </Title>\n );\n }\n\n return (\n <div {...commonProps} {...props} ref={ref as React.Ref<HTMLDivElement>}>\n <Title as={as} type={levelTypography} className=\"np-header__title\">\n {title}\n </Title>\n <HeaderAction ref={actionRef} action={action} />\n </div>\n );\n },\n);\n\nHeader.displayName = 'Header';\n\nexport default Header;\n"],"names":["HeaderAction","React","forwardRef","action","ref","ariaLabel","text","onClick","inner","_jsx","Link","className","href","target","children","Button","priority","size","displayName","Header","as","testId","title","level","props","internalRef","useRef","actionRef","levelTypography","Typography","TITLE_GROUP","TITLE_SUBSECTION","isLegendOrNoAction","headerClasses","clsx","commonProps","useEffect","current","parentElement","tagName","toLowerCase","console","warn","Title","type","_jsxs"],"mappings":"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"}
|
package/build/header/Header.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
|
-
import Button from '../button/Button.resolver.mjs';
|
|
3
2
|
import '../common/theme.mjs';
|
|
4
3
|
import '../common/direction.mjs';
|
|
5
4
|
import '../common/propsValues/control.mjs';
|
|
@@ -20,77 +19,113 @@ import '../common/propsValues/scroll.mjs';
|
|
|
20
19
|
import '../common/propsValues/markdownNodeType.mjs';
|
|
21
20
|
import '../common/fileType.mjs';
|
|
22
21
|
import '@transferwise/icons';
|
|
23
|
-
import 'react';
|
|
22
|
+
import React__default, { useRef, useEffect } from 'react';
|
|
24
23
|
import 'react-intl';
|
|
25
24
|
import '../common/closeButton/CloseButton.messages.mjs';
|
|
26
25
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
27
26
|
import Link from '../link/Link.mjs';
|
|
27
|
+
import Button from '../button/Button.resolver.mjs';
|
|
28
28
|
import Title from '../title/Title.mjs';
|
|
29
29
|
|
|
30
|
-
const HeaderAction = ({
|
|
30
|
+
const HeaderAction = /*#__PURE__*/React__default.forwardRef(({
|
|
31
31
|
action
|
|
32
|
-
}) => {
|
|
33
|
-
const
|
|
34
|
-
'aria-label':
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
}, ref) => {
|
|
33
|
+
const {
|
|
34
|
+
'aria-label': ariaLabel,
|
|
35
|
+
text,
|
|
36
|
+
onClick
|
|
37
|
+
} = action;
|
|
38
|
+
const inner = 'href' in action ? /*#__PURE__*/jsx(Link, {
|
|
39
|
+
ref: ref,
|
|
40
|
+
className: "np-header__action-link",
|
|
41
|
+
href: action.href,
|
|
42
|
+
target: action.target,
|
|
43
|
+
"aria-label": action['aria-label'],
|
|
44
|
+
onClick: action.onClick,
|
|
45
|
+
children: action.text
|
|
46
|
+
}) : /*#__PURE__*/jsx(Button, {
|
|
47
|
+
ref: ref,
|
|
48
|
+
className: "np-header__action-button",
|
|
47
49
|
priority: "tertiary",
|
|
48
50
|
size: "sm",
|
|
51
|
+
"aria-label": action['aria-label'],
|
|
49
52
|
onClick: action.onClick,
|
|
50
|
-
...props,
|
|
51
53
|
children: action.text
|
|
52
54
|
});
|
|
53
|
-
|
|
55
|
+
return /*#__PURE__*/jsx("div", {
|
|
56
|
+
className: "np-header__action",
|
|
57
|
+
children: inner
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
HeaderAction.displayName = 'HeaderAction';
|
|
54
61
|
/**
|
|
62
|
+
* @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.
|
|
63
|
+
* @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.
|
|
64
|
+
* @param {string} title - Required prop to set the title of the section header.
|
|
65
|
+
* @param {'group' | 'section'} [level='group'] - Optional prop to specify the level of the section header.
|
|
66
|
+
* @param {string} [className]
|
|
67
|
+
* @param {string} [testId]
|
|
55
68
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
69
|
+
* @see {@link Header } for further information.
|
|
70
|
+
* @see {@link https://storybook.wise.design/?path=/docs/typography-header--docs|Storybook Wise Design}
|
|
58
71
|
*/
|
|
59
|
-
const Header = ({
|
|
60
|
-
id,
|
|
61
|
-
action,
|
|
72
|
+
const Header = /*#__PURE__*/React__default.forwardRef(({
|
|
62
73
|
as = 'h5',
|
|
63
|
-
|
|
74
|
+
action,
|
|
64
75
|
className,
|
|
65
|
-
|
|
66
|
-
|
|
76
|
+
testId,
|
|
77
|
+
title,
|
|
78
|
+
level = 'group',
|
|
79
|
+
...props
|
|
80
|
+
}, ref) => {
|
|
81
|
+
const internalRef = useRef(null);
|
|
82
|
+
const actionRef = useRef(null);
|
|
83
|
+
const levelTypography = level === 'group' ? Typography.TITLE_GROUP : Typography.TITLE_SUBSECTION;
|
|
84
|
+
const isLegendOrNoAction = !action || as === 'legend';
|
|
85
|
+
const headerClasses = clsx('np-header', className, {
|
|
86
|
+
'np-header--group': level === 'group',
|
|
87
|
+
'np-header__title': isLegendOrNoAction
|
|
88
|
+
});
|
|
89
|
+
const commonProps = {
|
|
90
|
+
className: headerClasses,
|
|
91
|
+
'data-testid': testId
|
|
92
|
+
};
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (as === 'legend' && internalRef.current) {
|
|
95
|
+
const {
|
|
96
|
+
parentElement
|
|
97
|
+
} = internalRef.current;
|
|
98
|
+
if (!parentElement || parentElement.tagName.toLowerCase() !== 'fieldset') {
|
|
99
|
+
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, [as]);
|
|
67
103
|
if (!action) {
|
|
68
104
|
return /*#__PURE__*/jsx(Title, {
|
|
105
|
+
ref: internalRef,
|
|
69
106
|
as: as,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
className: clsx('np-header', 'np-header__title', className),
|
|
107
|
+
type: levelTypography,
|
|
108
|
+
...commonProps,
|
|
109
|
+
...props,
|
|
74
110
|
children: title
|
|
75
111
|
});
|
|
76
112
|
}
|
|
77
|
-
if (as === 'legend') {
|
|
78
|
-
// eslint-disable-next-line no-console
|
|
79
|
-
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
80
|
-
}
|
|
81
113
|
return /*#__PURE__*/jsxs("div", {
|
|
82
|
-
|
|
114
|
+
...commonProps,
|
|
115
|
+
...props,
|
|
116
|
+
ref: ref,
|
|
83
117
|
children: [/*#__PURE__*/jsx(Title, {
|
|
84
118
|
as: as,
|
|
85
|
-
type:
|
|
86
|
-
id: id,
|
|
119
|
+
type: levelTypography,
|
|
87
120
|
className: "np-header__title",
|
|
88
121
|
children: title
|
|
89
122
|
}), /*#__PURE__*/jsx(HeaderAction, {
|
|
123
|
+
ref: actionRef,
|
|
90
124
|
action: action
|
|
91
125
|
})]
|
|
92
126
|
});
|
|
93
|
-
};
|
|
127
|
+
});
|
|
128
|
+
Header.displayName = 'Header';
|
|
94
129
|
|
|
95
|
-
export { Header
|
|
130
|
+
export { Header as default };
|
|
96
131
|
//# sourceMappingURL=Header.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.mjs","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport {
|
|
1
|
+
{"version":3,"file":"Header.mjs","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport { AriaLabelProperty, CommonProps, Heading, LinkProps, Typography } from '../common';\nimport Link from '../link';\nimport Button from '../button';\nimport Title from '../title';\nimport React, { useEffect, useRef, FunctionComponent } from 'react';\n\ntype ActionProps = AriaLabelProperty & {\n text: string;\n onClick?: () => void;\n};\n\ntype ButtonActionProps = ActionProps;\ntype LinkActionProps = ActionProps & LinkProps;\n\nexport interface HeaderProps extends CommonProps {\n /**\n * Optional prop to define the action for the header. If the `href` property\n * is provided, a `Link` will be rendered instead of a `Button`.\n */\n action?: ButtonActionProps | LinkActionProps;\n\n /**\n * Option prop to specify DOM render element of the title\n *\n * - When `as=\"legend\"`, the `Header` will render as a `<legend>` element.\n * **Note:** `<legend>` elements must be the first child of a `<fieldset>` to comply with HTML semantics.\n * If this condition is not met, a warning will be logged to the console.\n * Additionally, the `action` prop is not supported when `as=\"legend\"`.\n *\n * - Other valid values include standard heading tags (`h1` to `h6`) or `header`.\n */\n as?: Heading | 'legend' | 'header';\n\n /** Required prop to set the title of the Header. */\n title: string;\n\n /** Optional prop to specify the level of the Header */\n level?: 'section' | 'group';\n\n className?: string;\n testId?: string;\n}\n\n/**\n * Renders a header action which can be either a button or a link.\n *\n * @param {Object} props - The properties object.\n * @param {ButtonActionProps | LinkActionProps} props.action - The action object which can be either a button or a link.\n * @returns {JSX.Element} The rendered header action component.\n */\nconst HeaderAction = React.forwardRef(\n (\n { action }: { action: ButtonActionProps | LinkActionProps },\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n ) => {\n const { 'aria-label': ariaLabel, text, onClick } = action;\n\n const inner =\n 'href' in action ? (\n <Link\n ref={ref as React.Ref<HTMLAnchorElement>}\n className=\"np-header__action-link\"\n href={action.href}\n target={action.target}\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\n ) : (\n <Button\n ref={ref as React.Ref<HTMLButtonElement>}\n className=\"np-header__action-button\"\n priority=\"tertiary\"\n size=\"sm\"\n aria-label={action['aria-label']}\n onClick={action.onClick}\n >\n {action.text}\n </Button>\n );\n\n return <div className=\"np-header__action\">{inner}</div>;\n },\n);\n\nHeaderAction.displayName = 'HeaderAction';\n\n/**\n * @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.\n * @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.\n * @param {string} title - Required prop to set the title of the section header.\n * @param {'group' | 'section'} [level='group'] - Optional prop to specify the level of the section header.\n * @param {string} [className]\n * @param {string} [testId]\n *\n * @see {@link Header } for further information.\n * @see {@link https://storybook.wise.design/?path=/docs/typography-header--docs|Storybook Wise Design}\n */\nconst Header: FunctionComponent<HeaderProps> = React.forwardRef(\n (\n { as = 'h5', action, className, testId, title, level = 'group', ...props },\n ref: React.Ref<HTMLDivElement | HTMLHeadingElement | HTMLLegendElement>,\n ) => {\n const internalRef = useRef<HTMLLegendElement>(null);\n const actionRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const levelTypography =\n level === 'group' ? Typography.TITLE_GROUP : Typography.TITLE_SUBSECTION;\n const isLegendOrNoAction = !action || as === 'legend';\n const headerClasses = clsx('np-header', className, {\n 'np-header--group': level === 'group',\n 'np-header__title': isLegendOrNoAction,\n });\n\n const commonProps = {\n className: headerClasses,\n 'data-testid': testId,\n };\n\n useEffect(() => {\n if (as === 'legend' && internalRef.current) {\n const { parentElement } = internalRef.current;\n if (!parentElement || parentElement.tagName.toLowerCase() !== 'fieldset') {\n console.warn(\n 'Legends should be the first child in a fieldset, and this is not possible when including an action',\n );\n }\n }\n }, [as]);\n\n if (!action) {\n return (\n <Title ref={internalRef} as={as} type={levelTypography} {...commonProps} {...props}>\n {title}\n </Title>\n );\n }\n\n return (\n <div {...commonProps} {...props} ref={ref as React.Ref<HTMLDivElement>}>\n <Title as={as} type={levelTypography} className=\"np-header__title\">\n {title}\n </Title>\n <HeaderAction ref={actionRef} action={action} />\n </div>\n );\n },\n);\n\nHeader.displayName = 'Header';\n\nexport default Header;\n"],"names":["HeaderAction","React","forwardRef","action","ref","ariaLabel","text","onClick","inner","_jsx","Link","className","href","target","children","Button","priority","size","displayName","Header","as","testId","title","level","props","internalRef","useRef","actionRef","levelTypography","Typography","TITLE_GROUP","TITLE_SUBSECTION","isLegendOrNoAction","headerClasses","clsx","commonProps","useEffect","current","parentElement","tagName","toLowerCase","console","warn","Title","type","_jsxs"],"mappings":"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"}
|
package/build/i18n/es.json
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"neptune.Upload.csFailureText": "La carga del archivo ha fallado. Por favor, inténtalo de nuevo",
|
|
46
46
|
"neptune.Upload.csSuccessText": "¡Se ha subido el archivo!",
|
|
47
47
|
"neptune.Upload.csTooLargeMessage": "Proporciona un archivo menor de {maxSize} MB",
|
|
48
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "Proporciona un archivo más pequeño",
|
|
48
49
|
"neptune.Upload.csWrongTypeMessage": "Tipo de archivo no aceptado. Por favor, inténtalo de nuevo con un archivo diferente",
|
|
49
50
|
"neptune.Upload.psButtonText": "Cancela",
|
|
50
51
|
"neptune.Upload.psProcessingText": "Subiendo...",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"neptune.Upload.usButtonText": "O selecciona un archivo",
|
|
53
54
|
"neptune.Upload.usDropMessage": "Arrastra un archivo para subirlo",
|
|
54
55
|
"neptune.Upload.usPlaceholder": "Arrastra y suelta un archivo de menos de {maxSize} MB",
|
|
56
|
+
"neptune.Upload.usPlaceholderNoLimit": "Arrastra y suelta un archivo",
|
|
55
57
|
"neptune.UploadButton.allFileTypes": "Todos los tipos de archivos",
|
|
56
58
|
"neptune.UploadButton.dropFiles": "Arrastra un archivo para subirlo",
|
|
57
59
|
"neptune.UploadButton.instructions": "{fileTypes}, menor que {size}MB",
|
package/build/i18n/es.json.js
CHANGED
|
@@ -49,6 +49,7 @@ var es = {
|
|
|
49
49
|
"neptune.Upload.csFailureText": "La carga del archivo ha fallado. Por favor, inténtalo de nuevo",
|
|
50
50
|
"neptune.Upload.csSuccessText": "¡Se ha subido el archivo!",
|
|
51
51
|
"neptune.Upload.csTooLargeMessage": "Proporciona un archivo menor de {maxSize} MB",
|
|
52
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "Proporciona un archivo más pequeño",
|
|
52
53
|
"neptune.Upload.csWrongTypeMessage": "Tipo de archivo no aceptado. Por favor, inténtalo de nuevo con un archivo diferente",
|
|
53
54
|
"neptune.Upload.psButtonText": "Cancela",
|
|
54
55
|
"neptune.Upload.psProcessingText": "Subiendo...",
|
|
@@ -56,6 +57,7 @@ var es = {
|
|
|
56
57
|
"neptune.Upload.usButtonText": "O selecciona un archivo",
|
|
57
58
|
"neptune.Upload.usDropMessage": "Arrastra un archivo para subirlo",
|
|
58
59
|
"neptune.Upload.usPlaceholder": "Arrastra y suelta un archivo de menos de {maxSize} MB",
|
|
60
|
+
"neptune.Upload.usPlaceholderNoLimit": "Arrastra y suelta un archivo",
|
|
59
61
|
"neptune.UploadButton.allFileTypes": "Todos los tipos de archivos",
|
|
60
62
|
"neptune.UploadButton.dropFiles": "Arrastra un archivo para subirlo",
|
|
61
63
|
"neptune.UploadButton.instructions": "{fileTypes}, menor que {size}MB",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/es.json.mjs
CHANGED
|
@@ -45,6 +45,7 @@ var es = {
|
|
|
45
45
|
"neptune.Upload.csFailureText": "La carga del archivo ha fallado. Por favor, inténtalo de nuevo",
|
|
46
46
|
"neptune.Upload.csSuccessText": "¡Se ha subido el archivo!",
|
|
47
47
|
"neptune.Upload.csTooLargeMessage": "Proporciona un archivo menor de {maxSize} MB",
|
|
48
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "Proporciona un archivo más pequeño",
|
|
48
49
|
"neptune.Upload.csWrongTypeMessage": "Tipo de archivo no aceptado. Por favor, inténtalo de nuevo con un archivo diferente",
|
|
49
50
|
"neptune.Upload.psButtonText": "Cancela",
|
|
50
51
|
"neptune.Upload.psProcessingText": "Subiendo...",
|
|
@@ -52,6 +53,7 @@ var es = {
|
|
|
52
53
|
"neptune.Upload.usButtonText": "O selecciona un archivo",
|
|
53
54
|
"neptune.Upload.usDropMessage": "Arrastra un archivo para subirlo",
|
|
54
55
|
"neptune.Upload.usPlaceholder": "Arrastra y suelta un archivo de menos de {maxSize} MB",
|
|
56
|
+
"neptune.Upload.usPlaceholderNoLimit": "Arrastra y suelta un archivo",
|
|
55
57
|
"neptune.UploadButton.allFileTypes": "Todos los tipos de archivos",
|
|
56
58
|
"neptune.UploadButton.dropFiles": "Arrastra un archivo para subirlo",
|
|
57
59
|
"neptune.UploadButton.instructions": "{fileTypes}, menor que {size}MB",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/index.js
CHANGED
|
@@ -200,7 +200,7 @@ exports.DropFade = DropFade.default;
|
|
|
200
200
|
exports.Emphasis = Emphasis.default;
|
|
201
201
|
exports.Field = Field.Field;
|
|
202
202
|
exports.FlowNavigation = FlowNavigation.default;
|
|
203
|
-
exports.Header = Header.
|
|
203
|
+
exports.Header = Header.default;
|
|
204
204
|
Object.defineProperty(exports, "InfoPresentation", {
|
|
205
205
|
enumerable: true,
|
|
206
206
|
get: function () { return infoPresentations.InfoPresentation; }
|
package/build/index.mjs
CHANGED
|
@@ -45,7 +45,7 @@ export { default as DropFade } from './dropFade/DropFade.mjs';
|
|
|
45
45
|
export { default as Emphasis } from './emphasis/Emphasis.mjs';
|
|
46
46
|
export { Field } from './field/Field.mjs';
|
|
47
47
|
export { default as FlowNavigation } from './flowNavigation/FlowNavigation.mjs';
|
|
48
|
-
export { Header } from './header/Header.mjs';
|
|
48
|
+
export { default as Header } from './header/Header.mjs';
|
|
49
49
|
export { InfoPresentation } from './info/infoPresentations.mjs';
|
|
50
50
|
export { default as Info } from './info/Info.mjs';
|
|
51
51
|
export { default as InlineAlert } from './inlineAlert/InlineAlert.mjs';
|
|
@@ -608,7 +608,7 @@ function SelectInputGroupItemView({
|
|
|
608
608
|
needle
|
|
609
609
|
}) {
|
|
610
610
|
const headerId = React.useId();
|
|
611
|
-
const header = /*#__PURE__*/jsxRuntime.jsx(Header.
|
|
611
|
+
const header = /*#__PURE__*/jsxRuntime.jsx(Header.default, {
|
|
612
612
|
as: "header",
|
|
613
613
|
role: "none",
|
|
614
614
|
id: headerId,
|