@daoyi/nmtl-ui 2.0.1-beta.91 → 2.0.1-beta.92
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/lib/components/{Autocomplete-887cda6a.js → Autocomplete-5d6f1df8.js} +44 -11
- package/lib/components/Autocomplete.js +5 -4
- package/lib/components/Avatar.js +1 -1
- package/lib/components/BackTop.js +2 -2
- package/lib/components/BarChart.js +1 -1
- package/lib/components/Breadcrumbs.js +1 -1
- package/lib/components/{Button-8742afeb.js → Button-305b69a0.js} +1 -1
- package/lib/components/Button.js +2 -2
- package/lib/components/Carousel.js +1 -1
- package/lib/components/CollapseContent.js +2 -2
- package/lib/components/{ContactModal-530d4d80.js → ContactModal-1997d146.js} +92 -20
- package/lib/components/ContactModal.js +9 -9
- package/lib/components/{Drawer-96442344.js → Drawer-b9855a54.js} +9 -2
- package/lib/components/Drawer.js +5 -4
- package/lib/components/Dropdown.js +1 -1
- package/lib/components/{Empty-94a8d8ff.js → Empty-bf77164f.js} +1 -1
- package/lib/components/Empty.js +2 -2
- package/lib/components/ExportButton.js +1 -1
- package/lib/components/{ExtraTools-bfb076ca.js → ExtraTools-5954ee3a.js} +72 -14
- package/lib/components/ExtraTools.js +3 -3
- package/lib/components/Filter.js +2 -2
- package/lib/components/Footer.js +9 -9
- package/lib/components/{ForwardLink-059be72d.js → ForwardLink-aa950a50.js} +12 -3
- package/lib/components/ForwardLink.js +3 -2
- package/lib/components/Header.js +24 -8
- package/lib/components/Image.js +1 -1
- package/lib/components/Input.js +1 -1
- package/lib/components/InputMethod.js +1 -1
- package/lib/components/{KeywordSearch-c3acab41.js → KeywordSearch-33341dd3.js} +2 -2
- package/lib/components/KeywordSearch.js +6 -5
- package/lib/components/KeywordTicker.js +4 -3
- package/lib/components/Keywords.js +6 -5
- package/lib/components/Loading.js +1 -1
- package/lib/components/{Modal-fc4320d3.js → Modal-5a27951f.js} +12 -4
- package/lib/components/Modal.js +5 -4
- package/lib/components/{MoreButton-d7c9f3b8.js → MoreButton-44d3b4fe.js} +1 -1
- package/lib/components/MoreButton.js +2 -2
- package/lib/components/Pagination.js +2 -2
- package/lib/components/SNA.js +3 -3
- package/lib/components/{Select-fdb4d9b8.js → Select-e550d0a5.js} +23 -6
- package/lib/components/Select.js +3 -3
- package/lib/components/{Spin-fafe3787.js → Spin-8dc60bfe.js} +1 -1
- package/lib/components/Spin.js +2 -2
- package/lib/components/{Tooltip-e67a18bc.js → Tooltip-6ebfa9c1.js} +1 -1
- package/lib/components/Tooltip.js +2 -2
- package/lib/components/globalConfig.js +27 -3
- package/package.json +1 -1
- /package/lib/components/{createSvgIcon-0d38de2e.js → createSvgIcon-e3803ee1.js} +0 -0
- /package/lib/components/{index-0be0afec.js → index-b47819f3.js} +0 -0
- /package/lib/components/{index-ef96775f.js → index-b76a85f4.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { Component, forwardRef, useState } from 'react';
|
|
4
|
-
import { c as classNames } from './index-
|
|
4
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { a as getDefaultExportFromCjs } from './_commonjsHelpers-70de2c37.js';
|
|
7
7
|
import { Menu, MenuItem, useMediaQuery, IconButton } from '@material-ui/core';
|
|
8
|
-
import { T as Tooltip } from './Tooltip-
|
|
8
|
+
import { T as Tooltip } from './Tooltip-6ebfa9c1.js';
|
|
9
9
|
import { s as snaToExcel, f as fileDownload$1, a as jsonExcel } from './dataExport-d55d6fa3.js';
|
|
10
10
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
11
11
|
|
|
@@ -3147,6 +3147,16 @@ var css_248z = ".extraTools {\n width: 100%;\n display: inline-flex;\n justif
|
|
|
3147
3147
|
styleInject(css_248z);
|
|
3148
3148
|
|
|
3149
3149
|
/* eslint-disable prefer-destructuring */
|
|
3150
|
+
|
|
3151
|
+
/* 視覺隱藏文字(供按鈕內容作為可及名稱, WCAG 4.1.2) */
|
|
3152
|
+
const hiddenTextStyle = {
|
|
3153
|
+
position: 'absolute',
|
|
3154
|
+
width: 1,
|
|
3155
|
+
height: 1,
|
|
3156
|
+
overflow: 'hidden',
|
|
3157
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
3158
|
+
whiteSpace: 'nowrap'
|
|
3159
|
+
};
|
|
3150
3160
|
const ShareButton = _ref => {
|
|
3151
3161
|
let {
|
|
3152
3162
|
className
|
|
@@ -3154,11 +3164,15 @@ const ShareButton = _ref => {
|
|
|
3154
3164
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3155
3165
|
className: classNames('extraTools__share', className)
|
|
3156
3166
|
}, /*#__PURE__*/React__default.createElement(FacebookShareButton, {
|
|
3157
|
-
url: document.location.href
|
|
3167
|
+
url: document.location.href,
|
|
3168
|
+
"aria-label": "\u5206\u4EAB\u81F3 Facebook"
|
|
3158
3169
|
}, /*#__PURE__*/React__default.createElement(FacebookIcon, {
|
|
3159
3170
|
size: 32,
|
|
3160
|
-
round: true
|
|
3161
|
-
|
|
3171
|
+
round: true,
|
|
3172
|
+
"aria-hidden": "true"
|
|
3173
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
3174
|
+
style: hiddenTextStyle
|
|
3175
|
+
}, "\u5206\u4EAB\u81F3 Facebook")));
|
|
3162
3176
|
};
|
|
3163
3177
|
ShareButton.defaultProps = {
|
|
3164
3178
|
className: undefined
|
|
@@ -3220,9 +3234,23 @@ const DownloadMenu = _ref2 => {
|
|
|
3220
3234
|
placement: "bottom"
|
|
3221
3235
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3222
3236
|
className: "extraTools__download-icon",
|
|
3223
|
-
|
|
3237
|
+
role: "button",
|
|
3238
|
+
tabIndex: 0,
|
|
3239
|
+
"aria-label": intl ? intl.formatMessage({
|
|
3240
|
+
id: 'knowledge.writersAndWorksSNA.download'
|
|
3241
|
+
}) : '下載',
|
|
3242
|
+
"aria-haspopup": "menu",
|
|
3243
|
+
"aria-expanded": Boolean(anchorEl),
|
|
3244
|
+
onClick: e => setAnchorEl(e.currentTarget),
|
|
3245
|
+
onKeyDown: e => {
|
|
3246
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
3247
|
+
e.preventDefault();
|
|
3248
|
+
setAnchorEl(e.currentTarget);
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3224
3251
|
}, /*#__PURE__*/React__default.createElement(DownloadImg, {
|
|
3225
|
-
fill: iconColor
|
|
3252
|
+
fill: iconColor,
|
|
3253
|
+
"aria-hidden": "true"
|
|
3226
3254
|
}))), /*#__PURE__*/React__default.createElement(Menu, {
|
|
3227
3255
|
id: "download-menu",
|
|
3228
3256
|
anchorEl: anchorEl,
|
|
@@ -3289,11 +3317,23 @@ const FullscreenBtn = _ref4 => {
|
|
|
3289
3317
|
placement: "bottom"
|
|
3290
3318
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3291
3319
|
className: "extraTools__fullscreenBtn-icon",
|
|
3320
|
+
role: "button",
|
|
3321
|
+
tabIndex: 0,
|
|
3322
|
+
"aria-label": intl ? intl.formatMessage({
|
|
3323
|
+
id: 'knowledge.writersAndWorksSNA.fullscreen'
|
|
3324
|
+
}) : '全螢幕模式',
|
|
3292
3325
|
onClick: () => {
|
|
3293
3326
|
if (screenfull.isEnabled && fullscreenDomId) screenfull.request(document.getElementById(fullscreenDomId));
|
|
3327
|
+
},
|
|
3328
|
+
onKeyDown: e => {
|
|
3329
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
3330
|
+
e.preventDefault();
|
|
3331
|
+
if (screenfull.isEnabled && fullscreenDomId) screenfull.request(document.getElementById(fullscreenDomId));
|
|
3332
|
+
}
|
|
3294
3333
|
}
|
|
3295
3334
|
}, /*#__PURE__*/React__default.createElement(SVGComponent, {
|
|
3296
|
-
fill: iconColor
|
|
3335
|
+
fill: iconColor,
|
|
3336
|
+
"aria-hidden": "true"
|
|
3297
3337
|
}))));
|
|
3298
3338
|
};
|
|
3299
3339
|
FullscreenBtn.defaultProps = {
|
|
@@ -3328,22 +3368,35 @@ const FontSizeChanger = _ref5 => {
|
|
|
3328
3368
|
targets: FontSizeTargets,
|
|
3329
3369
|
options: FontSizeOptions,
|
|
3330
3370
|
customButtons: {
|
|
3371
|
+
/* 外層按鈕由 react-font-size-changer 渲染,以 role="img" + aria-label 提供按鈕可及名稱(WCAG 4.1.2) */
|
|
3331
3372
|
up: /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
3332
3373
|
title: intl ? intl.formatMessage({
|
|
3333
3374
|
id: 'knowledge.writersAndWorksSNA.big'
|
|
3334
3375
|
}) : '字級放大',
|
|
3335
3376
|
placement: "bottom"
|
|
3377
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3378
|
+
role: "img",
|
|
3379
|
+
"aria-label": intl ? intl.formatMessage({
|
|
3380
|
+
id: 'knowledge.writersAndWorksSNA.big'
|
|
3381
|
+
}) : '字級放大'
|
|
3336
3382
|
}, /*#__PURE__*/React__default.createElement(SVGComponent$2, {
|
|
3337
|
-
fill: iconColor
|
|
3338
|
-
|
|
3383
|
+
fill: iconColor,
|
|
3384
|
+
"aria-hidden": "true"
|
|
3385
|
+
}))),
|
|
3339
3386
|
down: /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
3340
3387
|
title: intl ? intl.formatMessage({
|
|
3341
3388
|
id: 'knowledge.writersAndWorksSNA.small'
|
|
3342
3389
|
}) : '字級縮小',
|
|
3343
3390
|
placement: "bottom"
|
|
3391
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3392
|
+
role: "img",
|
|
3393
|
+
"aria-label": intl ? intl.formatMessage({
|
|
3394
|
+
id: 'knowledge.writersAndWorksSNA.small'
|
|
3395
|
+
}) : '字級縮小'
|
|
3344
3396
|
}, /*#__PURE__*/React__default.createElement(SVGComponent$1, {
|
|
3345
|
-
fill: iconColor
|
|
3346
|
-
|
|
3397
|
+
fill: iconColor,
|
|
3398
|
+
"aria-hidden": "true"
|
|
3399
|
+
}))),
|
|
3347
3400
|
style: {
|
|
3348
3401
|
border: 'none'
|
|
3349
3402
|
},
|
|
@@ -3393,14 +3446,19 @@ const SNAResetBtn = _ref6 => {
|
|
|
3393
3446
|
}) : '回到原來位置與大小',
|
|
3394
3447
|
placement: "bottom"
|
|
3395
3448
|
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
3449
|
+
"aria-label": intl ? intl.formatMessage({
|
|
3450
|
+
id: 'common.sna.reset'
|
|
3451
|
+
}) : '回到原來位置與大小',
|
|
3396
3452
|
onClick: () => renderSNA(),
|
|
3397
3453
|
style: {
|
|
3398
3454
|
padding: '0px'
|
|
3399
3455
|
}
|
|
3400
3456
|
}, isMobile ? /*#__PURE__*/React__default.createElement(ResetMobileIcon, {
|
|
3401
|
-
fill: iconColor
|
|
3457
|
+
fill: iconColor,
|
|
3458
|
+
"aria-hidden": "true"
|
|
3402
3459
|
}) : /*#__PURE__*/React__default.createElement(ResetIcon, {
|
|
3403
|
-
fill: iconColor
|
|
3460
|
+
fill: iconColor,
|
|
3461
|
+
"aria-hidden": "true"
|
|
3404
3462
|
})))));
|
|
3405
3463
|
};
|
|
3406
3464
|
SNAResetBtn.defaultProps = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { E as default } from './ExtraTools-
|
|
1
|
+
export { E as default } from './ExtraTools-5954ee3a.js';
|
|
2
2
|
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-b76a85f4.js';
|
|
5
5
|
import 'prop-types';
|
|
6
6
|
import './_commonjsHelpers-70de2c37.js';
|
|
7
7
|
import '@material-ui/core';
|
|
8
|
-
import './Tooltip-
|
|
8
|
+
import './Tooltip-6ebfa9c1.js';
|
|
9
9
|
import './style-inject.es-1f59c1d0.js';
|
|
10
10
|
import './dataExport-d55d6fa3.js';
|
package/lib/components/Filter.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { f as _taggedTemplateLiteral, e as _defineProperty } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useContext, createElement, useCallback } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
5
|
-
import { q as queryString } from './index-
|
|
4
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
5
|
+
import { q as queryString } from './index-b47819f3.js';
|
|
6
6
|
import { useHistory } from 'react-router-dom';
|
|
7
7
|
import { isValidElementType, typeOf } from 'react-is';
|
|
8
8
|
import { h as hoistNonReactStatics_cjs } from './hoist-non-react-statics.cjs-3f408ad2.js';
|
package/lib/components/Footer.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { a as _slicedToArray, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
|
-
import { c as classNames } from './index-
|
|
3
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { C as ContactModal } from './ContactModal-
|
|
7
|
-
import { S as Spin } from './Spin-
|
|
6
|
+
import { C as ContactModal } from './ContactModal-1997d146.js';
|
|
7
|
+
import { S as Spin } from './Spin-8dc60bfe.js';
|
|
8
8
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
9
9
|
import './hoist-non-react-statics.cjs-3f408ad2.js';
|
|
10
10
|
import 'react-is';
|
|
11
|
-
import './Modal-
|
|
11
|
+
import './Modal-5a27951f.js';
|
|
12
12
|
import '@material-ui/core';
|
|
13
13
|
import '@material-ui/icons';
|
|
14
|
-
import './Button-
|
|
14
|
+
import './Button-305b69a0.js';
|
|
15
|
+
import './globalConfig';
|
|
15
16
|
import './_commonjsHelpers-70de2c37.js';
|
|
16
|
-
import './Select-
|
|
17
|
-
import './Empty-
|
|
18
|
-
import './createSvgIcon-
|
|
17
|
+
import './Select-e550d0a5.js';
|
|
18
|
+
import './Empty-bf77164f.js';
|
|
19
|
+
import './createSvgIcon-e3803ee1.js';
|
|
19
20
|
import './defaultTheme-ed7746fe.js';
|
|
20
21
|
import '@material-ui/styles';
|
|
21
22
|
import 'react-dom';
|
|
22
|
-
import './globalConfig';
|
|
23
23
|
|
|
24
24
|
/* eslint-disable max-len */
|
|
25
25
|
const NmtlLogo = _ref => {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { q as queryString } from './index-
|
|
4
|
+
import { q as queryString } from './index-b47819f3.js';
|
|
5
5
|
import { useHistory, Link } from 'react-router-dom';
|
|
6
6
|
import { Tooltip } from '@material-ui/core';
|
|
7
|
+
import { getIntl } from './globalConfig';
|
|
7
8
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
8
9
|
|
|
9
10
|
var css_248z = ".forwardLink {\n width: -moz-fit-content;\n width: fit-content;\n max-width: 100%;\n display: flex;\n}\n.forwardLink__link {\n color: unset;\n text-decoration: none;\n text-overflow: ellipsis;\n overflow: hidden;\n cursor: pointer;\n display: block;\n width: 100%;\n}\n.forwardLink__link--disabled {\n cursor: not-allowed;\n}";
|
|
@@ -44,17 +45,25 @@ var ForwardLink = function ForwardLink(_ref) {
|
|
|
44
45
|
pathname = _useMemo$pathname === void 0 ? '' : _useMemo$pathname,
|
|
45
46
|
_useMemo$search = _useMemo.search,
|
|
46
47
|
search = _useMemo$search === void 0 ? '' : _useMemo$search;
|
|
48
|
+
|
|
49
|
+
/* WAVE: Redundant title text — title 與連結內文相同時不輸出,避免輔具重複朗讀 */
|
|
50
|
+
var domTitle = tip || typeof children === 'string' && children === title ? undefined : title;
|
|
51
|
+
/* WCAG 3.2.x 另開新視窗預告:target="_blank" 時以 aria-label 註明 */
|
|
52
|
+
var newWindowLabel = target === '_blank' && (typeof children === 'string' || title) ? "".concat(typeof children === 'string' ? children : title).concat(getIntl().formatMessage({
|
|
53
|
+
id: 'aria.newWindow'
|
|
54
|
+
})) : undefined;
|
|
47
55
|
var linkComponent = /*#__PURE__*/React__default.createElement("div", {
|
|
48
56
|
className: className
|
|
49
57
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
50
58
|
className: "forwardLink"
|
|
51
59
|
}, disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
52
|
-
title:
|
|
60
|
+
title: domTitle,
|
|
53
61
|
className: "forwardLink__link--disabled"
|
|
54
62
|
}, children) : /*#__PURE__*/React__default.createElement(Link, {
|
|
55
63
|
className: "forwardLink__link",
|
|
56
64
|
target: target,
|
|
57
|
-
title:
|
|
65
|
+
title: domTitle,
|
|
66
|
+
"aria-label": newWindowLabel,
|
|
58
67
|
to: {
|
|
59
68
|
pathname: "".concat(locale).concat(pathname),
|
|
60
69
|
search: search
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { F as default } from './ForwardLink-
|
|
1
|
+
export { F as default } from './ForwardLink-aa950a50.js';
|
|
2
2
|
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-b47819f3.js';
|
|
6
6
|
import 'react-router-dom';
|
|
7
7
|
import '@material-ui/core';
|
|
8
|
+
import './globalConfig';
|
|
8
9
|
import './style-inject.es-1f59c1d0.js';
|
package/lib/components/Header.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
4
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
5
5
|
import { d as debounce_1 } from './debounce-127da66c.js';
|
|
6
6
|
import { useHistory, useRouteMatch, NavLink } from 'react-router-dom';
|
|
7
7
|
import { Typography, IconButton } from '@material-ui/core';
|
|
8
8
|
import { SearchOutlined } from '@material-ui/icons';
|
|
9
|
-
import { K as KeywordSearch } from './KeywordSearch-
|
|
10
|
-
import { S as Select } from './Select-
|
|
11
|
-
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-
|
|
9
|
+
import { K as KeywordSearch } from './KeywordSearch-33341dd3.js';
|
|
10
|
+
import { S as Select } from './Select-e550d0a5.js';
|
|
11
|
+
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-b9855a54.js';
|
|
12
|
+
import { getIntl } from './globalConfig';
|
|
12
13
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
13
14
|
import './isObjectLike-e111475d.js';
|
|
14
15
|
import './_commonjsHelpers-70de2c37.js';
|
|
15
16
|
import 'axios';
|
|
16
|
-
import './Autocomplete-
|
|
17
|
+
import './Autocomplete-5d6f1df8.js';
|
|
17
18
|
import '@material-ui/lab';
|
|
18
|
-
import './createSvgIcon-
|
|
19
|
+
import './createSvgIcon-e3803ee1.js';
|
|
19
20
|
import './defaultTheme-ed7746fe.js';
|
|
20
21
|
import 'react-is';
|
|
21
22
|
import '@material-ui/styles';
|
|
22
23
|
import 'react-dom';
|
|
23
24
|
import './toConsumableArray-dbe8af76.js';
|
|
24
|
-
import './Empty-
|
|
25
|
+
import './Empty-bf77164f.js';
|
|
25
26
|
|
|
26
27
|
var css_248z = "@charset \"UTF-8\";\n.header {\n display: flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.6);\n background-color: rgba(255, 255, 255, 0.6);\n padding: 12px 36px !important;\n position: fixed;\n top: 0;\n z-index: 10;\n width: 100% !important;\n transition: top 0.3s ease-in-out;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);\n}\n.header__logo {\n display: flex;\n width: -moz-fit-content !important;\n width: fit-content !important;\n margin-right: 30px !important;\n cursor: pointer;\n}\n.header__logo__img {\n display: flex;\n align-items: center;\n}\n.header__logo__title {\n white-space: nowrap;\n margin-left: 1rem !important;\n font-size: 1.5rem !important;\n font-weight: 700 !important;\n font-family: \"Noto Sans TC\" !important;\n}\n.header__links {\n display: flex;\n justify-content: flex-end;\n padding-right: 14px;\n}\n.header__links a {\n text-decoration: none;\n}\n.header__links--full {\n flex: 1;\n}\n.header__links__item {\n color: rgba(0, 0, 0, 0.85);\n font-size: 1.125rem !important;\n font-weight: 500 !important;\n white-space: nowrap;\n padding: 6px 14px;\n font-family: \"Noto Sans TC\" !important;\n}\n.header__links__item--active .header__links__item {\n font-weight: 800 !important;\n background: transparent;\n border-radius: 45px;\n}\n.header__links__item:hover {\n font-weight: 800 !important;\n}\n.header__language {\n min-width: 100px !important;\n}\n.header__searchIcon {\n display: none !important;\n}\n@media screen and (max-width: 768px) {\n .header--smallUseSearchIcon .header__searchIcon {\n display: flex !important;\n margin-right: 10px !important;\n }\n .header--smallUseSearchIcon .keywordSearch {\n visibility: hidden;\n flex: 1;\n width: 0;\n }\n}\n.header--hide {\n top: -100px;\n}\n.header--focus .header__links {\n display: none;\n}\n.header .MuiTypography-root {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.header .autocomplete {\n float: right;\n}\n.header .autocomplete .MuiAutocomplete-inputRoot[class*=MuiOutlinedInput-root] {\n padding: 1px 8px !important;\n}\n.header .keywordSearch {\n margin-right: 8px;\n}\n.header .keywordSearch--focus .autocomplete {\n width: 100% !important;\n}\n.header .keywordSearch--animation .autocomplete {\n width: 240px;\n transition: width 0.3s ease-in-out;\n}\n\n/* 避免寬度460以下炸版 */\n@media screen and (max-width: 460px) {\n .header .keywordSearch--animation .autocomplete {\n width: 100%;\n }\n}\n@media screen and (max-width: 768px) {\n .header {\n padding: 12px 15px !important;\n }\n .header__logo {\n margin-right: 16px !important;\n }\n .header__logo__title {\n display: none !important;\n }\n .header__links {\n display: none;\n }\n .header__links__item {\n font-size: 1rem !important;\n }\n .header__language {\n display: none !important;\n }\n .header--focus .header__logo {\n display: none !important;\n }\n\n .autocomplete__icon {\n display: none !important;\n }\n}";
|
|
27
28
|
styleInject(css_248z);
|
|
@@ -78,8 +79,19 @@ var Header = function Header(props) {
|
|
|
78
79
|
}, className)
|
|
79
80
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
80
81
|
className: "header__logo",
|
|
82
|
+
role: "link",
|
|
83
|
+
tabIndex: 0,
|
|
84
|
+
"aria-label": getIntl().formatMessage({
|
|
85
|
+
id: 'aria.header.logoHome'
|
|
86
|
+
}),
|
|
81
87
|
onClick: function onClick() {
|
|
82
88
|
return history.push("/".concat(locale, "/main/home"));
|
|
89
|
+
},
|
|
90
|
+
onKeyDown: function onKeyDown(event) {
|
|
91
|
+
if (event.key === 'Enter') {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
history.push("/".concat(locale, "/main/home"));
|
|
94
|
+
}
|
|
83
95
|
}
|
|
84
96
|
}, logo && /*#__PURE__*/React__default.createElement("div", {
|
|
85
97
|
className: "header__logo__img"
|
|
@@ -121,9 +133,13 @@ var Header = function Header(props) {
|
|
|
121
133
|
}, label);
|
|
122
134
|
})), /*#__PURE__*/React__default.createElement(IconButton, {
|
|
123
135
|
className: "header__searchIcon",
|
|
136
|
+
"aria-label": getIntl().formatMessage({
|
|
137
|
+
id: 'aria.header.searchOpen'
|
|
138
|
+
}),
|
|
124
139
|
onClick: onSearchIconClick
|
|
125
140
|
}, /*#__PURE__*/React__default.createElement(SearchOutlined, {
|
|
126
|
-
fontSize: "large"
|
|
141
|
+
fontSize: "large",
|
|
142
|
+
"aria-hidden": "true"
|
|
127
143
|
})), showDarkModeSwitch , Array.isArray(supportLanguages) && supportLanguages.length > 0 && /*#__PURE__*/React__default.createElement(Select, {
|
|
128
144
|
className: "header__language",
|
|
129
145
|
defaultValue: checkLanguageSupport({
|
package/lib/components/Image.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
|
-
import { c as classNames } from './index-
|
|
3
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
6
|
|
package/lib/components/Input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { c as classNames } from './index-
|
|
3
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
4
4
|
import { OutlinedInput } from '@material-ui/core';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
4
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
5
5
|
import { ExpandMore, ExpandLess, Search } from '@material-ui/icons';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
import { c as commonjsGlobal } from './_commonjsHelpers-70de2c37.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
4
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
|
-
import { A as Autocomplete } from './Autocomplete-
|
|
7
|
+
import { A as Autocomplete } from './Autocomplete-5d6f1df8.js';
|
|
8
8
|
|
|
9
9
|
var css_248z = ".keywordSearch {\n border-radius: 4px;\n width: 100%;\n margin-right: 14px;\n}\n.keywordSearch--animation .autocomplete {\n transition: max-width 0.3s ease-out;\n max-width: 240px;\n}\n.keywordSearch--focus {\n flex: 1;\n}\n.keywordSearch--focus .autocomplete {\n max-width: 100%;\n}\n.keywordSearch .MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon .MuiAutocomplete-inputRoot[class*=MuiOutlinedInput-root] {\n border-radius: 10px;\n background-color: #ffffff66;\n}";
|
|
10
10
|
styleInject(css_248z);
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export { K as default } from './KeywordSearch-
|
|
1
|
+
export { K as default } from './KeywordSearch-33341dd3.js';
|
|
2
2
|
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-b76a85f4.js';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import './style-inject.es-1f59c1d0.js';
|
|
8
|
-
import './Autocomplete-
|
|
8
|
+
import './Autocomplete-5d6f1df8.js';
|
|
9
9
|
import './debounce-127da66c.js';
|
|
10
10
|
import './isObjectLike-e111475d.js';
|
|
11
11
|
import './_commonjsHelpers-70de2c37.js';
|
|
12
12
|
import '@material-ui/lab';
|
|
13
13
|
import '@material-ui/core';
|
|
14
14
|
import '@material-ui/icons';
|
|
15
|
-
import './createSvgIcon-
|
|
15
|
+
import './createSvgIcon-e3803ee1.js';
|
|
16
16
|
import './defaultTheme-ed7746fe.js';
|
|
17
17
|
import 'react-is';
|
|
18
18
|
import '@material-ui/styles';
|
|
19
19
|
import 'react-dom';
|
|
20
20
|
import './toConsumableArray-dbe8af76.js';
|
|
21
|
-
import './
|
|
21
|
+
import './globalConfig';
|
|
22
|
+
import './Empty-bf77164f.js';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
5
|
-
import { F as ForwardLink } from './ForwardLink-
|
|
4
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
5
|
+
import { F as ForwardLink } from './ForwardLink-aa950a50.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
|
-
import './index-
|
|
7
|
+
import './index-b47819f3.js';
|
|
8
8
|
import 'react-router-dom';
|
|
9
9
|
import '@material-ui/core';
|
|
10
|
+
import './globalConfig';
|
|
10
11
|
|
|
11
12
|
var css_248z = ".keywordTicker {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n}\n.keywordTicker__track {\n display: flex;\n width: 100%;\n padding: 20px 0px;\n background-color: #ece8c0;\n overflow: hidden;\n margin-left: -80px;\n padding-left: 100px;\n z-index: 1;\n position: relative;\n}\n.keywordTicker__items {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: nowrap;\n position: relative;\n}\n.keywordTicker-item {\n width: auto;\n display: flex;\n justify-content: center;\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n}\n.keywordTicker-text {\n font-size: 1.5rem;\n z-index: 2;\n font-weight: bold;\n color: #825c0d;\n border-left: 2px solid #fff;\n padding: 0px 40px;\n}\n.keywordTicker__img {\n z-index: 2;\n position: relative;\n display: flex;\n}\n.keywordTicker__img img {\n height: 100%;\n max-height: 195px;\n image-rendering: -webkit-optimize-contrast;\n position: relative;\n}\n.keywordTicker--fake {\n position: absolute;\n opacity: 0;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .keywordTicker-text {\n font-size: 1.5rem;\n padding: 0px 15px;\n }\n .keywordTicker__img img {\n max-height: 104px;\n left: -60px;\n }\n .keywordTicker__track {\n padding: 10px 0px;\n margin-left: -100px;\n }\n}\n@media only screen and (max-width: 484px) {\n .keywordTicker-text {\n font-size: 14px;\n }\n}";
|
|
12
13
|
styleInject(css_248z);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
5
|
-
import { M as Modal } from './Modal-
|
|
4
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
5
|
+
import { M as Modal } from './Modal-5a27951f.js';
|
|
6
6
|
import { Typography } from '@material-ui/core';
|
|
7
|
-
import { r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-
|
|
7
|
+
import { r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-e3803ee1.js';
|
|
8
8
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
9
9
|
import '@material-ui/icons';
|
|
10
|
-
import './Button-
|
|
11
|
-
import './Spin-
|
|
10
|
+
import './Button-305b69a0.js';
|
|
11
|
+
import './Spin-8dc60bfe.js';
|
|
12
|
+
import './globalConfig';
|
|
12
13
|
import './_commonjsHelpers-70de2c37.js';
|
|
13
14
|
import './defaultTheme-ed7746fe.js';
|
|
14
15
|
import 'react-is';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { c as classNames } from './index-
|
|
2
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
3
3
|
import { CircularProgress } from '@material-ui/core';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { c as classNames } from './index-
|
|
2
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Dialog, DialogTitle, IconButton, DialogContent, DialogActions, CircularProgress } from '@material-ui/core';
|
|
5
5
|
import { CloseSharp } from '@material-ui/icons';
|
|
6
|
-
import { B as Button } from './Button-
|
|
7
|
-
import { S as Spin } from './Spin-
|
|
6
|
+
import { B as Button } from './Button-305b69a0.js';
|
|
7
|
+
import { S as Spin } from './Spin-8dc60bfe.js';
|
|
8
|
+
import { getIntl } from './globalConfig';
|
|
8
9
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
9
10
|
|
|
10
11
|
var css_248z = ".modal__title h2 {\n display: flex;\n align-items: center;\n}\n.modal__title__text {\n flex: 1;\n font-size: 16px;\n padding: 8px 0;\n color: white;\n}\n.modal__title__close {\n cursor: pointer;\n color: white;\n}\n.modal--transparent .MuiPaper-root {\n background: transparent !important;\n box-shadow: none;\n}\n.modal--transparent .modal__title {\n background: transparent !important;\n}";
|
|
@@ -36,14 +37,21 @@ var Modal = function Modal(props) {
|
|
|
36
37
|
onClose: function onClose() {
|
|
37
38
|
return closable && onCancel();
|
|
38
39
|
}
|
|
40
|
+
// WCAG 4.1.2 對話框需有可及名稱
|
|
41
|
+
,
|
|
42
|
+
"aria-label": typeof title === 'string' ? title : undefined
|
|
39
43
|
}, /*#__PURE__*/React__default.createElement(DialogTitle, {
|
|
40
44
|
className: "modal__title"
|
|
41
45
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
42
46
|
className: "modal__title__text"
|
|
43
47
|
}, title), closable && /*#__PURE__*/React__default.createElement(IconButton, {
|
|
48
|
+
"aria-label": getIntl().formatMessage({
|
|
49
|
+
id: 'aria.modal.close'
|
|
50
|
+
}),
|
|
44
51
|
onClick: onCancel
|
|
45
52
|
}, /*#__PURE__*/React__default.createElement(CloseSharp, {
|
|
46
|
-
className: "modal__title__close"
|
|
53
|
+
className: "modal__title__close",
|
|
54
|
+
"aria-hidden": "true"
|
|
47
55
|
}))), /*#__PURE__*/React__default.createElement(DialogContent, null, /*#__PURE__*/React__default.createElement(Spin, {
|
|
48
56
|
spinning: loading
|
|
49
57
|
}, children)), footer !== null && /*#__PURE__*/React__default.createElement(DialogActions, null, footer === undefined && (cancelText || okText) ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, cancelText && /*#__PURE__*/React__default.createElement(Button, {
|
package/lib/components/Modal.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export { M as default } from './Modal-
|
|
1
|
+
export { M as default } from './Modal-5a27951f.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-b76a85f4.js';
|
|
4
4
|
import 'prop-types';
|
|
5
5
|
import '@material-ui/core';
|
|
6
6
|
import '@material-ui/icons';
|
|
7
|
-
import './Button-
|
|
7
|
+
import './Button-305b69a0.js';
|
|
8
8
|
import './style-inject.es-1f59c1d0.js';
|
|
9
|
-
import './Spin-
|
|
9
|
+
import './Spin-8dc60bfe.js';
|
|
10
|
+
import './globalConfig';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { c as classNames } from './index-
|
|
3
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
4
4
|
import { ExpandLess, ExpandMore } from '@material-ui/icons';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { M as default } from './MoreButton-
|
|
1
|
+
export { M as default } from './MoreButton-44d3b4fe.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'prop-types';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-b76a85f4.js';
|
|
5
5
|
import '@material-ui/icons';
|
|
6
6
|
import './style-inject.es-1f59c1d0.js';
|
|
@@ -3,14 +3,14 @@ import * as React$2 from 'react';
|
|
|
3
3
|
import React__default, { Children, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { d as defaultTheme, k as _objectWithoutProperties, o as _slicedToArray, _ as _extends, q as _objectWithoutPropertiesLoose, r as alpha, j as formatMuiErrorMessage } from './defaultTheme-ed7746fe.js';
|
|
6
|
-
import { u as useControlled, c as clsx, b as useEventCallback, w as withStyles, d as useIsFocusVisible, e as useForkRef, f as createSvgIcon, g as capitalize, h as debounce, r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-
|
|
6
|
+
import { u as useControlled, c as clsx, b as useEventCallback, w as withStyles, d as useIsFocusVisible, e as useForkRef, f as createSvgIcon, g as capitalize, h as debounce, r as requireCreateSvgIcon, i as interopRequireDefault, a as interopRequireWildcard } from './createSvgIcon-e3803ee1.js';
|
|
7
7
|
import 'react-is';
|
|
8
8
|
import { useTheme as useTheme$1 } from '@material-ui/styles';
|
|
9
9
|
import './withTheme-2d778133.js';
|
|
10
10
|
import { _ as _toConsumableArray } from './toConsumableArray-dbe8af76.js';
|
|
11
11
|
import * as ReactDOM from 'react-dom';
|
|
12
12
|
import ReactDOM__default from 'react-dom';
|
|
13
|
-
import { c as classNames } from './index-
|
|
13
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
14
14
|
import { IconButton } from '@material-ui/core';
|
|
15
15
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
16
16
|
import './_commonjsHelpers-70de2c37.js';
|
package/lib/components/SNA.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React__default, { useMemo, useEffect } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { c as classNames } from './index-
|
|
3
|
+
import { c as classNames } from './index-b76a85f4.js';
|
|
4
4
|
import { e as event, d as d3Select, a as dispatch, c as customEvent, D as DragEvent, q as quadtree, m as map, t as timer, T as Transform, i as identity, b as interrupt, o as ordinal, f as category10 } from './transform-3a04288b.js';
|
|
5
|
-
import { E as ExtraTools } from './ExtraTools-
|
|
5
|
+
import { E as ExtraTools } from './ExtraTools-5954ee3a.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
8
8
|
import './_commonjsHelpers-70de2c37.js';
|
|
9
9
|
import '@material-ui/core';
|
|
10
|
-
import './Tooltip-
|
|
10
|
+
import './Tooltip-6ebfa9c1.js';
|
|
11
11
|
import './dataExport-d55d6fa3.js';
|
|
12
12
|
|
|
13
13
|
function sourceEvent() {
|