@daoyi/nmtl-ui 2.0.1-beta.13 → 2.0.1-beta.131
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-3b418e5f.js +494 -0
- package/lib/components/Autocomplete.js +20 -1
- package/lib/components/Avatar.js +59 -1
- package/lib/components/BackTop.js +124 -1
- package/lib/components/BarChart.js +764 -1
- package/lib/components/Breadcrumbs.js +122 -1
- package/lib/components/Button-7bd5aa09.js +114 -0
- package/lib/components/Button.js +7 -1
- package/lib/components/Carousel.js +4654 -1
- package/lib/components/Checkbox.js +37 -1
- package/lib/components/CollapseContent.js +180 -1
- package/lib/components/ContactModal-eaed02b8.js +12282 -0
- package/lib/components/ContactModal.js +24 -3
- package/lib/components/Drawer-629e59c7.js +176 -0
- package/lib/components/Drawer.js +17 -1
- package/lib/components/Dropdown.js +134 -1
- package/lib/components/Empty-c6a44967.js +46 -0
- package/lib/components/Empty.js +5 -1
- package/lib/components/ExportButton.js +128 -1
- package/lib/components/ExtraTools-2691c13e.js +3676 -0
- package/lib/components/ExtraTools.js +11 -22
- package/lib/components/Filter.js +821 -12
- package/lib/components/Footer.js +317 -1
- package/lib/components/ForwardLink-5fbd2705.js +184 -0
- package/lib/components/ForwardLink.js +10 -0
- package/lib/components/Header.js +233 -1
- package/lib/components/Image.js +61 -1
- package/lib/components/Input.js +89 -1
- package/lib/components/InputMethod.js +33949 -12
- package/lib/components/KeywordSearch-fec33a2c.js +156 -0
- package/lib/components/KeywordSearch.js +22 -1
- package/lib/components/KeywordTicker.js +224 -1
- package/lib/components/Keywords.js +383 -1
- package/lib/components/Loading.js +32 -1
- package/lib/components/MUITheme.js +2657 -1
- package/lib/components/Modal-e04532fa.js +127 -0
- package/lib/components/Modal.js +11 -1
- package/lib/components/MoreButton-19055e07.js +148 -0
- package/lib/components/MoreButton.js +8 -1
- package/lib/components/Pagination.js +3702 -0
- package/lib/components/Radio.js +83 -1
- package/lib/components/SNA.js +1755 -22
- package/lib/components/Select-cb3e1ba1.js +189 -0
- package/lib/components/Select.js +14 -1
- package/lib/components/Spin-8f87eadc.js +79 -0
- package/lib/components/Spin.js +7 -1
- package/lib/components/Table.js +51 -1
- package/lib/components/Tooltip-6ebfa9c1.js +70 -0
- package/lib/components/Tooltip.js +7 -1
- package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
- package/lib/components/_rollupPluginBabelHelpers-a52356f6.js +142 -0
- package/lib/components/createSvgIcon-e3803ee1.js +576 -0
- package/lib/components/dataExport-a9e3fae1.js +91 -0
- package/lib/components/debounce-127da66c.js +355 -0
- package/lib/components/defaultTheme-ed7746fe.js +1661 -0
- package/lib/components/globalConfig.js +429 -0
- package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
- package/lib/components/index-b47819f3.js +481 -0
- package/lib/components/index-b76a85f4.js +61 -0
- package/lib/components/isObjectLike-e111475d.js +190 -0
- package/lib/components/style-inject.es-1f59c1d0.js +28 -1
- package/lib/components/toConsumableArray-dbe8af76.js +19 -0
- package/lib/components/transform-849a452c.js +5475 -0
- package/lib/components/useTheme-d16d02d9.js +11 -0
- package/lib/components/withTheme-2d778133.js +6 -0
- package/lib/configs/config.selector.js +151 -0
- package/lib/configs/index.d.ts +1 -0
- package/lib/configs/index.js +1 -0
- package/lib/index.d.ts +5 -1
- package/lib/index.js +5 -1
- package/lib/utils/_rollupPluginBabelHelpers-9802e640.js +121 -0
- package/lib/utils/arrayMerge.js +4953 -1
- package/lib/utils/chunkArray.js +15 -1
- package/lib/utils/convert2HtmlEntities.js +42 -1
- package/lib/utils/domToImage.js +802 -1
- package/lib/utils/downloadGephi.js +106 -1
- package/lib/utils/exportXlsx.js +221 -1
- package/lib/utils/historyAppendSearch.js +502 -1
- package/lib/utils/isDevelopMode.js +5 -1
- package/lib/utils/parseYMD.js +36 -1
- package/lib/utils/removeDuplicateItem.js +11 -1
- package/lib/utils/sendEmail.js +39 -1
- package/lib/utils/snaDefine-6a2bcd94.js +5 -0
- package/lib/utils/snaDefine.js +1 -1
- package/lib/utils/snaPreProcess.js +84 -1
- package/package.json +134 -128
- package/lib/components/Empty-54b79907.js +0 -1
- package/lib/components/KeywordSearch-5a393f12.js +0 -1
- package/lib/components/Select-f2441b83.js +0 -1
- package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
- package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
- package/lib/components/createSvgIcon-62b64929.js +0 -1
- package/lib/components/createSvgIcon-e24792d4.js +0 -1
- package/lib/components/createTheme-7fffa109.js +0 -1
- package/lib/components/dataExport-9fccd4f0.js +0 -1
- package/lib/components/debounce-c993109b.js +0 -1
- package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
- package/lib/components/index-11391ca3.js +0 -7
- package/lib/components/index-b2745105.js +0 -7
- package/lib/components/isObjectLike-2f1983fe.js +0 -1
- package/lib/components/style-inject.es-c875d022.js +0 -1
- package/lib/components/transform-95ae0119.js +0 -1
- package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
- package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
package/lib/components/Radio.js
CHANGED
|
@@ -1 +1,83 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { RadioGroup, FormControlLabel, Radio as Radio$1 } from '@material-ui/core';
|
|
5
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
|
+
|
|
7
|
+
var css_248z = "";
|
|
8
|
+
styleInject(css_248z);
|
|
9
|
+
|
|
10
|
+
var Radio = function Radio(props) {
|
|
11
|
+
var className = props.className,
|
|
12
|
+
name = props.name,
|
|
13
|
+
defaultValue = props.defaultValue,
|
|
14
|
+
value = props.value,
|
|
15
|
+
size = props.size,
|
|
16
|
+
style = props.style,
|
|
17
|
+
direction = props.direction; // Attributes
|
|
18
|
+
var options = props.options; // DataList
|
|
19
|
+
var _onChange = props.onChange; // Call Back functions
|
|
20
|
+
|
|
21
|
+
return /*#__PURE__*/React__default.createElement(RadioGroup, {
|
|
22
|
+
className: "radioGroup",
|
|
23
|
+
style: _objectSpread2({
|
|
24
|
+
flexDirection: direction
|
|
25
|
+
}, style),
|
|
26
|
+
name: name,
|
|
27
|
+
defaultValue: defaultValue || undefined,
|
|
28
|
+
value: value || undefined,
|
|
29
|
+
onChange: function onChange(event) {
|
|
30
|
+
if (_onChange) _onChange(event.target.value);
|
|
31
|
+
}
|
|
32
|
+
}, Array.isArray(options) && options.map(function (option) {
|
|
33
|
+
return /*#__PURE__*/React__default.createElement(FormControlLabel, {
|
|
34
|
+
value: option.value,
|
|
35
|
+
key: option.value
|
|
36
|
+
/* WCAG 4.1.2(Freego HM1130104C):FormControlLabel 產生的是「包裹式」隱式 label,
|
|
37
|
+
檢測工具只認 input 自身的 for/title/aria-*,故把選項文字同步標在 input 上 */,
|
|
38
|
+
control: /*#__PURE__*/React__default.createElement(Radio$1, {
|
|
39
|
+
disabled: option.disabled || false,
|
|
40
|
+
size: size,
|
|
41
|
+
className: className,
|
|
42
|
+
inputProps: {
|
|
43
|
+
'aria-label': typeof option.label === 'string' ? option.label : String(option.value)
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
46
|
+
label: option.label
|
|
47
|
+
});
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
Radio.defaultProps = {
|
|
51
|
+
className: undefined,
|
|
52
|
+
name: undefined,
|
|
53
|
+
defaultValue: undefined,
|
|
54
|
+
value: undefined,
|
|
55
|
+
size: 'small',
|
|
56
|
+
style: undefined,
|
|
57
|
+
direction: 'row',
|
|
58
|
+
options: undefined,
|
|
59
|
+
onChange: function onChange() {}
|
|
60
|
+
};
|
|
61
|
+
Radio.propTypes = {
|
|
62
|
+
/** Css Name */
|
|
63
|
+
className: PropTypes.string,
|
|
64
|
+
/** 搭配FormControl 使用的名稱 */
|
|
65
|
+
name: PropTypes.string,
|
|
66
|
+
/** 預設內容 */
|
|
67
|
+
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
68
|
+
/** 如果你就是好想要Value */
|
|
69
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
70
|
+
/** Radio的大小 */
|
|
71
|
+
// size: PropTypes.string,
|
|
72
|
+
size: PropTypes.oneOf(['small', 'medium']),
|
|
73
|
+
/** 樣式 */
|
|
74
|
+
style: PropTypes.objectOf(PropTypes.any),
|
|
75
|
+
/** Radio的方向 */
|
|
76
|
+
direction: PropTypes.oneOf(['row', 'column']),
|
|
77
|
+
/** Radio的清單 */
|
|
78
|
+
options: PropTypes.arrayOf(PropTypes.any),
|
|
79
|
+
/** 選擇時的callback */
|
|
80
|
+
onChange: PropTypes.func
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export { Radio as default };
|