@daoyi/nmtl-ui 2.0.1-beta.100 → 2.0.1-beta.101

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.
@@ -5,6 +5,7 @@ import { c as classNames } from './index-b76a85f4.js';
5
5
  import { d as debounce_1 } from './debounce-127da66c.js';
6
6
  import { Fade, NoSsr, Box } from '@material-ui/core';
7
7
  import { r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-e3803ee1.js';
8
+ import { getIntl } from './globalConfig';
8
9
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
9
10
  import './isObjectLike-e111475d.js';
10
11
  import './_commonjsHelpers-70de2c37.js';
@@ -78,9 +79,21 @@ var BackTop = function BackTop(props) {
78
79
  unmountOnExit: true
79
80
  }, /*#__PURE__*/React__default.createElement("div", {
80
81
  className: classNames('backTop', className),
82
+ role: "button",
83
+ tabIndex: 0,
84
+ "aria-label": getIntl().formatMessage({
85
+ id: 'aria.backTop'
86
+ }),
81
87
  onClick: function onClick() {
82
88
  scrollToTop();
83
89
  _onClick();
90
+ },
91
+ onKeyDown: function onKeyDown(event) {
92
+ if (event.key === 'Enter' || event.key === ' ') {
93
+ event.preventDefault();
94
+ scrollToTop();
95
+ _onClick();
96
+ }
84
97
  }
85
98
  }, children ? /*#__PURE__*/React__default.createElement("div", null, children) : /*#__PURE__*/React__default.createElement(NoSsr, null, /*#__PURE__*/React__default.createElement(Box, {
86
99
  className: "backTop__default",
@@ -79,7 +79,8 @@ var zhtw = {
79
79
  "aria.moreButton.collapsed": "已收合結果",
80
80
  "aria.filter.hint": "(篩選條件,選取後過濾下方結果)",
81
81
  "aria.filter.applied": "已套用篩選:{title},結果已更新",
82
- "aria.export.download": "(下載檔案)"
82
+ "aria.export.download": "(下載檔案)",
83
+ "aria.backTop": "回到頁面頂端"
83
84
  };
84
85
 
85
86
  var zhcn = {
@@ -147,7 +148,8 @@ var zhcn = {
147
148
  "aria.moreButton.collapsed": "已收合结果",
148
149
  "aria.filter.hint": "(筛选条件,选取后过滤下方结果)",
149
150
  "aria.filter.applied": "已套用筛选:{title},结果已更新",
150
- "aria.export.download": "(下载档案)"
151
+ "aria.export.download": "(下载档案)",
152
+ "aria.backTop": "回到页面顶端"
151
153
  };
152
154
 
153
155
  var enus = {
@@ -215,7 +217,8 @@ var enus = {
215
217
  "aria.moreButton.collapsed": "Results collapsed",
216
218
  "aria.filter.hint": " (filter, updates the results below)",
217
219
  "aria.filter.applied": "Filter applied: {title}. Results updated",
218
- "aria.export.download": " (downloads a file)"
220
+ "aria.export.download": " (downloads a file)",
221
+ "aria.backTop": "Back to top"
219
222
  };
220
223
 
221
224
  var _languages;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daoyi/nmtl-ui",
3
- "version": "2.0.1-beta.100",
3
+ "version": "2.0.1-beta.101",
4
4
  "description": "This project is to be used as a starter kit for building React component using Storybook and Rollup",
5
5
  "author": "daoyi",
6
6
  "main": "lib/index.js",