@hi-ui/layout 4.0.0

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.
Files changed (105) hide show
  1. package/README.md +11 -0
  2. package/lib/cjs/Content.js +48 -0
  3. package/lib/cjs/Layout.js +48 -0
  4. package/lib/cjs/SearchTrigger.js +55 -0
  5. package/lib/cjs/Sider.js +100 -0
  6. package/lib/cjs/_virtual/Draggable.js +16 -0
  7. package/lib/cjs/_virtual/DraggableCore.js +16 -0
  8. package/lib/cjs/_virtual/Resizable.js +16 -0
  9. package/lib/cjs/_virtual/ResizableBox.js +16 -0
  10. package/lib/cjs/_virtual/cjs.js +18 -0
  11. package/lib/cjs/_virtual/domFns.js +16 -0
  12. package/lib/cjs/_virtual/getPrefix.js +16 -0
  13. package/lib/cjs/_virtual/index.js +18 -0
  14. package/lib/cjs/_virtual/index2.js +18 -0
  15. package/lib/cjs/_virtual/index3.js +18 -0
  16. package/lib/cjs/_virtual/index4.js +18 -0
  17. package/lib/cjs/_virtual/log.js +16 -0
  18. package/lib/cjs/_virtual/positionFns.js +16 -0
  19. package/lib/cjs/_virtual/propTypes.js +16 -0
  20. package/lib/cjs/_virtual/react-is.development.js +16 -0
  21. package/lib/cjs/_virtual/react-is.production.min.js +16 -0
  22. package/lib/cjs/_virtual/shims.js +16 -0
  23. package/lib/cjs/_virtual/utils.js +16 -0
  24. package/lib/cjs/index.js +24 -0
  25. package/lib/cjs/node_modules/classnames/index.js +62 -0
  26. package/lib/cjs/node_modules/object-assign/index.js +94 -0
  27. package/lib/cjs/node_modules/prop-types/checkPropTypes.js +101 -0
  28. package/lib/cjs/node_modules/prop-types/factoryWithThrowingShims.js +68 -0
  29. package/lib/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +553 -0
  30. package/lib/cjs/node_modules/prop-types/index.js +36 -0
  31. package/lib/cjs/node_modules/prop-types/lib/ReactPropTypesSecret.js +25 -0
  32. package/lib/cjs/node_modules/react-draggable/build/cjs/Draggable.js +655 -0
  33. package/lib/cjs/node_modules/react-draggable/build/cjs/DraggableCore.js +670 -0
  34. package/lib/cjs/node_modules/react-draggable/build/cjs/cjs.js +23 -0
  35. package/lib/cjs/node_modules/react-draggable/build/cjs/utils/domFns.js +366 -0
  36. package/lib/cjs/node_modules/react-draggable/build/cjs/utils/getPrefix.js +69 -0
  37. package/lib/cjs/node_modules/react-draggable/build/cjs/utils/log.js +19 -0
  38. package/lib/cjs/node_modules/react-draggable/build/cjs/utils/positionFns.js +176 -0
  39. package/lib/cjs/node_modules/react-draggable/build/cjs/utils/shims.js +57 -0
  40. package/lib/cjs/node_modules/react-is/cjs/react-is.development.js +182 -0
  41. package/lib/cjs/node_modules/react-is/cjs/react-is.production.min.js +132 -0
  42. package/lib/cjs/node_modules/react-is/index.js +21 -0
  43. package/lib/cjs/node_modules/react-resizable/build/Resizable.js +366 -0
  44. package/lib/cjs/node_modules/react-resizable/build/ResizableBox.js +244 -0
  45. package/lib/cjs/node_modules/react-resizable/build/propTypes.js +115 -0
  46. package/lib/cjs/node_modules/react-resizable/build/utils.js +86 -0
  47. package/lib/cjs/node_modules/react-resizable/index.js +25 -0
  48. package/lib/cjs/packages/icons/lib/esm/components/common/search-outlined.js +65 -0
  49. package/lib/cjs/packages/icons/lib/esm/styles/index.scss.js +35 -0
  50. package/lib/cjs/styles/index.scss.js +18 -0
  51. package/lib/esm/Content.js +36 -0
  52. package/lib/esm/Layout.js +36 -0
  53. package/lib/esm/SearchTrigger.js +43 -0
  54. package/lib/esm/Sider.js +88 -0
  55. package/lib/esm/_virtual/Draggable.js +11 -0
  56. package/lib/esm/_virtual/DraggableCore.js +11 -0
  57. package/lib/esm/_virtual/Resizable.js +11 -0
  58. package/lib/esm/_virtual/ResizableBox.js +11 -0
  59. package/lib/esm/_virtual/cjs.js +13 -0
  60. package/lib/esm/_virtual/domFns.js +11 -0
  61. package/lib/esm/_virtual/getPrefix.js +11 -0
  62. package/lib/esm/_virtual/index.js +13 -0
  63. package/lib/esm/_virtual/index2.js +13 -0
  64. package/lib/esm/_virtual/index3.js +13 -0
  65. package/lib/esm/_virtual/index4.js +13 -0
  66. package/lib/esm/_virtual/log.js +11 -0
  67. package/lib/esm/_virtual/positionFns.js +11 -0
  68. package/lib/esm/_virtual/propTypes.js +11 -0
  69. package/lib/esm/_virtual/react-is.development.js +11 -0
  70. package/lib/esm/_virtual/react-is.production.min.js +11 -0
  71. package/lib/esm/_virtual/shims.js +11 -0
  72. package/lib/esm/_virtual/utils.js +11 -0
  73. package/lib/esm/index.js +14 -0
  74. package/lib/esm/node_modules/classnames/index.js +60 -0
  75. package/lib/esm/node_modules/object-assign/index.js +88 -0
  76. package/lib/esm/node_modules/prop-types/checkPropTypes.js +96 -0
  77. package/lib/esm/node_modules/prop-types/factoryWithThrowingShims.js +63 -0
  78. package/lib/esm/node_modules/prop-types/factoryWithTypeCheckers.js +548 -0
  79. package/lib/esm/node_modules/prop-types/index.js +34 -0
  80. package/lib/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +19 -0
  81. package/lib/esm/node_modules/react-draggable/build/cjs/Draggable.js +645 -0
  82. package/lib/esm/node_modules/react-draggable/build/cjs/DraggableCore.js +660 -0
  83. package/lib/esm/node_modules/react-draggable/build/cjs/cjs.js +21 -0
  84. package/lib/esm/node_modules/react-draggable/build/cjs/utils/domFns.js +361 -0
  85. package/lib/esm/node_modules/react-draggable/build/cjs/utils/getPrefix.js +67 -0
  86. package/lib/esm/node_modules/react-draggable/build/cjs/utils/log.js +17 -0
  87. package/lib/esm/node_modules/react-draggable/build/cjs/utils/positionFns.js +171 -0
  88. package/lib/esm/node_modules/react-draggable/build/cjs/utils/shims.js +52 -0
  89. package/lib/esm/node_modules/react-is/cjs/react-is.development.js +177 -0
  90. package/lib/esm/node_modules/react-is/cjs/react-is.production.min.js +127 -0
  91. package/lib/esm/node_modules/react-is/index.js +19 -0
  92. package/lib/esm/node_modules/react-resizable/build/Resizable.js +358 -0
  93. package/lib/esm/node_modules/react-resizable/build/ResizableBox.js +236 -0
  94. package/lib/esm/node_modules/react-resizable/build/propTypes.js +110 -0
  95. package/lib/esm/node_modules/react-resizable/build/utils.js +74 -0
  96. package/lib/esm/node_modules/react-resizable/index.js +20 -0
  97. package/lib/esm/packages/icons/lib/esm/components/common/search-outlined.js +53 -0
  98. package/lib/esm/packages/icons/lib/esm/styles/index.scss.js +23 -0
  99. package/lib/esm/styles/index.scss.js +13 -0
  100. package/lib/types/Content.d.ts +8 -0
  101. package/lib/types/Layout.d.ts +8 -0
  102. package/lib/types/SearchTrigger.d.ts +10 -0
  103. package/lib/types/Sider.d.ts +10 -0
  104. package/lib/types/index.d.ts +6 -0
  105. package/package.json +61 -0
