@helpdice/ui 1.4.9 → 1.5.1
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/dist/CircularProgress/index.js +6 -6
- package/dist/Placeholder/index.js +41 -41
- package/dist/auto-complete/index.js +60 -60
- package/dist/avatar/index.js +28 -28
- package/dist/badge/index.js +27 -27
- package/dist/breadcrumbs/index.js +34 -34
- package/dist/button/button.compact.d.ts +2 -2
- package/dist/button/index.js +46 -45
- package/dist/button-dropdown/index.js +34 -34
- package/dist/button-group/index.js +25 -25
- package/dist/capacity/index.js +26 -26
- package/dist/card/index.js +44 -44
- package/dist/checkbox/index.js +30 -30
- package/dist/code/index.js +27 -27
- package/dist/col/index.js +8 -8
- package/dist/collapse/index.js +30 -30
- package/dist/css-baseline/index.js +6 -6
- package/dist/description/index.js +26 -26
- package/dist/display/index.js +26 -26
- package/dist/divider/index.js +26 -26
- package/dist/dot/index.js +25 -25
- package/dist/drawer/index.js +53 -53
- package/dist/fieldset/index.js +33 -33
- package/dist/form/FormWrapper.d.ts +7 -7
- package/dist/form/connect.d.ts +1 -0
- package/dist/grid/index.js +33 -33
- package/dist/html-renderer/index.d.ts +6 -0
- package/dist/image/index.js +37 -37
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1899 -547
- package/dist/input/index.js +40 -40
- package/dist/keyboard/index.js +28 -28
- package/dist/link/index.js +29 -29
- package/dist/loading/index.js +26 -26
- package/dist/modal/index.js +75 -75
- package/dist/note/index.js +27 -27
- package/dist/page/index.js +30 -30
- package/dist/pagination/index.js +27 -27
- package/dist/popover/index.js +57 -57
- package/dist/progress/index.js +29 -29
- package/dist/radio/index.js +30 -30
- package/dist/rating/index.js +29 -29
- package/dist/row/index.js +11 -11
- package/dist/search-bar/index.js +1826 -61
- package/dist/select/index.js +60 -60
- package/dist/slider/index.js +35 -35
- package/dist/snippet/index.js +30 -30
- package/dist/spacer/index.js +25 -25
- package/dist/spinner/index.js +24 -24
- package/dist/table/index.js +224 -211
- package/dist/tabs/index.js +39 -39
- package/dist/tag/index.js +26 -26
- package/dist/text/index.js +40 -40
- package/dist/textarea/index.js +29 -29
- package/dist/themes/index.js +2 -2
- package/dist/toggle/index.js +27 -27
- package/dist/tooltip/index.js +42 -42
- package/dist/tree/index.js +23 -23
- package/dist/ui-provider/index.js +48 -48
- package/dist/use-all-themes/index.js +2 -2
- package/dist/use-body-scroll/index.js +5 -5
- package/dist/use-clipboard/index.js +1 -1
- package/dist/use-current-state/index.js +1 -1
- package/dist/use-input/index.js +1 -1
- package/dist/use-keyboard/index.js +5 -5
- package/dist/use-media-query/index.js +5 -5
- package/dist/use-modal/index.js +1 -1
- package/dist/use-scale/index.js +19 -19
- package/dist/use-tabs/index.js +1 -1
- package/dist/use-theme/index.js +2 -2
- package/dist/use-toasts/index.js +3 -3
- package/dist/user/index.js +36 -36
- package/esm/button/button.compact.d.ts +2 -2
- package/esm/button/button.compact.js +4 -2
- package/esm/form/FastField.js +1 -1
- package/esm/form/FormWrapper.d.ts +7 -7
- package/esm/form/FormWrapper.js +2 -2
- package/esm/form/connect.d.ts +1 -0
- package/esm/form/connect.js +2 -1
- package/esm/html-renderer/index.d.ts +6 -0
- package/esm/html-renderer/index.js +12 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/link/link.js +2 -0
- package/esm/login-with/LoginSocialAmazon/index.js +162 -134
- package/esm/login-with/index.js +2 -0
- package/esm/search-bar/components/index.js +4 -7
- package/esm/table/data-table.js +6 -4
- package/esm/table/table.js +12 -1
- package/package.json +5 -3
- package/esm/formik-native/src/index.js +0 -12
- package/esm/formik-native/test/blah.test.js +0 -5
package/dist/textarea/index.js
CHANGED
|
@@ -151,8 +151,8 @@ function _slicedToArray(r, e) {
|
|
|
151
151
|
function _toPrimitive(t, r) {
|
|
152
152
|
if ("object" != typeof t || !t) return t;
|
|
153
153
|
var e = t[Symbol.toPrimitive];
|
|
154
|
-
if (
|
|
155
|
-
var i = e.call(t, r
|
|
154
|
+
if (void 0 !== e) {
|
|
155
|
+
var i = e.call(t, r);
|
|
156
156
|
if ("object" != typeof i) return i;
|
|
157
157
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
158
158
|
}
|
|
@@ -175,7 +175,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
175
175
|
if (r) {
|
|
176
176
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
177
177
|
var t = {}.toString.call(r).slice(8, -1);
|
|
178
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
178
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -209,7 +209,7 @@ function requireIndex () {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
212
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
212
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
213
213
|
return Constructor;
|
|
214
214
|
}
|
|
215
215
|
var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
|
|
@@ -218,7 +218,7 @@ function requireIndex () {
|
|
|
218
218
|
};
|
|
219
219
|
var StyleSheet = /*#__PURE__*/ function() {
|
|
220
220
|
function StyleSheet(param) {
|
|
221
|
-
var ref = param ===
|
|
221
|
+
var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
|
|
222
222
|
invariant$1(isString(name), "`name` must be a string");
|
|
223
223
|
this._name = name;
|
|
224
224
|
this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
|
|
@@ -476,7 +476,7 @@ function requireIndex () {
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
function mapRulesToStyle(cssRules, options) {
|
|
479
|
-
if (options ===
|
|
479
|
+
if (options === void 0) options = {};
|
|
480
480
|
return cssRules.map(function(args) {
|
|
481
481
|
var id = args[0];
|
|
482
482
|
var css = args[1];
|
|
@@ -493,7 +493,7 @@ function requireIndex () {
|
|
|
493
493
|
}
|
|
494
494
|
var StyleSheetRegistry = /*#__PURE__*/ function() {
|
|
495
495
|
function StyleSheetRegistry(param) {
|
|
496
|
-
var ref = param ===
|
|
496
|
+
var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
|
|
497
497
|
this._sheet = styleSheet || new StyleSheet({
|
|
498
498
|
name: "styled-jsx",
|
|
499
499
|
optimizeForSpeed: optimizeForSpeed
|
|
@@ -1129,9 +1129,9 @@ var withScale = function withScale(Render) {
|
|
|
1129
1129
|
margin = props.margin,
|
|
1130
1130
|
padding = props.padding,
|
|
1131
1131
|
_props$unit = props.unit,
|
|
1132
|
-
unit = _props$unit ===
|
|
1132
|
+
unit = _props$unit === void 0 ? layout.unit : _props$unit,
|
|
1133
1133
|
_props$scale = props.scale,
|
|
1134
|
-
scale = _props$scale ===
|
|
1134
|
+
scale = _props$scale === void 0 ? 1 : _props$scale;
|
|
1135
1135
|
var makeScaleHandler = function makeScaleHandler(attrValue) {
|
|
1136
1136
|
return function (scale1x, defaultValue) {
|
|
1137
1137
|
// 0 means disable scale and the default value is 0
|
|
@@ -1152,20 +1152,20 @@ var withScale = function withScale(Render) {
|
|
|
1152
1152
|
var value = {
|
|
1153
1153
|
unit: unit,
|
|
1154
1154
|
SCALES: {
|
|
1155
|
-
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !==
|
|
1156
|
-
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !==
|
|
1157
|
-
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !==
|
|
1158
|
-
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !==
|
|
1159
|
-
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !==
|
|
1160
|
-
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !==
|
|
1161
|
-
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !==
|
|
1162
|
-
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !==
|
|
1163
|
-
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !==
|
|
1164
|
-
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !==
|
|
1165
|
-
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !==
|
|
1166
|
-
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !==
|
|
1167
|
-
width: makeScaleHandler(width !== null && width !==
|
|
1168
|
-
height: makeScaleHandler(height !== null && height !==
|
|
1155
|
+
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
|
|
1156
|
+
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
|
|
1157
|
+
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
|
|
1158
|
+
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
|
|
1159
|
+
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
|
|
1160
|
+
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
|
|
1161
|
+
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
|
|
1162
|
+
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
|
|
1163
|
+
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
|
|
1164
|
+
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
|
|
1165
|
+
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
|
|
1166
|
+
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
|
|
1167
|
+
width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
|
|
1168
|
+
height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
|
|
1169
1169
|
font: makeScaleHandler(font)
|
|
1170
1170
|
},
|
|
1171
1171
|
getScaleProps: generateGetScaleProps(props),
|
|
@@ -1218,22 +1218,22 @@ var _excluded = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className
|
|
|
1218
1218
|
tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
|
|
1219
1219
|
var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1220
1220
|
var _ref$type = _ref.type,
|
|
1221
|
-
type = _ref$type ===
|
|
1221
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
1222
1222
|
_ref$disabled = _ref.disabled,
|
|
1223
|
-
disabled = _ref$disabled ===
|
|
1223
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1224
1224
|
_ref$readOnly = _ref.readOnly,
|
|
1225
|
-
readOnly = _ref$readOnly ===
|
|
1225
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
1226
1226
|
onFocus = _ref.onFocus,
|
|
1227
1227
|
onBlur = _ref.onBlur,
|
|
1228
1228
|
_ref$className = _ref.className,
|
|
1229
|
-
className = _ref$className ===
|
|
1229
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1230
1230
|
_ref$initialValue = _ref.initialValue,
|
|
1231
|
-
initialValue = _ref$initialValue ===
|
|
1231
|
+
initialValue = _ref$initialValue === void 0 ? '' : _ref$initialValue,
|
|
1232
1232
|
onChange = _ref.onChange,
|
|
1233
1233
|
value = _ref.value,
|
|
1234
1234
|
placeholder = _ref.placeholder,
|
|
1235
1235
|
_ref$resize = _ref.resize,
|
|
1236
|
-
resize = _ref$resize ===
|
|
1236
|
+
resize = _ref$resize === void 0 ? 'none' : _ref$resize,
|
|
1237
1237
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1238
1238
|
var theme = useTheme();
|
|
1239
1239
|
var _useScale = useScale(),
|
package/dist/themes/index.js
CHANGED
|
@@ -34,8 +34,8 @@ function _objectSpread2(e) {
|
|
|
34
34
|
function _toPrimitive(t, r) {
|
|
35
35
|
if ("object" != typeof t || !t) return t;
|
|
36
36
|
var e = t[Symbol.toPrimitive];
|
|
37
|
-
if (
|
|
38
|
-
var i = e.call(t, r
|
|
37
|
+
if (void 0 !== e) {
|
|
38
|
+
var i = e.call(t, r);
|
|
39
39
|
if ("object" != typeof i) return i;
|
|
40
40
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
41
41
|
}
|
package/dist/toggle/index.js
CHANGED
|
@@ -151,8 +151,8 @@ function _slicedToArray(r, e) {
|
|
|
151
151
|
function _toPrimitive(t, r) {
|
|
152
152
|
if ("object" != typeof t || !t) return t;
|
|
153
153
|
var e = t[Symbol.toPrimitive];
|
|
154
|
-
if (
|
|
155
|
-
var i = e.call(t, r
|
|
154
|
+
if (void 0 !== e) {
|
|
155
|
+
var i = e.call(t, r);
|
|
156
156
|
if ("object" != typeof i) return i;
|
|
157
157
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
158
158
|
}
|
|
@@ -175,7 +175,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
175
175
|
if (r) {
|
|
176
176
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
177
177
|
var t = {}.toString.call(r).slice(8, -1);
|
|
178
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
178
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -209,7 +209,7 @@ function requireIndex () {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
212
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
212
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
213
213
|
return Constructor;
|
|
214
214
|
}
|
|
215
215
|
var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
|
|
@@ -218,7 +218,7 @@ function requireIndex () {
|
|
|
218
218
|
};
|
|
219
219
|
var StyleSheet = /*#__PURE__*/ function() {
|
|
220
220
|
function StyleSheet(param) {
|
|
221
|
-
var ref = param ===
|
|
221
|
+
var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
|
|
222
222
|
invariant$1(isString(name), "`name` must be a string");
|
|
223
223
|
this._name = name;
|
|
224
224
|
this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
|
|
@@ -476,7 +476,7 @@ function requireIndex () {
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
function mapRulesToStyle(cssRules, options) {
|
|
479
|
-
if (options ===
|
|
479
|
+
if (options === void 0) options = {};
|
|
480
480
|
return cssRules.map(function(args) {
|
|
481
481
|
var id = args[0];
|
|
482
482
|
var css = args[1];
|
|
@@ -493,7 +493,7 @@ function requireIndex () {
|
|
|
493
493
|
}
|
|
494
494
|
var StyleSheetRegistry = /*#__PURE__*/ function() {
|
|
495
495
|
function StyleSheetRegistry(param) {
|
|
496
|
-
var ref = param ===
|
|
496
|
+
var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
|
|
497
497
|
this._sheet = styleSheet || new StyleSheet({
|
|
498
498
|
name: "styled-jsx",
|
|
499
499
|
optimizeForSpeed: optimizeForSpeed
|
|
@@ -1104,9 +1104,9 @@ var withScale = function withScale(Render) {
|
|
|
1104
1104
|
margin = props.margin,
|
|
1105
1105
|
padding = props.padding,
|
|
1106
1106
|
_props$unit = props.unit,
|
|
1107
|
-
unit = _props$unit ===
|
|
1107
|
+
unit = _props$unit === void 0 ? layout.unit : _props$unit,
|
|
1108
1108
|
_props$scale = props.scale,
|
|
1109
|
-
scale = _props$scale ===
|
|
1109
|
+
scale = _props$scale === void 0 ? 1 : _props$scale;
|
|
1110
1110
|
var makeScaleHandler = function makeScaleHandler(attrValue) {
|
|
1111
1111
|
return function (scale1x, defaultValue) {
|
|
1112
1112
|
// 0 means disable scale and the default value is 0
|
|
@@ -1127,20 +1127,20 @@ var withScale = function withScale(Render) {
|
|
|
1127
1127
|
var value = {
|
|
1128
1128
|
unit: unit,
|
|
1129
1129
|
SCALES: {
|
|
1130
|
-
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !==
|
|
1131
|
-
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !==
|
|
1132
|
-
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !==
|
|
1133
|
-
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !==
|
|
1134
|
-
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !==
|
|
1135
|
-
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !==
|
|
1136
|
-
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !==
|
|
1137
|
-
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !==
|
|
1138
|
-
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !==
|
|
1139
|
-
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !==
|
|
1140
|
-
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !==
|
|
1141
|
-
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !==
|
|
1142
|
-
width: makeScaleHandler(width !== null && width !==
|
|
1143
|
-
height: makeScaleHandler(height !== null && height !==
|
|
1130
|
+
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
|
|
1131
|
+
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
|
|
1132
|
+
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
|
|
1133
|
+
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
|
|
1134
|
+
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
|
|
1135
|
+
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
|
|
1136
|
+
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
|
|
1137
|
+
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
|
|
1138
|
+
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
|
|
1139
|
+
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
|
|
1140
|
+
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
|
|
1141
|
+
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
|
|
1142
|
+
width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
|
|
1143
|
+
height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
|
|
1144
1144
|
font: makeScaleHandler(font)
|
|
1145
1145
|
},
|
|
1146
1146
|
getScaleProps: generateGetScaleProps(props),
|
|
@@ -1192,15 +1192,15 @@ var useClasses = function useClasses() {
|
|
|
1192
1192
|
var _excluded = ["initialChecked", "checked", "disabled", "onChange", "type", "className", "children"];
|
|
1193
1193
|
var ToggleComponent = function ToggleComponent(_ref) {
|
|
1194
1194
|
var _ref$initialChecked = _ref.initialChecked,
|
|
1195
|
-
initialChecked = _ref$initialChecked ===
|
|
1195
|
+
initialChecked = _ref$initialChecked === void 0 ? false : _ref$initialChecked,
|
|
1196
1196
|
checked = _ref.checked,
|
|
1197
1197
|
_ref$disabled = _ref.disabled,
|
|
1198
|
-
disabled = _ref$disabled ===
|
|
1198
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1199
1199
|
onChange = _ref.onChange,
|
|
1200
1200
|
_ref$type = _ref.type,
|
|
1201
|
-
type = _ref$type ===
|
|
1201
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
1202
1202
|
_ref$className = _ref.className,
|
|
1203
|
-
className = _ref$className ===
|
|
1203
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1204
1204
|
children = _ref.children,
|
|
1205
1205
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1206
1206
|
var theme = useTheme();
|
package/dist/tooltip/index.js
CHANGED
|
@@ -152,8 +152,8 @@ function _slicedToArray(r, e) {
|
|
|
152
152
|
function _toPrimitive(t, r) {
|
|
153
153
|
if ("object" != typeof t || !t) return t;
|
|
154
154
|
var e = t[Symbol.toPrimitive];
|
|
155
|
-
if (
|
|
156
|
-
var i = e.call(t, r
|
|
155
|
+
if (void 0 !== e) {
|
|
156
|
+
var i = e.call(t, r);
|
|
157
157
|
if ("object" != typeof i) return i;
|
|
158
158
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
159
159
|
}
|
|
@@ -176,7 +176,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
176
176
|
if (r) {
|
|
177
177
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
178
178
|
var t = {}.toString.call(r).slice(8, -1);
|
|
179
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
179
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
@@ -210,7 +210,7 @@ function requireIndex () {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
213
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
213
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
214
214
|
return Constructor;
|
|
215
215
|
}
|
|
216
216
|
var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
|
|
@@ -219,7 +219,7 @@ function requireIndex () {
|
|
|
219
219
|
};
|
|
220
220
|
var StyleSheet = /*#__PURE__*/ function() {
|
|
221
221
|
function StyleSheet(param) {
|
|
222
|
-
var ref = param ===
|
|
222
|
+
var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
|
|
223
223
|
invariant$1(isString(name), "`name` must be a string");
|
|
224
224
|
this._name = name;
|
|
225
225
|
this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
|
|
@@ -477,7 +477,7 @@ function requireIndex () {
|
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
function mapRulesToStyle(cssRules, options) {
|
|
480
|
-
if (options ===
|
|
480
|
+
if (options === void 0) options = {};
|
|
481
481
|
return cssRules.map(function(args) {
|
|
482
482
|
var id = args[0];
|
|
483
483
|
var css = args[1];
|
|
@@ -494,7 +494,7 @@ function requireIndex () {
|
|
|
494
494
|
}
|
|
495
495
|
var StyleSheetRegistry = /*#__PURE__*/ function() {
|
|
496
496
|
function StyleSheetRegistry(param) {
|
|
497
|
-
var ref = param ===
|
|
497
|
+
var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
|
|
498
498
|
this._sheet = styleSheet || new StyleSheet({
|
|
499
499
|
name: "styled-jsx",
|
|
500
500
|
optimizeForSpeed: optimizeForSpeed
|
|
@@ -1029,17 +1029,17 @@ var _excluded$2 = ["children", "className", "visible", "enterTime", "leaveTime",
|
|
|
1029
1029
|
var CssTransition = function CssTransition(_ref) {
|
|
1030
1030
|
var children = _ref.children,
|
|
1031
1031
|
_ref$className = _ref.className,
|
|
1032
|
-
className = _ref$className ===
|
|
1032
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1033
1033
|
_ref$visible = _ref.visible,
|
|
1034
|
-
visible = _ref$visible ===
|
|
1034
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
1035
1035
|
_ref$enterTime = _ref.enterTime,
|
|
1036
|
-
enterTime = _ref$enterTime ===
|
|
1036
|
+
enterTime = _ref$enterTime === void 0 ? 60 : _ref$enterTime,
|
|
1037
1037
|
_ref$leaveTime = _ref.leaveTime,
|
|
1038
|
-
leaveTime = _ref$leaveTime ===
|
|
1038
|
+
leaveTime = _ref$leaveTime === void 0 ? 60 : _ref$leaveTime,
|
|
1039
1039
|
_ref$clearTime = _ref.clearTime,
|
|
1040
|
-
clearTime = _ref$clearTime ===
|
|
1040
|
+
clearTime = _ref$clearTime === void 0 ? 60 : _ref$clearTime,
|
|
1041
1041
|
_ref$name = _ref.name,
|
|
1042
|
-
name = _ref$name ===
|
|
1042
|
+
name = _ref$name === void 0 ? 'transition' : _ref$name,
|
|
1043
1043
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1044
1044
|
var _useState = React.useState(''),
|
|
1045
1045
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1424,9 +1424,9 @@ var withScale = function withScale(Render) {
|
|
|
1424
1424
|
margin = props.margin,
|
|
1425
1425
|
padding = props.padding,
|
|
1426
1426
|
_props$unit = props.unit,
|
|
1427
|
-
unit = _props$unit ===
|
|
1427
|
+
unit = _props$unit === void 0 ? layout.unit : _props$unit,
|
|
1428
1428
|
_props$scale = props.scale,
|
|
1429
|
-
scale = _props$scale ===
|
|
1429
|
+
scale = _props$scale === void 0 ? 1 : _props$scale;
|
|
1430
1430
|
var makeScaleHandler = function makeScaleHandler(attrValue) {
|
|
1431
1431
|
return function (scale1x, defaultValue) {
|
|
1432
1432
|
// 0 means disable scale and the default value is 0
|
|
@@ -1447,20 +1447,20 @@ var withScale = function withScale(Render) {
|
|
|
1447
1447
|
var value = {
|
|
1448
1448
|
unit: unit,
|
|
1449
1449
|
SCALES: {
|
|
1450
|
-
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !==
|
|
1451
|
-
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !==
|
|
1452
|
-
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !==
|
|
1453
|
-
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !==
|
|
1454
|
-
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !==
|
|
1455
|
-
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !==
|
|
1456
|
-
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !==
|
|
1457
|
-
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !==
|
|
1458
|
-
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !==
|
|
1459
|
-
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !==
|
|
1460
|
-
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !==
|
|
1461
|
-
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !==
|
|
1462
|
-
width: makeScaleHandler(width !== null && width !==
|
|
1463
|
-
height: makeScaleHandler(height !== null && height !==
|
|
1450
|
+
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
|
|
1451
|
+
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
|
|
1452
|
+
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
|
|
1453
|
+
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
|
|
1454
|
+
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
|
|
1455
|
+
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
|
|
1456
|
+
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
|
|
1457
|
+
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
|
|
1458
|
+
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
|
|
1459
|
+
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
|
|
1460
|
+
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
|
|
1461
|
+
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
|
|
1462
|
+
width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
|
|
1463
|
+
height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
|
|
1464
1464
|
font: makeScaleHandler(font)
|
|
1465
1465
|
},
|
|
1466
1466
|
getScaleProps: generateGetScaleProps(props),
|
|
@@ -1612,28 +1612,28 @@ var _excluded = ["children", "initialVisible", "text", "offset", "placement", "p
|
|
|
1612
1612
|
var TooltipComponent = function TooltipComponent(_ref) {
|
|
1613
1613
|
var children = _ref.children,
|
|
1614
1614
|
_ref$initialVisible = _ref.initialVisible,
|
|
1615
|
-
initialVisible = _ref$initialVisible ===
|
|
1615
|
+
initialVisible = _ref$initialVisible === void 0 ? false : _ref$initialVisible,
|
|
1616
1616
|
text = _ref.text,
|
|
1617
1617
|
_ref$offset = _ref.offset,
|
|
1618
|
-
offset = _ref$offset ===
|
|
1618
|
+
offset = _ref$offset === void 0 ? 12 : _ref$offset,
|
|
1619
1619
|
_ref$placement = _ref.placement,
|
|
1620
|
-
placement = _ref$placement ===
|
|
1620
|
+
placement = _ref$placement === void 0 ? 'top' : _ref$placement,
|
|
1621
1621
|
_ref$portalClassName = _ref.portalClassName,
|
|
1622
|
-
portalClassName = _ref$portalClassName ===
|
|
1622
|
+
portalClassName = _ref$portalClassName === void 0 ? '' : _ref$portalClassName,
|
|
1623
1623
|
_ref$enterDelay = _ref.enterDelay,
|
|
1624
|
-
enterDelay = _ref$enterDelay ===
|
|
1624
|
+
enterDelay = _ref$enterDelay === void 0 ? 100 : _ref$enterDelay,
|
|
1625
1625
|
_ref$leaveDelay = _ref.leaveDelay,
|
|
1626
|
-
leaveDelay = _ref$leaveDelay ===
|
|
1626
|
+
leaveDelay = _ref$leaveDelay === void 0 ? 150 : _ref$leaveDelay,
|
|
1627
1627
|
_ref$trigger = _ref.trigger,
|
|
1628
|
-
trigger = _ref$trigger ===
|
|
1628
|
+
trigger = _ref$trigger === void 0 ? 'hover' : _ref$trigger,
|
|
1629
1629
|
_ref$type = _ref.type,
|
|
1630
|
-
type = _ref$type ===
|
|
1630
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
1631
1631
|
_ref$className = _ref.className,
|
|
1632
|
-
className = _ref$className ===
|
|
1632
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1633
1633
|
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
1634
|
-
onVisibleChange = _ref$onVisibleChange ===
|
|
1634
|
+
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
1635
1635
|
_ref$hideArrow = _ref.hideArrow,
|
|
1636
|
-
hideArrow = _ref$hideArrow ===
|
|
1636
|
+
hideArrow = _ref$hideArrow === void 0 ? false : _ref$hideArrow,
|
|
1637
1637
|
customVisible = _ref.visible,
|
|
1638
1638
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1639
1639
|
var timer = React.useRef();
|
|
@@ -1643,7 +1643,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
1643
1643
|
visible = _useState2[0],
|
|
1644
1644
|
setVisible = _useState2[1];
|
|
1645
1645
|
var iconOffset = React.useMemo(function () {
|
|
1646
|
-
if (!(ref !== null && ref !==
|
|
1646
|
+
if (!(ref !== null && ref !== void 0 && ref.current)) return {
|
|
1647
1647
|
x: '0.75em',
|
|
1648
1648
|
y: '0.75em'
|
|
1649
1649
|
};
|
|
@@ -1652,7 +1652,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
1652
1652
|
x: "".concat(rect.width ? rect.width / 2 : 0, "px"),
|
|
1653
1653
|
y: "".concat(rect.height ? rect.height / 2 : 0, "px")
|
|
1654
1654
|
};
|
|
1655
|
-
}, [ref === null || ref ===
|
|
1655
|
+
}, [ref === null || ref === void 0 ? void 0 : ref.current]);
|
|
1656
1656
|
var contentProps = {
|
|
1657
1657
|
type: type,
|
|
1658
1658
|
visible: visible,
|
package/dist/tree/index.js
CHANGED
|
@@ -115,8 +115,8 @@ function _toConsumableArray(r) {
|
|
|
115
115
|
function _toPrimitive(t, r) {
|
|
116
116
|
if ("object" != typeof t || !t) return t;
|
|
117
117
|
var e = t[Symbol.toPrimitive];
|
|
118
|
-
if (
|
|
119
|
-
var i = e.call(t, r
|
|
118
|
+
if (void 0 !== e) {
|
|
119
|
+
var i = e.call(t, r);
|
|
120
120
|
if ("object" != typeof i) return i;
|
|
121
121
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
122
122
|
}
|
|
@@ -139,7 +139,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
139
139
|
if (r) {
|
|
140
140
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
141
141
|
var t = {}.toString.call(r).slice(8, -1);
|
|
142
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
142
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -173,7 +173,7 @@ function requireIndex () {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
176
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
176
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
177
177
|
return Constructor;
|
|
178
178
|
}
|
|
179
179
|
var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
|
|
@@ -182,7 +182,7 @@ function requireIndex () {
|
|
|
182
182
|
};
|
|
183
183
|
var StyleSheet = /*#__PURE__*/ function() {
|
|
184
184
|
function StyleSheet(param) {
|
|
185
|
-
var ref = param ===
|
|
185
|
+
var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
|
|
186
186
|
invariant$1(isString(name), "`name` must be a string");
|
|
187
187
|
this._name = name;
|
|
188
188
|
this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
|
|
@@ -440,7 +440,7 @@ function requireIndex () {
|
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
function mapRulesToStyle(cssRules, options) {
|
|
443
|
-
if (options ===
|
|
443
|
+
if (options === void 0) options = {};
|
|
444
444
|
return cssRules.map(function(args) {
|
|
445
445
|
var id = args[0];
|
|
446
446
|
var css = args[1];
|
|
@@ -457,7 +457,7 @@ function requireIndex () {
|
|
|
457
457
|
}
|
|
458
458
|
var StyleSheetRegistry = /*#__PURE__*/ function() {
|
|
459
459
|
function StyleSheetRegistry(param) {
|
|
460
|
-
var ref = param ===
|
|
460
|
+
var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
|
|
461
461
|
this._sheet = styleSheet || new StyleSheet({
|
|
462
462
|
name: "styled-jsx",
|
|
463
463
|
optimizeForSpeed: optimizeForSpeed
|
|
@@ -919,9 +919,9 @@ var useTheme = function useTheme() {
|
|
|
919
919
|
var TreeFileIcon = function TreeFileIcon(_ref) {
|
|
920
920
|
var color = _ref.color,
|
|
921
921
|
_ref$width = _ref.width,
|
|
922
|
-
width = _ref$width ===
|
|
922
|
+
width = _ref$width === void 0 ? 22 : _ref$width,
|
|
923
923
|
_ref$height = _ref.height,
|
|
924
|
-
height = _ref$height ===
|
|
924
|
+
height = _ref$height === void 0 ? 22 : _ref$height;
|
|
925
925
|
var theme = useTheme();
|
|
926
926
|
return /*#__PURE__*/React.createElement("svg", {
|
|
927
927
|
viewBox: "0 0 24 24",
|
|
@@ -1026,12 +1026,12 @@ var _excluded$2 = ["name", "parentPath", "level", "extra", "className"];
|
|
|
1026
1026
|
var TreeFile = function TreeFile(_ref) {
|
|
1027
1027
|
var name = _ref.name,
|
|
1028
1028
|
_ref$parentPath = _ref.parentPath,
|
|
1029
|
-
parentPath = _ref$parentPath ===
|
|
1029
|
+
parentPath = _ref$parentPath === void 0 ? '' : _ref$parentPath,
|
|
1030
1030
|
_ref$level = _ref.level,
|
|
1031
|
-
level = _ref$level ===
|
|
1031
|
+
level = _ref$level === void 0 ? 0 : _ref$level,
|
|
1032
1032
|
extra = _ref.extra,
|
|
1033
1033
|
_ref$className = _ref.className,
|
|
1034
|
-
className = _ref$className ===
|
|
1034
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1035
1035
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1036
1036
|
var theme = useTheme();
|
|
1037
1037
|
var _useTreeContext = useTreeContext(),
|
|
@@ -1130,9 +1130,9 @@ var useRealShape = function useRealShape(ref) {
|
|
|
1130
1130
|
|
|
1131
1131
|
var Expand = function Expand(_ref) {
|
|
1132
1132
|
var _ref$isExpanded = _ref.isExpanded,
|
|
1133
|
-
isExpanded = _ref$isExpanded ===
|
|
1133
|
+
isExpanded = _ref$isExpanded === void 0 ? false : _ref$isExpanded,
|
|
1134
1134
|
_ref$delay = _ref.delay,
|
|
1135
|
-
delay = _ref$delay ===
|
|
1135
|
+
delay = _ref$delay === void 0 ? 200 : _ref$delay,
|
|
1136
1136
|
children = _ref.children;
|
|
1137
1137
|
var _useState = React.useState(isExpanded ? 'auto' : '0'),
|
|
1138
1138
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1210,9 +1210,9 @@ Expand.displayName = 'Expand';
|
|
|
1210
1210
|
var TreeFolderIcon = function TreeFolderIcon(_ref) {
|
|
1211
1211
|
var color = _ref.color,
|
|
1212
1212
|
_ref$width = _ref.width,
|
|
1213
|
-
width = _ref$width ===
|
|
1213
|
+
width = _ref$width === void 0 ? 22 : _ref$width,
|
|
1214
1214
|
_ref$height = _ref.height,
|
|
1215
|
-
height = _ref$height ===
|
|
1215
|
+
height = _ref$height === void 0 ? 22 : _ref$height;
|
|
1216
1216
|
var theme = useTheme();
|
|
1217
1217
|
return /*#__PURE__*/React.createElement("svg", {
|
|
1218
1218
|
viewBox: "0 0 24 24",
|
|
@@ -1238,11 +1238,11 @@ TreeFolderIcon.displayName = 'TreeFolderIcon';
|
|
|
1238
1238
|
var TreeStatusIcon = function TreeStatusIcon(_ref) {
|
|
1239
1239
|
var color = _ref.color,
|
|
1240
1240
|
_ref$width = _ref.width,
|
|
1241
|
-
width = _ref$width ===
|
|
1241
|
+
width = _ref$width === void 0 ? 12 : _ref$width,
|
|
1242
1242
|
_ref$height = _ref.height,
|
|
1243
|
-
height = _ref$height ===
|
|
1243
|
+
height = _ref$height === void 0 ? 12 : _ref$height,
|
|
1244
1244
|
_ref$active = _ref.active,
|
|
1245
|
-
active = _ref$active ===
|
|
1245
|
+
active = _ref$active === void 0 ? false : _ref$active;
|
|
1246
1246
|
var theme = useTheme();
|
|
1247
1247
|
return /*#__PURE__*/React.createElement("svg", {
|
|
1248
1248
|
viewBox: "0 0 24 24",
|
|
@@ -1280,11 +1280,11 @@ var _excluded$1 = ["name", "children", "parentPath", "level", "extra", "classNam
|
|
|
1280
1280
|
var _TreeFolder = function TreeFolder(_ref) {
|
|
1281
1281
|
var name = _ref.name,
|
|
1282
1282
|
_ref$children = _ref.children,
|
|
1283
|
-
children = _ref$children ===
|
|
1283
|
+
children = _ref$children === void 0 ? '' : _ref$children,
|
|
1284
1284
|
_ref$parentPath = _ref.parentPath,
|
|
1285
|
-
parentPath = _ref$parentPath ===
|
|
1285
|
+
parentPath = _ref$parentPath === void 0 ? '' : _ref$parentPath,
|
|
1286
1286
|
_ref$level = _ref.level,
|
|
1287
|
-
parentLevel = _ref$level ===
|
|
1287
|
+
parentLevel = _ref$level === void 0 ? 0 : _ref$level,
|
|
1288
1288
|
extra = _ref.extra,
|
|
1289
1289
|
className = _ref.className,
|
|
1290
1290
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
@@ -1381,7 +1381,7 @@ var Tree = function Tree(_ref) {
|
|
|
1381
1381
|
var children = _ref.children,
|
|
1382
1382
|
onClick = _ref.onClick,
|
|
1383
1383
|
_ref$initialExpand = _ref.initialExpand,
|
|
1384
|
-
initialExpand = _ref$initialExpand ===
|
|
1384
|
+
initialExpand = _ref$initialExpand === void 0 ? false : _ref$initialExpand,
|
|
1385
1385
|
value = _ref.value,
|
|
1386
1386
|
className = _ref.className,
|
|
1387
1387
|
props = _objectWithoutProperties(_ref, _excluded);
|