@helpdice/ui 1.3.0 → 1.3.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/index.js +19 -16
- package/dist/table/index.js +761 -758
- package/esm/table/table-head.js +19 -17
- package/package.json +1 -1
package/dist/table/index.js
CHANGED
|
@@ -19835,525 +19835,6 @@ var SelectOption = withScale(SelectOptionComponent);
|
|
|
19835
19835
|
|
|
19836
19836
|
Select.Option = SelectOption;
|
|
19837
19837
|
|
|
19838
|
-
var ButtonDrip = function ButtonDrip(_ref) {
|
|
19839
|
-
var _ref$x = _ref.x,
|
|
19840
|
-
x = _ref$x === undefined ? 0 : _ref$x,
|
|
19841
|
-
_ref$y = _ref.y,
|
|
19842
|
-
y = _ref$y === undefined ? 0 : _ref$y,
|
|
19843
|
-
color = _ref.color,
|
|
19844
|
-
onCompleted = _ref.onCompleted;
|
|
19845
|
-
var dripRef = React.useRef(null);
|
|
19846
|
-
/* istanbul ignore next */
|
|
19847
|
-
var top = Number.isNaN(+y) ? 0 : y - 10;
|
|
19848
|
-
/* istanbul ignore next */
|
|
19849
|
-
var left = Number.isNaN(+x) ? 0 : x - 10;
|
|
19850
|
-
React.useEffect(function () {
|
|
19851
|
-
/* istanbul ignore next */
|
|
19852
|
-
if (!dripRef.current) return;
|
|
19853
|
-
dripRef.current.addEventListener('animationend', onCompleted);
|
|
19854
|
-
return function () {
|
|
19855
|
-
/* istanbul ignore next */
|
|
19856
|
-
if (!dripRef.current) return;
|
|
19857
|
-
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
19858
|
-
};
|
|
19859
|
-
});
|
|
19860
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
19861
|
-
ref: dripRef,
|
|
19862
|
-
className: "jsx-3424889537" + " " + "drip"
|
|
19863
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
19864
|
-
width: "20",
|
|
19865
|
-
height: "20",
|
|
19866
|
-
viewBox: "0 0 20 20",
|
|
19867
|
-
style: {
|
|
19868
|
-
top: top,
|
|
19869
|
-
left: left
|
|
19870
|
-
},
|
|
19871
|
-
className: "jsx-3424889537"
|
|
19872
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
19873
|
-
stroke: "none",
|
|
19874
|
-
strokeWidth: "1",
|
|
19875
|
-
fill: "none",
|
|
19876
|
-
fillRule: "evenodd",
|
|
19877
|
-
className: "jsx-3424889537"
|
|
19878
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
19879
|
-
fill: color,
|
|
19880
|
-
className: "jsx-3424889537"
|
|
19881
|
-
}, /*#__PURE__*/React.createElement("rect", {
|
|
19882
|
-
width: "100%",
|
|
19883
|
-
height: "100%",
|
|
19884
|
-
rx: "10",
|
|
19885
|
-
className: "jsx-3424889537"
|
|
19886
|
-
})))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
19887
|
-
id: "3424889537"
|
|
19888
|
-
}, ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"));
|
|
19889
|
-
};
|
|
19890
|
-
ButtonDrip.displayName = 'ButtonDrip';
|
|
19891
|
-
|
|
19892
|
-
var _excluded$4 = ["children", "type", "color", "className", "spaceRatio"];
|
|
19893
|
-
var getIconBgColor = function getIconBgColor(type, palette, color) {
|
|
19894
|
-
var colors = {
|
|
19895
|
-
"default": palette.accents_6,
|
|
19896
|
-
secondary: palette.secondary,
|
|
19897
|
-
success: palette.success,
|
|
19898
|
-
warning: palette.warning,
|
|
19899
|
-
error: palette.error
|
|
19900
|
-
};
|
|
19901
|
-
return color ? color : colors[type];
|
|
19902
|
-
};
|
|
19903
|
-
var LoadingComponent = function LoadingComponent(_ref) {
|
|
19904
|
-
var children = _ref.children,
|
|
19905
|
-
_ref$type = _ref.type,
|
|
19906
|
-
type = _ref$type === undefined ? 'default' : _ref$type,
|
|
19907
|
-
color = _ref.color,
|
|
19908
|
-
_ref$className = _ref.className,
|
|
19909
|
-
className = _ref$className === undefined ? '' : _ref$className,
|
|
19910
|
-
_ref$spaceRatio = _ref.spaceRatio,
|
|
19911
|
-
spaceRatio = _ref$spaceRatio === undefined ? 1 : _ref$spaceRatio,
|
|
19912
|
-
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
19913
|
-
var theme = useTheme();
|
|
19914
|
-
var _useScale = useScale(),
|
|
19915
|
-
SCALES = _useScale.SCALES;
|
|
19916
|
-
var classes = useClasses('loading-container', className);
|
|
19917
|
-
var bgColor = React.useMemo(function () {
|
|
19918
|
-
return getIconBgColor(type, theme.palette, color);
|
|
19919
|
-
}, [type, theme.palette, color]);
|
|
19920
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
19921
|
-
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
19922
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
19923
|
-
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading"
|
|
19924
|
-
}, children && /*#__PURE__*/React.createElement("label", {
|
|
19925
|
-
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
19926
|
-
}, children), /*#__PURE__*/React.createElement("i", {
|
|
19927
|
-
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
19928
|
-
}), /*#__PURE__*/React.createElement("i", {
|
|
19929
|
-
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
19930
|
-
}), /*#__PURE__*/React.createElement("i", {
|
|
19931
|
-
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
19932
|
-
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
19933
|
-
id: "2201634259",
|
|
19934
|
-
dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]
|
|
19935
|
-
}, ".loading-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;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), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")));
|
|
19936
|
-
};
|
|
19937
|
-
LoadingComponent.displayName = 'Loading';
|
|
19938
|
-
var Loading = withScale(LoadingComponent);
|
|
19939
|
-
|
|
19940
|
-
var ButtonLoading = function ButtonLoading(_ref) {
|
|
19941
|
-
var color = _ref.color;
|
|
19942
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
19943
|
-
className: "jsx-212623367" + " " + "btn-loading"
|
|
19944
|
-
}, /*#__PURE__*/React.createElement(Loading, {
|
|
19945
|
-
color: color
|
|
19946
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
19947
|
-
id: "212623367"
|
|
19948
|
-
}, ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"));
|
|
19949
|
-
};
|
|
19950
|
-
ButtonLoading.displayName = 'GeistButtonLoading';
|
|
19951
|
-
|
|
19952
|
-
var _excluded$3 = ["isRight", "isSingle", "children", "className"];
|
|
19953
|
-
var ButtonIcon = function ButtonIcon(_ref) {
|
|
19954
|
-
var _ref$isRight = _ref.isRight,
|
|
19955
|
-
isRight = _ref$isRight === undefined ? false : _ref$isRight,
|
|
19956
|
-
isSingle = _ref.isSingle,
|
|
19957
|
-
children = _ref.children,
|
|
19958
|
-
_ref$className = _ref.className,
|
|
19959
|
-
className = _ref$className === undefined ? '' : _ref$className,
|
|
19960
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
19961
|
-
var classes = useClasses('icon', {
|
|
19962
|
-
right: isRight,
|
|
19963
|
-
single: isSingle
|
|
19964
|
-
}, className);
|
|
19965
|
-
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
19966
|
-
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || "")
|
|
19967
|
-
}), children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
19968
|
-
id: "2467502931"
|
|
19969
|
-
}, ".icon.jsx-2467502931{position:absolute;left:var(--helpdice-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--helpdice-ui-button-color);z-index:1;}.right.jsx-2467502931{right:var(--helpdice-ui-button-icon-padding);left:auto;}.icon.jsx-2467502931 svg{background:transparent;height:calc(var(--helpdice-ui-button-height) / 2.35);width:calc(var(--helpdice-ui-button-height) / 2.35);}.single.jsx-2467502931{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"));
|
|
19970
|
-
};
|
|
19971
|
-
ButtonIcon.displayName = 'ButtonIcon';
|
|
19972
|
-
|
|
19973
|
-
var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
|
|
19974
|
-
var icon = icons.icon,
|
|
19975
|
-
iconRight = icons.iconRight;
|
|
19976
|
-
var hasIcon = icon || iconRight;
|
|
19977
|
-
var isRight = Boolean(iconRight);
|
|
19978
|
-
var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
|
|
19979
|
-
var classes = useClasses('text', isRight ? 'right' : 'left');
|
|
19980
|
-
if (!hasIcon) return /*#__PURE__*/React.createElement("div", {
|
|
19981
|
-
className: "text"
|
|
19982
|
-
}, children);
|
|
19983
|
-
if (React.Children.count(children) === 0) {
|
|
19984
|
-
return /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
19985
|
-
isRight: isRight,
|
|
19986
|
-
isSingle: true
|
|
19987
|
-
}, hasIcon);
|
|
19988
|
-
}
|
|
19989
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
19990
|
-
isRight: isRight
|
|
19991
|
-
}, hasIcon), /*#__PURE__*/React.createElement("div", {
|
|
19992
|
-
className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
|
|
19993
|
-
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
19994
|
-
id: "3568181479",
|
|
19995
|
-
dynamic: [paddingForAutoMode, paddingForAutoMode]
|
|
19996
|
-
}, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
|
|
19997
|
-
};
|
|
19998
|
-
var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
|
|
19999
|
-
if (!config.isButtonGroup) return props;
|
|
20000
|
-
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20001
|
-
auto: true,
|
|
20002
|
-
shadow: false,
|
|
20003
|
-
ghost: config.ghost || props.ghost,
|
|
20004
|
-
type: config.type || props.type,
|
|
20005
|
-
disabled: config.disabled || props.disabled
|
|
20006
|
-
});
|
|
20007
|
-
};
|
|
20008
|
-
|
|
20009
|
-
/* "use client" */
|
|
20010
|
-
|
|
20011
|
-
var defaultContext$1 = {
|
|
20012
|
-
isButtonGroup: false,
|
|
20013
|
-
disabled: false
|
|
20014
|
-
};
|
|
20015
|
-
var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext$1);
|
|
20016
|
-
var useButtonGroupContext = function useButtonGroupContext() {
|
|
20017
|
-
return React.useContext(ButtonGroupContext);
|
|
20018
|
-
};
|
|
20019
|
-
|
|
20020
|
-
var hexToRgb = function hexToRgb(color) {
|
|
20021
|
-
var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
20022
|
-
var full = color.replace(fullReg, function (_, r, g, b) {
|
|
20023
|
-
return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
|
|
20024
|
-
});
|
|
20025
|
-
var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
|
|
20026
|
-
if (!values) {
|
|
20027
|
-
throw new Error("Helpdice UI: Unsupported ".concat(color, " color."));
|
|
20028
|
-
}
|
|
20029
|
-
return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
|
|
20030
|
-
};
|
|
20031
|
-
var colorToRgbValues = function colorToRgbValues(color) {
|
|
20032
|
-
if (color.charAt(0) === '#') return hexToRgb(color);
|
|
20033
|
-
var safeColor = color.replace(/ /g, '');
|
|
20034
|
-
var colorType = color.substr(0, 4);
|
|
20035
|
-
var regArray = safeColor.match(/\((.+)\)/);
|
|
20036
|
-
if (!colorType.startsWith('rgb') || !regArray) {
|
|
20037
|
-
console.log(color);
|
|
20038
|
-
throw new Error("Helpdice UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
|
|
20039
|
-
}
|
|
20040
|
-
return regArray[1].split(',').map(function (str) {
|
|
20041
|
-
return Number.parseFloat(str);
|
|
20042
|
-
});
|
|
20043
|
-
};
|
|
20044
|
-
var addColorAlpha = function addColorAlpha(color, alpha) {
|
|
20045
|
-
if (!/^#|rgb|RGB/.test(color)) return color;
|
|
20046
|
-
var _colorToRgbValues = colorToRgbValues(color),
|
|
20047
|
-
_colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
|
|
20048
|
-
r = _colorToRgbValues2[0],
|
|
20049
|
-
g = _colorToRgbValues2[1],
|
|
20050
|
-
b = _colorToRgbValues2[2];
|
|
20051
|
-
var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
|
|
20052
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
|
|
20053
|
-
};
|
|
20054
|
-
|
|
20055
|
-
var getButtonGhostColors = function getButtonGhostColors(palette, type) {
|
|
20056
|
-
var colors = {
|
|
20057
|
-
secondary: {
|
|
20058
|
-
bg: palette.background,
|
|
20059
|
-
border: palette.foreground,
|
|
20060
|
-
color: palette.foreground
|
|
20061
|
-
},
|
|
20062
|
-
success: {
|
|
20063
|
-
bg: palette.background,
|
|
20064
|
-
border: palette.success,
|
|
20065
|
-
color: palette.success
|
|
20066
|
-
},
|
|
20067
|
-
warning: {
|
|
20068
|
-
bg: palette.background,
|
|
20069
|
-
border: palette.warning,
|
|
20070
|
-
color: palette.warning
|
|
20071
|
-
},
|
|
20072
|
-
error: {
|
|
20073
|
-
bg: palette.background,
|
|
20074
|
-
border: palette.error,
|
|
20075
|
-
color: palette.error
|
|
20076
|
-
}
|
|
20077
|
-
};
|
|
20078
|
-
return colors[type] || null;
|
|
20079
|
-
};
|
|
20080
|
-
var getButtonColors = function getButtonColors(palette, props) {
|
|
20081
|
-
var type = props.type,
|
|
20082
|
-
disabled = props.disabled,
|
|
20083
|
-
ghost = props.ghost;
|
|
20084
|
-
var colors = {
|
|
20085
|
-
"default": {
|
|
20086
|
-
bg: palette.background,
|
|
20087
|
-
border: palette.border,
|
|
20088
|
-
color: palette.accents_5
|
|
20089
|
-
},
|
|
20090
|
-
secondary: {
|
|
20091
|
-
bg: palette.foreground,
|
|
20092
|
-
border: palette.foreground,
|
|
20093
|
-
color: palette.background
|
|
20094
|
-
},
|
|
20095
|
-
success: {
|
|
20096
|
-
bg: palette.success,
|
|
20097
|
-
border: palette.success,
|
|
20098
|
-
color: '#fff'
|
|
20099
|
-
},
|
|
20100
|
-
warning: {
|
|
20101
|
-
bg: palette.warning,
|
|
20102
|
-
border: palette.warning,
|
|
20103
|
-
color: '#fff'
|
|
20104
|
-
},
|
|
20105
|
-
error: {
|
|
20106
|
-
bg: palette.error,
|
|
20107
|
-
border: palette.error,
|
|
20108
|
-
color: '#fff'
|
|
20109
|
-
},
|
|
20110
|
-
abort: {
|
|
20111
|
-
bg: 'transparent',
|
|
20112
|
-
border: 'transparent',
|
|
20113
|
-
color: palette.accents_5
|
|
20114
|
-
}
|
|
20115
|
-
};
|
|
20116
|
-
if (disabled) return {
|
|
20117
|
-
bg: palette.accents_1,
|
|
20118
|
-
border: palette.accents_2,
|
|
20119
|
-
color: '#ccc'
|
|
20120
|
-
};
|
|
20121
|
-
|
|
20122
|
-
/**
|
|
20123
|
-
* The '-light' type is the same color as the common type,
|
|
20124
|
-
* only hover's color is different.
|
|
20125
|
-
* e.g.
|
|
20126
|
-
* Color['success'] === Color['success-light']
|
|
20127
|
-
* Color['warning'] === Color['warning-light']
|
|
20128
|
-
*/
|
|
20129
|
-
var withoutLightType = type === null || type === undefined ? undefined : type.replace('-light', '');
|
|
20130
|
-
var defaultColor = colors["default"];
|
|
20131
|
-
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
20132
|
-
return colors[withoutLightType] || defaultColor;
|
|
20133
|
-
};
|
|
20134
|
-
var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
|
|
20135
|
-
var colors = {
|
|
20136
|
-
secondary: {
|
|
20137
|
-
bg: palette.foreground,
|
|
20138
|
-
border: palette.background,
|
|
20139
|
-
color: palette.background
|
|
20140
|
-
},
|
|
20141
|
-
success: {
|
|
20142
|
-
bg: palette.success,
|
|
20143
|
-
border: palette.background,
|
|
20144
|
-
color: 'white'
|
|
20145
|
-
},
|
|
20146
|
-
warning: {
|
|
20147
|
-
bg: palette.warning,
|
|
20148
|
-
border: palette.background,
|
|
20149
|
-
color: 'white'
|
|
20150
|
-
},
|
|
20151
|
-
error: {
|
|
20152
|
-
bg: palette.error,
|
|
20153
|
-
border: palette.background,
|
|
20154
|
-
color: 'white'
|
|
20155
|
-
}
|
|
20156
|
-
};
|
|
20157
|
-
var withoutLightType = type.replace('-light', '');
|
|
20158
|
-
return colors[withoutLightType] || null;
|
|
20159
|
-
};
|
|
20160
|
-
var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
20161
|
-
var type = props.type,
|
|
20162
|
-
disabled = props.disabled,
|
|
20163
|
-
loading = props.loading,
|
|
20164
|
-
shadow = props.shadow,
|
|
20165
|
-
ghost = props.ghost;
|
|
20166
|
-
var defaultColor = getButtonColors(palette, props);
|
|
20167
|
-
var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
|
|
20168
|
-
var colors = {
|
|
20169
|
-
"default": {
|
|
20170
|
-
bg: palette.background,
|
|
20171
|
-
border: palette.foreground
|
|
20172
|
-
},
|
|
20173
|
-
secondary: {
|
|
20174
|
-
bg: palette.background,
|
|
20175
|
-
border: palette.foreground
|
|
20176
|
-
},
|
|
20177
|
-
success: {
|
|
20178
|
-
bg: palette.background,
|
|
20179
|
-
border: palette.success
|
|
20180
|
-
},
|
|
20181
|
-
warning: {
|
|
20182
|
-
bg: palette.background,
|
|
20183
|
-
border: palette.warning
|
|
20184
|
-
},
|
|
20185
|
-
error: {
|
|
20186
|
-
bg: palette.background,
|
|
20187
|
-
border: palette.error
|
|
20188
|
-
},
|
|
20189
|
-
abort: {
|
|
20190
|
-
bg: 'transparent',
|
|
20191
|
-
border: 'transparent',
|
|
20192
|
-
color: palette.accents_5
|
|
20193
|
-
},
|
|
20194
|
-
'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
20195
|
-
bg: alphaBackground
|
|
20196
|
-
}),
|
|
20197
|
-
'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
20198
|
-
bg: alphaBackground
|
|
20199
|
-
}),
|
|
20200
|
-
'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
20201
|
-
bg: alphaBackground
|
|
20202
|
-
}),
|
|
20203
|
-
'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
20204
|
-
bg: alphaBackground
|
|
20205
|
-
})
|
|
20206
|
-
};
|
|
20207
|
-
if (disabled) return {
|
|
20208
|
-
bg: palette.accents_1,
|
|
20209
|
-
border: palette.accents_2,
|
|
20210
|
-
color: '#ccc'
|
|
20211
|
-
};
|
|
20212
|
-
if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
20213
|
-
color: 'transparent'
|
|
20214
|
-
});
|
|
20215
|
-
if (shadow) return defaultColor;
|
|
20216
|
-
var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
|
|
20217
|
-
return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
|
|
20218
|
-
color: hoverColor.color || hoverColor.border
|
|
20219
|
-
});
|
|
20220
|
-
};
|
|
20221
|
-
var getButtonCursor = function getButtonCursor(disabled, loading) {
|
|
20222
|
-
if (disabled) return {
|
|
20223
|
-
cursor: 'not-allowed',
|
|
20224
|
-
events: 'auto'
|
|
20225
|
-
};
|
|
20226
|
-
if (loading) return {
|
|
20227
|
-
cursor: 'default',
|
|
20228
|
-
events: 'none'
|
|
20229
|
-
};
|
|
20230
|
-
return {
|
|
20231
|
-
cursor: 'pointer',
|
|
20232
|
-
events: 'auto'
|
|
20233
|
-
};
|
|
20234
|
-
};
|
|
20235
|
-
var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
20236
|
-
var type = props.type;
|
|
20237
|
-
var isLightHover = type ? type.endsWith('light') : false;
|
|
20238
|
-
var hoverColors = getButtonHoverColors(palette, props);
|
|
20239
|
-
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
20240
|
-
};
|
|
20241
|
-
|
|
20242
|
-
var _excluded$2 = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
|
|
20243
|
-
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
20244
|
-
var theme = useTheme();
|
|
20245
|
-
var _useScale = useScale(),
|
|
20246
|
-
SCALES = _useScale.SCALES;
|
|
20247
|
-
var buttonRef = React.useRef(null);
|
|
20248
|
-
React.useImperativeHandle(ref, function () {
|
|
20249
|
-
return buttonRef.current;
|
|
20250
|
-
});
|
|
20251
|
-
var _useState = React.useState(false),
|
|
20252
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
20253
|
-
dripShow = _useState2[0],
|
|
20254
|
-
setDripShow = _useState2[1];
|
|
20255
|
-
var _useState3 = React.useState(0),
|
|
20256
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
20257
|
-
dripX = _useState4[0],
|
|
20258
|
-
setDripX = _useState4[1];
|
|
20259
|
-
var _useState5 = React.useState(0),
|
|
20260
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
20261
|
-
dripY = _useState6[0],
|
|
20262
|
-
setDripY = _useState6[1];
|
|
20263
|
-
var groupConfig = useButtonGroupContext();
|
|
20264
|
-
var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
|
|
20265
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
20266
|
-
var children = filteredProps.children,
|
|
20267
|
-
_filteredProps$disabl = filteredProps.disabled,
|
|
20268
|
-
disabled = _filteredProps$disabl === undefined ? false : _filteredProps$disabl;
|
|
20269
|
-
filteredProps.type;
|
|
20270
|
-
var _filteredProps$loadin = filteredProps.loading,
|
|
20271
|
-
loading = _filteredProps$loadin === undefined ? false : _filteredProps$loadin,
|
|
20272
|
-
_filteredProps$shadow = filteredProps.shadow,
|
|
20273
|
-
shadow = _filteredProps$shadow === undefined ? false : _filteredProps$shadow,
|
|
20274
|
-
_filteredProps$ghost = filteredProps.ghost,
|
|
20275
|
-
ghost = _filteredProps$ghost === undefined ? false : _filteredProps$ghost,
|
|
20276
|
-
_filteredProps$effect = filteredProps.effect,
|
|
20277
|
-
effect = _filteredProps$effect === undefined ? true : _filteredProps$effect,
|
|
20278
|
-
onClick = filteredProps.onClick,
|
|
20279
|
-
_filteredProps$auto = filteredProps.auto,
|
|
20280
|
-
auto = _filteredProps$auto === undefined ? false : _filteredProps$auto,
|
|
20281
|
-
icon = filteredProps.icon,
|
|
20282
|
-
_filteredProps$htmlTy = filteredProps.htmlType,
|
|
20283
|
-
htmlType = _filteredProps$htmlTy === undefined ? 'button' : _filteredProps$htmlTy,
|
|
20284
|
-
iconRight = filteredProps.iconRight,
|
|
20285
|
-
_filteredProps$classN = filteredProps.className,
|
|
20286
|
-
className = _filteredProps$classN === undefined ? '' : _filteredProps$classN;
|
|
20287
|
-
filteredProps.crossOrigin;
|
|
20288
|
-
var props = _objectWithoutProperties(filteredProps, _excluded$2);
|
|
20289
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
20290
|
-
|
|
20291
|
-
var _useMemo = React.useMemo(function () {
|
|
20292
|
-
return getButtonColors(theme.palette, filteredProps);
|
|
20293
|
-
}, [theme.palette, filteredProps]),
|
|
20294
|
-
bg = _useMemo.bg,
|
|
20295
|
-
border = _useMemo.border,
|
|
20296
|
-
color = _useMemo.color;
|
|
20297
|
-
var hover = React.useMemo(function () {
|
|
20298
|
-
return getButtonHoverColors(theme.palette, filteredProps);
|
|
20299
|
-
}, [theme.palette, filteredProps]);
|
|
20300
|
-
var _useMemo2 = React.useMemo(function () {
|
|
20301
|
-
return getButtonCursor(disabled, loading);
|
|
20302
|
-
}, [disabled, loading]),
|
|
20303
|
-
cursor = _useMemo2.cursor,
|
|
20304
|
-
events = _useMemo2.events;
|
|
20305
|
-
var dripColor = React.useMemo(function () {
|
|
20306
|
-
return getButtonDripColor(theme.palette, filteredProps);
|
|
20307
|
-
}, [theme.palette, filteredProps]);
|
|
20308
|
-
|
|
20309
|
-
/* istanbul ignore next */
|
|
20310
|
-
var dripCompletedHandle = function dripCompletedHandle() {
|
|
20311
|
-
setDripShow(false);
|
|
20312
|
-
setDripX(0);
|
|
20313
|
-
setDripY(0);
|
|
20314
|
-
};
|
|
20315
|
-
var clickHandler = function clickHandler(event) {
|
|
20316
|
-
if (disabled || loading) return;
|
|
20317
|
-
var showDrip = !shadow && !ghost && effect;
|
|
20318
|
-
/* istanbul ignore next */
|
|
20319
|
-
if (showDrip && buttonRef.current) {
|
|
20320
|
-
var rect = buttonRef.current.getBoundingClientRect();
|
|
20321
|
-
setDripShow(true);
|
|
20322
|
-
setDripX(event.clientX - rect.left);
|
|
20323
|
-
setDripY(event.clientY - rect.top);
|
|
20324
|
-
}
|
|
20325
|
-
onClick && onClick(event);
|
|
20326
|
-
};
|
|
20327
|
-
var childrenWithIcon = React.useMemo(function () {
|
|
20328
|
-
return getButtonChildrenWithIcon(auto, children, {
|
|
20329
|
-
icon: icon,
|
|
20330
|
-
iconRight: iconRight
|
|
20331
|
-
});
|
|
20332
|
-
}, [auto, children, icon, iconRight]);
|
|
20333
|
-
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
20334
|
-
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
20335
|
-
return /*#__PURE__*/React.createElement("button", _extends({
|
|
20336
|
-
ref: buttonRef,
|
|
20337
|
-
type: htmlType,
|
|
20338
|
-
disabled: disabled,
|
|
20339
|
-
onClick: clickHandler
|
|
20340
|
-
}, props, {
|
|
20341
|
-
className: _JSXStyle.dynamic([["22324076", [SCALES.height(2.5), theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : '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, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses('btn', className) || "")
|
|
20342
|
-
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
20343
|
-
color: color
|
|
20344
|
-
}), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
|
|
20345
|
-
x: dripX,
|
|
20346
|
-
y: dripY,
|
|
20347
|
-
color: dripColor,
|
|
20348
|
-
onCompleted: dripCompletedHandle
|
|
20349
|
-
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
20350
|
-
id: "22324076",
|
|
20351
|
-
dynamic: [SCALES.height(2.5), theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : '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, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']
|
|
20352
|
-
}, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(theme.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowMedium : 'none', ";-webkit-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);-ms-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}")));
|
|
20353
|
-
});
|
|
20354
|
-
ButtonComponent.displayName = 'Button';
|
|
20355
|
-
var Button = withScale(ButtonComponent);
|
|
20356
|
-
|
|
20357
19838
|
var makeColgroup = function makeColgroup(width, columns) {
|
|
20358
19839
|
var unsetWidthCount = columns.filter(function (c) {
|
|
20359
19840
|
return !c.width;
|
|
@@ -20393,14 +19874,19 @@ var TableHead = function TableHead(props) {
|
|
|
20393
19874
|
var handleFilterChange = function handleFilterChange(name, value) {
|
|
20394
19875
|
setFilters(function (prevFilters) {
|
|
20395
19876
|
var updatedFilters = _objectSpread2(_objectSpread2({}, prevFilters), {}, _defineProperty({}, name, value));
|
|
19877
|
+
if (onFilters) {
|
|
19878
|
+
onFilters(updatedFilters);
|
|
19879
|
+
}
|
|
20396
19880
|
return updatedFilters;
|
|
20397
19881
|
});
|
|
20398
19882
|
};
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
}
|
|
19883
|
+
|
|
19884
|
+
// const applyFilters = () => {
|
|
19885
|
+
// if (onFilters) {
|
|
19886
|
+
// onFilters(filters);
|
|
19887
|
+
// }
|
|
19888
|
+
// }
|
|
19889
|
+
|
|
20404
19890
|
var generateFilterInputs = function generateFilterInputs() {
|
|
20405
19891
|
return columns.map(function (col) {
|
|
20406
19892
|
var _String, _filters$filterName;
|
|
@@ -20409,9 +19895,16 @@ var TableHead = function TableHead(props) {
|
|
|
20409
19895
|
options = col.options;
|
|
20410
19896
|
var filterName = (_String = String(col === null || col === undefined ? undefined : col.label)) === null || _String === undefined ? undefined : _String.replace(' ', '_').toLowerCase();
|
|
20411
19897
|
var unq_accessor = _.uniqueId(filterName);
|
|
19898
|
+
// if (Header === 'actions') {
|
|
19899
|
+
// return (
|
|
19900
|
+
// <th style={{ margin: '3px' }} data-column={Header} key={unq_accessor}>
|
|
19901
|
+
// <Button onClick={applyFilters} auto px={0.6} scale={2 / 3}>Apply</Button>
|
|
19902
|
+
// </th>
|
|
19903
|
+
// )
|
|
19904
|
+
// }
|
|
20412
19905
|
return /*#__PURE__*/React.createElement("th", {
|
|
20413
19906
|
style: {
|
|
20414
|
-
|
|
19907
|
+
padding: '3px'
|
|
20415
19908
|
},
|
|
20416
19909
|
"data-column": Header,
|
|
20417
19910
|
key: unq_accessor
|
|
@@ -20482,18 +19975,9 @@ var TableHead = function TableHead(props) {
|
|
|
20482
19975
|
},
|
|
20483
19976
|
className: _JSXStyle.dynamic([["134865897", [theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
|
|
20484
19977
|
}, column.text)));
|
|
20485
|
-
}), /*#__PURE__*/React.createElement("th", {
|
|
20486
|
-
className: _JSXStyle.dynamic([["134865897", [theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
|
|
20487
19978
|
})), showFilters && /*#__PURE__*/React.createElement("tr", {
|
|
20488
19979
|
className: _JSXStyle.dynamic([["134865897", [theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
|
|
20489
|
-
}, generateFilterInputs(), /*#__PURE__*/React.createElement(
|
|
20490
|
-
className: _JSXStyle.dynamic([["134865897", [theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
|
|
20491
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
20492
|
-
onClick: applyFilters,
|
|
20493
|
-
auto: true,
|
|
20494
|
-
px: 0.6,
|
|
20495
|
-
scale: 2 / 3
|
|
20496
|
-
}, "Apply")))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
19980
|
+
}, generateFilterInputs())), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
20497
19981
|
id: "134865897",
|
|
20498
19982
|
dynamic: [theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]
|
|
20499
19983
|
}, "thead.__jsx-style-dynamic-selector{border-collapse:separate;border-spacing:0;font-size:inherit;}th.__jsx-style-dynamic-selector{padding:0 0.5em;font-size:calc(0.75 * var(--table-font-size));font-weight:normal;text-align:left;-webkit-letter-spacing:0;-moz-letter-spacing:0;-ms-letter-spacing:0;letter-spacing:0;vertical-align:middle;min-height:calc(2.5 * var(--table-font-size));color:".concat(theme.palette.accents_5, ";background:").concat(theme.palette.accents_1, ";border-bottom:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-radius:0;}th.__jsx-style-dynamic-selector:nth-child(1){border-bottom:1px solid ").concat(theme.palette.border, ";border-left:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-top-left-radius:").concat(theme.layout.radius, ";border-bottom-left-radius:").concat(theme.layout.radius, ";}th.__jsx-style-dynamic-selector:last-child{border-bottom:1px solid ").concat(theme.palette.border, ";border-right:1px solid ").concat(theme.palette.border, ";border-top:1px solid ").concat(theme.palette.border, ";border-top-right-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";}.thead-box.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-align:center;min-height:calc(2.5 * var(--table-font-size));text-transform:uppercase;}")));
|
|
@@ -20535,11 +20019,11 @@ var TableCell = function TableCell(_ref) {
|
|
|
20535
20019
|
|
|
20536
20020
|
/* "use client" */
|
|
20537
20021
|
|
|
20538
|
-
var defaultContext = {
|
|
20022
|
+
var defaultContext$1 = {
|
|
20539
20023
|
columns: [],
|
|
20540
20024
|
updateColumn: function updateColumn() {}
|
|
20541
20025
|
};
|
|
20542
|
-
var TableContext = /*#__PURE__*/React.createContext(defaultContext);
|
|
20026
|
+
var TableContext = /*#__PURE__*/React.createContext(defaultContext$1);
|
|
20543
20027
|
var useTableContext = function useTableContext() {
|
|
20544
20028
|
return React.useContext(TableContext);
|
|
20545
20029
|
};
|
|
@@ -20777,7 +20261,7 @@ var TableColumn = function TableColumn(columnProps) {
|
|
|
20777
20261
|
};
|
|
20778
20262
|
TableColumn.displayName = 'TableColumn';
|
|
20779
20263
|
|
|
20780
|
-
var _excluded$
|
|
20264
|
+
var _excluded$4 = ["children", "data", "initialData", "hover", "emptyText", "rowDraggable", "readOnly", "onRow", "onCell", "onChange", "onFilters", "showFilters", "onSelected", "className", "rowClassName"];
|
|
20781
20265
|
function TableComponent(tableProps) {
|
|
20782
20266
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
20783
20267
|
var _ref = tableProps,
|
|
@@ -20806,7 +20290,7 @@ function TableComponent(tableProps) {
|
|
|
20806
20290
|
rowClassName = _ref$rowClassName === undefined ? function () {
|
|
20807
20291
|
return '';
|
|
20808
20292
|
} : _ref$rowClassName,
|
|
20809
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
20293
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
20810
20294
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
20811
20295
|
var _useScale = useScale(),
|
|
20812
20296
|
SCALES = _useScale.SCALES;
|
|
@@ -30393,23 +29877,210 @@ const ZoomOut = ({ color, strokeWidth, set }) => {
|
|
|
30393
29877
|
React__namespace.createElement("path", { d: "M7 10L13 10", stroke: color, strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
30394
29878
|
switch (set) {
|
|
30395
29879
|
case "broken":
|
|
30396
|
-
return React__namespace.createElement(Broken, null);
|
|
29880
|
+
return React__namespace.createElement(Broken, null);
|
|
29881
|
+
case "curved":
|
|
29882
|
+
return React__namespace.createElement(Curved, null);
|
|
29883
|
+
case "duotone":
|
|
29884
|
+
return React__namespace.createElement(Duotone, null);
|
|
29885
|
+
case "outline":
|
|
29886
|
+
return React__namespace.createElement(Outline, null);
|
|
29887
|
+
default:
|
|
29888
|
+
return React__namespace.createElement(Outline, null);
|
|
29889
|
+
}
|
|
29890
|
+
};
|
|
29891
|
+
ZoomOut.displayName = "ZoomOut";
|
|
29892
|
+
createIcon(ZoomOut);
|
|
29893
|
+
|
|
29894
|
+
const Github = ({ color, strokeWidth, set }) => {
|
|
29895
|
+
const Outline = () => (React.createElement("g", null,
|
|
29896
|
+
React.createElement("path", { d: "M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0020 4.77 5.07 5.07 0 0019.91 1S18.73.65 16 2.48a13.38 13.38 0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 005 4.77a5.44 5.44 0 00-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 009 18.13V22", stroke: color, strokeWidth: strokeWidth })));
|
|
29897
|
+
switch (set) {
|
|
29898
|
+
case "broken":
|
|
29899
|
+
return "";
|
|
29900
|
+
case "curved":
|
|
29901
|
+
return "";
|
|
29902
|
+
case "duotone":
|
|
29903
|
+
return "";
|
|
29904
|
+
case "outline":
|
|
29905
|
+
return React.createElement(Outline, null);
|
|
29906
|
+
default:
|
|
29907
|
+
return React.createElement(Outline, null);
|
|
29908
|
+
}
|
|
29909
|
+
};
|
|
29910
|
+
Github.displayName = "Github";
|
|
29911
|
+
createIcon(Github);
|
|
29912
|
+
|
|
29913
|
+
const CodeSandbox = ({ color, strokeWidth, set }) => {
|
|
29914
|
+
const Outline = () => (React.createElement("g", null,
|
|
29915
|
+
React.createElement("path", { d: "M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z", stroke: color, strokeWidth: strokeWidth }),
|
|
29916
|
+
React.createElement("path", { d: "M7.5 4.21l4.5 2.6 4.5-2.6", stroke: color, strokeWidth: strokeWidth }),
|
|
29917
|
+
React.createElement("path", { d: "M7.5 19.79V14.6L3 12", stroke: color, strokeWidth: strokeWidth }),
|
|
29918
|
+
React.createElement("path", { d: "M21 12l-4.5 2.6v5.19", stroke: color, strokeWidth: strokeWidth }),
|
|
29919
|
+
React.createElement("path", { d: "M3.27 6.96L12 12.01l8.73-5.05", stroke: color, strokeWidth: strokeWidth }),
|
|
29920
|
+
React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
|
|
29921
|
+
switch (set) {
|
|
29922
|
+
case "broken":
|
|
29923
|
+
return "";
|
|
29924
|
+
case "curved":
|
|
29925
|
+
return "";
|
|
29926
|
+
case "duotone":
|
|
29927
|
+
return "";
|
|
29928
|
+
case "outline":
|
|
29929
|
+
return React.createElement(Outline, null);
|
|
29930
|
+
default:
|
|
29931
|
+
return React.createElement(Outline, null);
|
|
29932
|
+
}
|
|
29933
|
+
};
|
|
29934
|
+
CodeSandbox.displayName = "CodeSandbox";
|
|
29935
|
+
createIcon(CodeSandbox);
|
|
29936
|
+
|
|
29937
|
+
const FileFunctionFill = ({ color, strokeWidth, set }) => {
|
|
29938
|
+
const Outline = () => (React.createElement("g", null,
|
|
29939
|
+
React.createElement("path", { d: "M4.055 2.055A2.75 2.75 0 016 1.25h12A2.75 2.75 0 0120.75 4v16A2.75 2.75 0 0118 22.75H6A2.75 2.75 0 013.25 20V4c0-.73.29-1.429.805-1.945zM15.116 5.31c-1.237-.194-2.29.086-3.02.83-.709.722-.998 1.758-.998 2.844v1.502H9a.75.75 0 100 1.5h2.098v3.22c0 .78-.197 1.257-.48 1.543-.283.284-.773.501-1.618.501a.75.75 0 000 1.5c1.088 0 2.023-.281 2.681-.944.658-.662.918-1.582.918-2.6v-3.22h2.062a.75.75 0 000-1.5h-2.063V8.984c0-.851.229-1.447.567-1.792.315-.32.838-.538 1.719-.4a.75.75 0 00.232-1.482z", stroke: color, strokeWidth: strokeWidth })));
|
|
29940
|
+
switch (set) {
|
|
29941
|
+
case "broken":
|
|
29942
|
+
return "";
|
|
29943
|
+
case "curved":
|
|
29944
|
+
return "";
|
|
29945
|
+
case "duotone":
|
|
29946
|
+
return "";
|
|
29947
|
+
case "outline":
|
|
29948
|
+
return React.createElement(Outline, null);
|
|
29949
|
+
default:
|
|
29950
|
+
return React.createElement(Outline, null);
|
|
29951
|
+
}
|
|
29952
|
+
};
|
|
29953
|
+
FileFunctionFill.displayName = "FileFunctionFill";
|
|
29954
|
+
createIcon(FileFunctionFill);
|
|
29955
|
+
|
|
29956
|
+
const Lambda = ({ color, strokeWidth, set }) => {
|
|
29957
|
+
const Outline = () => (React.createElement("g", null,
|
|
29958
|
+
React.createElement("path", { d: "M1.99799968,0.500003998 C1.78162411,0.500869509 1.63364907,0.642137248 1.63364907,0.814271399 C1.63364907,0.985218642 1.78032508,1.1285428 1.97131342,1.12856172 L2.19867872,1.13056263 C3.10118421,1.14702589 3.60939673,1.26556347 4.03249851,1.568379 C4.44848628,1.86630467 4.81555118,2.36599046 5.30914132,3.29234706 L5.53635444,3.7319218 L7.127422,7.27537654 L6.98962107,7.5004737 L0.544625394,18.0283431 C0.486884418,18.1227208 0.485083442,18.2383317 0.539767758,18.3342249 C0.596620657,18.4339208 0.706568325,18.4981484 0.828403729,18.4999606 C0.950391011,18.501775 1.0625816,18.4406875 1.12276173,18.342323 L7.45742934,7.99500773 L7.84867238,8.84715959 L10.8910664,15.4738335 L11.3866691,16.600051 L11.4963288,16.8355567 C11.6974732,17.2598124 11.8703886,17.5497167 12.0716373,17.7798218 C12.5006231,18.2692457 13.0516354,18.4715747 13.9517354,18.4967326 L14.1338876,18.5007429 L14.2140555,18.4965687 C14.3788402,18.4747246 14.5,18.3402281 14.5,18.1853946 C14.5,18.0144473 14.353324,17.8711232 14.159766,17.8710753 L13.9667577,17.8683457 C13.23949,17.8471739 12.8730841,17.7079192 12.5747116,17.3670263 L12.5148848,17.2937701 C12.3862775,17.1267414 12.2591138,16.9035538 12.1043882,16.5789995 C12.0565097,16.4787037 12.0069781,16.3709095 11.9496307,16.2425932 L11.5034339,15.2259235 L7.80746029,7.17411382 L6.14520282,3.47634226 L5.9868176,3.16569971 C5.41304784,2.06259444 4.97093878,1.45201729 4.43388865,1.06822222 C3.88266741,0.671861393 3.24308245,0.52047405 2.2259303,0.50220525 L1.99799968,0.500003998 Z", transform: "translate(5 3)", stroke: color, strokeWidth: strokeWidth })));
|
|
29959
|
+
switch (set) {
|
|
29960
|
+
case "broken":
|
|
29961
|
+
return "";
|
|
29962
|
+
case "curved":
|
|
29963
|
+
return "";
|
|
29964
|
+
case "duotone":
|
|
29965
|
+
return "";
|
|
29966
|
+
case "outline":
|
|
29967
|
+
return React.createElement(Outline, null);
|
|
29968
|
+
default:
|
|
29969
|
+
return React.createElement(Outline, null);
|
|
29970
|
+
}
|
|
29971
|
+
};
|
|
29972
|
+
Lambda.displayName = "Lambda";
|
|
29973
|
+
createIcon(Lambda);
|
|
29974
|
+
|
|
29975
|
+
const Layout = ({ color, strokeWidth, set }) => {
|
|
29976
|
+
const Outline = () => (React.createElement("g", null,
|
|
29977
|
+
React.createElement("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2", stroke: color, strokeWidth: strokeWidth }),
|
|
29978
|
+
React.createElement("path", { d: "M3 9h18", stroke: color, strokeWidth: strokeWidth }),
|
|
29979
|
+
React.createElement("path", { d: "M9 21V9", stroke: color, strokeWidth: strokeWidth })));
|
|
29980
|
+
switch (set) {
|
|
29981
|
+
case "broken":
|
|
29982
|
+
return "";
|
|
29983
|
+
case "curved":
|
|
29984
|
+
return "";
|
|
29985
|
+
case "duotone":
|
|
29986
|
+
return "";
|
|
29987
|
+
case "outline":
|
|
29988
|
+
return React.createElement(Outline, null);
|
|
29989
|
+
default:
|
|
29990
|
+
return React.createElement(Outline, null);
|
|
29991
|
+
}
|
|
29992
|
+
};
|
|
29993
|
+
Layout.displayName = "Layout";
|
|
29994
|
+
createIcon(Layout);
|
|
29995
|
+
|
|
29996
|
+
const Menu = ({ color, strokeWidth, set }) => {
|
|
29997
|
+
const Outline = () => (React.createElement("g", null,
|
|
29998
|
+
React.createElement("path", { d: "M3 12h18", stroke: color, strokeWidth: strokeWidth }),
|
|
29999
|
+
React.createElement("path", { d: "M3 6h18", stroke: color, strokeWidth: strokeWidth }),
|
|
30000
|
+
React.createElement("path", { d: "M3 18h18", stroke: color, strokeWidth: strokeWidth })));
|
|
30001
|
+
switch (set) {
|
|
30002
|
+
case "broken":
|
|
30003
|
+
return "";
|
|
30004
|
+
case "curved":
|
|
30005
|
+
return "";
|
|
30006
|
+
case "duotone":
|
|
30007
|
+
return "";
|
|
30008
|
+
case "outline":
|
|
30009
|
+
return React.createElement(Outline, null);
|
|
30010
|
+
default:
|
|
30011
|
+
return React.createElement(Outline, null);
|
|
30012
|
+
}
|
|
30013
|
+
};
|
|
30014
|
+
Menu.displayName = "Menu";
|
|
30015
|
+
createIcon(Menu);
|
|
30016
|
+
|
|
30017
|
+
const Box = ({ color, strokeWidth, set }) => {
|
|
30018
|
+
const Outline = () => (React.createElement("g", null,
|
|
30019
|
+
React.createElement("path", { d: "M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z", stroke: color, strokeWidth: strokeWidth }),
|
|
30020
|
+
React.createElement("path", { d: "M3.27 6.96L12 12.01l8.73-5.05", stroke: color, strokeWidth: strokeWidth }),
|
|
30021
|
+
React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
|
|
30022
|
+
switch (set) {
|
|
30023
|
+
case "broken":
|
|
30024
|
+
return "";
|
|
30025
|
+
case "curved":
|
|
30026
|
+
return "";
|
|
30027
|
+
case "duotone":
|
|
30028
|
+
return "";
|
|
30029
|
+
case "outline":
|
|
30030
|
+
return React.createElement(Outline, null);
|
|
30031
|
+
default:
|
|
30032
|
+
return React.createElement(Outline, null);
|
|
30033
|
+
}
|
|
30034
|
+
};
|
|
30035
|
+
Box.displayName = "Box";
|
|
30036
|
+
createIcon(Box);
|
|
30037
|
+
|
|
30038
|
+
const Database = ({ color, strokeWidth, set }) => {
|
|
30039
|
+
const Outline = () => (React.createElement("g", null,
|
|
30040
|
+
React.createElement("ellipse", { stroke: color, strokeWidth: strokeWidth, cx: "12", cy: "5", rx: "9", ry: "3" }),
|
|
30041
|
+
React.createElement("path", { d: "M21 12c0 1.66-4 3-9 3s-9-1.34-9-3", stroke: color, strokeWidth: strokeWidth }),
|
|
30042
|
+
React.createElement("path", { d: "M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5", stroke: color, strokeWidth: strokeWidth })));
|
|
30043
|
+
switch (set) {
|
|
30044
|
+
case "broken":
|
|
30045
|
+
return "";
|
|
30046
|
+
case "curved":
|
|
30047
|
+
return "";
|
|
30048
|
+
case "duotone":
|
|
30049
|
+
return "";
|
|
30050
|
+
case "outline":
|
|
30051
|
+
return React.createElement(Outline, null);
|
|
30052
|
+
default:
|
|
30053
|
+
return React.createElement(Outline, null);
|
|
30054
|
+
}
|
|
30055
|
+
};
|
|
30056
|
+
Database.displayName = "Database";
|
|
30057
|
+
createIcon(Database);
|
|
30058
|
+
|
|
30059
|
+
const RotateCcw = ({ color, strokeWidth, set }) => {
|
|
30060
|
+
const Outline = () => (React.createElement("g", null,
|
|
30061
|
+
React.createElement("path", { d: "M1 4v6h6", stroke: color, strokeWidth: strokeWidth }),
|
|
30062
|
+
React.createElement("path", { d: "M3.51 15a9 9 0 102.13-9.36L1 10", stroke: color, strokeWidth: strokeWidth })));
|
|
30063
|
+
switch (set) {
|
|
30064
|
+
case "broken":
|
|
30065
|
+
return "";
|
|
30397
30066
|
case "curved":
|
|
30398
|
-
return
|
|
30067
|
+
return "";
|
|
30399
30068
|
case "duotone":
|
|
30400
|
-
return
|
|
30069
|
+
return "";
|
|
30401
30070
|
case "outline":
|
|
30402
|
-
return
|
|
30071
|
+
return React.createElement(Outline, null);
|
|
30403
30072
|
default:
|
|
30404
|
-
return
|
|
30073
|
+
return React.createElement(Outline, null);
|
|
30405
30074
|
}
|
|
30406
30075
|
};
|
|
30407
|
-
|
|
30408
|
-
createIcon(
|
|
30076
|
+
RotateCcw.displayName = "RotateCcw";
|
|
30077
|
+
createIcon(RotateCcw);
|
|
30409
30078
|
|
|
30410
|
-
const
|
|
30079
|
+
const Type = ({ color, strokeWidth, set }) => {
|
|
30411
30080
|
const Outline = () => (React.createElement("g", null,
|
|
30412
|
-
React.createElement("path", { d: "
|
|
30081
|
+
React.createElement("path", { d: "M4 7V4h16v3", stroke: color, strokeWidth: strokeWidth }),
|
|
30082
|
+
React.createElement("path", { d: "M9 20h6", stroke: color, strokeWidth: strokeWidth }),
|
|
30083
|
+
React.createElement("path", { d: "M12 4v16", stroke: color, strokeWidth: strokeWidth })));
|
|
30413
30084
|
switch (set) {
|
|
30414
30085
|
case "broken":
|
|
30415
30086
|
return "";
|
|
@@ -30423,17 +30094,15 @@ const Github = ({ color, strokeWidth, set }) => {
|
|
|
30423
30094
|
return React.createElement(Outline, null);
|
|
30424
30095
|
}
|
|
30425
30096
|
};
|
|
30426
|
-
|
|
30427
|
-
createIcon(
|
|
30097
|
+
Type.displayName = "Type";
|
|
30098
|
+
createIcon(Type);
|
|
30428
30099
|
|
|
30429
|
-
const
|
|
30100
|
+
const UserX = ({ color, strokeWidth, set }) => {
|
|
30430
30101
|
const Outline = () => (React.createElement("g", null,
|
|
30431
|
-
React.createElement("path", { d: "
|
|
30432
|
-
React.createElement("
|
|
30433
|
-
React.createElement("path", { d: "
|
|
30434
|
-
React.createElement("path", { d: "
|
|
30435
|
-
React.createElement("path", { d: "M3.27 6.96L12 12.01l8.73-5.05", stroke: color, strokeWidth: strokeWidth }),
|
|
30436
|
-
React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
|
|
30102
|
+
React.createElement("path", { d: "M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2", stroke: color, strokeWidth: strokeWidth }),
|
|
30103
|
+
React.createElement("circle", { cx: "8.5", cy: "7", r: "4", stroke: color, strokeWidth: strokeWidth }),
|
|
30104
|
+
React.createElement("path", { d: "M18 8l5 5", stroke: color, strokeWidth: strokeWidth }),
|
|
30105
|
+
React.createElement("path", { d: "M23 8l-5 5", stroke: color, strokeWidth: strokeWidth })));
|
|
30437
30106
|
switch (set) {
|
|
30438
30107
|
case "broken":
|
|
30439
30108
|
return "";
|
|
@@ -30447,12 +30116,12 @@ const CodeSandbox = ({ color, strokeWidth, set }) => {
|
|
|
30447
30116
|
return React.createElement(Outline, null);
|
|
30448
30117
|
}
|
|
30449
30118
|
};
|
|
30450
|
-
|
|
30451
|
-
createIcon(
|
|
30119
|
+
UserX.displayName = "UserX";
|
|
30120
|
+
createIcon(UserX);
|
|
30452
30121
|
|
|
30453
|
-
const
|
|
30122
|
+
const Columns = ({ color, strokeWidth, set }) => {
|
|
30454
30123
|
const Outline = () => (React.createElement("g", null,
|
|
30455
|
-
React.createElement("path", { d: "
|
|
30124
|
+
React.createElement("path", { d: "M12 3h7a2 2 0 012 2v14a2 2 0 01-2 2h-7m0-18H5a2 2 0 00-2 2v14a2 2 0 002 2h7m0-18v18", stroke: color, strokeWidth: strokeWidth })));
|
|
30456
30125
|
switch (set) {
|
|
30457
30126
|
case "broken":
|
|
30458
30127
|
return "";
|
|
@@ -30466,12 +30135,12 @@ const FileFunctionFill = ({ color, strokeWidth, set }) => {
|
|
|
30466
30135
|
return React.createElement(Outline, null);
|
|
30467
30136
|
}
|
|
30468
30137
|
};
|
|
30469
|
-
|
|
30470
|
-
createIcon(
|
|
30138
|
+
Columns.displayName = "Columns";
|
|
30139
|
+
var Columns$1 = createIcon(Columns);
|
|
30471
30140
|
|
|
30472
|
-
const
|
|
30141
|
+
const Folder = ({ color, strokeWidth, set }) => {
|
|
30473
30142
|
const Outline = () => (React.createElement("g", null,
|
|
30474
|
-
React.createElement("path", { d: "
|
|
30143
|
+
React.createElement("path", { d: "M2.707 7.454V5.62C2.707 4.725 3.469 4 4.409 4h4.843c.451 0 .884.17 1.204.474l.49.467c.126.12.296.186.473.186h8.399c.94 0 1.55.695 1.55 1.59v.737m-18.661 0h-.354a.344.344 0 00-.353.35l.508 11.587c.015.34.31.609.668.609h17.283c.358 0 .652-.269.667-.61L22 7.805a.344.344 0 00-.353-.35h-.278m-18.662 0h18.662", stroke: color, strokeWidth: strokeWidth })));
|
|
30475
30144
|
switch (set) {
|
|
30476
30145
|
case "broken":
|
|
30477
30146
|
return "";
|
|
@@ -30485,14 +30154,13 @@ const Lambda = ({ color, strokeWidth, set }) => {
|
|
|
30485
30154
|
return React.createElement(Outline, null);
|
|
30486
30155
|
}
|
|
30487
30156
|
};
|
|
30488
|
-
|
|
30489
|
-
createIcon(
|
|
30157
|
+
Folder.displayName = "Folder";
|
|
30158
|
+
createIcon(Folder);
|
|
30490
30159
|
|
|
30491
|
-
const
|
|
30160
|
+
const File = ({ color, strokeWidth, set }) => {
|
|
30492
30161
|
const Outline = () => (React.createElement("g", null,
|
|
30493
|
-
React.createElement("
|
|
30494
|
-
React.createElement("path", { d: "
|
|
30495
|
-
React.createElement("path", { d: "M9 21V9", stroke: color, strokeWidth: strokeWidth })));
|
|
30162
|
+
React.createElement("path", { d: "M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9z", stroke: color, strokeWidth: strokeWidth }),
|
|
30163
|
+
React.createElement("path", { d: "M13 2v7h7", stroke: color, strokeWidth: strokeWidth })));
|
|
30496
30164
|
switch (set) {
|
|
30497
30165
|
case "broken":
|
|
30498
30166
|
return "";
|
|
@@ -30506,14 +30174,14 @@ const Layout = ({ color, strokeWidth, set }) => {
|
|
|
30506
30174
|
return React.createElement(Outline, null);
|
|
30507
30175
|
}
|
|
30508
30176
|
};
|
|
30509
|
-
|
|
30510
|
-
createIcon(
|
|
30177
|
+
File.displayName = "File";
|
|
30178
|
+
createIcon(File);
|
|
30511
30179
|
|
|
30512
|
-
const
|
|
30180
|
+
const Printer = ({ color, strokeWidth, set }) => {
|
|
30513
30181
|
const Outline = () => (React.createElement("g", null,
|
|
30514
|
-
React.createElement("path", { d: "
|
|
30515
|
-
React.createElement("path", { d: "
|
|
30516
|
-
React.createElement("path", { d: "
|
|
30182
|
+
React.createElement("path", { d: "M6 9V2h12v7", stroke: color, strokeWidth: strokeWidth }),
|
|
30183
|
+
React.createElement("path", { d: "M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2", stroke: color, strokeWidth: strokeWidth }),
|
|
30184
|
+
React.createElement("path", { d: "M6 14h12v8H6z", stroke: color, strokeWidth: strokeWidth })));
|
|
30517
30185
|
switch (set) {
|
|
30518
30186
|
case "broken":
|
|
30519
30187
|
return "";
|
|
@@ -30527,14 +30195,13 @@ const Menu = ({ color, strokeWidth, set }) => {
|
|
|
30527
30195
|
return React.createElement(Outline, null);
|
|
30528
30196
|
}
|
|
30529
30197
|
};
|
|
30530
|
-
|
|
30531
|
-
createIcon(
|
|
30198
|
+
Printer.displayName = "Printer";
|
|
30199
|
+
createIcon(Printer);
|
|
30532
30200
|
|
|
30533
|
-
const
|
|
30201
|
+
const Lock = ({ color, strokeWidth, set }) => {
|
|
30534
30202
|
const Outline = () => (React.createElement("g", null,
|
|
30535
|
-
React.createElement("
|
|
30536
|
-
React.createElement("path", { d: "
|
|
30537
|
-
React.createElement("path", { d: "M12 22.08V12", stroke: color, strokeWidth: strokeWidth })));
|
|
30203
|
+
React.createElement("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2", stroke: color, strokeWidth: strokeWidth }),
|
|
30204
|
+
React.createElement("path", { d: "M7 11V7a5 5 0 0110 0v4", stroke: color, strokeWidth: strokeWidth })));
|
|
30538
30205
|
switch (set) {
|
|
30539
30206
|
case "broken":
|
|
30540
30207
|
return "";
|
|
@@ -30548,14 +30215,14 @@ const Box = ({ color, strokeWidth, set }) => {
|
|
|
30548
30215
|
return React.createElement(Outline, null);
|
|
30549
30216
|
}
|
|
30550
30217
|
};
|
|
30551
|
-
|
|
30552
|
-
createIcon(
|
|
30218
|
+
Lock.displayName = "Lock";
|
|
30219
|
+
createIcon(Lock);
|
|
30553
30220
|
|
|
30554
|
-
const
|
|
30221
|
+
const HelpCircle = ({ color, strokeWidth, set }) => {
|
|
30555
30222
|
const Outline = () => (React.createElement("g", null,
|
|
30556
|
-
React.createElement("
|
|
30557
|
-
React.createElement("path", { d: "
|
|
30558
|
-
React.createElement("path", { d: "
|
|
30223
|
+
React.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: strokeWidth }),
|
|
30224
|
+
React.createElement("path", { d: "M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3", stroke: color, strokeWidth: strokeWidth }),
|
|
30225
|
+
React.createElement("path", { d: "M12 17h.01", stroke: color, strokeWidth: strokeWidth })));
|
|
30559
30226
|
switch (set) {
|
|
30560
30227
|
case "broken":
|
|
30561
30228
|
return "";
|
|
@@ -30569,191 +30236,527 @@ const Database = ({ color, strokeWidth, set }) => {
|
|
|
30569
30236
|
return React.createElement(Outline, null);
|
|
30570
30237
|
}
|
|
30571
30238
|
};
|
|
30572
|
-
|
|
30573
|
-
createIcon(
|
|
30239
|
+
HelpCircle.displayName = "HelpCircle";
|
|
30240
|
+
createIcon(HelpCircle);
|
|
30241
|
+
|
|
30242
|
+
var ButtonDrip = function ButtonDrip(_ref) {
|
|
30243
|
+
var _ref$x = _ref.x,
|
|
30244
|
+
x = _ref$x === undefined ? 0 : _ref$x,
|
|
30245
|
+
_ref$y = _ref.y,
|
|
30246
|
+
y = _ref$y === undefined ? 0 : _ref$y,
|
|
30247
|
+
color = _ref.color,
|
|
30248
|
+
onCompleted = _ref.onCompleted;
|
|
30249
|
+
var dripRef = React.useRef(null);
|
|
30250
|
+
/* istanbul ignore next */
|
|
30251
|
+
var top = Number.isNaN(+y) ? 0 : y - 10;
|
|
30252
|
+
/* istanbul ignore next */
|
|
30253
|
+
var left = Number.isNaN(+x) ? 0 : x - 10;
|
|
30254
|
+
React.useEffect(function () {
|
|
30255
|
+
/* istanbul ignore next */
|
|
30256
|
+
if (!dripRef.current) return;
|
|
30257
|
+
dripRef.current.addEventListener('animationend', onCompleted);
|
|
30258
|
+
return function () {
|
|
30259
|
+
/* istanbul ignore next */
|
|
30260
|
+
if (!dripRef.current) return;
|
|
30261
|
+
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
30262
|
+
};
|
|
30263
|
+
});
|
|
30264
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30265
|
+
ref: dripRef,
|
|
30266
|
+
className: "jsx-3424889537" + " " + "drip"
|
|
30267
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
30268
|
+
width: "20",
|
|
30269
|
+
height: "20",
|
|
30270
|
+
viewBox: "0 0 20 20",
|
|
30271
|
+
style: {
|
|
30272
|
+
top: top,
|
|
30273
|
+
left: left
|
|
30274
|
+
},
|
|
30275
|
+
className: "jsx-3424889537"
|
|
30276
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
30277
|
+
stroke: "none",
|
|
30278
|
+
strokeWidth: "1",
|
|
30279
|
+
fill: "none",
|
|
30280
|
+
fillRule: "evenodd",
|
|
30281
|
+
className: "jsx-3424889537"
|
|
30282
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
30283
|
+
fill: color,
|
|
30284
|
+
className: "jsx-3424889537"
|
|
30285
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
30286
|
+
width: "100%",
|
|
30287
|
+
height: "100%",
|
|
30288
|
+
rx: "10",
|
|
30289
|
+
className: "jsx-3424889537"
|
|
30290
|
+
})))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
30291
|
+
id: "3424889537"
|
|
30292
|
+
}, ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"));
|
|
30293
|
+
};
|
|
30294
|
+
ButtonDrip.displayName = 'ButtonDrip';
|
|
30295
|
+
|
|
30296
|
+
var _excluded$3 = ["children", "type", "color", "className", "spaceRatio"];
|
|
30297
|
+
var getIconBgColor = function getIconBgColor(type, palette, color) {
|
|
30298
|
+
var colors = {
|
|
30299
|
+
"default": palette.accents_6,
|
|
30300
|
+
secondary: palette.secondary,
|
|
30301
|
+
success: palette.success,
|
|
30302
|
+
warning: palette.warning,
|
|
30303
|
+
error: palette.error
|
|
30304
|
+
};
|
|
30305
|
+
return color ? color : colors[type];
|
|
30306
|
+
};
|
|
30307
|
+
var LoadingComponent = function LoadingComponent(_ref) {
|
|
30308
|
+
var children = _ref.children,
|
|
30309
|
+
_ref$type = _ref.type,
|
|
30310
|
+
type = _ref$type === undefined ? 'default' : _ref$type,
|
|
30311
|
+
color = _ref.color,
|
|
30312
|
+
_ref$className = _ref.className,
|
|
30313
|
+
className = _ref$className === undefined ? '' : _ref$className,
|
|
30314
|
+
_ref$spaceRatio = _ref.spaceRatio,
|
|
30315
|
+
spaceRatio = _ref$spaceRatio === undefined ? 1 : _ref$spaceRatio,
|
|
30316
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
30317
|
+
var theme = useTheme();
|
|
30318
|
+
var _useScale = useScale(),
|
|
30319
|
+
SCALES = _useScale.SCALES;
|
|
30320
|
+
var classes = useClasses('loading-container', className);
|
|
30321
|
+
var bgColor = React.useMemo(function () {
|
|
30322
|
+
return getIconBgColor(type, theme.palette, color);
|
|
30323
|
+
}, [type, theme.palette, color]);
|
|
30324
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
30325
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
30326
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
30327
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading"
|
|
30328
|
+
}, children && /*#__PURE__*/React.createElement("label", {
|
|
30329
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
30330
|
+
}, children), /*#__PURE__*/React.createElement("i", {
|
|
30331
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
30332
|
+
}), /*#__PURE__*/React.createElement("i", {
|
|
30333
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
30334
|
+
}), /*#__PURE__*/React.createElement("i", {
|
|
30335
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
30336
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
30337
|
+
id: "2201634259",
|
|
30338
|
+
dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]
|
|
30339
|
+
}, ".loading-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;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), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")));
|
|
30340
|
+
};
|
|
30341
|
+
LoadingComponent.displayName = 'Loading';
|
|
30342
|
+
var Loading = withScale(LoadingComponent);
|
|
30343
|
+
|
|
30344
|
+
var ButtonLoading = function ButtonLoading(_ref) {
|
|
30345
|
+
var color = _ref.color;
|
|
30346
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30347
|
+
className: "jsx-212623367" + " " + "btn-loading"
|
|
30348
|
+
}, /*#__PURE__*/React.createElement(Loading, {
|
|
30349
|
+
color: color
|
|
30350
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
30351
|
+
id: "212623367"
|
|
30352
|
+
}, ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"));
|
|
30353
|
+
};
|
|
30354
|
+
ButtonLoading.displayName = 'GeistButtonLoading';
|
|
30355
|
+
|
|
30356
|
+
var _excluded$2 = ["isRight", "isSingle", "children", "className"];
|
|
30357
|
+
var ButtonIcon = function ButtonIcon(_ref) {
|
|
30358
|
+
var _ref$isRight = _ref.isRight,
|
|
30359
|
+
isRight = _ref$isRight === undefined ? false : _ref$isRight,
|
|
30360
|
+
isSingle = _ref.isSingle,
|
|
30361
|
+
children = _ref.children,
|
|
30362
|
+
_ref$className = _ref.className,
|
|
30363
|
+
className = _ref$className === undefined ? '' : _ref$className,
|
|
30364
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
30365
|
+
var classes = useClasses('icon', {
|
|
30366
|
+
right: isRight,
|
|
30367
|
+
single: isSingle
|
|
30368
|
+
}, className);
|
|
30369
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
30370
|
+
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || "")
|
|
30371
|
+
}), children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
30372
|
+
id: "2467502931"
|
|
30373
|
+
}, ".icon.jsx-2467502931{position:absolute;left:var(--helpdice-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--helpdice-ui-button-color);z-index:1;}.right.jsx-2467502931{right:var(--helpdice-ui-button-icon-padding);left:auto;}.icon.jsx-2467502931 svg{background:transparent;height:calc(var(--helpdice-ui-button-height) / 2.35);width:calc(var(--helpdice-ui-button-height) / 2.35);}.single.jsx-2467502931{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"));
|
|
30374
|
+
};
|
|
30375
|
+
ButtonIcon.displayName = 'ButtonIcon';
|
|
30376
|
+
|
|
30377
|
+
var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
|
|
30378
|
+
var icon = icons.icon,
|
|
30379
|
+
iconRight = icons.iconRight;
|
|
30380
|
+
var hasIcon = icon || iconRight;
|
|
30381
|
+
var isRight = Boolean(iconRight);
|
|
30382
|
+
var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
|
|
30383
|
+
var classes = useClasses('text', isRight ? 'right' : 'left');
|
|
30384
|
+
if (!hasIcon) return /*#__PURE__*/React.createElement("div", {
|
|
30385
|
+
className: "text"
|
|
30386
|
+
}, children);
|
|
30387
|
+
if (React.Children.count(children) === 0) {
|
|
30388
|
+
return /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
30389
|
+
isRight: isRight,
|
|
30390
|
+
isSingle: true
|
|
30391
|
+
}, hasIcon);
|
|
30392
|
+
}
|
|
30393
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
30394
|
+
isRight: isRight
|
|
30395
|
+
}, hasIcon), /*#__PURE__*/React.createElement("div", {
|
|
30396
|
+
className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
|
|
30397
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
30398
|
+
id: "3568181479",
|
|
30399
|
+
dynamic: [paddingForAutoMode, paddingForAutoMode]
|
|
30400
|
+
}, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
|
|
30401
|
+
};
|
|
30402
|
+
var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
|
|
30403
|
+
if (!config.isButtonGroup) return props;
|
|
30404
|
+
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
30405
|
+
auto: true,
|
|
30406
|
+
shadow: false,
|
|
30407
|
+
ghost: config.ghost || props.ghost,
|
|
30408
|
+
type: config.type || props.type,
|
|
30409
|
+
disabled: config.disabled || props.disabled
|
|
30410
|
+
});
|
|
30411
|
+
};
|
|
30574
30412
|
|
|
30575
|
-
|
|
30576
|
-
|
|
30577
|
-
|
|
30578
|
-
|
|
30579
|
-
|
|
30580
|
-
|
|
30581
|
-
|
|
30582
|
-
|
|
30583
|
-
|
|
30584
|
-
case "duotone":
|
|
30585
|
-
return "";
|
|
30586
|
-
case "outline":
|
|
30587
|
-
return React.createElement(Outline, null);
|
|
30588
|
-
default:
|
|
30589
|
-
return React.createElement(Outline, null);
|
|
30590
|
-
}
|
|
30413
|
+
/* "use client" */
|
|
30414
|
+
|
|
30415
|
+
var defaultContext = {
|
|
30416
|
+
isButtonGroup: false,
|
|
30417
|
+
disabled: false
|
|
30418
|
+
};
|
|
30419
|
+
var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext);
|
|
30420
|
+
var useButtonGroupContext = function useButtonGroupContext() {
|
|
30421
|
+
return React.useContext(ButtonGroupContext);
|
|
30591
30422
|
};
|
|
30592
|
-
RotateCcw.displayName = "RotateCcw";
|
|
30593
|
-
createIcon(RotateCcw);
|
|
30594
30423
|
|
|
30595
|
-
|
|
30596
|
-
|
|
30597
|
-
|
|
30598
|
-
|
|
30599
|
-
|
|
30600
|
-
|
|
30601
|
-
|
|
30602
|
-
|
|
30603
|
-
|
|
30604
|
-
|
|
30605
|
-
|
|
30606
|
-
|
|
30607
|
-
|
|
30608
|
-
|
|
30609
|
-
|
|
30610
|
-
|
|
30611
|
-
|
|
30424
|
+
var hexToRgb = function hexToRgb(color) {
|
|
30425
|
+
var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
30426
|
+
var full = color.replace(fullReg, function (_, r, g, b) {
|
|
30427
|
+
return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
|
|
30428
|
+
});
|
|
30429
|
+
var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
|
|
30430
|
+
if (!values) {
|
|
30431
|
+
throw new Error("Helpdice UI: Unsupported ".concat(color, " color."));
|
|
30432
|
+
}
|
|
30433
|
+
return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
|
|
30434
|
+
};
|
|
30435
|
+
var colorToRgbValues = function colorToRgbValues(color) {
|
|
30436
|
+
if (color.charAt(0) === '#') return hexToRgb(color);
|
|
30437
|
+
var safeColor = color.replace(/ /g, '');
|
|
30438
|
+
var colorType = color.substr(0, 4);
|
|
30439
|
+
var regArray = safeColor.match(/\((.+)\)/);
|
|
30440
|
+
if (!colorType.startsWith('rgb') || !regArray) {
|
|
30441
|
+
console.log(color);
|
|
30442
|
+
throw new Error("Helpdice UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
|
|
30443
|
+
}
|
|
30444
|
+
return regArray[1].split(',').map(function (str) {
|
|
30445
|
+
return Number.parseFloat(str);
|
|
30446
|
+
});
|
|
30447
|
+
};
|
|
30448
|
+
var addColorAlpha = function addColorAlpha(color, alpha) {
|
|
30449
|
+
if (!/^#|rgb|RGB/.test(color)) return color;
|
|
30450
|
+
var _colorToRgbValues = colorToRgbValues(color),
|
|
30451
|
+
_colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
|
|
30452
|
+
r = _colorToRgbValues2[0],
|
|
30453
|
+
g = _colorToRgbValues2[1],
|
|
30454
|
+
b = _colorToRgbValues2[2];
|
|
30455
|
+
var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
|
|
30456
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
|
|
30612
30457
|
};
|
|
30613
|
-
Type.displayName = "Type";
|
|
30614
|
-
createIcon(Type);
|
|
30615
30458
|
|
|
30616
|
-
|
|
30617
|
-
|
|
30618
|
-
|
|
30619
|
-
|
|
30620
|
-
|
|
30621
|
-
|
|
30622
|
-
|
|
30623
|
-
|
|
30624
|
-
|
|
30625
|
-
|
|
30626
|
-
|
|
30627
|
-
|
|
30628
|
-
|
|
30629
|
-
|
|
30630
|
-
|
|
30631
|
-
|
|
30632
|
-
|
|
30459
|
+
var getButtonGhostColors = function getButtonGhostColors(palette, type) {
|
|
30460
|
+
var colors = {
|
|
30461
|
+
secondary: {
|
|
30462
|
+
bg: palette.background,
|
|
30463
|
+
border: palette.foreground,
|
|
30464
|
+
color: palette.foreground
|
|
30465
|
+
},
|
|
30466
|
+
success: {
|
|
30467
|
+
bg: palette.background,
|
|
30468
|
+
border: palette.success,
|
|
30469
|
+
color: palette.success
|
|
30470
|
+
},
|
|
30471
|
+
warning: {
|
|
30472
|
+
bg: palette.background,
|
|
30473
|
+
border: palette.warning,
|
|
30474
|
+
color: palette.warning
|
|
30475
|
+
},
|
|
30476
|
+
error: {
|
|
30477
|
+
bg: palette.background,
|
|
30478
|
+
border: palette.error,
|
|
30479
|
+
color: palette.error
|
|
30633
30480
|
}
|
|
30481
|
+
};
|
|
30482
|
+
return colors[type] || null;
|
|
30634
30483
|
};
|
|
30635
|
-
|
|
30636
|
-
|
|
30484
|
+
var getButtonColors = function getButtonColors(palette, props) {
|
|
30485
|
+
var type = props.type,
|
|
30486
|
+
disabled = props.disabled,
|
|
30487
|
+
ghost = props.ghost;
|
|
30488
|
+
var colors = {
|
|
30489
|
+
"default": {
|
|
30490
|
+
bg: palette.background,
|
|
30491
|
+
border: palette.border,
|
|
30492
|
+
color: palette.accents_5
|
|
30493
|
+
},
|
|
30494
|
+
secondary: {
|
|
30495
|
+
bg: palette.foreground,
|
|
30496
|
+
border: palette.foreground,
|
|
30497
|
+
color: palette.background
|
|
30498
|
+
},
|
|
30499
|
+
success: {
|
|
30500
|
+
bg: palette.success,
|
|
30501
|
+
border: palette.success,
|
|
30502
|
+
color: '#fff'
|
|
30503
|
+
},
|
|
30504
|
+
warning: {
|
|
30505
|
+
bg: palette.warning,
|
|
30506
|
+
border: palette.warning,
|
|
30507
|
+
color: '#fff'
|
|
30508
|
+
},
|
|
30509
|
+
error: {
|
|
30510
|
+
bg: palette.error,
|
|
30511
|
+
border: palette.error,
|
|
30512
|
+
color: '#fff'
|
|
30513
|
+
},
|
|
30514
|
+
abort: {
|
|
30515
|
+
bg: 'transparent',
|
|
30516
|
+
border: 'transparent',
|
|
30517
|
+
color: palette.accents_5
|
|
30518
|
+
}
|
|
30519
|
+
};
|
|
30520
|
+
if (disabled) return {
|
|
30521
|
+
bg: palette.accents_1,
|
|
30522
|
+
border: palette.accents_2,
|
|
30523
|
+
color: '#ccc'
|
|
30524
|
+
};
|
|
30637
30525
|
|
|
30638
|
-
|
|
30639
|
-
|
|
30640
|
-
|
|
30641
|
-
|
|
30642
|
-
|
|
30643
|
-
|
|
30644
|
-
|
|
30645
|
-
|
|
30646
|
-
|
|
30647
|
-
|
|
30648
|
-
|
|
30649
|
-
|
|
30650
|
-
|
|
30651
|
-
|
|
30526
|
+
/**
|
|
30527
|
+
* The '-light' type is the same color as the common type,
|
|
30528
|
+
* only hover's color is different.
|
|
30529
|
+
* e.g.
|
|
30530
|
+
* Color['success'] === Color['success-light']
|
|
30531
|
+
* Color['warning'] === Color['warning-light']
|
|
30532
|
+
*/
|
|
30533
|
+
var withoutLightType = type === null || type === undefined ? undefined : type.replace('-light', '');
|
|
30534
|
+
var defaultColor = colors["default"];
|
|
30535
|
+
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
30536
|
+
return colors[withoutLightType] || defaultColor;
|
|
30537
|
+
};
|
|
30538
|
+
var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
|
|
30539
|
+
var colors = {
|
|
30540
|
+
secondary: {
|
|
30541
|
+
bg: palette.foreground,
|
|
30542
|
+
border: palette.background,
|
|
30543
|
+
color: palette.background
|
|
30544
|
+
},
|
|
30545
|
+
success: {
|
|
30546
|
+
bg: palette.success,
|
|
30547
|
+
border: palette.background,
|
|
30548
|
+
color: 'white'
|
|
30549
|
+
},
|
|
30550
|
+
warning: {
|
|
30551
|
+
bg: palette.warning,
|
|
30552
|
+
border: palette.background,
|
|
30553
|
+
color: 'white'
|
|
30554
|
+
},
|
|
30555
|
+
error: {
|
|
30556
|
+
bg: palette.error,
|
|
30557
|
+
border: palette.background,
|
|
30558
|
+
color: 'white'
|
|
30652
30559
|
}
|
|
30560
|
+
};
|
|
30561
|
+
var withoutLightType = type.replace('-light', '');
|
|
30562
|
+
return colors[withoutLightType] || null;
|
|
30563
|
+
};
|
|
30564
|
+
var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
30565
|
+
var type = props.type,
|
|
30566
|
+
disabled = props.disabled,
|
|
30567
|
+
loading = props.loading,
|
|
30568
|
+
shadow = props.shadow,
|
|
30569
|
+
ghost = props.ghost;
|
|
30570
|
+
var defaultColor = getButtonColors(palette, props);
|
|
30571
|
+
var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
|
|
30572
|
+
var colors = {
|
|
30573
|
+
"default": {
|
|
30574
|
+
bg: palette.background,
|
|
30575
|
+
border: palette.foreground
|
|
30576
|
+
},
|
|
30577
|
+
secondary: {
|
|
30578
|
+
bg: palette.background,
|
|
30579
|
+
border: palette.foreground
|
|
30580
|
+
},
|
|
30581
|
+
success: {
|
|
30582
|
+
bg: palette.background,
|
|
30583
|
+
border: palette.success
|
|
30584
|
+
},
|
|
30585
|
+
warning: {
|
|
30586
|
+
bg: palette.background,
|
|
30587
|
+
border: palette.warning
|
|
30588
|
+
},
|
|
30589
|
+
error: {
|
|
30590
|
+
bg: palette.background,
|
|
30591
|
+
border: palette.error
|
|
30592
|
+
},
|
|
30593
|
+
abort: {
|
|
30594
|
+
bg: 'transparent',
|
|
30595
|
+
border: 'transparent',
|
|
30596
|
+
color: palette.accents_5
|
|
30597
|
+
},
|
|
30598
|
+
'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
30599
|
+
bg: alphaBackground
|
|
30600
|
+
}),
|
|
30601
|
+
'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
30602
|
+
bg: alphaBackground
|
|
30603
|
+
}),
|
|
30604
|
+
'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
30605
|
+
bg: alphaBackground
|
|
30606
|
+
}),
|
|
30607
|
+
'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
30608
|
+
bg: alphaBackground
|
|
30609
|
+
})
|
|
30610
|
+
};
|
|
30611
|
+
if (disabled) return {
|
|
30612
|
+
bg: palette.accents_1,
|
|
30613
|
+
border: palette.accents_2,
|
|
30614
|
+
color: '#ccc'
|
|
30615
|
+
};
|
|
30616
|
+
if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
30617
|
+
color: 'transparent'
|
|
30618
|
+
});
|
|
30619
|
+
if (shadow) return defaultColor;
|
|
30620
|
+
var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
|
|
30621
|
+
return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
|
|
30622
|
+
color: hoverColor.color || hoverColor.border
|
|
30623
|
+
});
|
|
30653
30624
|
};
|
|
30654
|
-
|
|
30655
|
-
|
|
30656
|
-
|
|
30657
|
-
|
|
30658
|
-
|
|
30659
|
-
|
|
30660
|
-
|
|
30661
|
-
|
|
30662
|
-
|
|
30663
|
-
|
|
30664
|
-
|
|
30665
|
-
|
|
30666
|
-
|
|
30667
|
-
case "outline":
|
|
30668
|
-
return React.createElement(Outline, null);
|
|
30669
|
-
default:
|
|
30670
|
-
return React.createElement(Outline, null);
|
|
30671
|
-
}
|
|
30625
|
+
var getButtonCursor = function getButtonCursor(disabled, loading) {
|
|
30626
|
+
if (disabled) return {
|
|
30627
|
+
cursor: 'not-allowed',
|
|
30628
|
+
events: 'auto'
|
|
30629
|
+
};
|
|
30630
|
+
if (loading) return {
|
|
30631
|
+
cursor: 'default',
|
|
30632
|
+
events: 'none'
|
|
30633
|
+
};
|
|
30634
|
+
return {
|
|
30635
|
+
cursor: 'pointer',
|
|
30636
|
+
events: 'auto'
|
|
30637
|
+
};
|
|
30672
30638
|
};
|
|
30673
|
-
|
|
30674
|
-
|
|
30675
|
-
|
|
30676
|
-
|
|
30677
|
-
|
|
30678
|
-
React.createElement("path", { d: "M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9z", stroke: color, strokeWidth: strokeWidth }),
|
|
30679
|
-
React.createElement("path", { d: "M13 2v7h7", stroke: color, strokeWidth: strokeWidth })));
|
|
30680
|
-
switch (set) {
|
|
30681
|
-
case "broken":
|
|
30682
|
-
return "";
|
|
30683
|
-
case "curved":
|
|
30684
|
-
return "";
|
|
30685
|
-
case "duotone":
|
|
30686
|
-
return "";
|
|
30687
|
-
case "outline":
|
|
30688
|
-
return React.createElement(Outline, null);
|
|
30689
|
-
default:
|
|
30690
|
-
return React.createElement(Outline, null);
|
|
30691
|
-
}
|
|
30639
|
+
var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
30640
|
+
var type = props.type;
|
|
30641
|
+
var isLightHover = type ? type.endsWith('light') : false;
|
|
30642
|
+
var hoverColors = getButtonHoverColors(palette, props);
|
|
30643
|
+
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
30692
30644
|
};
|
|
30693
|
-
File.displayName = "File";
|
|
30694
|
-
createIcon(File);
|
|
30695
30645
|
|
|
30696
|
-
|
|
30697
|
-
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
|
|
30701
|
-
|
|
30702
|
-
|
|
30703
|
-
|
|
30704
|
-
|
|
30705
|
-
|
|
30706
|
-
|
|
30707
|
-
|
|
30708
|
-
|
|
30709
|
-
|
|
30710
|
-
|
|
30711
|
-
|
|
30712
|
-
|
|
30713
|
-
|
|
30714
|
-
|
|
30715
|
-
|
|
30646
|
+
var _excluded$1 = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
|
|
30647
|
+
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
30648
|
+
var theme = useTheme();
|
|
30649
|
+
var _useScale = useScale(),
|
|
30650
|
+
SCALES = _useScale.SCALES;
|
|
30651
|
+
var buttonRef = React.useRef(null);
|
|
30652
|
+
React.useImperativeHandle(ref, function () {
|
|
30653
|
+
return buttonRef.current;
|
|
30654
|
+
});
|
|
30655
|
+
var _useState = React.useState(false),
|
|
30656
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30657
|
+
dripShow = _useState2[0],
|
|
30658
|
+
setDripShow = _useState2[1];
|
|
30659
|
+
var _useState3 = React.useState(0),
|
|
30660
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
30661
|
+
dripX = _useState4[0],
|
|
30662
|
+
setDripX = _useState4[1];
|
|
30663
|
+
var _useState5 = React.useState(0),
|
|
30664
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
30665
|
+
dripY = _useState6[0],
|
|
30666
|
+
setDripY = _useState6[1];
|
|
30667
|
+
var groupConfig = useButtonGroupContext();
|
|
30668
|
+
var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
|
|
30669
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
30670
|
+
var children = filteredProps.children,
|
|
30671
|
+
_filteredProps$disabl = filteredProps.disabled,
|
|
30672
|
+
disabled = _filteredProps$disabl === undefined ? false : _filteredProps$disabl;
|
|
30673
|
+
filteredProps.type;
|
|
30674
|
+
var _filteredProps$loadin = filteredProps.loading,
|
|
30675
|
+
loading = _filteredProps$loadin === undefined ? false : _filteredProps$loadin,
|
|
30676
|
+
_filteredProps$shadow = filteredProps.shadow,
|
|
30677
|
+
shadow = _filteredProps$shadow === undefined ? false : _filteredProps$shadow,
|
|
30678
|
+
_filteredProps$ghost = filteredProps.ghost,
|
|
30679
|
+
ghost = _filteredProps$ghost === undefined ? false : _filteredProps$ghost,
|
|
30680
|
+
_filteredProps$effect = filteredProps.effect,
|
|
30681
|
+
effect = _filteredProps$effect === undefined ? true : _filteredProps$effect,
|
|
30682
|
+
onClick = filteredProps.onClick,
|
|
30683
|
+
_filteredProps$auto = filteredProps.auto,
|
|
30684
|
+
auto = _filteredProps$auto === undefined ? false : _filteredProps$auto,
|
|
30685
|
+
icon = filteredProps.icon,
|
|
30686
|
+
_filteredProps$htmlTy = filteredProps.htmlType,
|
|
30687
|
+
htmlType = _filteredProps$htmlTy === undefined ? 'button' : _filteredProps$htmlTy,
|
|
30688
|
+
iconRight = filteredProps.iconRight,
|
|
30689
|
+
_filteredProps$classN = filteredProps.className,
|
|
30690
|
+
className = _filteredProps$classN === undefined ? '' : _filteredProps$classN;
|
|
30691
|
+
filteredProps.crossOrigin;
|
|
30692
|
+
var props = _objectWithoutProperties(filteredProps, _excluded$1);
|
|
30693
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
30716
30694
|
|
|
30717
|
-
|
|
30718
|
-
|
|
30719
|
-
|
|
30720
|
-
|
|
30721
|
-
|
|
30722
|
-
|
|
30723
|
-
|
|
30724
|
-
|
|
30725
|
-
|
|
30726
|
-
|
|
30727
|
-
|
|
30728
|
-
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
};
|
|
30734
|
-
Lock.displayName = "Lock";
|
|
30735
|
-
createIcon(Lock);
|
|
30695
|
+
var _useMemo = React.useMemo(function () {
|
|
30696
|
+
return getButtonColors(theme.palette, filteredProps);
|
|
30697
|
+
}, [theme.palette, filteredProps]),
|
|
30698
|
+
bg = _useMemo.bg,
|
|
30699
|
+
border = _useMemo.border,
|
|
30700
|
+
color = _useMemo.color;
|
|
30701
|
+
var hover = React.useMemo(function () {
|
|
30702
|
+
return getButtonHoverColors(theme.palette, filteredProps);
|
|
30703
|
+
}, [theme.palette, filteredProps]);
|
|
30704
|
+
var _useMemo2 = React.useMemo(function () {
|
|
30705
|
+
return getButtonCursor(disabled, loading);
|
|
30706
|
+
}, [disabled, loading]),
|
|
30707
|
+
cursor = _useMemo2.cursor,
|
|
30708
|
+
events = _useMemo2.events;
|
|
30709
|
+
var dripColor = React.useMemo(function () {
|
|
30710
|
+
return getButtonDripColor(theme.palette, filteredProps);
|
|
30711
|
+
}, [theme.palette, filteredProps]);
|
|
30736
30712
|
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
return React.createElement(Outline, null);
|
|
30713
|
+
/* istanbul ignore next */
|
|
30714
|
+
var dripCompletedHandle = function dripCompletedHandle() {
|
|
30715
|
+
setDripShow(false);
|
|
30716
|
+
setDripX(0);
|
|
30717
|
+
setDripY(0);
|
|
30718
|
+
};
|
|
30719
|
+
var clickHandler = function clickHandler(event) {
|
|
30720
|
+
if (disabled || loading) return;
|
|
30721
|
+
var showDrip = !shadow && !ghost && effect;
|
|
30722
|
+
/* istanbul ignore next */
|
|
30723
|
+
if (showDrip && buttonRef.current) {
|
|
30724
|
+
var rect = buttonRef.current.getBoundingClientRect();
|
|
30725
|
+
setDripShow(true);
|
|
30726
|
+
setDripX(event.clientX - rect.left);
|
|
30727
|
+
setDripY(event.clientY - rect.top);
|
|
30753
30728
|
}
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30729
|
+
onClick && onClick(event);
|
|
30730
|
+
};
|
|
30731
|
+
var childrenWithIcon = React.useMemo(function () {
|
|
30732
|
+
return getButtonChildrenWithIcon(auto, children, {
|
|
30733
|
+
icon: icon,
|
|
30734
|
+
iconRight: iconRight
|
|
30735
|
+
});
|
|
30736
|
+
}, [auto, children, icon, iconRight]);
|
|
30737
|
+
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
30738
|
+
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
30739
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
30740
|
+
ref: buttonRef,
|
|
30741
|
+
type: htmlType,
|
|
30742
|
+
disabled: disabled,
|
|
30743
|
+
onClick: clickHandler
|
|
30744
|
+
}, props, {
|
|
30745
|
+
className: _JSXStyle.dynamic([["22324076", [SCALES.height(2.5), theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : '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, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses('btn', className) || "")
|
|
30746
|
+
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
30747
|
+
color: color
|
|
30748
|
+
}), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
|
|
30749
|
+
x: dripX,
|
|
30750
|
+
y: dripY,
|
|
30751
|
+
color: dripColor,
|
|
30752
|
+
onCompleted: dripCompletedHandle
|
|
30753
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
30754
|
+
id: "22324076",
|
|
30755
|
+
dynamic: [SCALES.height(2.5), theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : '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, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']
|
|
30756
|
+
}, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(theme.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowMedium : 'none', ";-webkit-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);-ms-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}")));
|
|
30757
|
+
});
|
|
30758
|
+
ButtonComponent.displayName = 'Button';
|
|
30759
|
+
var Button = withScale(ButtonComponent);
|
|
30757
30760
|
|
|
30758
30761
|
var getColors = function getColors(type, palette) {
|
|
30759
30762
|
var colors = {
|