@@ -0,0 +1,94 @@
1
+ /** @LICENSE
2
+ * @hi-ui/layout
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+
16
+ /*
17
+ object-assign
18
+ (c) Sindre Sorhus
19
+ @license MIT
20
+ */
21
+ /* eslint-disable no-unused-vars */
22
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
23
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
24
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
25
+ function toObject(val) {
26
+ if (val === null || val === undefined) {
27
+ throw new TypeError('Object.assign cannot be called with null or undefined');
28
+ }
29
+ return Object(val);
30
+ }
31
+ function shouldUseNative() {
32
+ try {
33
+ if (!Object.assign) {
34
+ return false;
35
+ }
36
+
37
+ // Detect buggy property enumeration order in older V8 versions.
38
+
39
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
40
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
41
+ test1[5] = 'de';
42
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
43
+ return false;
44
+ }
45
+
46
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
47
+ var test2 = {};
48
+ for (var i = 0; i < 10; i++) {
49
+ test2['_' + String.fromCharCode(i)] = i;
50
+ }
51
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
52
+ return test2[n];
53
+ });
54
+ if (order2.join('') !== '0123456789') {
55
+ return false;
56
+ }
57
+
58
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
59
+ var test3 = {};
60
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
61
+ test3[letter] = letter;
62
+ });
63
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
64
+ return false;
65
+ }
66
+ return true;
67
+ } catch (err) {
68
+ // We don't expect any of the above to throw, but better to be safe.
69
+ return false;
70
+ }
71
+ }
72
+ var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
73
+ var from;
74
+ var to = toObject(target);
75
+ var symbols;
76
+ for (var s = 1; s < arguments.length; s++) {
77
+ from = Object(arguments[s]);
78
+ for (var key in from) {
79
+ if (hasOwnProperty.call(from, key)) {
80
+ to[key] = from[key];
81
+ }
82
+ }
83
+ if (getOwnPropertySymbols) {
84
+ symbols = getOwnPropertySymbols(from);
85
+ for (var i = 0; i < symbols.length; i++) {
86
+ if (propIsEnumerable.call(from, symbols[i])) {
87
+ to[symbols[i]] = from[symbols[i]];
88
+ }
89
+ }
90
+ }
91
+ }
92
+ return to;
93
+ };
94
+ exports["default"] = objectAssign;
@@ -0,0 +1,101 @@
1
+ /** @LICENSE
2
+ * @hi-ui/layout
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ 'use strict';
11
+
12
+ var _typeof = require("@babel/runtime/helpers/typeof");
13
+ Object.defineProperty(exports, '__esModule', {
14
+ value: true
15
+ });
16
+ var ReactPropTypesSecret$1 = require('./lib/ReactPropTypesSecret.js');
17
+
18
+ /**
19
+ * Copyright (c) 2013-present, Facebook, Inc.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */
24
+
25
+ var printWarning = function printWarning() {};
26
+ if (process.env.NODE_ENV !== 'production') {
27
+ var ReactPropTypesSecret = ReactPropTypesSecret$1["default"];
28
+ var loggedTypeFailures = {};
29
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
30
+ printWarning = function printWarning(text) {
31
+ var message = 'Warning: ' + text;
32
+ if (typeof console !== 'undefined') {
33
+ console.error(message);
34
+ }
35
+ try {
36
+ // --- Welcome to debugging React ---
37
+ // This error was thrown as a convenience so that you can use this stack
38
+ // to find the callsite that caused this warning to fire.
39
+ throw new Error(message);
40
+ } catch (x) {}
41
+ };
42
+ }
43
+
44
+ /**
45
+ * Assert that the values match with the type specs.
46
+ * Error messages are memorized and will only be shown once.
47
+ *
48
+ * @param {object} typeSpecs Map of name to a ReactPropType
49
+ * @param {object} values Runtime values that need to be type-checked
50
+ * @param {string} location e.g. "prop", "context", "child context"
51
+ * @param {string} componentName Name of the component for error messages.
52
+ * @param {?Function} getStack Returns the component stack.
53
+ * @private
54
+ */
55
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
56
+ if (process.env.NODE_ENV !== 'production') {
57
+ for (var typeSpecName in typeSpecs) {
58
+ if (has(typeSpecs, typeSpecName)) {
59
+ var error;
60
+ // Prop type validation may throw. In case they do, we don't want to
61
+ // fail the render phase where it didn't fail before. So we log it.
62
+ // After these have been cleaned up, we'll let them throw.
63
+ try {
64
+ // This is intentionally an invariant that gets caught. It's the same
65
+ // behavior as without this statement except with a better message.
66
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
67
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + _typeof(typeSpecs[typeSpecName]) + '`.');
68
+ err.name = 'Invariant Violation';
69
+ throw err;
70
+ }
71
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
72
+ } catch (ex) {
73
+ error = ex;
74
+ }
75
+ if (error && !(error instanceof Error)) {
76
+ printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
77
+ }
78
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
79
+ // Only monitor this failure once because there tends to be a lot of the
80
+ // same error.
81
+ loggedTypeFailures[error.message] = true;
82
+ var stack = getStack ? getStack() : '';
83
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Resets warning cache when testing.
92
+ *
93
+ * @private
94
+ */
95
+ checkPropTypes.resetWarningCache = function () {
96
+ if (process.env.NODE_ENV !== 'production') {
97
+ loggedTypeFailures = {};
98
+ }
99
+ };
100
+ var checkPropTypes_1 = checkPropTypes;
101
+ exports["default"] = checkPropTypes_1;
@@ -0,0 +1,68 @@
1
+ /** @LICENSE
2
+ * @hi-ui/layout
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+ var ReactPropTypesSecret$1 = require('./lib/ReactPropTypesSecret.js');
16
+
17
+ /**
18
+ * Copyright (c) 2013-present, Facebook, Inc.
19
+ *
20
+ * This source code is licensed under the MIT license found in the
21
+ * LICENSE file in the root directory of this source tree.
22
+ */
23
+
24
+ var ReactPropTypesSecret = ReactPropTypesSecret$1["default"];
25
+ function emptyFunction() {}
26
+ function emptyFunctionWithReset() {}
27
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
28
+ var factoryWithThrowingShims = function factoryWithThrowingShims() {
29
+ function shim(props, propName, componentName, location, propFullName, secret) {
30
+ if (secret === ReactPropTypesSecret) {
31
+ // It is still safe when called from React.
32
+ return;
33
+ }
34
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
35
+ err.name = 'Invariant Violation';
36
+ throw err;
37
+ }
38
+ shim.isRequired = shim;
39
+ function getShim() {
40
+ return shim;
41
+ } // Important!
42
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
43
+ var ReactPropTypes = {
44
+ array: shim,
45
+ bool: shim,
46
+ func: shim,
47
+ number: shim,
48
+ object: shim,
49
+ string: shim,
50
+ symbol: shim,
51
+ any: shim,
52
+ arrayOf: getShim,
53
+ element: shim,
54
+ elementType: shim,
55
+ instanceOf: getShim,
56
+ node: shim,
57
+ objectOf: getShim,
58
+ oneOf: getShim,
59
+ oneOfType: getShim,
60
+ shape: getShim,
61
+ exact: getShim,
62
+ checkPropTypes: emptyFunctionWithReset,
63
+ resetWarningCache: emptyFunction
64
+ };
65
+ ReactPropTypes.PropTypes = ReactPropTypes;
66
+ return ReactPropTypes;
67
+ };
68
+ exports["default"] = factoryWithThrowingShims;