@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,13 @@
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
+ var propTypes = {
11
+ exports: {}
12
+ };
13
+ export { propTypes as p };
@@ -0,0 +1,13 @@
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
+ var reactIs = {
11
+ exports: {}
12
+ };
13
+ export { reactIs as r };
@@ -0,0 +1,13 @@
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
+ var classnames = {
11
+ exports: {}
12
+ };
13
+ export { classnames as c };
@@ -0,0 +1,11 @@
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
+ var log = {};
11
+ export { log as __exports };
@@ -0,0 +1,11 @@
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
+ var positionFns = {};
11
+ export { positionFns as __exports };
@@ -0,0 +1,11 @@
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
+ var propTypes = {};
11
+ export { propTypes as __exports };
@@ -0,0 +1,11 @@
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
+ var reactIs_development = {};
11
+ export { reactIs_development as __exports };
@@ -0,0 +1,11 @@
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
+ var reactIs_production_min = {};
11
+ export { reactIs_production_min as __exports };
@@ -0,0 +1,11 @@
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
+ var shims = {};
11
+ export { shims as __exports };
@@ -0,0 +1,11 @@
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
+ var utils = {};
11
+ export { utils as __exports };
@@ -0,0 +1,14 @@
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
+ import './styles/index.scss.js';
11
+ export { Layout, Layout as default } from './Layout.js';
12
+ export { Sider } from './Sider.js';
13
+ export { Content } from './Content.js';
14
+ export { SearchTrigger } from './SearchTrigger.js';
@@ -0,0 +1,60 @@
1
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
2
+ /** @LICENSE
3
+ * @hi-ui/layout
4
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#readme
5
+ *
6
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */
11
+ import { c as classnames } from '../../_virtual/index4.js';
12
+
13
+ /*!
14
+ Copyright (c) 2018 Jed Watson.
15
+ Licensed under the MIT License (MIT), see
16
+ http://jedwatson.github.io/classnames
17
+ */
18
+
19
+ (function (module) {
20
+ /* global define */
21
+
22
+ (function () {
23
+ var hasOwn = {}.hasOwnProperty;
24
+ function classNames() {
25
+ var classes = [];
26
+ for (var i = 0; i < arguments.length; i++) {
27
+ var arg = arguments[i];
28
+ if (!arg) continue;
29
+ var argType = _typeof(arg);
30
+ if (argType === 'string' || argType === 'number') {
31
+ classes.push(arg);
32
+ } else if (Array.isArray(arg)) {
33
+ if (arg.length) {
34
+ var inner = classNames.apply(null, arg);
35
+ if (inner) {
36
+ classes.push(inner);
37
+ }
38
+ }
39
+ } else if (argType === 'object') {
40
+ if (arg.toString === Object.prototype.toString) {
41
+ for (var key in arg) {
42
+ if (hasOwn.call(arg, key) && arg[key]) {
43
+ classes.push(key);
44
+ }
45
+ }
46
+ } else {
47
+ classes.push(arg.toString());
48
+ }
49
+ }
50
+ }
51
+ return classes.join(' ');
52
+ }
53
+ if (module.exports) {
54
+ classNames["default"] = classNames;
55
+ module.exports = classNames;
56
+ } else {
57
+ window.classNames = classNames;
58
+ }
59
+ })();
60
+ })(classnames);
@@ -0,0 +1,88 @@
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
+ /*
11
+ object-assign
12
+ (c) Sindre Sorhus
13
+ @license MIT
14
+ */
15
+ /* eslint-disable no-unused-vars */
16
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
17
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
18
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
19
+ function toObject(val) {
20
+ if (val === null || val === undefined) {
21
+ throw new TypeError('Object.assign cannot be called with null or undefined');
22
+ }
23
+ return Object(val);
24
+ }
25
+ function shouldUseNative() {
26
+ try {
27
+ if (!Object.assign) {
28
+ return false;
29
+ }
30
+
31
+ // Detect buggy property enumeration order in older V8 versions.
32
+
33
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
34
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
35
+ test1[5] = 'de';
36
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
37
+ return false;
38
+ }
39
+
40
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
41
+ var test2 = {};
42
+ for (var i = 0; i < 10; i++) {
43
+ test2['_' + String.fromCharCode(i)] = i;
44
+ }
45
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
46
+ return test2[n];
47
+ });
48
+ if (order2.join('') !== '0123456789') {
49
+ return false;
50
+ }
51
+
52
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
53
+ var test3 = {};
54
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
55
+ test3[letter] = letter;
56
+ });
57
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
58
+ return false;
59
+ }
60
+ return true;
61
+ } catch (err) {
62
+ // We don't expect any of the above to throw, but better to be safe.
63
+ return false;
64
+ }
65
+ }
66
+ var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
67
+ var from;
68
+ var to = toObject(target);
69
+ var symbols;
70
+ for (var s = 1; s < arguments.length; s++) {
71
+ from = Object(arguments[s]);
72
+ for (var key in from) {
73
+ if (hasOwnProperty.call(from, key)) {
74
+ to[key] = from[key];
75
+ }
76
+ }
77
+ if (getOwnPropertySymbols) {
78
+ symbols = getOwnPropertySymbols(from);
79
+ for (var i = 0; i < symbols.length; i++) {
80
+ if (propIsEnumerable.call(from, symbols[i])) {
81
+ to[symbols[i]] = from[symbols[i]];
82
+ }
83
+ }
84
+ }
85
+ }
86
+ return to;
87
+ };
88
+ export { objectAssign as default };
@@ -0,0 +1,96 @@
1
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
2
+ /** @LICENSE
3
+ * @hi-ui/layout
4
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/layout#readme
5
+ *
6
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */
11
+ import ReactPropTypesSecret_1 from './lib/ReactPropTypesSecret.js';
12
+
13
+ /**
14
+ * Copyright (c) 2013-present, Facebook, Inc.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */
19
+
20
+ var printWarning = function printWarning() {};
21
+ if (process.env.NODE_ENV !== 'production') {
22
+ var ReactPropTypesSecret = ReactPropTypesSecret_1;
23
+ var loggedTypeFailures = {};
24
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
25
+ printWarning = function printWarning(text) {
26
+ var message = 'Warning: ' + text;
27
+ if (typeof console !== 'undefined') {
28
+ console.error(message);
29
+ }
30
+ try {
31
+ // --- Welcome to debugging React ---
32
+ // This error was thrown as a convenience so that you can use this stack
33
+ // to find the callsite that caused this warning to fire.
34
+ throw new Error(message);
35
+ } catch (x) {}
36
+ };
37
+ }
38
+
39
+ /**
40
+ * Assert that the values match with the type specs.
41
+ * Error messages are memorized and will only be shown once.
42
+ *
43
+ * @param {object} typeSpecs Map of name to a ReactPropType
44
+ * @param {object} values Runtime values that need to be type-checked
45
+ * @param {string} location e.g. "prop", "context", "child context"
46
+ * @param {string} componentName Name of the component for error messages.
47
+ * @param {?Function} getStack Returns the component stack.
48
+ * @private
49
+ */
50
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
51
+ if (process.env.NODE_ENV !== 'production') {
52
+ for (var typeSpecName in typeSpecs) {
53
+ if (has(typeSpecs, typeSpecName)) {
54
+ var error;
55
+ // Prop type validation may throw. In case they do, we don't want to
56
+ // fail the render phase where it didn't fail before. So we log it.
57
+ // After these have been cleaned up, we'll let them throw.
58
+ try {
59
+ // This is intentionally an invariant that gets caught. It's the same
60
+ // behavior as without this statement except with a better message.
61
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
62
+ 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]) + '`.');
63
+ err.name = 'Invariant Violation';
64
+ throw err;
65
+ }
66
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
67
+ } catch (ex) {
68
+ error = ex;
69
+ }
70
+ if (error && !(error instanceof Error)) {
71
+ 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).');
72
+ }
73
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
74
+ // Only monitor this failure once because there tends to be a lot of the
75
+ // same error.
76
+ loggedTypeFailures[error.message] = true;
77
+ var stack = getStack ? getStack() : '';
78
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Resets warning cache when testing.
87
+ *
88
+ * @private
89
+ */
90
+ checkPropTypes.resetWarningCache = function () {
91
+ if (process.env.NODE_ENV !== 'production') {
92
+ loggedTypeFailures = {};
93
+ }
94
+ };
95
+ var checkPropTypes_1 = checkPropTypes;
96
+ export { checkPropTypes_1 as default };
@@ -0,0 +1,63 @@
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
+ import ReactPropTypesSecret_1 from './lib/ReactPropTypesSecret.js';
11
+
12
+ /**
13
+ * Copyright (c) 2013-present, Facebook, Inc.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+
19
+ var ReactPropTypesSecret = ReactPropTypesSecret_1;
20
+ function emptyFunction() {}
21
+ function emptyFunctionWithReset() {}
22
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
23
+ var factoryWithThrowingShims = function factoryWithThrowingShims() {
24
+ function shim(props, propName, componentName, location, propFullName, secret) {
25
+ if (secret === ReactPropTypesSecret) {
26
+ // It is still safe when called from React.
27
+ return;
28
+ }
29
+ 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');
30
+ err.name = 'Invariant Violation';
31
+ throw err;
32
+ }
33
+ shim.isRequired = shim;
34
+ function getShim() {
35
+ return shim;
36
+ } // Important!
37
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
38
+ var ReactPropTypes = {
39
+ array: shim,
40
+ bool: shim,
41
+ func: shim,
42
+ number: shim,
43
+ object: shim,
44
+ string: shim,
45
+ symbol: shim,
46
+ any: shim,
47
+ arrayOf: getShim,
48
+ element: shim,
49
+ elementType: shim,
50
+ instanceOf: getShim,
51
+ node: shim,
52
+ objectOf: getShim,
53
+ oneOf: getShim,
54
+ oneOfType: getShim,
55
+ shape: getShim,
56
+ exact: getShim,
57
+ checkPropTypes: emptyFunctionWithReset,
58
+ resetWarningCache: emptyFunction
59
+ };
60
+ ReactPropTypes.PropTypes = ReactPropTypes;
61
+ return ReactPropTypes;
62
+ };
63
+ export { factoryWithThrowingShims as default };