@startlibs/components 1.0.0-alpha-8a → 1.0.0-alpha-8b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +51 -12
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -290,6 +290,43 @@ Button.Link = function (props) {
|
|
|
290
290
|
}));
|
|
291
291
|
};
|
|
292
292
|
|
|
293
|
+
var TextButton = styled__default(function (_ref) {
|
|
294
|
+
var className = _ref.className,
|
|
295
|
+
isLoading = _ref.isLoading,
|
|
296
|
+
children = _ref.children,
|
|
297
|
+
_ref$innerAs = _ref.innerAs,
|
|
298
|
+
Wrapper = _ref$innerAs === void 0 ? 'div' : _ref$innerAs,
|
|
299
|
+
props = _objectWithoutProperties(_ref, ["className", "isLoading", "children", "innerAs"]);
|
|
300
|
+
|
|
301
|
+
return React__default.createElement(Wrapper, _extends({
|
|
302
|
+
className: className
|
|
303
|
+
}, props), children, " ", isLoading && React__default.createElement(Loading, {
|
|
304
|
+
size: 14,
|
|
305
|
+
borderWidth: 3
|
|
306
|
+
}));
|
|
307
|
+
}).withConfig({
|
|
308
|
+
displayName: "TextButton",
|
|
309
|
+
componentId: "sc-1eydmhc-0"
|
|
310
|
+
})(["display:inline-block;font-weight:500;font-size:13px;color:", ";cursor:pointer;text-decoration:none;:hover,:active{color:", ";}", "{display:inline-block;margin-left:0.25rem;vertical-align:-3px;}", ""], utils.getColor('main'), function (props) {
|
|
311
|
+
return polished.darken(0.1, utils.getColor("main")(props));
|
|
312
|
+
}, Loading, function (props) {
|
|
313
|
+
return props.nowrap && "\n white-space: nowrap;\n ";
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
TextButton.a = function (props) {
|
|
317
|
+
return React__default.createElement(TextButton, _extends({}, props, {
|
|
318
|
+
className: props.className,
|
|
319
|
+
innerAs: "a"
|
|
320
|
+
}));
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
TextButton.Link = function (props) {
|
|
324
|
+
return React__default.createElement(TextButton, _extends({}, props, {
|
|
325
|
+
className: props.className,
|
|
326
|
+
innerAs: Link
|
|
327
|
+
}));
|
|
328
|
+
};
|
|
329
|
+
|
|
293
330
|
var ErrorBoundary =
|
|
294
331
|
/*#__PURE__*/
|
|
295
332
|
function (_React$Component) {
|
|
@@ -2058,7 +2095,7 @@ var MainIcon = styled__default(Icon).withConfig({
|
|
|
2058
2095
|
displayName: "WarningDialog__MainIcon",
|
|
2059
2096
|
componentId: "sc-1jw779e-1"
|
|
2060
2097
|
})(["color:", ";font-size:46px;display:block;margin-bottom:1.25rem;"], function (props) {
|
|
2061
|
-
return props.icon === 'warning' ? utils.getColor('alert') : utils.getColor('main');
|
|
2098
|
+
return props.icon === 'warning' ? utils.getColor('alert') : props.icon === 'success' ? utils.getColor('success') : utils.getColor('main');
|
|
2062
2099
|
});
|
|
2063
2100
|
var useWarningDialog = function useWarningDialog() {
|
|
2064
2101
|
return useDialogWithToggle(function (toggle) {
|
|
@@ -2073,8 +2110,12 @@ var _willUseSharedState = core.willUseSharedState(),
|
|
|
2073
2110
|
useRenderDefaultWarningDialog = _willUseSharedState2[0],
|
|
2074
2111
|
_setWarningDialog = _willUseSharedState2[2];
|
|
2075
2112
|
|
|
2076
|
-
var setWarningDialog = function setWarningDialog(
|
|
2077
|
-
|
|
2113
|
+
var setWarningDialog = function setWarningDialog(_ref2) {
|
|
2114
|
+
var _ref2$as = _ref2.as,
|
|
2115
|
+
Dialog = _ref2$as === void 0 ? WarningDialog : _ref2$as,
|
|
2116
|
+
props = _objectWithoutProperties(_ref2, ["as"]);
|
|
2117
|
+
|
|
2118
|
+
return _setWarningDialog(React__default.createElement(Dialog, _extends({}, props, {
|
|
2078
2119
|
closeDialog: function closeDialog() {
|
|
2079
2120
|
return _setWarningDialog(null);
|
|
2080
2121
|
}
|
|
@@ -2572,7 +2613,10 @@ function (_React$Component) {
|
|
|
2572
2613
|
return;
|
|
2573
2614
|
}
|
|
2574
2615
|
|
|
2575
|
-
|
|
2616
|
+
new Promise(function (res) {
|
|
2617
|
+
morph(oldItem.domNode, formatAnimation(removeAnimation || animation, timing), res);
|
|
2618
|
+
setTimeout(res, 1500);
|
|
2619
|
+
}).then(function () {
|
|
2576
2620
|
oldItem.domNode.remove();
|
|
2577
2621
|
});
|
|
2578
2622
|
});
|
|
@@ -4373,19 +4417,13 @@ var ContextMenuComponent = React.forwardRef(function (_ref2, unesuredRef) {
|
|
|
4373
4417
|
e.target.dispatchEvent(new MouseEvent('mousemove', {
|
|
4374
4418
|
bubbles: true
|
|
4375
4419
|
}));
|
|
4376
|
-
|
|
4377
|
-
return [function (e, nextPos) {
|
|
4420
|
+
return function (e, nextPos) {
|
|
4378
4421
|
var delta = prevPos.clientY - nextPos.clientY;
|
|
4379
4422
|
|
|
4380
4423
|
if (Math.abs(delta) > 10) {
|
|
4381
|
-
passedResistance = true;
|
|
4382
4424
|
setCursorOnHover(-1);
|
|
4383
4425
|
}
|
|
4384
|
-
}
|
|
4385
|
-
if (!passedResistance) {
|
|
4386
|
-
e.target.click();
|
|
4387
|
-
}
|
|
4388
|
-
}];
|
|
4426
|
+
};
|
|
4389
4427
|
});
|
|
4390
4428
|
return React__default.createElement(ContextListMenu, _extends({
|
|
4391
4429
|
"data-drag": false,
|
|
@@ -5290,6 +5328,7 @@ exports.SimpleLi = SimpleLi;
|
|
|
5290
5328
|
exports.SplitColumnsContainer = SplitColumnsContainer;
|
|
5291
5329
|
exports.StickyContainer = StickyContainer;
|
|
5292
5330
|
exports.SwitchDiv = SwitchDiv;
|
|
5331
|
+
exports.TextButton = TextButton;
|
|
5293
5332
|
exports.Tooltip = Tooltip;
|
|
5294
5333
|
exports.TransitionDiv = TransitionDiv;
|
|
5295
5334
|
exports.WarningDialog = WarningDialog;
|