@transferwise/components 46.104.0 → 46.105.1
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 +60 -43
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +57 -43
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/cs.json +2 -0
- package/build/i18n/cs.json.js +2 -0
- package/build/i18n/cs.json.js.map +1 -1
- package/build/i18n/cs.json.mjs +2 -0
- package/build/i18n/cs.json.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/i18n/th.json +2 -0
- package/build/i18n/th.json.js +2 -0
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/th.json.mjs +2 -0
- package/build/i18n/th.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/ListItem.js +4 -2
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +4 -2
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/main.css +24 -22
- package/build/styles/header/Header.css +21 -14
- package/build/styles/listItem/ListItem.css +3 -8
- package/build/styles/listItem/ListItem.grid.css +0 -8
- package/build/styles/main.css +24 -22
- 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 +27 -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.map +1 -1
- package/build/types/listItem/_stories/subcomponents.d.ts +1 -1
- package/build/types/listItem/_stories/subcomponents.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 +1 -1
- package/src/actionButton/ActionButton.story.tsx +1 -1
- package/src/avatar/Avatar.story.tsx +1 -1
- package/src/avatarWrapper/AvatarWrapper.story.tsx +1 -1
- package/src/badge/Badge.story.tsx +1 -1
- package/src/button/Button.spec.tsx +25 -1
- package/src/button/Button.story.tsx +1 -1
- package/src/button/LegacyButton.story.tsx +1 -1
- package/src/header/Header.accessibility.docs.mdx +85 -0
- package/src/header/Header.css +21 -14
- package/src/header/Header.less +17 -10
- package/src/header/Header.spec.tsx +68 -50
- package/src/header/Header.story.tsx +190 -36
- package/src/header/Header.tsx +96 -65
- package/src/header/index.ts +1 -0
- package/src/i18n/cs.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/th.json +2 -0
- package/src/iconButton/iconButton.spec.tsx +31 -0
- package/src/index.ts +1 -0
- package/src/listItem/Button/ListItemButton.spec.tsx +23 -1
- package/src/listItem/IconButton/ListItemIconButton.spec.tsx +14 -2
- package/src/listItem/ListItem.css +3 -8
- package/src/listItem/ListItem.grid.css +0 -8
- package/src/listItem/ListItem.grid.less +0 -8
- package/src/listItem/ListItem.less +4 -0
- package/src/listItem/ListItem.tsx +4 -2
- package/src/listItem/Navigation/ListItemNavigation.spec.tsx +8 -0
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +4 -2
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +20 -0
- package/src/listItem/_stories/ListItem.story.tsx +1 -1
- package/src/listItem/_stories/ListItem.variants.test.story.tsx +3 -0
- package/src/listItem/_stories/subcomponents.tsx +2 -0
- package/src/main.css +24 -22
- package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +15 -4
- package/src/select/Select.story.tsx +1 -1
- 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,96 @@ 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');
|
|
32
31
|
var Title = require('../title/Title.js');
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
34
|
+
|
|
35
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
36
|
+
|
|
37
|
+
const HeaderAction = /*#__PURE__*/React__default.default.forwardRef(({
|
|
35
38
|
action
|
|
36
|
-
}) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
href: action.href,
|
|
43
|
-
target: action.target,
|
|
44
|
-
onClick: action.onClick,
|
|
45
|
-
...props,
|
|
46
|
-
children: action.text
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button_resolver.default, {
|
|
50
|
-
className: "np-header__button",
|
|
51
|
-
priority: "tertiary",
|
|
52
|
-
size: "sm",
|
|
39
|
+
}, ref) => {
|
|
40
|
+
return /*#__PURE__*/jsxRuntime.jsx(Link.default, {
|
|
41
|
+
className: "np-header__action-button",
|
|
42
|
+
"aria-label": action['aria-label'],
|
|
43
|
+
href: 'href' in action ? action.href : undefined,
|
|
44
|
+
target: 'target' in action ? action.target : undefined,
|
|
53
45
|
onClick: action.onClick,
|
|
54
|
-
...props,
|
|
55
46
|
children: action.text
|
|
56
47
|
});
|
|
57
|
-
};
|
|
48
|
+
});
|
|
49
|
+
HeaderAction.displayName = 'HeaderAction';
|
|
58
50
|
/**
|
|
51
|
+
* @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.
|
|
52
|
+
* @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.
|
|
53
|
+
* @param {string} title - Required prop to set the title of the section header.
|
|
54
|
+
* @param {'group' | 'section'} [level='group'] - Optional prop to specify the level of the section header.
|
|
55
|
+
* @param {string} [className]
|
|
56
|
+
* @param {string} [testId]
|
|
59
57
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
58
|
+
* @see {@link Header } for further information.
|
|
59
|
+
* @see {@link https://storybook.wise.design/?path=/docs/typography-header--docs|Storybook Wise Design}
|
|
62
60
|
*/
|
|
63
|
-
const Header = ({
|
|
64
|
-
id,
|
|
65
|
-
action,
|
|
61
|
+
const Header = /*#__PURE__*/React__default.default.forwardRef(({
|
|
66
62
|
as = 'h5',
|
|
67
|
-
|
|
63
|
+
action,
|
|
68
64
|
className,
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
testId,
|
|
66
|
+
title,
|
|
67
|
+
level = 'group',
|
|
68
|
+
...props
|
|
69
|
+
}, ref) => {
|
|
70
|
+
const internalRef = React.useRef(null);
|
|
71
|
+
const levelTypography = level === 'group' ? typography.Typography.TITLE_GROUP : typography.Typography.TITLE_SUBSECTION;
|
|
72
|
+
const isLegendOrNoAction = !action || as === 'legend';
|
|
73
|
+
const headerClasses = clsx.clsx('np-header', className, {
|
|
74
|
+
'np-header--group': level === 'group',
|
|
75
|
+
'np-header__title': isLegendOrNoAction
|
|
76
|
+
});
|
|
77
|
+
const commonProps = {
|
|
78
|
+
className: headerClasses,
|
|
79
|
+
'data-testid': testId
|
|
80
|
+
};
|
|
81
|
+
React.useEffect(() => {
|
|
82
|
+
if (as === 'legend' && internalRef.current) {
|
|
83
|
+
const {
|
|
84
|
+
parentElement
|
|
85
|
+
} = internalRef.current;
|
|
86
|
+
if (!parentElement || parentElement.tagName.toLowerCase() !== 'fieldset') {
|
|
87
|
+
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, [as]);
|
|
71
91
|
if (!action) {
|
|
72
92
|
return /*#__PURE__*/jsxRuntime.jsx(Title.default, {
|
|
93
|
+
ref: internalRef,
|
|
73
94
|
as: as,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
className: clsx.clsx('np-header', 'np-header__title', className),
|
|
95
|
+
type: levelTypography,
|
|
96
|
+
...commonProps,
|
|
97
|
+
...props,
|
|
78
98
|
children: title
|
|
79
99
|
});
|
|
80
100
|
}
|
|
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
101
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
86
|
-
|
|
102
|
+
...commonProps,
|
|
103
|
+
...props,
|
|
104
|
+
ref: ref,
|
|
87
105
|
children: [/*#__PURE__*/jsxRuntime.jsx(Title.default, {
|
|
88
106
|
as: as,
|
|
89
|
-
type:
|
|
90
|
-
id: id,
|
|
107
|
+
type: levelTypography,
|
|
91
108
|
className: "np-header__title",
|
|
92
109
|
children: title
|
|
93
110
|
}), /*#__PURE__*/jsxRuntime.jsx(HeaderAction, {
|
|
94
111
|
action: action
|
|
95
112
|
})]
|
|
96
113
|
});
|
|
97
|
-
};
|
|
114
|
+
});
|
|
115
|
+
Header.displayName = 'Header';
|
|
98
116
|
|
|
99
|
-
exports.Header = Header;
|
|
100
117
|
exports.default = Header;
|
|
101
118
|
//# 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 Button from '../button';\nimport Link from '../link';\nimport Title from '../title';\nimport React, { useEffect, useRef, FunctionComponent } from 'react';\n\ntype ActionProps = AriaLabelProperty & {\n text: string;\n onClick?: (event: React.MouseEvent) => 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 *\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 HTMLButtonElement | HTMLAnchorElement,\n { action: ButtonActionProps | LinkActionProps }\n>(({ action }, ref) => {\n return (\n <Link\n className=\"np-header__action-button\"\n aria-label={action['aria-label']}\n href={'href' in action ? action.href : undefined}\n target={'target' in action ? action.target : undefined}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\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 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 action={action} />\n </div>\n );\n },\n);\n\nHeader.displayName = 'Header';\n\nexport default Header;\n"],"names":["HeaderAction","React","forwardRef","action","ref","_jsx","Link","className","href","undefined","target","onClick","children","text","displayName","Header","as","testId","title","level","props","internalRef","useRef","levelTypography","Typography","TITLE_GROUP","TITLE_SUBSECTION","isLegendOrNoAction","headerClasses","clsx","commonProps","useEffect","current","parentElement","tagName","toLowerCase","console","warn","Title","type","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAMA,YAAY,gBAAGC,sBAAK,CAACC,UAAU,CAGnC,CAAC;AAAEC,EAAAA;AAAM,CAAE,EAAEC,GAAG,KAAI;EACpB,oBACEC,cAAA,CAACC,YAAI,EAAA;AACHC,IAAAA,SAAS,EAAC,0BAA0B;IACpC,YAAA,EAAYJ,MAAM,CAAC,YAAY,CAAE;IACjCK,IAAI,EAAE,MAAM,IAAIL,MAAM,GAAGA,MAAM,CAACK,IAAI,GAAGC,SAAU;IACjDC,MAAM,EAAE,QAAQ,IAAIP,MAAM,GAAGA,MAAM,CAACO,MAAM,GAAGD,SAAU;IACvDE,OAAO,EAAER,MAAM,CAACQ,OAAQ;IAAAC,QAAA,EAEvBT,MAAM,CAACU;AAAI,GACR,CAAC;AAEX,CAAC,CAAC;AAEFb,YAAY,CAACc,WAAW,GAAG,cAAc;AAEzC;;;;;;;;;;AAUG;AACH,MAAMC,MAAM,gBAAmCd,sBAAK,CAACC,UAAU,CAC7D,CACE;AAAEc,EAAAA,EAAE,GAAG,IAAI;EAAEb,MAAM;EAAEI,SAAS;EAAEU,MAAM;EAAEC,KAAK;AAAEC,EAAAA,KAAK,GAAG,OAAO;EAAE,GAAGC;AAAK,CAAE,EAC1EhB,GAAuE,KACrE;AACF,EAAA,MAAMiB,WAAW,GAAGC,YAAM,CAAoB,IAAI,CAAC;AACnD,EAAA,MAAMC,eAAe,GACnBJ,KAAK,KAAK,OAAO,GAAGK,qBAAU,CAACC,WAAW,GAAGD,qBAAU,CAACE,gBAAgB;AAC1E,EAAA,MAAMC,kBAAkB,GAAG,CAACxB,MAAM,IAAIa,EAAE,KAAK,QAAQ;AACrD,EAAA,MAAMY,aAAa,GAAGC,SAAI,CAAC,WAAW,EAAEtB,SAAS,EAAE;IACjD,kBAAkB,EAAEY,KAAK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K,CAAC;AAEV,CAAC;AAGHY,MAAM,CAACD,WAAW,GAAG,QAAQ;;;;"}
|
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,92 @@ 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';
|
|
28
27
|
import Title from '../title/Title.mjs';
|
|
29
28
|
|
|
30
|
-
const HeaderAction = ({
|
|
29
|
+
const HeaderAction = /*#__PURE__*/React__default.forwardRef(({
|
|
31
30
|
action
|
|
32
|
-
}) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
href: action.href,
|
|
39
|
-
target: action.target,
|
|
40
|
-
onClick: action.onClick,
|
|
41
|
-
...props,
|
|
42
|
-
children: action.text
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return /*#__PURE__*/jsx(Button, {
|
|
46
|
-
className: "np-header__button",
|
|
47
|
-
priority: "tertiary",
|
|
48
|
-
size: "sm",
|
|
31
|
+
}, ref) => {
|
|
32
|
+
return /*#__PURE__*/jsx(Link, {
|
|
33
|
+
className: "np-header__action-button",
|
|
34
|
+
"aria-label": action['aria-label'],
|
|
35
|
+
href: 'href' in action ? action.href : undefined,
|
|
36
|
+
target: 'target' in action ? action.target : undefined,
|
|
49
37
|
onClick: action.onClick,
|
|
50
|
-
...props,
|
|
51
38
|
children: action.text
|
|
52
39
|
});
|
|
53
|
-
};
|
|
40
|
+
});
|
|
41
|
+
HeaderAction.displayName = 'HeaderAction';
|
|
54
42
|
/**
|
|
43
|
+
* @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.
|
|
44
|
+
* @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.
|
|
45
|
+
* @param {string} title - Required prop to set the title of the section header.
|
|
46
|
+
* @param {'group' | 'section'} [level='group'] - Optional prop to specify the level of the section header.
|
|
47
|
+
* @param {string} [className]
|
|
48
|
+
* @param {string} [testId]
|
|
55
49
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
50
|
+
* @see {@link Header } for further information.
|
|
51
|
+
* @see {@link https://storybook.wise.design/?path=/docs/typography-header--docs|Storybook Wise Design}
|
|
58
52
|
*/
|
|
59
|
-
const Header = ({
|
|
60
|
-
id,
|
|
61
|
-
action,
|
|
53
|
+
const Header = /*#__PURE__*/React__default.forwardRef(({
|
|
62
54
|
as = 'h5',
|
|
63
|
-
|
|
55
|
+
action,
|
|
64
56
|
className,
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
testId,
|
|
58
|
+
title,
|
|
59
|
+
level = 'group',
|
|
60
|
+
...props
|
|
61
|
+
}, ref) => {
|
|
62
|
+
const internalRef = useRef(null);
|
|
63
|
+
const levelTypography = level === 'group' ? Typography.TITLE_GROUP : Typography.TITLE_SUBSECTION;
|
|
64
|
+
const isLegendOrNoAction = !action || as === 'legend';
|
|
65
|
+
const headerClasses = clsx('np-header', className, {
|
|
66
|
+
'np-header--group': level === 'group',
|
|
67
|
+
'np-header__title': isLegendOrNoAction
|
|
68
|
+
});
|
|
69
|
+
const commonProps = {
|
|
70
|
+
className: headerClasses,
|
|
71
|
+
'data-testid': testId
|
|
72
|
+
};
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (as === 'legend' && internalRef.current) {
|
|
75
|
+
const {
|
|
76
|
+
parentElement
|
|
77
|
+
} = internalRef.current;
|
|
78
|
+
if (!parentElement || parentElement.tagName.toLowerCase() !== 'fieldset') {
|
|
79
|
+
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, [as]);
|
|
67
83
|
if (!action) {
|
|
68
84
|
return /*#__PURE__*/jsx(Title, {
|
|
85
|
+
ref: internalRef,
|
|
69
86
|
as: as,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
className: clsx('np-header', 'np-header__title', className),
|
|
87
|
+
type: levelTypography,
|
|
88
|
+
...commonProps,
|
|
89
|
+
...props,
|
|
74
90
|
children: title
|
|
75
91
|
});
|
|
76
92
|
}
|
|
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
93
|
return /*#__PURE__*/jsxs("div", {
|
|
82
|
-
|
|
94
|
+
...commonProps,
|
|
95
|
+
...props,
|
|
96
|
+
ref: ref,
|
|
83
97
|
children: [/*#__PURE__*/jsx(Title, {
|
|
84
98
|
as: as,
|
|
85
|
-
type:
|
|
86
|
-
id: id,
|
|
99
|
+
type: levelTypography,
|
|
87
100
|
className: "np-header__title",
|
|
88
101
|
children: title
|
|
89
102
|
}), /*#__PURE__*/jsx(HeaderAction, {
|
|
90
103
|
action: action
|
|
91
104
|
})]
|
|
92
105
|
});
|
|
93
|
-
};
|
|
106
|
+
});
|
|
107
|
+
Header.displayName = 'Header';
|
|
94
108
|
|
|
95
|
-
export { Header
|
|
109
|
+
export { Header as default };
|
|
96
110
|
//# 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 Button from '../button';\nimport Link from '../link';\nimport Title from '../title';\nimport React, { useEffect, useRef, FunctionComponent } from 'react';\n\ntype ActionProps = AriaLabelProperty & {\n text: string;\n onClick?: (event: React.MouseEvent) => 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 *\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 HTMLButtonElement | HTMLAnchorElement,\n { action: ButtonActionProps | LinkActionProps }\n>(({ action }, ref) => {\n return (\n <Link\n className=\"np-header__action-button\"\n aria-label={action['aria-label']}\n href={'href' in action ? action.href : undefined}\n target={'target' in action ? action.target : undefined}\n onClick={action.onClick}\n >\n {action.text}\n </Link>\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 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 action={action} />\n </div>\n );\n },\n);\n\nHeader.displayName = 'Header';\n\nexport default Header;\n"],"names":["HeaderAction","React","forwardRef","action","ref","_jsx","Link","className","href","undefined","target","onClick","children","text","displayName","Header","as","testId","title","level","props","internalRef","useRef","levelTypography","Typography","TITLE_GROUP","TITLE_SUBSECTION","isLegendOrNoAction","headerClasses","clsx","commonProps","useEffect","current","parentElement","tagName","toLowerCase","console","warn","Title","type","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAm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une.Upload.csFailureText": "Nahrání se nezdařilo. Zkuste to prosím později",
|
|
46
46
|
"neptune.Upload.csSuccessText": "Úspěšně nahráno!",
|
|
47
47
|
"neptune.Upload.csTooLargeMessage": "Nahrajte soubor menší než {maxSize} MB",
|
|
48
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "Nahrajte menší soubor",
|
|
48
49
|
"neptune.Upload.csWrongTypeMessage": "Tento formát souboru není podporován. Zkuste to znovu s jiným souborem",
|
|
49
50
|
"neptune.Upload.psButtonText": "Zrušit",
|
|
50
51
|
"neptune.Upload.psProcessingText": "Načítání...",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"neptune.Upload.usButtonText": "Nebo vyberte soubor",
|
|
53
54
|
"neptune.Upload.usDropMessage": "Přetáhněte soubor a zahajte nahrávání",
|
|
54
55
|
"neptune.Upload.usPlaceholder": "Přetáhněte soubor menší než {maxSize} MB",
|
|
56
|
+
"neptune.Upload.usPlaceholderNoLimit": "Přetáhněte soubor",
|
|
55
57
|
"neptune.UploadButton.allFileTypes": "Všechny typy souborů",
|
|
56
58
|
"neptune.UploadButton.dropFiles": "Přetáhněte soubor a zahajte nahrávání",
|
|
57
59
|
"neptune.UploadButton.instructions": "{fileTypes}, menší než {size} MB",
|
package/build/i18n/cs.json.js
CHANGED
|
@@ -49,6 +49,7 @@ var cs = {
|
|
|
49
49
|
"neptune.Upload.csFailureText": "Nahrání se nezdařilo. Zkuste to prosím později",
|
|
50
50
|
"neptune.Upload.csSuccessText": "Úspěšně nahráno!",
|
|
51
51
|
"neptune.Upload.csTooLargeMessage": "Nahrajte soubor menší než {maxSize} MB",
|
|
52
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "Nahrajte menší soubor",
|
|
52
53
|
"neptune.Upload.csWrongTypeMessage": "Tento formát souboru není podporován. Zkuste to znovu s jiným souborem",
|
|
53
54
|
"neptune.Upload.psButtonText": "Zrušit",
|
|
54
55
|
"neptune.Upload.psProcessingText": "Načítání...",
|
|
@@ -56,6 +57,7 @@ var cs = {
|
|
|
56
57
|
"neptune.Upload.usButtonText": "Nebo vyberte soubor",
|
|
57
58
|
"neptune.Upload.usDropMessage": "Přetáhněte soubor a zahajte nahrávání",
|
|
58
59
|
"neptune.Upload.usPlaceholder": "Přetáhněte soubor menší než {maxSize} MB",
|
|
60
|
+
"neptune.Upload.usPlaceholderNoLimit": "Přetáhněte soubor",
|
|
59
61
|
"neptune.UploadButton.allFileTypes": "Všechny typy souborů",
|
|
60
62
|
"neptune.UploadButton.dropFiles": "Přetáhněte soubor a zahajte nahrávání",
|
|
61
63
|
"neptune.UploadButton.instructions": "{fileTypes}, menší než {size} MB",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/cs.json.mjs
CHANGED
|
@@ -45,6 +45,7 @@ var cs = {
|
|
|
45
45
|
"neptune.Upload.csFailureText": "Nahrání se nezdařilo. Zkuste to prosím později",
|
|
46
46
|
"neptune.Upload.csSuccessText": "Úspěšně nahráno!",
|
|
47
47
|
"neptune.Upload.csTooLargeMessage": "Nahrajte soubor menší než {maxSize} MB",
|
|
48
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "Nahrajte menší soubor",
|
|
48
49
|
"neptune.Upload.csWrongTypeMessage": "Tento formát souboru není podporován. Zkuste to znovu s jiným souborem",
|
|
49
50
|
"neptune.Upload.psButtonText": "Zrušit",
|
|
50
51
|
"neptune.Upload.psProcessingText": "Načítání...",
|
|
@@ -52,6 +53,7 @@ var cs = {
|
|
|
52
53
|
"neptune.Upload.usButtonText": "Nebo vyberte soubor",
|
|
53
54
|
"neptune.Upload.usDropMessage": "Přetáhněte soubor a zahajte nahrávání",
|
|
54
55
|
"neptune.Upload.usPlaceholder": "Přetáhněte soubor menší než {maxSize} MB",
|
|
56
|
+
"neptune.Upload.usPlaceholderNoLimit": "Přetáhněte soubor",
|
|
55
57
|
"neptune.UploadButton.allFileTypes": "Všechny typy souborů",
|
|
56
58
|
"neptune.UploadButton.dropFiles": "Přetáhněte soubor a zahajte nahrávání",
|
|
57
59
|
"neptune.UploadButton.instructions": "{fileTypes}, menší než {size} MB",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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/i18n/th.json
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"neptune.Upload.csFailureText": "การอัปโหลดล้มเหลว กรุณาลองอีกครั้ง",
|
|
46
46
|
"neptune.Upload.csSuccessText": "อัปโหลดเรียบร้อย!",
|
|
47
47
|
"neptune.Upload.csTooLargeMessage": "กรุณาใช้ไฟล์ที่มีขนาดเล็กกว่า {maxSize} MB",
|
|
48
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "โปรดอัปโหลดไฟล์ที่เล็กลง",
|
|
48
49
|
"neptune.Upload.csWrongTypeMessage": "ไม่รองรับประเภทไฟล์ โปรดลองอีกครั้งโดยใช้ไฟล์อื่น",
|
|
49
50
|
"neptune.Upload.psButtonText": "ยกเลิก",
|
|
50
51
|
"neptune.Upload.psProcessingText": "กำลังอัปโหลด...",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"neptune.Upload.usButtonText": "หรือเลือกไฟล์",
|
|
53
54
|
"neptune.Upload.usDropMessage": "วางไฟล์เพื่อเริ่มการอัปโหลด",
|
|
54
55
|
"neptune.Upload.usPlaceholder": "ลากและวางไฟล์ที่น้อยกว่า {maxSize} MB",
|
|
56
|
+
"neptune.Upload.usPlaceholderNoLimit": "ลากและวางไฟล์",
|
|
55
57
|
"neptune.UploadButton.allFileTypes": "ไฟล์ทุกประเภท",
|
|
56
58
|
"neptune.UploadButton.dropFiles": "วางไฟล์เพื่อเริ่มการอัปโหลด",
|
|
57
59
|
"neptune.UploadButton.instructions": "{fileTypes} น้อยกว่า {size} MB",
|
package/build/i18n/th.json.js
CHANGED
|
@@ -49,6 +49,7 @@ var th = {
|
|
|
49
49
|
"neptune.Upload.csFailureText": "การอัปโหลดล้มเหลว กรุณาลองอีกครั้ง",
|
|
50
50
|
"neptune.Upload.csSuccessText": "อัปโหลดเรียบร้อย!",
|
|
51
51
|
"neptune.Upload.csTooLargeMessage": "กรุณาใช้ไฟล์ที่มีขนาดเล็กกว่า {maxSize} MB",
|
|
52
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "โปรดอัปโหลดไฟล์ที่เล็กลง",
|
|
52
53
|
"neptune.Upload.csWrongTypeMessage": "ไม่รองรับประเภทไฟล์ โปรดลองอีกครั้งโดยใช้ไฟล์อื่น",
|
|
53
54
|
"neptune.Upload.psButtonText": "ยกเลิก",
|
|
54
55
|
"neptune.Upload.psProcessingText": "กำลังอัปโหลด...",
|
|
@@ -56,6 +57,7 @@ var th = {
|
|
|
56
57
|
"neptune.Upload.usButtonText": "หรือเลือกไฟล์",
|
|
57
58
|
"neptune.Upload.usDropMessage": "วางไฟล์เพื่อเริ่มการอัปโหลด",
|
|
58
59
|
"neptune.Upload.usPlaceholder": "ลากและวางไฟล์ที่น้อยกว่า {maxSize} MB",
|
|
60
|
+
"neptune.Upload.usPlaceholderNoLimit": "ลากและวางไฟล์",
|
|
59
61
|
"neptune.UploadButton.allFileTypes": "ไฟล์ทุกประเภท",
|
|
60
62
|
"neptune.UploadButton.dropFiles": "วางไฟล์เพื่อเริ่มการอัปโหลด",
|
|
61
63
|
"neptune.UploadButton.instructions": "{fileTypes} น้อยกว่า {size} MB",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"th.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"th.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/th.json.mjs
CHANGED
|
@@ -45,6 +45,7 @@ var th = {
|
|
|
45
45
|
"neptune.Upload.csFailureText": "การอัปโหลดล้มเหลว กรุณาลองอีกครั้ง",
|
|
46
46
|
"neptune.Upload.csSuccessText": "อัปโหลดเรียบร้อย!",
|
|
47
47
|
"neptune.Upload.csTooLargeMessage": "กรุณาใช้ไฟล์ที่มีขนาดเล็กกว่า {maxSize} MB",
|
|
48
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "โปรดอัปโหลดไฟล์ที่เล็กลง",
|
|
48
49
|
"neptune.Upload.csWrongTypeMessage": "ไม่รองรับประเภทไฟล์ โปรดลองอีกครั้งโดยใช้ไฟล์อื่น",
|
|
49
50
|
"neptune.Upload.psButtonText": "ยกเลิก",
|
|
50
51
|
"neptune.Upload.psProcessingText": "กำลังอัปโหลด...",
|
|
@@ -52,6 +53,7 @@ var th = {
|
|
|
52
53
|
"neptune.Upload.usButtonText": "หรือเลือกไฟล์",
|
|
53
54
|
"neptune.Upload.usDropMessage": "วางไฟล์เพื่อเริ่มการอัปโหลด",
|
|
54
55
|
"neptune.Upload.usPlaceholder": "ลากและวางไฟล์ที่น้อยกว่า {maxSize} MB",
|
|
56
|
+
"neptune.Upload.usPlaceholderNoLimit": "ลากและวางไฟล์",
|
|
55
57
|
"neptune.UploadButton.allFileTypes": "ไฟล์ทุกประเภท",
|
|
56
58
|
"neptune.UploadButton.dropFiles": "วางไฟล์เพื่อเริ่มการอัปโหลด",
|
|
57
59
|
"neptune.UploadButton.instructions": "{fileTypes} น้อยกว่า {size} MB",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"th.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"th.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,
|