@helpdice/ui 2.5.8-beta.0 → 2.5.9
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/auto-complete/index.js +549 -491
- package/dist/avatar/index.js +82 -45
- package/dist/badge/index.js +69 -27
- package/dist/breadcrumbs/index.js +107 -56
- package/dist/button/button.icon.d.ts +3 -15
- package/dist/button/button.small.d.ts +3 -15
- package/dist/button/index.js +143 -155
- package/dist/button-dropdown/index.js +96 -83
- package/dist/button-group/index.js +61 -21
- package/dist/capacity/index.js +61 -22
- package/dist/card/index.js +147 -123
- package/dist/carousal/index.js +349 -328
- package/dist/checkbox/index.js +72 -67
- package/dist/circular-progress/CircularProgress.d.ts +17 -0
- package/dist/circular-progress/index.d.ts +3 -4
- package/dist/circular-progress/index.js +713 -336
- package/dist/circular-progress/useCircularProgress.d.ts +12 -0
- package/dist/code/index.js +70 -26
- package/dist/col/index.js +61 -24
- package/dist/collapse/index.js +102 -52
- package/dist/container/index.js +187 -188
- package/dist/copy-to-clipboard/index.js +158 -208
- package/dist/description/index.js +64 -23
- package/dist/display/index.js +64 -23
- package/dist/divider/index.js +62 -22
- package/dist/dot/index.js +63 -23
- package/dist/drawer/index.js +74 -61
- package/dist/fieldset/index.js +127 -63
- package/dist/form/index.js +15 -40
- package/dist/grid/index.js +74 -29
- package/dist/html-renderer/index.js +3 -2
- package/dist/image/index.js +163 -104
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4172 -3745
- package/dist/input/index.js +466 -419
- package/dist/keyboard/index.js +73 -29
- package/dist/linear-progress/index.js +27 -24
- package/dist/link/index.js +78 -36
- package/dist/list/index.js +118 -63
- package/dist/loadable/index.js +76 -27
- package/dist/loading/index.js +70 -29
- package/dist/menu/index.js +53 -47
- package/dist/modal/index.js +225 -178
- package/dist/note/index.js +64 -23
- package/dist/notetip/index.js +54 -45
- package/dist/notetip/note-tip.d.ts +2 -0
- package/dist/page/index.js +102 -51
- package/dist/pagination/index.js +180 -123
- package/dist/placeholder/index.js +545 -534
- package/dist/popover/index.js +94 -81
- package/dist/progress/index.js +66 -27
- package/dist/radio/index.js +94 -48
- package/dist/rating/index.js +78 -38
- package/dist/row/index.js +62 -25
- package/dist/search-bar/index.js +172 -162
- package/dist/select/index.js +364 -327
- package/dist/slider/index.js +91 -47
- package/dist/snippet/index.js +39 -39
- package/dist/spacer/index.js +58 -19
- package/dist/spinner/index.js +69 -28
- package/dist/swipe/index.js +28 -13
- package/dist/table/index.js +2216 -1973
- package/dist/table/table-body.d.ts +4 -2
- package/dist/table/table-cell.d.ts +4 -2
- package/dist/table/table-types.d.ts +2 -0
- package/dist/table/table.d.ts +4 -1
- package/dist/tabs/index.js +61 -59
- package/dist/tag/index.js +16 -20
- package/dist/text/index.js +178 -180
- package/dist/textarea/index.js +220 -214
- package/dist/toggle/index.js +75 -33
- package/dist/tooltip/index.d.ts +1 -2
- package/dist/tooltip/index.js +59 -52
- package/dist/tooltip/tooltip-content.d.ts +1 -1
- package/dist/tooltip/tooltip.d.ts +2 -1
- package/dist/tree/index.js +176 -115
- package/dist/use-scale/index.js +50 -13
- package/dist/user/index.js +146 -96
- package/esm/button/button.icon.d.ts +3 -15
- package/esm/button/button.icon.js +22 -22
- package/esm/button/button.js +4 -4
- package/esm/button/button.small.d.ts +3 -15
- package/esm/button/button.small.js +20 -21
- package/esm/circular-progress/CircularProgress.d.ts +17 -0
- package/esm/circular-progress/CircularProgress.js +110 -0
- package/esm/circular-progress/index.d.ts +3 -4
- package/esm/circular-progress/index.js +3 -4
- package/esm/circular-progress/useCircularProgress.d.ts +12 -0
- package/esm/circular-progress/useCircularProgress.js +35 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +1 -1
- package/esm/list/list-item.js +11 -11
- package/esm/notetip/note-tip.d.ts +2 -0
- package/esm/notetip/note-tip.js +8 -5
- package/esm/skeleton/index.js +9 -4
- package/esm/table/table-body.d.ts +4 -2
- package/esm/table/table-body.js +9 -4
- package/esm/table/table-cell.d.ts +4 -2
- package/esm/table/table-cell.js +19 -3
- package/esm/table/table-types.d.ts +2 -0
- package/esm/table/table.d.ts +4 -1
- package/esm/table/table.js +13 -6
- package/esm/tooltip/index.d.ts +1 -2
- package/esm/tooltip/tooltip-content.d.ts +1 -1
- package/esm/tooltip/tooltip-content.js +5 -5
- package/esm/tooltip/tooltip.d.ts +2 -1
- package/esm/tooltip/tooltip.js +6 -5
- package/package.json +3 -3
- package/dist/circular-progress/CircularProgressbar.d.ts +0 -10
- package/dist/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
- package/dist/circular-progress/Path.d.ts +0 -9
- package/dist/circular-progress/buildStyles.d.ts +0 -12
- package/dist/circular-progress/constants.d.ts +0 -5
- package/dist/circular-progress/types.d.ts +0 -50
- package/esm/circular-progress/CircularProgressbar.d.ts +0 -10
- package/esm/circular-progress/CircularProgressbar.js +0 -118
- package/esm/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
- package/esm/circular-progress/CircularProgressbarWithChildren.js +0 -32
- package/esm/circular-progress/Path.d.ts +0 -9
- package/esm/circular-progress/Path.js +0 -52
- package/esm/circular-progress/buildStyles.d.ts +0 -12
- package/esm/circular-progress/buildStyles.js +0 -45
- package/esm/circular-progress/constants.d.ts +0 -5
- package/esm/circular-progress/constants.js +0 -5
- package/esm/circular-progress/types.d.ts +0 -50
- package/esm/circular-progress/types.js +0 -1
package/dist/popover/index.js
CHANGED
|
@@ -5,6 +5,7 @@ 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 jsxRuntime = require('react/jsx-runtime');
|
|
8
9
|
|
|
9
10
|
function _arrayLikeToArray(r, a) {
|
|
10
11
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -70,15 +71,6 @@ function _defineProperty(e, r, t) {
|
|
|
70
71
|
writable: true
|
|
71
72
|
}) : e[r] = t, e;
|
|
72
73
|
}
|
|
73
|
-
function _extends() {
|
|
74
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
75
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
76
|
-
var t = arguments[e];
|
|
77
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
78
|
-
}
|
|
79
|
-
return n;
|
|
80
|
-
}, _extends.apply(null, arguments);
|
|
81
|
-
}
|
|
82
74
|
function _iterableToArrayLimit(r, l) {
|
|
83
75
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
84
76
|
if (null != t) {
|
|
@@ -1102,12 +1094,14 @@ var TooltipIcon = function TooltipIcon(_ref) {
|
|
|
1102
1094
|
if (!shadow || theme$1.type !== 'dark') return 'var(--tooltip-content-bg)';
|
|
1103
1095
|
return theme$1.palette.accents_2;
|
|
1104
1096
|
}, [theme$1.type, shadow]);
|
|
1105
|
-
return /*#__PURE__*/
|
|
1106
|
-
className: _JSXStyle.dynamic([["2440507693", [bgColorWithDark, left, top, right, bottom, transform]]])
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1097
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1098
|
+
className: _JSXStyle.dynamic([["2440507693", [bgColorWithDark, left, top, right, bottom, transform]]]),
|
|
1099
|
+
children: /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1100
|
+
id: "2440507693",
|
|
1101
|
+
dynamic: [bgColorWithDark, left, top, right, bottom, transform],
|
|
1102
|
+
children: "span.__jsx-style-dynamic-selector{width:0;height:0;border-style:solid;border-width:6px 7px 6px 0;border-color:transparent ".concat(bgColorWithDark, " transparent transparent;position:absolute;left:").concat(left, ";top:").concat(top, ";right:").concat(right, ";bottom:").concat(bottom, ";-webkit-transform:").concat(transform, ";-ms-transform:").concat(transform, ";transform:").concat(transform, ";}")
|
|
1103
|
+
})
|
|
1104
|
+
});
|
|
1111
1105
|
};
|
|
1112
1106
|
|
|
1113
1107
|
/* "use client" */
|
|
@@ -1276,11 +1270,13 @@ var withScale = function withScale(Render) {
|
|
|
1276
1270
|
getScaleProps: generateGetScaleProps(props),
|
|
1277
1271
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
1278
1272
|
};
|
|
1279
|
-
return /*#__PURE__*/
|
|
1280
|
-
value: value
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1273
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
1274
|
+
value: value,
|
|
1275
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1276
|
+
ref: ref,
|
|
1277
|
+
children: children
|
|
1278
|
+
}))
|
|
1279
|
+
});
|
|
1284
1280
|
});
|
|
1285
1281
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
1286
1282
|
return ScaleFC;
|
|
@@ -1332,8 +1328,8 @@ var TooltipContent = function TooltipContent(_ref) {
|
|
|
1332
1328
|
offset = _ref.offset,
|
|
1333
1329
|
iconOffset = _ref.iconOffset,
|
|
1334
1330
|
placement = _ref.placement,
|
|
1335
|
-
_ref$
|
|
1336
|
-
|
|
1331
|
+
_ref$color = _ref.color,
|
|
1332
|
+
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
1337
1333
|
className = _ref.className,
|
|
1338
1334
|
hideArrow = _ref.hideArrow;
|
|
1339
1335
|
var theme$1 = theme.useTheme();
|
|
@@ -1346,9 +1342,9 @@ var TooltipContent = function TooltipContent(_ref) {
|
|
|
1346
1342
|
rect = _useState2[0],
|
|
1347
1343
|
setRect = _useState2[1];
|
|
1348
1344
|
var colors = React.useMemo(function () {
|
|
1349
|
-
return getColors(
|
|
1350
|
-
}, [
|
|
1351
|
-
var hasShadow =
|
|
1345
|
+
return getColors(color, theme$1.palette);
|
|
1346
|
+
}, [color, theme$1.palette]);
|
|
1347
|
+
var hasShadow = color === 'default';
|
|
1352
1348
|
var classes = theme.useClasses('tooltip-content', className);
|
|
1353
1349
|
|
|
1354
1350
|
// console.log('Having Parent', parent);
|
|
@@ -1378,21 +1374,25 @@ var TooltipContent = function TooltipContent(_ref) {
|
|
|
1378
1374
|
event.nativeEvent.stopImmediatePropagation();
|
|
1379
1375
|
};
|
|
1380
1376
|
if (!el) return null;
|
|
1381
|
-
return /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/
|
|
1382
|
-
visible: visible
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1377
|
+
return /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/jsxRuntime.jsx(theme.CssTransition, {
|
|
1378
|
+
visible: visible,
|
|
1379
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1380
|
+
ref: selfRef,
|
|
1381
|
+
onClick: preventHandler,
|
|
1382
|
+
className: _JSXStyle.dynamic([["2237208653", [iconOffset.x, iconOffset.y, colors.bgColor, rect.top, rect.left, rect.transform, colors.color, theme$1.layout.radius, hasShadow ? theme$1.expressiveness.shadowMedium : 'none', SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.font(1), SCALES.pt(0.65), SCALES.pr(0.9), SCALES.pb(0.65), SCALES.pl(0.9)]]]) + " " + (classes || ""),
|
|
1383
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1384
|
+
className: _JSXStyle.dynamic([["2237208653", [iconOffset.x, iconOffset.y, colors.bgColor, rect.top, rect.left, rect.transform, colors.color, theme$1.layout.radius, hasShadow ? theme$1.expressiveness.shadowMedium : 'none', SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.font(1), SCALES.pt(0.65), SCALES.pr(0.9), SCALES.pb(0.65), SCALES.pl(0.9)]]]) + " " + "inner",
|
|
1385
|
+
children: [!hideArrow && /*#__PURE__*/jsxRuntime.jsx(TooltipIcon, {
|
|
1386
|
+
placement: placement,
|
|
1387
|
+
shadow: hasShadow
|
|
1388
|
+
}), children]
|
|
1389
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1390
|
+
id: "2237208653",
|
|
1391
|
+
dynamic: [iconOffset.x, iconOffset.y, colors.bgColor, rect.top, rect.left, rect.transform, colors.color, theme$1.layout.radius, hasShadow ? theme$1.expressiveness.shadowMedium : 'none', SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.font(1), SCALES.pt(0.65), SCALES.pr(0.9), SCALES.pb(0.65), SCALES.pl(0.9)],
|
|
1392
|
+
children: ".tooltip-content.__jsx-style-dynamic-selector{--tooltip-icon-offset-x:".concat(iconOffset.x, ";--tooltip-icon-offset-y:").concat(iconOffset.y, ";--tooltip-content-bg:").concat(colors.bgColor, ";box-sizing:border-box;position:absolute;top:").concat(rect.top, ";left:").concat(rect.left, ";-webkit-transform:").concat(rect.transform, ";-ms-transform:").concat(rect.transform, ";transform:").concat(rect.transform, ";background-color:var(--tooltip-content-bg);color:").concat(colors.color, ";border-radius:").concat(theme$1.layout.radius, ";padding:0;z-index:1000;box-shadow:").concat(hasShadow ? theme$1.expressiveness.shadowMedium : 'none', ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";}.inner.__jsx-style-dynamic-selector{box-sizing:border-box;position:relative;font-size:").concat(SCALES.font(1), ";padding:").concat(SCALES.pt(0.65), " ").concat(SCALES.pr(0.9), " ").concat(SCALES.pb(0.65), " ").concat(SCALES.pl(0.9), ";height:100%;}")
|
|
1393
|
+
})]
|
|
1394
|
+
})
|
|
1395
|
+
}), el);
|
|
1396
1396
|
};
|
|
1397
1397
|
|
|
1398
1398
|
/* "use client" */
|
|
@@ -1432,15 +1432,16 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
1432
1432
|
leaveDelay = _ref$leaveDelay === void 0 ? 150 : _ref$leaveDelay,
|
|
1433
1433
|
_ref$trigger = _ref.trigger,
|
|
1434
1434
|
trigger = _ref$trigger === void 0 ? 'hover' : _ref$trigger,
|
|
1435
|
-
_ref$
|
|
1436
|
-
|
|
1435
|
+
_ref$color = _ref.color,
|
|
1436
|
+
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
1437
1437
|
_ref$className = _ref.className,
|
|
1438
1438
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1439
1439
|
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
1440
1440
|
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
1441
1441
|
_ref$hideArrow = _ref.hideArrow,
|
|
1442
1442
|
hideArrow = _ref$hideArrow === void 0 ? false : _ref$hideArrow,
|
|
1443
|
-
customVisible = _ref.visible
|
|
1443
|
+
customVisible = _ref.visible,
|
|
1444
|
+
disabled = _ref.disabled;
|
|
1444
1445
|
var timer = React.useRef(undefined);
|
|
1445
1446
|
var ref = React.useRef(null);
|
|
1446
1447
|
var _useState = React.useState(initialVisible),
|
|
@@ -1459,8 +1460,8 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
1459
1460
|
};
|
|
1460
1461
|
}, [ref === null || ref === void 0 ? void 0 : ref.current]);
|
|
1461
1462
|
var contentProps = {
|
|
1462
|
-
|
|
1463
|
-
visible: visible,
|
|
1463
|
+
color: color,
|
|
1464
|
+
visible: disabled ? false : visible,
|
|
1464
1465
|
offset: offset,
|
|
1465
1466
|
placement: placement,
|
|
1466
1467
|
hideArrow: hideArrow,
|
|
@@ -1503,7 +1504,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
1503
1504
|
if (customVisible === undefined) return;
|
|
1504
1505
|
changeVisible(customVisible);
|
|
1505
1506
|
}, [customVisible]);
|
|
1506
|
-
return /*#__PURE__*/
|
|
1507
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1507
1508
|
ref: ref,
|
|
1508
1509
|
onClick: clickEventHandler,
|
|
1509
1510
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -1514,10 +1515,14 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
1514
1515
|
}
|
|
1515
1516
|
// {...props}
|
|
1516
1517
|
,
|
|
1517
|
-
className: "jsx-418573366" + " " + (theme.useClasses('tooltip', className) || "")
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1518
|
+
className: "jsx-418573366" + " " + (theme.useClasses('tooltip', className) || ""),
|
|
1519
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(TooltipContent, _objectSpread2(_objectSpread2({}, contentProps), {}, {
|
|
1520
|
+
children: text
|
|
1521
|
+
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1522
|
+
id: "418573366",
|
|
1523
|
+
children: ".tooltip.jsx-418573366{width:-webkit-max-content;width:-moz-max-content;width:max-content;display:inline-block;}"
|
|
1524
|
+
})]
|
|
1525
|
+
});
|
|
1521
1526
|
};
|
|
1522
1527
|
TooltipComponent.displayName = 'Tooltip';
|
|
1523
1528
|
var Tooltip = withScale(TooltipComponent);
|
|
@@ -1586,23 +1591,27 @@ var PopoverComponent = function PopoverComponent(_ref) {
|
|
|
1586
1591
|
if (customVisible === undefined) return;
|
|
1587
1592
|
onPopoverVisibleChange(customVisible);
|
|
1588
1593
|
}, [customVisible]);
|
|
1589
|
-
return /*#__PURE__*/
|
|
1590
|
-
value: value
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1594
|
+
return /*#__PURE__*/jsxRuntime.jsx(PopoverContext.Provider, {
|
|
1595
|
+
value: value,
|
|
1596
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Tooltip, _objectSpread2(_objectSpread2({
|
|
1597
|
+
type: type,
|
|
1598
|
+
enterDelay: enterDelay,
|
|
1599
|
+
leaveDelay: leaveDelay,
|
|
1600
|
+
offset: offset,
|
|
1601
|
+
text: textNode,
|
|
1602
|
+
trigger: trigger,
|
|
1603
|
+
placement: placement,
|
|
1604
|
+
portalClassName: classes,
|
|
1605
|
+
visible: visible,
|
|
1606
|
+
onVisibleChange: onPopoverVisibleChange
|
|
1607
|
+
}, props), {}, {
|
|
1608
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1609
|
+
id: "3577605772",
|
|
1610
|
+
dynamic: [SCALES.pt(0.5), SCALES.pr(0), SCALES.pb(0.5), SCALES.pl(0)],
|
|
1611
|
+
children: ".tooltip-content.popover > .inner{padding:".concat(SCALES.pt(0.5), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0.5), " ").concat(SCALES.pl(0), ";}")
|
|
1612
|
+
})]
|
|
1613
|
+
}))
|
|
1614
|
+
});
|
|
1606
1615
|
};
|
|
1607
1616
|
PopoverComponent.displayName = 'Popover';
|
|
1608
1617
|
var Popover = withScale(PopoverComponent);
|
|
@@ -1641,20 +1650,24 @@ var PopoverItemComponent = function PopoverItemComponent(_ref) {
|
|
|
1641
1650
|
}
|
|
1642
1651
|
onItemClick(event);
|
|
1643
1652
|
};
|
|
1644
|
-
return /*#__PURE__*/
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1653
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1654
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
|
|
1655
|
+
style: {
|
|
1656
|
+
backgroundColor: selected ? '#efefef' : ''
|
|
1657
|
+
},
|
|
1658
|
+
onClick: clickHandler
|
|
1659
|
+
}, props), {}, {
|
|
1660
|
+
className: _JSXStyle.dynamic([["190621384", [theme$1.palette.accents_5, SCALES.font(0.875), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme$1.palette.foreground, theme$1.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme$1.palette.foreground]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
1661
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1662
|
+
id: "190621384",
|
|
1663
|
+
dynamic: [theme$1.palette.accents_5, SCALES.font(0.875), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme$1.palette.foreground, theme$1.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme$1.palette.foreground],
|
|
1664
|
+
children: ".item.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:".concat(theme$1.palette.accents_5, ";-webkit-transition:color,background-color 150ms linear;transition:color,background-color 150ms linear;line-height:1.25em;font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0.5), " ").concat(SCALES.pr(0.75), " ").concat(SCALES.pb(0.5), " ").concat(SCALES.pl(0.75), ";cursor:").concat(hasHandler ? 'pointer' : 'default', ";}.item.__jsx-style-dynamic-selector:hover{color:").concat(theme$1.palette.foreground, ";}.item.line.__jsx-style-dynamic-selector{line-height:0;padding:0;background-color:").concat(theme$1.palette.border, ";height:").concat(SCALES.height(0.0625), ";margin:").concat(SCALES.mt(0.35), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0.35), " ").concat(SCALES.ml(0), ";width:").concat(SCALES.width(1, '100%'), ";}.item.title.__jsx-style-dynamic-selector{font-weight:500;font-size:").concat(SCALES.font(0.925), ";color:").concat(theme$1.palette.foreground, ";}")
|
|
1665
|
+
})]
|
|
1666
|
+
})), showTitle && /*#__PURE__*/jsxRuntime.jsx(PopoverItem, {
|
|
1667
|
+
line: true,
|
|
1668
|
+
showTitle: false
|
|
1669
|
+
})]
|
|
1670
|
+
});
|
|
1658
1671
|
};
|
|
1659
1672
|
PopoverItemComponent.displayName = 'PopoverItem';
|
|
1660
1673
|
var PopoverItem = withScale(PopoverItemComponent);
|
package/dist/progress/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var theme = require('@helpdice/theme');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
|
|
8
9
|
function _arrayLikeToArray(r, a) {
|
|
9
10
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -58,14 +59,34 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
function _defineProperty(e, r, t) {
|
|
63
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
64
|
+
value: t,
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
writable: true
|
|
68
|
+
}) : e[r] = t, e;
|
|
69
|
+
}
|
|
70
|
+
function ownKeys(e, r) {
|
|
71
|
+
var t = Object.keys(e);
|
|
72
|
+
if (Object.getOwnPropertySymbols) {
|
|
73
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
74
|
+
r && (o = o.filter(function (r) {
|
|
75
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
76
|
+
})), t.push.apply(t, o);
|
|
77
|
+
}
|
|
78
|
+
return t;
|
|
79
|
+
}
|
|
80
|
+
function _objectSpread2(e) {
|
|
81
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
82
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
83
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
84
|
+
_defineProperty(e, r, t[r]);
|
|
85
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
86
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return e;
|
|
69
90
|
}
|
|
70
91
|
function _objectWithoutProperties(e, t) {
|
|
71
92
|
if (null == e) return {};
|
|
@@ -87,6 +108,20 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
87
108
|
}
|
|
88
109
|
return t;
|
|
89
110
|
}
|
|
111
|
+
function _toPrimitive(t, r) {
|
|
112
|
+
if ("object" != typeof t || !t) return t;
|
|
113
|
+
var e = t[Symbol.toPrimitive];
|
|
114
|
+
if (void 0 !== e) {
|
|
115
|
+
var i = e.call(t, r);
|
|
116
|
+
if ("object" != typeof i) return i;
|
|
117
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
118
|
+
}
|
|
119
|
+
return ("string" === r ? String : Number)(t);
|
|
120
|
+
}
|
|
121
|
+
function _toPropertyKey(t) {
|
|
122
|
+
var i = _toPrimitive(t, "string");
|
|
123
|
+
return "symbol" == typeof i ? i : i + "";
|
|
124
|
+
}
|
|
90
125
|
function _unsupportedIterableToArray(r, a) {
|
|
91
126
|
if (r) {
|
|
92
127
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
@@ -839,11 +874,13 @@ var withScale = function withScale(Render) {
|
|
|
839
874
|
getScaleProps: generateGetScaleProps(props),
|
|
840
875
|
getAllScaleProps: generateGetAllScaleProps(props)
|
|
841
876
|
};
|
|
842
|
-
return /*#__PURE__*/
|
|
843
|
-
value: value
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
877
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScaleContext.Provider, {
|
|
878
|
+
value: value,
|
|
879
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Render, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
880
|
+
ref: ref,
|
|
881
|
+
children: children
|
|
882
|
+
}))
|
|
883
|
+
});
|
|
847
884
|
});
|
|
848
885
|
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
849
886
|
return ScaleFC;
|
|
@@ -891,20 +928,22 @@ var ProgressComponent = function ProgressComponent(_ref) {
|
|
|
891
928
|
var classes = theme.useClasses('progress', {
|
|
892
929
|
fixed: fixed
|
|
893
930
|
}, className);
|
|
894
|
-
return /*#__PURE__*/
|
|
895
|
-
className: _JSXStyle.dynamic([["1239801602", [theme$1.palette.accents_2, theme$1.layout.radius, SCALES.width(1, '100%'), SCALES.height(0.625), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), fixedTop ? 0 : 'unset', fixedBottom ? 0 : 'unset', theme$1.layout.radius, currentColor, percentValue]]]) + " " + (classes || "")
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
931
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
932
|
+
className: _JSXStyle.dynamic([["1239801602", [theme$1.palette.accents_2, theme$1.layout.radius, SCALES.width(1, '100%'), SCALES.height(0.625), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), fixedTop ? 0 : 'unset', fixedBottom ? 0 : 'unset', theme$1.layout.radius, currentColor, percentValue]]]) + " " + (classes || ""),
|
|
933
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
934
|
+
title: "".concat(percentValue, "%"),
|
|
935
|
+
className: _JSXStyle.dynamic([["1239801602", [theme$1.palette.accents_2, theme$1.layout.radius, SCALES.width(1, '100%'), SCALES.height(0.625), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), fixedTop ? 0 : 'unset', fixedBottom ? 0 : 'unset', theme$1.layout.radius, currentColor, percentValue]]]) + " " + "inner"
|
|
936
|
+
}), /*#__PURE__*/jsxRuntime.jsx("progress", _objectSpread2(_objectSpread2({
|
|
937
|
+
value: value,
|
|
938
|
+
max: max
|
|
939
|
+
}, props), {}, {
|
|
940
|
+
className: _JSXStyle.dynamic([["1239801602", [theme$1.palette.accents_2, theme$1.layout.radius, SCALES.width(1, '100%'), SCALES.height(0.625), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), fixedTop ? 0 : 'unset', fixedBottom ? 0 : 'unset', theme$1.layout.radius, currentColor, percentValue]]]) + " " + (props && props.className != null && props.className || className || "")
|
|
941
|
+
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
942
|
+
id: "1239801602",
|
|
943
|
+
dynamic: [theme$1.palette.accents_2, theme$1.layout.radius, SCALES.width(1, '100%'), SCALES.height(0.625), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), fixedTop ? 0 : 'unset', fixedBottom ? 0 : 'unset', theme$1.layout.radius, currentColor, percentValue],
|
|
944
|
+
children: "progress.__jsx-style-dynamic-selector{position:fixed;top:-1000px;opacity:0;visibility:hidden;pointer-events:none;}.progress.__jsx-style-dynamic-selector{position:relative;background-color:".concat(theme$1.palette.accents_2, ";border-radius:").concat(theme$1.layout.radius, ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(0.625), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.fixed.__jsx-style-dynamic-selector{position:fixed;top:").concat(fixedTop ? 0 : 'unset', ";bottom:").concat(fixedBottom ? 0 : 'unset', ";left:0;border-radius:0;}.fixed.__jsx-style-dynamic-selector>.inner.__jsx-style-dynamic-selector{border-radius:0;}.inner.__jsx-style-dynamic-selector{position:absolute;top:0;left:0;height:100%;bottom:0;-webkit-transition:all 100ms ease-in;transition:all 100ms ease-in;border-radius:").concat(theme$1.layout.radius, ";background-color:").concat(currentColor, ";width:").concat(percentValue, "%;}")
|
|
945
|
+
})]
|
|
946
|
+
});
|
|
908
947
|
};
|
|
909
948
|
ProgressComponent.displayName = 'Progress';
|
|
910
949
|
var Progress = withScale(ProgressComponent);
|