@aloudata/aloudata-design 0.1.0-beta.2
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/README.md +82 -0
- package/es/Button/demo/Icon/index.d.ts +3 -0
- package/es/Button/demo/Icon/index.js +67 -0
- package/es/Button/demo/Icon/index.less +6 -0
- package/es/Button/demo/basic/index.d.ts +4 -0
- package/es/Button/demo/basic/index.js +57 -0
- package/es/Button/demo/basic/index.less +7 -0
- package/es/Button/demo/disable/index.d.ts +3 -0
- package/es/Button/demo/disable/index.js +23 -0
- package/es/Button/demo/disable/index.less +0 -0
- package/es/Button/demo/href/index.d.ts +2 -0
- package/es/Button/demo/href/index.js +17 -0
- package/es/Button/demo/loading/index.d.ts +3 -0
- package/es/Button/demo/loading/index.js +37 -0
- package/es/Button/demo/loading/index.less +6 -0
- package/es/Button/index.d.ts +50 -0
- package/es/Button/index.js +108 -0
- package/es/Button/style/index.d.ts +2 -0
- package/es/Button/style/index.js +2 -0
- package/es/Button/style/index.less +255 -0
- package/es/Dropdown/Button.d.ts +69 -0
- package/es/Dropdown/Button.js +39 -0
- package/es/Dropdown/demo/basic/index.d.ts +4 -0
- package/es/Dropdown/demo/basic/index.js +18 -0
- package/es/Dropdown/demo/button/index.d.ts +3 -0
- package/es/Dropdown/demo/button/index.js +159 -0
- package/es/Dropdown/demo/button/index.less +9 -0
- package/es/Dropdown/demo/placement/index.d.ts +2 -0
- package/es/Dropdown/demo/placement/index.js +40 -0
- package/es/Dropdown/demo/subMenu/index.d.ts +2 -0
- package/es/Dropdown/demo/subMenu/index.js +42 -0
- package/es/Dropdown/demo/trigger/index.d.ts +2 -0
- package/es/Dropdown/demo/trigger/index.js +17 -0
- package/es/Dropdown/index.d.ts +59 -0
- package/es/Dropdown/index.js +33 -0
- package/es/Dropdown/style/index.d.ts +2 -0
- package/es/Dropdown/style/index.js +2 -0
- package/es/Dropdown/style/index.less +40 -0
- package/es/Icon/iconfont/demo.css +539 -0
- package/es/Icon/iconfont/demo_index.html +628 -0
- package/es/Icon/iconfont/iconfont.css +93 -0
- package/es/Icon/iconfont/iconfont.js +46 -0
- package/es/Icon/iconfont/iconfont.json +142 -0
- package/es/Icon/iconfont/iconfont.ttf +0 -0
- package/es/Icon/iconfont/iconfont.woff +0 -0
- package/es/Icon/iconfont/iconfont.woff2 +0 -0
- package/es/Icon/index.d.ts +11 -0
- package/es/Icon/index.js +42 -0
- package/es/Icon/index.less +32 -0
- package/es/Input/components/Group/index.d.ts +15 -0
- package/es/Input/components/Group/index.js +12 -0
- package/es/Input/components/Password/index.d.ts +10 -0
- package/es/Input/components/Password/index.js +20 -0
- package/es/Input/components/TextArea/index.d.ts +52 -0
- package/es/Input/components/TextArea/index.js +14 -0
- package/es/Input/demo/allowClear/index.d.ts +3 -0
- package/es/Input/demo/allowClear/index.js +11 -0
- package/es/Input/demo/allowClear/index.less +0 -0
- package/es/Input/demo/basic/index.d.ts +4 -0
- package/es/Input/demo/basic/index.js +65 -0
- package/es/Input/demo/basic/index.less +6 -0
- package/es/Input/demo/gourp/index.d.ts +2 -0
- package/es/Input/demo/gourp/index.js +67 -0
- package/es/Input/demo/password/index.d.ts +3 -0
- package/es/Input/demo/password/index.js +21 -0
- package/es/Input/demo/password/index.less +0 -0
- package/es/Input/demo/prefix/index.d.ts +3 -0
- package/es/Input/demo/prefix/index.js +17 -0
- package/es/Input/demo/prefix/index.less +0 -0
- package/es/Input/demo/showCount/index.d.ts +3 -0
- package/es/Input/demo/showCount/index.js +17 -0
- package/es/Input/demo/showCount/index.less +0 -0
- package/es/Input/demo/textArea/autoSize.d.ts +2 -0
- package/es/Input/demo/textArea/autoSize.js +50 -0
- package/es/Input/index.d.ts +65 -0
- package/es/Input/index.js +46 -0
- package/es/Input/style/index.d.ts +2 -0
- package/es/Input/style/index.js +2 -0
- package/es/Input/style/index.less +62 -0
- package/es/Menu/Divider.d.ts +5 -0
- package/es/Menu/Divider.js +15 -0
- package/es/Menu/MenuItem.d.ts +17 -0
- package/es/Menu/MenuItem.js +15 -0
- package/es/Menu/SubMenu.d.ts +26 -0
- package/es/Menu/SubMenu.js +29 -0
- package/es/Menu/index.d.ts +20 -0
- package/es/Menu/index.js +31 -0
- package/es/Menu/style/index.d.ts +2 -0
- package/es/Menu/style/index.js +2 -0
- package/es/Menu/style/index.less +33 -0
- package/es/Select/BaseSelect.d.ts +5 -0
- package/es/Select/BaseSelect.js +400 -0
- package/es/Select/OptionsList/OptGroup.d.ts +7 -0
- package/es/Select/OptionsList/OptGroup.js +6 -0
- package/es/Select/OptionsList/OptionItem.d.ts +35 -0
- package/es/Select/OptionsList/OptionItem.js +157 -0
- package/es/Select/OptionsList/Options.d.ts +7 -0
- package/es/Select/OptionsList/Options.js +6 -0
- package/es/Select/OptionsList/index.d.ts +4 -0
- package/es/Select/OptionsList/index.js +187 -0
- package/es/Select/Selector/index.d.ts +4 -0
- package/es/Select/Selector/index.js +249 -0
- package/es/Select/VirtualList.d.ts +5 -0
- package/es/Select/VirtualList.js +29 -0
- package/es/Select/demo/disabled/index.d.ts +2 -0
- package/es/Select/demo/disabled/index.js +50 -0
- package/es/Select/demo/multiple/index.d.ts +2 -0
- package/es/Select/demo/multiple/index.js +140 -0
- package/es/Select/demo/options/index.d.ts +2 -0
- package/es/Select/demo/options/index.js +55 -0
- package/es/Select/demo/single/index.d.ts +2 -0
- package/es/Select/demo/single/index.js +86 -0
- package/es/Select/hooks/useCacheOption.d.ts +9 -0
- package/es/Select/hooks/useCacheOption.js +107 -0
- package/es/Select/index.d.ts +12 -0
- package/es/Select/index.js +9 -0
- package/es/Select/interface.d.ts +221 -0
- package/es/Select/interface.js +1 -0
- package/es/Select/style/index.d.ts +2 -0
- package/es/Select/style/index.js +2 -0
- package/es/Select/style/index.less +539 -0
- package/es/Select/utils.d.ts +21 -0
- package/es/Select/utils.js +193 -0
- package/es/Tabs/TabPane.d.ts +21 -0
- package/es/Tabs/TabPane.js +12 -0
- package/es/Tabs/demo/adaptHeight/index.d.ts +3 -0
- package/es/Tabs/demo/adaptHeight/index.js +19 -0
- package/es/Tabs/demo/adaptHeight/index.less +3 -0
- package/es/Tabs/demo/basic/index.d.ts +4 -0
- package/es/Tabs/demo/basic/index.js +44 -0
- package/es/Tabs/demo/basic/index.less +5 -0
- package/es/Tabs/demo/horizontalScroll/index.d.ts +3 -0
- package/es/Tabs/demo/horizontalScroll/index.js +30 -0
- package/es/Tabs/demo/horizontalScroll/index.less +3 -0
- package/es/Tabs/index.d.ts +41 -0
- package/es/Tabs/index.js +42 -0
- package/es/Tabs/style/index.d.ts +2 -0
- package/es/Tabs/style/index.js +2 -0
- package/es/Tabs/style/index.less +61 -0
- package/es/Tooltip/demo/basic/index.d.ts +2 -0
- package/es/Tooltip/demo/basic/index.js +7 -0
- package/es/Tooltip/demo/overflow/index.d.ts +2 -0
- package/es/Tooltip/demo/overflow/index.js +7 -0
- package/es/Tooltip/demo/placement/index.d.ts +6 -0
- package/es/Tooltip/demo/placement/index.js +70 -0
- package/es/Tooltip/demo/placement/index.less +7 -0
- package/es/Tooltip/demo/trigger/index.d.ts +3 -0
- package/es/Tooltip/demo/trigger/index.js +20 -0
- package/es/Tooltip/demo/trigger/index.less +5 -0
- package/es/Tooltip/index.d.ts +63 -0
- package/es/Tooltip/index.js +31 -0
- package/es/Tooltip/style/index.d.ts +2 -0
- package/es/Tooltip/style/index.js +2 -0
- package/es/Tooltip/style/index.less +14 -0
- package/es/_utils/hooks/useControlledState.d.ts +2 -0
- package/es/_utils/hooks/useControlledState.js +54 -0
- package/es/_utils/hooks/usePrefixCls.d.ts +2 -0
- package/es/_utils/hooks/usePrefixCls.js +14 -0
- package/es/index.d.ts +8 -0
- package/es/index.js +8 -0
- package/es/style/index.d.ts +2 -0
- package/es/style/index.js +2 -0
- package/es/style/index.less +3 -0
- package/es/style/mixins/index.less +0 -0
- package/es/style/themes/default/index.less +36 -0
- package/es/style/themes/default/themeColor.less +259 -0
- package/lib/Button/demo/Icon/index.d.ts +3 -0
- package/lib/Button/demo/Icon/index.js +82 -0
- package/lib/Button/demo/Icon/index.less +6 -0
- package/lib/Button/demo/basic/index.d.ts +4 -0
- package/lib/Button/demo/basic/index.js +73 -0
- package/lib/Button/demo/basic/index.less +7 -0
- package/lib/Button/demo/disable/index.d.ts +3 -0
- package/lib/Button/demo/disable/index.js +37 -0
- package/lib/Button/demo/disable/index.less +0 -0
- package/lib/Button/demo/href/index.d.ts +2 -0
- package/lib/Button/demo/href/index.js +30 -0
- package/lib/Button/demo/loading/index.d.ts +3 -0
- package/lib/Button/demo/loading/index.js +51 -0
- package/lib/Button/demo/loading/index.less +6 -0
- package/lib/Button/index.d.ts +50 -0
- package/lib/Button/index.js +124 -0
- package/lib/Button/style/index.d.ts +2 -0
- package/lib/Button/style/index.js +5 -0
- package/lib/Button/style/index.less +255 -0
- package/lib/Dropdown/Button.d.ts +69 -0
- package/lib/Dropdown/Button.js +52 -0
- package/lib/Dropdown/demo/basic/index.d.ts +4 -0
- package/lib/Dropdown/demo/basic/index.js +35 -0
- package/lib/Dropdown/demo/button/index.d.ts +3 -0
- package/lib/Dropdown/demo/button/index.js +182 -0
- package/lib/Dropdown/demo/button/index.less +9 -0
- package/lib/Dropdown/demo/placement/index.d.ts +2 -0
- package/lib/Dropdown/demo/placement/index.js +56 -0
- package/lib/Dropdown/demo/subMenu/index.d.ts +2 -0
- package/lib/Dropdown/demo/subMenu/index.js +59 -0
- package/lib/Dropdown/demo/trigger/index.d.ts +2 -0
- package/lib/Dropdown/demo/trigger/index.js +32 -0
- package/lib/Dropdown/index.d.ts +59 -0
- package/lib/Dropdown/index.js +47 -0
- package/lib/Dropdown/style/index.d.ts +2 -0
- package/lib/Dropdown/style/index.js +5 -0
- package/lib/Dropdown/style/index.less +40 -0
- package/lib/Icon/iconfont/demo.css +539 -0
- package/lib/Icon/iconfont/demo_index.html +628 -0
- package/lib/Icon/iconfont/iconfont.css +93 -0
- package/lib/Icon/iconfont/iconfont.js +48 -0
- package/lib/Icon/iconfont/iconfont.json +142 -0
- package/lib/Icon/iconfont/iconfont.ttf +0 -0
- package/lib/Icon/iconfont/iconfont.woff +0 -0
- package/lib/Icon/iconfont/iconfont.woff2 +0 -0
- package/lib/Icon/index.d.ts +11 -0
- package/lib/Icon/index.js +54 -0
- package/lib/Icon/index.less +32 -0
- package/lib/Input/components/Group/index.d.ts +15 -0
- package/lib/Input/components/Group/index.js +24 -0
- package/lib/Input/components/Password/index.d.ts +10 -0
- package/lib/Input/components/Password/index.js +33 -0
- package/lib/Input/components/TextArea/index.d.ts +52 -0
- package/lib/Input/components/TextArea/index.js +26 -0
- package/lib/Input/demo/allowClear/index.d.ts +3 -0
- package/lib/Input/demo/allowClear/index.js +25 -0
- package/lib/Input/demo/allowClear/index.less +0 -0
- package/lib/Input/demo/basic/index.d.ts +4 -0
- package/lib/Input/demo/basic/index.js +80 -0
- package/lib/Input/demo/basic/index.less +6 -0
- package/lib/Input/demo/gourp/index.d.ts +2 -0
- package/lib/Input/demo/gourp/index.js +81 -0
- package/lib/Input/demo/password/index.d.ts +3 -0
- package/lib/Input/demo/password/index.js +35 -0
- package/lib/Input/demo/password/index.less +0 -0
- package/lib/Input/demo/prefix/index.d.ts +3 -0
- package/lib/Input/demo/prefix/index.js +32 -0
- package/lib/Input/demo/prefix/index.less +0 -0
- package/lib/Input/demo/showCount/index.d.ts +3 -0
- package/lib/Input/demo/showCount/index.js +31 -0
- package/lib/Input/demo/showCount/index.less +0 -0
- package/lib/Input/demo/textArea/autoSize.d.ts +2 -0
- package/lib/Input/demo/textArea/autoSize.js +63 -0
- package/lib/Input/index.d.ts +65 -0
- package/lib/Input/index.js +63 -0
- package/lib/Input/style/index.d.ts +2 -0
- package/lib/Input/style/index.js +5 -0
- package/lib/Input/style/index.less +62 -0
- package/lib/Menu/Divider.d.ts +5 -0
- package/lib/Menu/Divider.js +28 -0
- package/lib/Menu/MenuItem.d.ts +17 -0
- package/lib/Menu/MenuItem.js +28 -0
- package/lib/Menu/SubMenu.d.ts +26 -0
- package/lib/Menu/SubMenu.js +44 -0
- package/lib/Menu/index.d.ts +20 -0
- package/lib/Menu/index.js +49 -0
- package/lib/Menu/style/index.d.ts +2 -0
- package/lib/Menu/style/index.js +5 -0
- package/lib/Menu/style/index.less +33 -0
- package/lib/Select/BaseSelect.d.ts +5 -0
- package/lib/Select/BaseSelect.js +433 -0
- package/lib/Select/OptionsList/OptGroup.d.ts +7 -0
- package/lib/Select/OptionsList/OptGroup.js +14 -0
- package/lib/Select/OptionsList/OptionItem.d.ts +35 -0
- package/lib/Select/OptionsList/OptionItem.js +185 -0
- package/lib/Select/OptionsList/Options.d.ts +7 -0
- package/lib/Select/OptionsList/Options.js +14 -0
- package/lib/Select/OptionsList/index.d.ts +4 -0
- package/lib/Select/OptionsList/index.js +207 -0
- package/lib/Select/Selector/index.d.ts +4 -0
- package/lib/Select/Selector/index.js +273 -0
- package/lib/Select/VirtualList.d.ts +5 -0
- package/lib/Select/VirtualList.js +42 -0
- package/lib/Select/demo/disabled/index.d.ts +2 -0
- package/lib/Select/demo/disabled/index.js +64 -0
- package/lib/Select/demo/multiple/index.d.ts +2 -0
- package/lib/Select/demo/multiple/index.js +154 -0
- package/lib/Select/demo/options/index.d.ts +2 -0
- package/lib/Select/demo/options/index.js +69 -0
- package/lib/Select/demo/single/index.d.ts +2 -0
- package/lib/Select/demo/single/index.js +99 -0
- package/lib/Select/hooks/useCacheOption.d.ts +9 -0
- package/lib/Select/hooks/useCacheOption.js +113 -0
- package/lib/Select/index.d.ts +12 -0
- package/lib/Select/index.js +34 -0
- package/lib/Select/interface.d.ts +221 -0
- package/lib/Select/interface.js +5 -0
- package/lib/Select/style/index.d.ts +2 -0
- package/lib/Select/style/index.js +5 -0
- package/lib/Select/style/index.less +539 -0
- package/lib/Select/utils.d.ts +21 -0
- package/lib/Select/utils.js +233 -0
- package/lib/Tabs/TabPane.d.ts +21 -0
- package/lib/Tabs/TabPane.js +24 -0
- package/lib/Tabs/demo/adaptHeight/index.d.ts +3 -0
- package/lib/Tabs/demo/adaptHeight/index.js +34 -0
- package/lib/Tabs/demo/adaptHeight/index.less +3 -0
- package/lib/Tabs/demo/basic/index.d.ts +4 -0
- package/lib/Tabs/demo/basic/index.js +67 -0
- package/lib/Tabs/demo/basic/index.less +5 -0
- package/lib/Tabs/demo/horizontalScroll/index.d.ts +3 -0
- package/lib/Tabs/demo/horizontalScroll/index.js +45 -0
- package/lib/Tabs/demo/horizontalScroll/index.less +3 -0
- package/lib/Tabs/index.d.ts +41 -0
- package/lib/Tabs/index.js +58 -0
- package/lib/Tabs/style/index.d.ts +2 -0
- package/lib/Tabs/style/index.js +5 -0
- package/lib/Tabs/style/index.less +61 -0
- package/lib/Tooltip/demo/basic/index.d.ts +2 -0
- package/lib/Tooltip/demo/basic/index.js +20 -0
- package/lib/Tooltip/demo/overflow/index.d.ts +2 -0
- package/lib/Tooltip/demo/overflow/index.js +20 -0
- package/lib/Tooltip/demo/placement/index.d.ts +6 -0
- package/lib/Tooltip/demo/placement/index.js +86 -0
- package/lib/Tooltip/demo/placement/index.less +7 -0
- package/lib/Tooltip/demo/trigger/index.d.ts +3 -0
- package/lib/Tooltip/demo/trigger/index.js +34 -0
- package/lib/Tooltip/demo/trigger/index.less +5 -0
- package/lib/Tooltip/index.d.ts +63 -0
- package/lib/Tooltip/index.js +44 -0
- package/lib/Tooltip/style/index.d.ts +2 -0
- package/lib/Tooltip/style/index.js +5 -0
- package/lib/Tooltip/style/index.less +14 -0
- package/lib/_utils/hooks/useControlledState.d.ts +2 -0
- package/lib/_utils/hooks/useControlledState.js +63 -0
- package/lib/_utils/hooks/usePrefixCls.d.ts +2 -0
- package/lib/_utils/hooks/usePrefixCls.js +27 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +63 -0
- package/lib/style/index.d.ts +2 -0
- package/lib/style/index.js +5 -0
- package/lib/style/index.less +3 -0
- package/lib/style/mixins/index.less +0 -0
- package/lib/style/themes/default/index.less +36 -0
- package/lib/style/themes/default/themeColor.less +259 -0
- package/package.json +87 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
require("antd/es/tooltip/style");
|
|
11
|
+
|
|
12
|
+
var _tooltip = _interopRequireDefault(require("antd/es/tooltip"));
|
|
13
|
+
|
|
14
|
+
var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
15
|
+
|
|
16
|
+
var _classnames3 = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
18
|
+
var _lodash = require("lodash");
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
+
|
|
22
|
+
var _rcOverflow = _interopRequireDefault(require("rc-overflow"));
|
|
23
|
+
|
|
24
|
+
var _excluded = ["input", "disabled", "prefix", "size", "multiple", "bordered", "isFocused", "className", "visible", "style", "allowClear", "label", "mode", "value", "searchType", "arrowComponent", "closeComponent", "placeholder", "deleteValue", "optionLabelRenderer", "getOptionByValue", "onInputChange", "onAllowClear", "filteredOptions"];
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
+
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
+
|
|
38
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
39
|
+
|
|
40
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
41
|
+
|
|
42
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
43
|
+
|
|
44
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
45
|
+
|
|
46
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
|
+
|
|
48
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
49
|
+
|
|
50
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
51
|
+
|
|
52
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
53
|
+
|
|
54
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
55
|
+
|
|
56
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57
|
+
|
|
58
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
59
|
+
|
|
60
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
61
|
+
|
|
62
|
+
var ZERO = 0;
|
|
63
|
+
var ICON_LARGE_SIZE = 20;
|
|
64
|
+
var ICON_SMALL_SIZE = 16;
|
|
65
|
+
|
|
66
|
+
var defaultArrowComponent = function defaultArrowComponent(prefix, size) {
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
68
|
+
className: "".concat(prefix, "-icon-arrow"),
|
|
69
|
+
size: size === 'large' ? ICON_LARGE_SIZE : ICON_SMALL_SIZE,
|
|
70
|
+
type: "expand_more1"
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var defaultCloseComponent = function defaultCloseComponent(prefix, size) {
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
76
|
+
className: "".concat(prefix, "-icon-close"),
|
|
77
|
+
size: size === 'large' ? ICON_LARGE_SIZE : ICON_SMALL_SIZE,
|
|
78
|
+
type: "cancel"
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var Selector = function Selector(props, ref) {
|
|
83
|
+
var _classnames;
|
|
84
|
+
|
|
85
|
+
var input = props.input,
|
|
86
|
+
disabled = props.disabled,
|
|
87
|
+
prefix = props.prefix,
|
|
88
|
+
size = props.size,
|
|
89
|
+
multiple = props.multiple,
|
|
90
|
+
bordered = props.bordered,
|
|
91
|
+
isFocused = props.isFocused,
|
|
92
|
+
className = props.className,
|
|
93
|
+
visible = props.visible,
|
|
94
|
+
style = props.style,
|
|
95
|
+
allowClear = props.allowClear,
|
|
96
|
+
label = props.label,
|
|
97
|
+
mode = props.mode,
|
|
98
|
+
value = props.value,
|
|
99
|
+
searchType = props.searchType,
|
|
100
|
+
arrowComponent = props.arrowComponent,
|
|
101
|
+
closeComponent = props.closeComponent,
|
|
102
|
+
placeholder = props.placeholder,
|
|
103
|
+
deleteValue = props.deleteValue,
|
|
104
|
+
optionLabelRenderer = props.optionLabelRenderer,
|
|
105
|
+
getOptionByValue = props.getOptionByValue,
|
|
106
|
+
onInputChange = props.onInputChange,
|
|
107
|
+
onAllowClear = props.onAllowClear,
|
|
108
|
+
filteredOptions = props.filteredOptions,
|
|
109
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
110
|
+
|
|
111
|
+
var inputRef = (0, _react.useRef)(null);
|
|
112
|
+
var selectorRef = (0, _react.useRef)(null);
|
|
113
|
+
var selectorAllRef = (0, _react.useRef)(null);
|
|
114
|
+
var selectValuesRef = (0, _react.useRef)(null);
|
|
115
|
+
|
|
116
|
+
var _useState = (0, _react.useState)(false),
|
|
117
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
118
|
+
isHovered = _useState2[0],
|
|
119
|
+
setIsHovered = _useState2[1];
|
|
120
|
+
|
|
121
|
+
var isEmptyValue = (0, _react.useMemo)(function () {
|
|
122
|
+
return !(0, _lodash.isEmpty)(value);
|
|
123
|
+
}, [value]);
|
|
124
|
+
var showClose = allowClear && (isEmptyValue || input) && isHovered && !disabled;
|
|
125
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
126
|
+
var _selectorRef$current;
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
clientWidth: selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.clientWidth,
|
|
130
|
+
focus: function focus() {
|
|
131
|
+
var _inputRef$current;
|
|
132
|
+
|
|
133
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
134
|
+
},
|
|
135
|
+
blur: function blur() {
|
|
136
|
+
var _inputRef$current2;
|
|
137
|
+
|
|
138
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
|
|
139
|
+
},
|
|
140
|
+
onBlur: function onBlur() {
|
|
141
|
+
var _selectorRef$current2;
|
|
142
|
+
|
|
143
|
+
selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current2 = selectorRef.current) === null || _selectorRef$current2 === void 0 ? void 0 : _selectorRef$current2.blur();
|
|
144
|
+
},
|
|
145
|
+
onFocus: function onFocus() {
|
|
146
|
+
var _selectorRef$current3;
|
|
147
|
+
|
|
148
|
+
selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current3 = selectorRef.current) === null || _selectorRef$current3 === void 0 ? void 0 : _selectorRef$current3.focus();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
var onMouseEnter = function onMouseEnter() {
|
|
154
|
+
if (allowClear) {
|
|
155
|
+
setIsHovered(true);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
var onMouseLeave = function onMouseLeave() {
|
|
160
|
+
if (allowClear) {
|
|
161
|
+
setIsHovered(false);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
var onAllClearClick = function onAllClearClick(e) {
|
|
166
|
+
e.stopPropagation();
|
|
167
|
+
|
|
168
|
+
if (allowClear) {
|
|
169
|
+
onAllowClear();
|
|
170
|
+
}
|
|
171
|
+
}; // ========================== render =======================
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
var renderPlaceHolder = function renderPlaceHolder() {
|
|
175
|
+
if ((0, _lodash.isEmpty)(value) && !input && placeholder) {
|
|
176
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
177
|
+
className: "".concat(prefix, "-item ").concat(prefix, "-placeholder")
|
|
178
|
+
}, placeholder);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return null;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
var renderMultipleValue = function renderMultipleValue() {
|
|
185
|
+
// @ts-ignore
|
|
186
|
+
var allValueLabel = value === null || value === void 0 ? void 0 : value.reduce(function (prev, curr) {
|
|
187
|
+
var item = getOptionByValue(curr);
|
|
188
|
+
|
|
189
|
+
if (item) {
|
|
190
|
+
return [].concat(_toConsumableArray(prev), [(item === null || item === void 0 ? void 0 : item.title) || (item === null || item === void 0 ? void 0 : item.label)]);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return [].concat(_toConsumableArray(prev), [curr]);
|
|
194
|
+
}, []);
|
|
195
|
+
|
|
196
|
+
if (Array.isArray(value) && value.length === filteredOptions.length) {
|
|
197
|
+
return /*#__PURE__*/_react.default.createElement("span", null, "\u5168\u90E8");
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
var renderItem = function renderItem(valueItem) {
|
|
201
|
+
return /*#__PURE__*/_react.default.createElement("span", null, optionLabelRenderer(valueItem, getOptionByValue(valueItem)));
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
var renderRest = function renderRest(valueItems) {
|
|
205
|
+
return /*#__PURE__*/_react.default.createElement("span", null, "\u7B49", valueItems.length, "\u9879");
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
return !input && !(0, _lodash.isNil)(value) ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
209
|
+
// @ts-ignore
|
|
210
|
+
title: allValueLabel === null || allValueLabel === void 0 ? void 0 : allValueLabel.join(','),
|
|
211
|
+
placement: "bottom",
|
|
212
|
+
getTooltipContainer: function getTooltipContainer() {
|
|
213
|
+
var _selectorRef$current4;
|
|
214
|
+
|
|
215
|
+
return (selectorRef === null || selectorRef === void 0 ? void 0 : (_selectorRef$current4 = selectorRef.current) === null || _selectorRef$current4 === void 0 ? void 0 : _selectorRef$current4.parentElement) || document.body;
|
|
216
|
+
}
|
|
217
|
+
}, /*#__PURE__*/_react.default.createElement(_rcOverflow.default, {
|
|
218
|
+
className: "".concat(prefix, "-item-all"),
|
|
219
|
+
prefixCls: "".concat(prefix, "-overflow"),
|
|
220
|
+
data: value,
|
|
221
|
+
renderItem: renderItem,
|
|
222
|
+
renderRest: renderRest,
|
|
223
|
+
maxCount: "responsive"
|
|
224
|
+
})) : null;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
var renderSingleValue = function renderSingleValue() {
|
|
228
|
+
var text = optionLabelRenderer(value, getOptionByValue(value));
|
|
229
|
+
return !input && (typeof value === 'string' || typeof value === 'number') ?
|
|
230
|
+
/*#__PURE__*/
|
|
231
|
+
// <Text>
|
|
232
|
+
_react.default.createElement("div", {
|
|
233
|
+
className: (0, _classnames3.default)("".concat(prefix, "-item"))
|
|
234
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
235
|
+
ref: selectorAllRef,
|
|
236
|
+
className: (0, _classnames3.default)("".concat(prefix, "-item-text"))
|
|
237
|
+
}, text)) : // </Text>
|
|
238
|
+
null;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
|
|
242
|
+
role: disabled ? undefined : 'combobox',
|
|
243
|
+
"aria-expanded": visible,
|
|
244
|
+
"aria-controls": "expandable",
|
|
245
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
246
|
+
tabIndex: ZERO,
|
|
247
|
+
className: (0, _classnames3.default)("".concat(prefix), "".concat(prefix, "-").concat(size), (_classnames = {}, _defineProperty(_classnames, "".concat(prefix, "-single"), !multiple), _defineProperty(_classnames, "".concat(prefix, "-bordered"), bordered), _defineProperty(_classnames, "".concat(prefix, "-focused"), isFocused), _defineProperty(_classnames, "".concat(prefix, "-disabled"), disabled), _classnames), className),
|
|
248
|
+
"aria-disabled": disabled,
|
|
249
|
+
"aria-hidden": "true",
|
|
250
|
+
style: style,
|
|
251
|
+
ref: selectorRef
|
|
252
|
+
}, rest), /*#__PURE__*/_react.default.createElement("div", {
|
|
253
|
+
className: "".concat(prefix, "-selector-wrap"),
|
|
254
|
+
onMouseEnter: onMouseEnter,
|
|
255
|
+
onMouseLeave: onMouseLeave
|
|
256
|
+
}, label && /*#__PURE__*/_react.default.createElement("div", {
|
|
257
|
+
className: "".concat(prefix, "-selector-label")
|
|
258
|
+
}, label), /*#__PURE__*/_react.default.createElement("div", {
|
|
259
|
+
className: "".concat(prefix, "-selector")
|
|
260
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
261
|
+
className: (0, _classnames3.default)("".concat(prefix, "-values-wrapper")),
|
|
262
|
+
ref: selectValuesRef
|
|
263
|
+
}, multiple ? renderMultipleValue() : renderSingleValue(), renderPlaceHolder())), /*#__PURE__*/_react.default.createElement("div", {
|
|
264
|
+
"aria-hidden": "true",
|
|
265
|
+
className: (0, _classnames3.default)("".concat(prefix, "-arrow"), _defineProperty({}, "".concat(prefix, "-arrow-focused"), visible)),
|
|
266
|
+
onClick: showClose ? onAllClearClick : undefined
|
|
267
|
+
}, showClose ? closeComponent || defaultCloseComponent(prefix, size) : arrowComponent || defaultArrowComponent(prefix, size))));
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
var ForwardSelector = /*#__PURE__*/_react.default.forwardRef(Selector);
|
|
271
|
+
|
|
272
|
+
var _default = ForwardSelector;
|
|
273
|
+
exports.default = _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ListRef, ListProps } from 'rc-virtual-list';
|
|
3
|
+
import { IOption } from './interface';
|
|
4
|
+
declare const RefVirtualList: React.ForwardRefExoticComponent<ListProps<IOption> & React.RefAttributes<ListRef>>;
|
|
5
|
+
export default RefVirtualList;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _rcVirtualList = _interopRequireDefault(require("rc-virtual-list"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
var defaultListRowHeight = 44;
|
|
15
|
+
var defaultListHeight = 520;
|
|
16
|
+
|
|
17
|
+
var VirtualList = function VirtualList(props, ref) {
|
|
18
|
+
var _props$itemHeight = props.itemHeight,
|
|
19
|
+
itemHeight = _props$itemHeight === void 0 ? defaultListRowHeight : _props$itemHeight,
|
|
20
|
+
_props$height = props.height,
|
|
21
|
+
height = _props$height === void 0 ? defaultListHeight : _props$height,
|
|
22
|
+
prefixCls = props.prefixCls,
|
|
23
|
+
children = props.children,
|
|
24
|
+
data = props.data,
|
|
25
|
+
virtual = props.virtual,
|
|
26
|
+
itemKey = props.itemKey;
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_rcVirtualList.default, {
|
|
28
|
+
itemKey: itemKey,
|
|
29
|
+
ref: ref,
|
|
30
|
+
itemHeight: itemHeight,
|
|
31
|
+
height: height,
|
|
32
|
+
data: data,
|
|
33
|
+
virtual: virtual,
|
|
34
|
+
prefixCls: "".concat(prefixCls, "-virtual-list"),
|
|
35
|
+
fullHeight: false
|
|
36
|
+
}, children);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var RefVirtualList = /*#__PURE__*/_react.default.forwardRef(VirtualList);
|
|
40
|
+
|
|
41
|
+
var _default = RefVirtualList;
|
|
42
|
+
exports.default = _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("../../index"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
// import { Select } from '@aloudata/aloudata-design';
|
|
15
|
+
var Option = _index.default.Option;
|
|
16
|
+
|
|
17
|
+
var _default = function _default() {
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: 'ald-select-demo'
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
21
|
+
className: 'ald-select',
|
|
22
|
+
style: {
|
|
23
|
+
width: 200
|
|
24
|
+
},
|
|
25
|
+
size: 'large',
|
|
26
|
+
multiple: true,
|
|
27
|
+
disabled: true,
|
|
28
|
+
placeholder: "large"
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(Option, {
|
|
30
|
+
key: 'a',
|
|
31
|
+
value: "Example Text"
|
|
32
|
+
}, "Example Text")), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
33
|
+
className: 'ald-select',
|
|
34
|
+
style: {
|
|
35
|
+
width: 200
|
|
36
|
+
},
|
|
37
|
+
multiple: true,
|
|
38
|
+
label: 'Label:',
|
|
39
|
+
disabled: true,
|
|
40
|
+
placeholder: "placeholder"
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(Option, {
|
|
42
|
+
key: 'a',
|
|
43
|
+
value: "Example Text"
|
|
44
|
+
}, "Example Text")), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
45
|
+
className: 'ald-select',
|
|
46
|
+
style: {
|
|
47
|
+
width: 200
|
|
48
|
+
},
|
|
49
|
+
multiple: true,
|
|
50
|
+
size: "small",
|
|
51
|
+
label: 'Label:',
|
|
52
|
+
defaultValue: ['a', 'b'],
|
|
53
|
+
disabled: true,
|
|
54
|
+
placeholder: "normal"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(Option, {
|
|
56
|
+
key: 'a',
|
|
57
|
+
value: "a"
|
|
58
|
+
}, "Example Text"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
59
|
+
key: 'b',
|
|
60
|
+
value: "b"
|
|
61
|
+
}, "Example Text")));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.default = _default;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("../../index"));
|
|
11
|
+
|
|
12
|
+
var _Icon = _interopRequireDefault(require("../../../Icon"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
|
|
18
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
|
|
20
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
+
|
|
22
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
+
|
|
24
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
25
|
+
|
|
26
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
|
|
28
|
+
var Option = _index.default.Option;
|
|
29
|
+
|
|
30
|
+
var _default = function _default() {
|
|
31
|
+
var _React$useState = _react.default.useState(''),
|
|
32
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33
|
+
value = _React$useState2[0],
|
|
34
|
+
setValue = _React$useState2[1];
|
|
35
|
+
|
|
36
|
+
var _onChange = function onChange(value) {
|
|
37
|
+
console.log(value);
|
|
38
|
+
setValue(value);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: 'ald-select-demo'
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
44
|
+
className: 'ald-select',
|
|
45
|
+
style: {
|
|
46
|
+
width: 200
|
|
47
|
+
},
|
|
48
|
+
size: 'large',
|
|
49
|
+
multiple: true,
|
|
50
|
+
placeholder: "large size"
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement(Option, {
|
|
52
|
+
key: 'a',
|
|
53
|
+
value: "Example Text"
|
|
54
|
+
}, "Example TexExample TextExample TextExample TextExample TextExample Textt"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
55
|
+
key: 'b',
|
|
56
|
+
value: "b"
|
|
57
|
+
}, "b"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
58
|
+
key: 'c',
|
|
59
|
+
value: "c"
|
|
60
|
+
}, "c"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
61
|
+
key: 'd',
|
|
62
|
+
value: "d"
|
|
63
|
+
}, "d"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
64
|
+
key: 'e',
|
|
65
|
+
value: "e"
|
|
66
|
+
}, "e"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
67
|
+
key: "f",
|
|
68
|
+
value: "f"
|
|
69
|
+
}, "f"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
70
|
+
key: "g",
|
|
71
|
+
value: "g"
|
|
72
|
+
}, "g")), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
73
|
+
className: 'ald-select',
|
|
74
|
+
style: {
|
|
75
|
+
width: 200
|
|
76
|
+
},
|
|
77
|
+
size: 'default',
|
|
78
|
+
label: 'Label:',
|
|
79
|
+
multiple: true,
|
|
80
|
+
listHeight: 100,
|
|
81
|
+
placeholder: "default"
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement(Option, {
|
|
83
|
+
key: 'a',
|
|
84
|
+
value: "Example Text"
|
|
85
|
+
}, "Example Text"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
86
|
+
key: 'b',
|
|
87
|
+
value: "b"
|
|
88
|
+
}, "b"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
89
|
+
key: 'c',
|
|
90
|
+
value: "c"
|
|
91
|
+
}, "c"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
92
|
+
key: 'd',
|
|
93
|
+
value: "d"
|
|
94
|
+
}, "d"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
95
|
+
key: 'e',
|
|
96
|
+
value: "e"
|
|
97
|
+
}, "e"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
98
|
+
key: "f",
|
|
99
|
+
value: "f"
|
|
100
|
+
}, "f"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
101
|
+
key: "g",
|
|
102
|
+
value: "g"
|
|
103
|
+
}, "g")), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
104
|
+
className: 'ald-select',
|
|
105
|
+
style: {
|
|
106
|
+
width: 200
|
|
107
|
+
},
|
|
108
|
+
size: 'small',
|
|
109
|
+
multiple: true,
|
|
110
|
+
value: value,
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
onChange: function onChange(v) {
|
|
113
|
+
_onChange(v);
|
|
114
|
+
},
|
|
115
|
+
placeholder: "small"
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(Option, {
|
|
117
|
+
key: 'a',
|
|
118
|
+
value: "Example Text"
|
|
119
|
+
}, "Example Text")), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
120
|
+
className: 'ald-select',
|
|
121
|
+
style: {
|
|
122
|
+
width: 200
|
|
123
|
+
},
|
|
124
|
+
size: 'large',
|
|
125
|
+
multiple: true,
|
|
126
|
+
label: /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
127
|
+
type: 'view_Partial_line'
|
|
128
|
+
}),
|
|
129
|
+
placeholder: "large size"
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(Option, {
|
|
131
|
+
key: 'a',
|
|
132
|
+
value: "Example Text"
|
|
133
|
+
}, "Example TexExample TextExample TextExample TextExample TextExample Textt"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
134
|
+
key: 'b',
|
|
135
|
+
value: "b"
|
|
136
|
+
}, "b"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
137
|
+
key: 'c',
|
|
138
|
+
value: "c"
|
|
139
|
+
}, "c"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
140
|
+
key: 'd',
|
|
141
|
+
value: "d"
|
|
142
|
+
}, "d"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
143
|
+
key: 'e',
|
|
144
|
+
value: "e"
|
|
145
|
+
}, "e"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
146
|
+
key: "f",
|
|
147
|
+
value: "f"
|
|
148
|
+
}, "f"), /*#__PURE__*/_react.default.createElement(Option, {
|
|
149
|
+
key: "g",
|
|
150
|
+
value: "g"
|
|
151
|
+
}, "g")));
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
exports.default = _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("../../index"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
// import { Select } from '@aloudata/aloudata-design';
|
|
15
|
+
var Option = _index.default.Option;
|
|
16
|
+
|
|
17
|
+
var _default = function _default() {
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: 'ald-select-demo'
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
21
|
+
className: 'ald-select',
|
|
22
|
+
style: {
|
|
23
|
+
width: 200
|
|
24
|
+
},
|
|
25
|
+
size: 'large',
|
|
26
|
+
multiple: true,
|
|
27
|
+
placeholder: "large",
|
|
28
|
+
options: [{
|
|
29
|
+
label: 'Option 1',
|
|
30
|
+
value: 'Option 1'
|
|
31
|
+
}, {
|
|
32
|
+
label: 'Option 2',
|
|
33
|
+
value: 'Option 2'
|
|
34
|
+
}]
|
|
35
|
+
}), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
36
|
+
className: 'ald-select',
|
|
37
|
+
style: {
|
|
38
|
+
width: 200
|
|
39
|
+
},
|
|
40
|
+
multiple: true,
|
|
41
|
+
label: 'Label:',
|
|
42
|
+
placeholder: "placeholder",
|
|
43
|
+
options: [{
|
|
44
|
+
label: 'Option 1',
|
|
45
|
+
value: 'Option 1'
|
|
46
|
+
}, {
|
|
47
|
+
label: 'Option 2',
|
|
48
|
+
value: 'Option 2'
|
|
49
|
+
}]
|
|
50
|
+
}), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
51
|
+
className: 'ald-select',
|
|
52
|
+
style: {
|
|
53
|
+
width: 200
|
|
54
|
+
},
|
|
55
|
+
multiple: true,
|
|
56
|
+
size: "small",
|
|
57
|
+
label: 'Label:',
|
|
58
|
+
placeholder: "normal",
|
|
59
|
+
options: [{
|
|
60
|
+
label: 'Option 1',
|
|
61
|
+
value: 'Option 1'
|
|
62
|
+
}, {
|
|
63
|
+
label: 'Option 2',
|
|
64
|
+
value: 'Option 2'
|
|
65
|
+
}]
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.default = _default;
|