@helpdice/ui 2.5.0 → 2.5.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/dist/button/index.js +8 -25
- package/dist/carousal/index.js +8 -25
- package/dist/container/index.js +8 -25
- package/dist/copy-to-clipboard/index.js +8 -25
- package/dist/index.d.ts +0 -1
- package/dist/index.js +8 -25
- package/dist/input/index.d.ts +2 -2
- package/dist/input/{currency-input/components/CurrencyInput.d.ts → input-currency.d.ts} +1 -1
- package/{esm/input/phone-input/phone.d.ts → dist/input/input-phone.d.ts} +1 -1
- package/dist/input/{currency-input/components/utils → utils}/cleanValue.d.ts +1 -1
- package/dist/input/{currency-input/components/utils → utils}/formatValue.d.ts +1 -1
- package/dist/input/{currency-input/components/utils → utils}/getLocaleConfig.d.ts +1 -1
- package/dist/modal/index.js +8 -25
- package/dist/placeholder/index.js +8 -25
- package/dist/table/index.js +8 -25
- package/dist/text/index.js +8 -25
- package/esm/button/button.js +4 -19
- package/esm/index.d.ts +0 -1
- package/esm/index.js +1 -1
- package/esm/input/index.d.ts +2 -2
- package/esm/input/index.js +2 -2
- package/esm/input/{currency-input/components/CurrencyInput.d.ts → input-currency.d.ts} +1 -1
- package/esm/input/{currency-input/components/CurrencyInput.js → input-currency.js} +2 -2
- package/{dist/input/phone-input/phone.d.ts → esm/input/input-phone.d.ts} +1 -1
- package/esm/input/{phone-input/phone.js → input-phone.js} +3 -3
- package/esm/input/{currency-input/components/utils → utils}/cleanValue.d.ts +1 -1
- package/esm/input/{currency-input/components/utils → utils}/formatValue.d.ts +1 -1
- package/esm/input/{currency-input/components/utils → utils}/getLocaleConfig.d.ts +1 -1
- package/package.json +1 -1
- package/dist/input/currency-input/index.d.ts +0 -5
- package/dist/input/phone-input/index.d.ts +0 -2
- package/esm/input/currency-input/index.d.ts +0 -5
- package/esm/input/currency-input/index.js +0 -4
- package/esm/input/phone-input/index.d.ts +0 -2
- package/esm/input/phone-input/index.js +0 -2
- /package/dist/input/{currency-input/components/CurrencyInputProps.d.ts → input-currency-props.d.ts} +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/escapeRegExp.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/fixedDecimalValue.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/getSuffix.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/index.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/isNumber.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/padTrimValue.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/parseAbbrValue.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/removeInvalidChars.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/removeSeparators.d.ts +0 -0
- /package/dist/input/{currency-input/components/utils → utils}/repositionCursor.d.ts +0 -0
- /package/esm/input/{currency-input/components/CurrencyInputProps.d.ts → input-currency-props.d.ts} +0 -0
- /package/esm/input/{currency-input/components/CurrencyInputProps.js → input-currency-props.js} +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/addSeparators.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/cleanValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/escapeRegExp.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/escapeRegExp.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/fixedDecimalValue.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/fixedDecimalValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/formatValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/getLocaleConfig.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/getSuffix.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/getSuffix.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/index.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/index.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/isNumber.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/isNumber.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/padTrimValue.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/padTrimValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/parseAbbrValue.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/parseAbbrValue.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeInvalidChars.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeInvalidChars.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeSeparators.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/removeSeparators.js +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/repositionCursor.d.ts +0 -0
- /package/esm/input/{currency-input/components/utils → utils}/repositionCursor.js +0 -0
package/dist/button/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var reactRouterDom = require('react-router-dom');
|
|
7
6
|
var theme = require('@helpdice/theme');
|
|
8
7
|
|
|
9
8
|
function _arrayLikeToArray(r, a) {
|
|
@@ -1318,7 +1317,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1318
1317
|
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1319
1318
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1320
1319
|
var theme$1 = theme.useTheme();
|
|
1321
|
-
|
|
1320
|
+
// const navigate = useNavigate();
|
|
1322
1321
|
var _useScale = useScale(),
|
|
1323
1322
|
SCALES = _useScale.SCALES;
|
|
1324
1323
|
var buttonRef = React.useRef(null);
|
|
@@ -1354,12 +1353,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1354
1353
|
_filteredProps$effect = filteredProps.effect,
|
|
1355
1354
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1356
1355
|
_filteredProps$round = filteredProps.round,
|
|
1357
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
to = filteredProps.to,
|
|
1356
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
1357
|
+
filteredProps.relative;
|
|
1358
|
+
filteredProps.replace;
|
|
1359
|
+
filteredProps.a;
|
|
1360
|
+
var to = filteredProps.to,
|
|
1363
1361
|
onClick = filteredProps.onClick,
|
|
1364
1362
|
_filteredProps$auto = filteredProps.auto,
|
|
1365
1363
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1450,22 +1448,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1450
1448
|
if (shadow) {
|
|
1451
1449
|
createRipple(event);
|
|
1452
1450
|
}
|
|
1453
|
-
|
|
1454
|
-
var navOptions = {};
|
|
1455
|
-
if (relative) {
|
|
1456
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1457
|
-
relative: relative
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
if (replace) {
|
|
1461
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1462
|
-
replace: replace
|
|
1463
|
-
});
|
|
1464
|
-
}
|
|
1465
|
-
navigate(to, navOptions);
|
|
1466
|
-
} else {
|
|
1467
|
-
onClick && onClick(event);
|
|
1468
|
-
}
|
|
1451
|
+
onClick && onClick(event);
|
|
1469
1452
|
};
|
|
1470
1453
|
var childrenWithIcon = React.useMemo(function () {
|
|
1471
1454
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -1478,7 +1461,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1478
1461
|
|
|
1479
1462
|
// If shadow provided is string then value other default
|
|
1480
1463
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1481
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
1464
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
1482
1465
|
href: to
|
|
1483
1466
|
}, props, {
|
|
1484
1467
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
package/dist/carousal/index.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var require$$0 = require('react-is');
|
|
7
|
-
var reactRouterDom = require('react-router-dom');
|
|
8
7
|
var theme = require('@helpdice/theme');
|
|
9
8
|
var icons = require('@helpdice/icons');
|
|
10
9
|
|
|
@@ -2731,7 +2730,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
2731
2730
|
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
2732
2731
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
2733
2732
|
var theme$1 = theme.useTheme();
|
|
2734
|
-
|
|
2733
|
+
// const navigate = useNavigate();
|
|
2735
2734
|
var _useScale = useScale(),
|
|
2736
2735
|
SCALES = _useScale.SCALES;
|
|
2737
2736
|
var buttonRef = React.useRef(null);
|
|
@@ -2767,12 +2766,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2767
2766
|
_filteredProps$effect = filteredProps.effect,
|
|
2768
2767
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
2769
2768
|
_filteredProps$round = filteredProps.round,
|
|
2770
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
to = filteredProps.to,
|
|
2769
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
2770
|
+
filteredProps.relative;
|
|
2771
|
+
filteredProps.replace;
|
|
2772
|
+
filteredProps.a;
|
|
2773
|
+
var to = filteredProps.to,
|
|
2776
2774
|
onClick = filteredProps.onClick,
|
|
2777
2775
|
_filteredProps$auto = filteredProps.auto,
|
|
2778
2776
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -2863,22 +2861,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2863
2861
|
if (shadow) {
|
|
2864
2862
|
createRipple(event);
|
|
2865
2863
|
}
|
|
2866
|
-
|
|
2867
|
-
var navOptions = {};
|
|
2868
|
-
if (relative) {
|
|
2869
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
2870
|
-
relative: relative
|
|
2871
|
-
});
|
|
2872
|
-
}
|
|
2873
|
-
if (replace) {
|
|
2874
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
2875
|
-
replace: replace
|
|
2876
|
-
});
|
|
2877
|
-
}
|
|
2878
|
-
navigate(to, navOptions);
|
|
2879
|
-
} else {
|
|
2880
|
-
onClick && onClick(event);
|
|
2881
|
-
}
|
|
2864
|
+
onClick && onClick(event);
|
|
2882
2865
|
};
|
|
2883
2866
|
var childrenWithIcon = React.useMemo(function () {
|
|
2884
2867
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -2891,7 +2874,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
2891
2874
|
|
|
2892
2875
|
// If shadow provided is string then value other default
|
|
2893
2876
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
2894
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
2877
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
2895
2878
|
href: to
|
|
2896
2879
|
}, props, {
|
|
2897
2880
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
package/dist/container/index.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var theme = require('@helpdice/theme');
|
|
7
|
-
var reactRouterDom = require('react-router-dom');
|
|
8
7
|
|
|
9
8
|
function _arrayLikeToArray(r, a) {
|
|
10
9
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -1411,7 +1410,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1411
1410
|
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1412
1411
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1413
1412
|
var theme$1 = theme.useTheme();
|
|
1414
|
-
|
|
1413
|
+
// const navigate = useNavigate();
|
|
1415
1414
|
var _useScale = useScale(),
|
|
1416
1415
|
SCALES = _useScale.SCALES;
|
|
1417
1416
|
var buttonRef = React.useRef(null);
|
|
@@ -1447,12 +1446,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1447
1446
|
_filteredProps$effect = filteredProps.effect,
|
|
1448
1447
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1449
1448
|
_filteredProps$round = filteredProps.round,
|
|
1450
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
to = filteredProps.to,
|
|
1449
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
1450
|
+
filteredProps.relative;
|
|
1451
|
+
filteredProps.replace;
|
|
1452
|
+
filteredProps.a;
|
|
1453
|
+
var to = filteredProps.to,
|
|
1456
1454
|
onClick = filteredProps.onClick,
|
|
1457
1455
|
_filteredProps$auto = filteredProps.auto,
|
|
1458
1456
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1543,22 +1541,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1543
1541
|
if (shadow) {
|
|
1544
1542
|
createRipple(event);
|
|
1545
1543
|
}
|
|
1546
|
-
|
|
1547
|
-
var navOptions = {};
|
|
1548
|
-
if (relative) {
|
|
1549
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1550
|
-
relative: relative
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1553
|
-
if (replace) {
|
|
1554
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1555
|
-
replace: replace
|
|
1556
|
-
});
|
|
1557
|
-
}
|
|
1558
|
-
navigate(to, navOptions);
|
|
1559
|
-
} else {
|
|
1560
|
-
onClick && onClick(event);
|
|
1561
|
-
}
|
|
1544
|
+
onClick && onClick(event);
|
|
1562
1545
|
};
|
|
1563
1546
|
var childrenWithIcon = React.useMemo(function () {
|
|
1564
1547
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -1571,7 +1554,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1571
1554
|
|
|
1572
1555
|
// If shadow provided is string then value other default
|
|
1573
1556
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1574
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
1557
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
1575
1558
|
href: to
|
|
1576
1559
|
}, props, {
|
|
1577
1560
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var icons = require('@helpdice/icons');
|
|
7
|
-
var reactRouterDom = require('react-router-dom');
|
|
8
7
|
var theme = require('@helpdice/theme');
|
|
9
8
|
|
|
10
9
|
function _arrayLikeToArray(r, a) {
|
|
@@ -1453,7 +1452,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1453
1452
|
var _excluded = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1454
1453
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1455
1454
|
var theme$1 = theme.useTheme();
|
|
1456
|
-
|
|
1455
|
+
// const navigate = useNavigate();
|
|
1457
1456
|
var _useScale = useScale(),
|
|
1458
1457
|
SCALES = _useScale.SCALES;
|
|
1459
1458
|
var buttonRef = React.useRef(null);
|
|
@@ -1489,12 +1488,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1489
1488
|
_filteredProps$effect = filteredProps.effect,
|
|
1490
1489
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1491
1490
|
_filteredProps$round = filteredProps.round,
|
|
1492
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
to = filteredProps.to,
|
|
1491
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
1492
|
+
filteredProps.relative;
|
|
1493
|
+
filteredProps.replace;
|
|
1494
|
+
filteredProps.a;
|
|
1495
|
+
var to = filteredProps.to,
|
|
1498
1496
|
onClick = filteredProps.onClick,
|
|
1499
1497
|
_filteredProps$auto = filteredProps.auto,
|
|
1500
1498
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1585,22 +1583,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1585
1583
|
if (shadow) {
|
|
1586
1584
|
createRipple(event);
|
|
1587
1585
|
}
|
|
1588
|
-
|
|
1589
|
-
var navOptions = {};
|
|
1590
|
-
if (relative) {
|
|
1591
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1592
|
-
relative: relative
|
|
1593
|
-
});
|
|
1594
|
-
}
|
|
1595
|
-
if (replace) {
|
|
1596
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1597
|
-
replace: replace
|
|
1598
|
-
});
|
|
1599
|
-
}
|
|
1600
|
-
navigate(to, navOptions);
|
|
1601
|
-
} else {
|
|
1602
|
-
onClick && onClick(event);
|
|
1603
|
-
}
|
|
1586
|
+
onClick && onClick(event);
|
|
1604
1587
|
};
|
|
1605
1588
|
var childrenWithIcon = React.useMemo(function () {
|
|
1606
1589
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -1613,7 +1596,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1613
1596
|
|
|
1614
1597
|
// If shadow provided is string then value other default
|
|
1615
1598
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1616
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
1599
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
1617
1600
|
href: to
|
|
1618
1601
|
}, props, {
|
|
1619
1602
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
package/dist/index.d.ts
CHANGED
|
@@ -125,7 +125,6 @@ export { default as Swipe } from './swipe';
|
|
|
125
125
|
export type { SwipeProps } from './swipe';
|
|
126
126
|
export { default as Carousel } from './carousal';
|
|
127
127
|
export type { CarouselProps } from './carousal';
|
|
128
|
-
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './input/currency-input';
|
|
129
128
|
export { default as useToasts } from './use-toasts';
|
|
130
129
|
export type { Toast, ToastInput, ToastAction, ToastLayout } from './use-toasts';
|
|
131
130
|
export { default as Clipboard } from './copy-to-clipboard';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var React$1 = require('react');
|
|
4
4
|
var theme = require('@helpdice/theme');
|
|
5
5
|
var icons = require('@helpdice/icons');
|
|
6
|
-
var reactRouterDom = require('react-router-dom');
|
|
7
6
|
var reactDom = require('react-dom');
|
|
8
7
|
var framerMotion = require('framer-motion');
|
|
9
8
|
var reactDom$1 = require('@floating-ui/react-dom');
|
|
@@ -4949,7 +4948,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
4949
4948
|
var _excluded$1d = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
4950
4949
|
var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
4951
4950
|
var theme$1 = theme.useTheme();
|
|
4952
|
-
|
|
4951
|
+
// const navigate = useNavigate();
|
|
4953
4952
|
var _useScale = useScale(),
|
|
4954
4953
|
SCALES = _useScale.SCALES;
|
|
4955
4954
|
var buttonRef = React$1.useRef(null);
|
|
@@ -4985,12 +4984,11 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
4985
4984
|
_filteredProps$effect = filteredProps.effect,
|
|
4986
4985
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
4987
4986
|
_filteredProps$round = filteredProps.round,
|
|
4988
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
to = filteredProps.to,
|
|
4987
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
4988
|
+
filteredProps.relative;
|
|
4989
|
+
filteredProps.replace;
|
|
4990
|
+
filteredProps.a;
|
|
4991
|
+
var to = filteredProps.to,
|
|
4994
4992
|
onClick = filteredProps.onClick,
|
|
4995
4993
|
_filteredProps$auto = filteredProps.auto,
|
|
4996
4994
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -5081,22 +5079,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
5081
5079
|
if (shadow) {
|
|
5082
5080
|
createRipple(event);
|
|
5083
5081
|
}
|
|
5084
|
-
|
|
5085
|
-
var navOptions = {};
|
|
5086
|
-
if (relative) {
|
|
5087
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
5088
|
-
relative: relative
|
|
5089
|
-
});
|
|
5090
|
-
}
|
|
5091
|
-
if (replace) {
|
|
5092
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
5093
|
-
replace: replace
|
|
5094
|
-
});
|
|
5095
|
-
}
|
|
5096
|
-
navigate(to, navOptions);
|
|
5097
|
-
} else {
|
|
5098
|
-
onClick && onClick(event);
|
|
5099
|
-
}
|
|
5082
|
+
onClick && onClick(event);
|
|
5100
5083
|
};
|
|
5101
5084
|
var childrenWithIcon = React$1.useMemo(function () {
|
|
5102
5085
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -5109,7 +5092,7 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
5109
5092
|
|
|
5110
5093
|
// If shadow provided is string then value other default
|
|
5111
5094
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
5112
|
-
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null,
|
|
5095
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, to ? /*#__PURE__*/React$1.createElement("a", _extends({
|
|
5113
5096
|
href: to
|
|
5114
5097
|
}, props, {
|
|
5115
5098
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
package/dist/input/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Input from './input-field';
|
|
2
2
|
import Textarea from '../textarea';
|
|
3
3
|
import InputPassword from './password';
|
|
4
|
-
import PhoneInput from './phone
|
|
5
|
-
import CurrencyInput from './currency
|
|
4
|
+
import PhoneInput from './input-phone';
|
|
5
|
+
import CurrencyInput from './input-currency';
|
|
6
6
|
export type InputComponentType = typeof Input & {
|
|
7
7
|
Textarea: typeof Textarea;
|
|
8
8
|
Password: typeof InputPassword;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import { CurrencyInputProps } from './
|
|
2
|
+
import { CurrencyInputProps } from './input-currency-props';
|
|
3
3
|
export declare const InputCurrency: FC<Omit<CurrencyInputProps, 'ref'>>;
|
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<Omit<CurrencyInputProps, "ref"> & {
|
|
5
5
|
width?: string | number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CurrencyInputProps } from '../
|
|
1
|
+
import { CurrencyInputProps } from '../input-currency-props';
|
|
2
2
|
export type CleanValueOptions = Pick<CurrencyInputProps, 'decimalSeparator' | 'groupSeparator' | 'allowDecimals' | 'decimalsLimit' | 'allowNegativeValue' | 'disableAbbreviations' | 'prefix' | 'transformRawValue'> & {
|
|
3
3
|
value: string;
|
|
4
4
|
};
|
package/dist/modal/index.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactDom = require('react-dom');
|
|
7
7
|
var theme = require('@helpdice/theme');
|
|
8
|
-
var reactRouterDom = require('react-router-dom');
|
|
9
8
|
|
|
10
9
|
function _arrayLikeToArray(r, a) {
|
|
11
10
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -1464,7 +1463,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1464
1463
|
var _excluded$5 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1465
1464
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1466
1465
|
var theme$1 = theme.useTheme();
|
|
1467
|
-
|
|
1466
|
+
// const navigate = useNavigate();
|
|
1468
1467
|
var _useScale = useScale(),
|
|
1469
1468
|
SCALES = _useScale.SCALES;
|
|
1470
1469
|
var buttonRef = React.useRef(null);
|
|
@@ -1500,12 +1499,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1500
1499
|
_filteredProps$effect = filteredProps.effect,
|
|
1501
1500
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1502
1501
|
_filteredProps$round = filteredProps.round,
|
|
1503
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
to = filteredProps.to,
|
|
1502
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
1503
|
+
filteredProps.relative;
|
|
1504
|
+
filteredProps.replace;
|
|
1505
|
+
filteredProps.a;
|
|
1506
|
+
var to = filteredProps.to,
|
|
1509
1507
|
onClick = filteredProps.onClick,
|
|
1510
1508
|
_filteredProps$auto = filteredProps.auto,
|
|
1511
1509
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1596,22 +1594,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1596
1594
|
if (shadow) {
|
|
1597
1595
|
createRipple(event);
|
|
1598
1596
|
}
|
|
1599
|
-
|
|
1600
|
-
var navOptions = {};
|
|
1601
|
-
if (relative) {
|
|
1602
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1603
|
-
relative: relative
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
if (replace) {
|
|
1607
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1608
|
-
replace: replace
|
|
1609
|
-
});
|
|
1610
|
-
}
|
|
1611
|
-
navigate(to, navOptions);
|
|
1612
|
-
} else {
|
|
1613
|
-
onClick && onClick(event);
|
|
1614
|
-
}
|
|
1597
|
+
onClick && onClick(event);
|
|
1615
1598
|
};
|
|
1616
1599
|
var childrenWithIcon = React.useMemo(function () {
|
|
1617
1600
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -1624,7 +1607,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1624
1607
|
|
|
1625
1608
|
// If shadow provided is string then value other default
|
|
1626
1609
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1627
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
1610
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
1628
1611
|
href: to
|
|
1629
1612
|
}, props, {
|
|
1630
1613
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var theme = require('@helpdice/theme');
|
|
7
|
-
var reactRouterDom = require('react-router-dom');
|
|
8
7
|
|
|
9
8
|
function _arrayLikeToArray(r, a) {
|
|
10
9
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -1687,7 +1686,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1687
1686
|
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1688
1687
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1689
1688
|
var theme$1 = theme.useTheme();
|
|
1690
|
-
|
|
1689
|
+
// const navigate = useNavigate();
|
|
1691
1690
|
var _useScale = useScale(),
|
|
1692
1691
|
SCALES = _useScale.SCALES;
|
|
1693
1692
|
var buttonRef = React.useRef(null);
|
|
@@ -1723,12 +1722,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1723
1722
|
_filteredProps$effect = filteredProps.effect,
|
|
1724
1723
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1725
1724
|
_filteredProps$round = filteredProps.round,
|
|
1726
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
to = filteredProps.to,
|
|
1725
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
1726
|
+
filteredProps.relative;
|
|
1727
|
+
filteredProps.replace;
|
|
1728
|
+
filteredProps.a;
|
|
1729
|
+
var to = filteredProps.to,
|
|
1732
1730
|
onClick = filteredProps.onClick,
|
|
1733
1731
|
_filteredProps$auto = filteredProps.auto,
|
|
1734
1732
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1819,22 +1817,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1819
1817
|
if (shadow) {
|
|
1820
1818
|
createRipple(event);
|
|
1821
1819
|
}
|
|
1822
|
-
|
|
1823
|
-
var navOptions = {};
|
|
1824
|
-
if (relative) {
|
|
1825
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1826
|
-
relative: relative
|
|
1827
|
-
});
|
|
1828
|
-
}
|
|
1829
|
-
if (replace) {
|
|
1830
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1831
|
-
replace: replace
|
|
1832
|
-
});
|
|
1833
|
-
}
|
|
1834
|
-
navigate(to, navOptions);
|
|
1835
|
-
} else {
|
|
1836
|
-
onClick && onClick(event);
|
|
1837
|
-
}
|
|
1820
|
+
onClick && onClick(event);
|
|
1838
1821
|
};
|
|
1839
1822
|
var childrenWithIcon = React.useMemo(function () {
|
|
1840
1823
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -1847,7 +1830,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1847
1830
|
|
|
1848
1831
|
// If shadow provided is string then value other default
|
|
1849
1832
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1850
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
1833
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
1851
1834
|
href: to
|
|
1852
1835
|
}, props, {
|
|
1853
1836
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
package/dist/table/index.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var theme = require('@helpdice/theme');
|
|
7
|
-
var reactRouterDom = require('react-router-dom');
|
|
8
7
|
var pro = require('@helpdice/pro');
|
|
9
8
|
var icons = require('@helpdice/icons');
|
|
10
9
|
var reactDom = require('react-dom');
|
|
@@ -22354,7 +22353,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
22354
22353
|
var _excluded$6 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
22355
22354
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
22356
22355
|
var theme$1 = theme.useTheme();
|
|
22357
|
-
|
|
22356
|
+
// const navigate = useNavigate();
|
|
22358
22357
|
var _useScale = useScale(),
|
|
22359
22358
|
SCALES = _useScale.SCALES;
|
|
22360
22359
|
var buttonRef = React.useRef(null);
|
|
@@ -22390,12 +22389,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22390
22389
|
_filteredProps$effect = filteredProps.effect,
|
|
22391
22390
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
22392
22391
|
_filteredProps$round = filteredProps.round,
|
|
22393
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
22394
|
-
|
|
22395
|
-
|
|
22396
|
-
|
|
22397
|
-
|
|
22398
|
-
to = filteredProps.to,
|
|
22392
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
22393
|
+
filteredProps.relative;
|
|
22394
|
+
filteredProps.replace;
|
|
22395
|
+
filteredProps.a;
|
|
22396
|
+
var to = filteredProps.to,
|
|
22399
22397
|
onClick = filteredProps.onClick,
|
|
22400
22398
|
_filteredProps$auto = filteredProps.auto,
|
|
22401
22399
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -22486,22 +22484,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22486
22484
|
if (shadow) {
|
|
22487
22485
|
createRipple(event);
|
|
22488
22486
|
}
|
|
22489
|
-
|
|
22490
|
-
var navOptions = {};
|
|
22491
|
-
if (relative) {
|
|
22492
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
22493
|
-
relative: relative
|
|
22494
|
-
});
|
|
22495
|
-
}
|
|
22496
|
-
if (replace) {
|
|
22497
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
22498
|
-
replace: replace
|
|
22499
|
-
});
|
|
22500
|
-
}
|
|
22501
|
-
navigate(to, navOptions);
|
|
22502
|
-
} else {
|
|
22503
|
-
onClick && onClick(event);
|
|
22504
|
-
}
|
|
22487
|
+
onClick && onClick(event);
|
|
22505
22488
|
};
|
|
22506
22489
|
var childrenWithIcon = React.useMemo(function () {
|
|
22507
22490
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -22514,7 +22497,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
22514
22497
|
|
|
22515
22498
|
// If shadow provided is string then value other default
|
|
22516
22499
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
22517
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
22500
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
22518
22501
|
href: to
|
|
22519
22502
|
}, props, {
|
|
22520
22503
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
package/dist/text/index.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var theme = require('@helpdice/theme');
|
|
7
|
-
var reactRouterDom = require('react-router-dom');
|
|
8
7
|
|
|
9
8
|
function _arrayLikeToArray(r, a) {
|
|
10
9
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -1382,7 +1381,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
1382
1381
|
var _excluded$1 = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1383
1382
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1384
1383
|
var theme$1 = theme.useTheme();
|
|
1385
|
-
|
|
1384
|
+
// const navigate = useNavigate();
|
|
1386
1385
|
var _useScale = useScale(),
|
|
1387
1386
|
SCALES = _useScale.SCALES;
|
|
1388
1387
|
var buttonRef = React.useRef(null);
|
|
@@ -1418,12 +1417,11 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1418
1417
|
_filteredProps$effect = filteredProps.effect,
|
|
1419
1418
|
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1420
1419
|
_filteredProps$round = filteredProps.round,
|
|
1421
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
to = filteredProps.to,
|
|
1420
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
1421
|
+
filteredProps.relative;
|
|
1422
|
+
filteredProps.replace;
|
|
1423
|
+
filteredProps.a;
|
|
1424
|
+
var to = filteredProps.to,
|
|
1427
1425
|
onClick = filteredProps.onClick,
|
|
1428
1426
|
_filteredProps$auto = filteredProps.auto,
|
|
1429
1427
|
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
@@ -1514,22 +1512,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1514
1512
|
if (shadow) {
|
|
1515
1513
|
createRipple(event);
|
|
1516
1514
|
}
|
|
1517
|
-
|
|
1518
|
-
var navOptions = {};
|
|
1519
|
-
if (relative) {
|
|
1520
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1521
|
-
relative: relative
|
|
1522
|
-
});
|
|
1523
|
-
}
|
|
1524
|
-
if (replace) {
|
|
1525
|
-
navOptions = _objectSpread2(_objectSpread2({}, navOptions), {}, {
|
|
1526
|
-
replace: replace
|
|
1527
|
-
});
|
|
1528
|
-
}
|
|
1529
|
-
navigate(to, navOptions);
|
|
1530
|
-
} else {
|
|
1531
|
-
onClick && onClick(event);
|
|
1532
|
-
}
|
|
1515
|
+
onClick && onClick(event);
|
|
1533
1516
|
};
|
|
1534
1517
|
var childrenWithIcon = React.useMemo(function () {
|
|
1535
1518
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -1542,7 +1525,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
1542
1525
|
|
|
1543
1526
|
// If shadow provided is string then value other default
|
|
1544
1527
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1545
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
1528
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
1546
1529
|
href: to
|
|
1547
1530
|
}, props, {
|
|
1548
1531
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || "")
|
package/esm/button/button.js
CHANGED
|
@@ -6,7 +6,7 @@ import _JSXStyle from "../styled-jsx.es.js";
|
|
|
6
6
|
/* "use client" */
|
|
7
7
|
|
|
8
8
|
import React, { useRef, useState, useMemo, useImperativeHandle } from 'react';
|
|
9
|
-
import { useNavigate } from "react-router-dom";
|
|
9
|
+
// import { useNavigate } from "react-router-dom";
|
|
10
10
|
import useScale, { withScale } from '../use-scale';
|
|
11
11
|
import { useTheme, useClasses } from '@helpdice/theme';
|
|
12
12
|
import ButtonDrip from './button.drip';
|
|
@@ -16,7 +16,7 @@ import { useButtonGroupContext } from '../button-group/button-group-context';
|
|
|
16
16
|
import { getButtonColors, getButtonCursor, getButtonDripColor, getButtonHoverColors } from './styles';
|
|
17
17
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
18
18
|
var theme = useTheme();
|
|
19
|
-
|
|
19
|
+
// const navigate = useNavigate();
|
|
20
20
|
var _useScale = useScale(),
|
|
21
21
|
SCALES = _useScale.SCALES;
|
|
22
22
|
var buttonRef = useRef(null);
|
|
@@ -150,22 +150,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
150
150
|
if (shadow) {
|
|
151
151
|
createRipple(event);
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
var navOptions = {};
|
|
155
|
-
if (relative) {
|
|
156
|
-
navOptions = _extends({}, navOptions, {
|
|
157
|
-
relative: relative
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
if (replace) {
|
|
161
|
-
navOptions = _extends({}, navOptions, {
|
|
162
|
-
replace: replace
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
navigate(to, navOptions);
|
|
166
|
-
} else {
|
|
167
|
-
onClick && onClick(event);
|
|
168
|
-
}
|
|
153
|
+
onClick && onClick(event);
|
|
169
154
|
};
|
|
170
155
|
var childrenWithIcon = useMemo(function () {
|
|
171
156
|
return getButtonChildrenWithIcon(auto, children, {
|
|
@@ -178,7 +163,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
178
163
|
|
|
179
164
|
// If shadow provided is string then value other default
|
|
180
165
|
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme.shadows.level.z2 : 'none';
|
|
181
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
166
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, to ? /*#__PURE__*/React.createElement("a", _extends({
|
|
182
167
|
href: to
|
|
183
168
|
}, props, {
|
|
184
169
|
className: _JSXStyle.dynamic([["3965326317", [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses('btn', 'btn-link', className) || "")
|
package/esm/index.d.ts
CHANGED
|
@@ -125,7 +125,6 @@ export { default as Swipe } from './swipe';
|
|
|
125
125
|
export type { SwipeProps } from './swipe';
|
|
126
126
|
export { default as Carousel } from './carousal';
|
|
127
127
|
export type { CarouselProps } from './carousal';
|
|
128
|
-
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './input/currency-input';
|
|
129
128
|
export { default as useToasts } from './use-toasts';
|
|
130
129
|
export type { Toast, ToastInput, ToastAction, ToastLayout } from './use-toasts';
|
|
131
130
|
export { default as Clipboard } from './copy-to-clipboard';
|
package/esm/index.js
CHANGED
|
@@ -84,8 +84,8 @@ export * from './login-with';
|
|
|
84
84
|
export { default as Swipe } from './swipe';
|
|
85
85
|
// Carousel
|
|
86
86
|
export { default as Carousel } from './carousal';
|
|
87
|
-
|
|
88
87
|
// Currency Input
|
|
88
|
+
// export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './input/input-currency';
|
|
89
89
|
|
|
90
90
|
export { default as useToasts } from './use-toasts';
|
|
91
91
|
export { default as Clipboard } from './copy-to-clipboard';
|
package/esm/input/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Input from './input-field';
|
|
2
2
|
import Textarea from '../textarea';
|
|
3
3
|
import InputPassword from './password';
|
|
4
|
-
import PhoneInput from './phone
|
|
5
|
-
import CurrencyInput from './currency
|
|
4
|
+
import PhoneInput from './input-phone';
|
|
5
|
+
import CurrencyInput from './input-currency';
|
|
6
6
|
export type InputComponentType = typeof Input & {
|
|
7
7
|
Textarea: typeof Textarea;
|
|
8
8
|
Password: typeof InputPassword;
|
package/esm/input/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import Input from './input-field';
|
|
3
3
|
import Textarea from '../textarea';
|
|
4
4
|
import InputPassword from './password';
|
|
5
|
-
import PhoneInput from './phone
|
|
6
|
-
import CurrencyInput from './currency
|
|
5
|
+
import PhoneInput from './input-phone';
|
|
6
|
+
import CurrencyInput from './input-currency';
|
|
7
7
|
Input.Textarea = Textarea;
|
|
8
8
|
Input.Password = InputPassword;
|
|
9
9
|
Input.Phone = PhoneInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import { CurrencyInputProps } from './
|
|
2
|
+
import { CurrencyInputProps } from './input-currency-props';
|
|
3
3
|
export declare const InputCurrency: FC<Omit<CurrencyInputProps, 'ref'>>;
|
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<Omit<CurrencyInputProps, "ref"> & {
|
|
5
5
|
width?: string | number;
|
|
@@ -6,8 +6,8 @@ import _JSXStyle from "../styled-jsx.es.js";
|
|
|
6
6
|
import React, { useState, useEffect, useRef, forwardRef, useMemo, useImperativeHandle } from 'react';
|
|
7
7
|
import { isNumber, cleanValue, fixedDecimalValue, formatValue, getLocaleConfig, padTrimValue, getSuffix, repositionCursor } from './utils';
|
|
8
8
|
import { useTheme } from '@helpdice/theme';
|
|
9
|
-
import InputBlockLabel from '
|
|
10
|
-
import useScale, { withScale } from '
|
|
9
|
+
import InputBlockLabel from './input-block-label';
|
|
10
|
+
import useScale, { withScale } from '../use-scale';
|
|
11
11
|
export var InputCurrency = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
12
12
|
var _ref$allowDecimals = _ref.allowDecimals,
|
|
13
13
|
allowDecimals = _ref$allowDecimals === void 0 ? true : _ref$allowDecimals,
|
|
@@ -3,9 +3,9 @@ import _JSXStyle from "../styled-jsx.es.js";
|
|
|
3
3
|
import React, { useState, useRef, useEffect, useMemo } from 'react';
|
|
4
4
|
import countries from './countries.json';
|
|
5
5
|
import { useTheme } from '@helpdice/theme';
|
|
6
|
-
import { getColors } from '
|
|
7
|
-
import useScale, { withScale } from '
|
|
8
|
-
import InputBlockLabel from '
|
|
6
|
+
import { getColors } from './styles';
|
|
7
|
+
import useScale, { withScale } from '../use-scale';
|
|
8
|
+
import InputBlockLabel from './input-block-label';
|
|
9
9
|
function PhoneInput(_ref) {
|
|
10
10
|
var onChange = _ref.onChange,
|
|
11
11
|
_ref$value = _ref.value,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CurrencyInputProps } from '../
|
|
1
|
+
import { CurrencyInputProps } from '../input-currency-props';
|
|
2
2
|
export type CleanValueOptions = Pick<CurrencyInputProps, 'decimalSeparator' | 'groupSeparator' | 'allowDecimals' | 'decimalsLimit' | 'allowNegativeValue' | 'disableAbbreviations' | 'prefix' | 'transformRawValue'> & {
|
|
3
3
|
value: string;
|
|
4
4
|
};
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import CurrencyInput from './components/CurrencyInput';
|
|
2
|
-
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './components/CurrencyInputProps';
|
|
3
|
-
export { formatValue } from './components/utils/formatValue';
|
|
4
|
-
export { cleanValue } from './components/utils/cleanValue';
|
|
5
|
-
export default CurrencyInput;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import CurrencyInput from './components/CurrencyInput';
|
|
2
|
-
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './components/CurrencyInputProps';
|
|
3
|
-
export { formatValue } from './components/utils/formatValue';
|
|
4
|
-
export { cleanValue } from './components/utils/cleanValue';
|
|
5
|
-
export default CurrencyInput;
|
/package/dist/input/{currency-input/components/CurrencyInputProps.d.ts → input-currency-props.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/esm/input/{currency-input/components/CurrencyInputProps.d.ts → input-currency-props.d.ts}
RENAMED
|
File without changes
|
/package/esm/input/{currency-input/components/CurrencyInputProps.js → input-currency-props.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|