@helpdice/ui 2.5.8 → 2.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-complete/index.js +85 -76
- package/dist/grid/grid-base.d.ts +2 -2
- package/dist/grid/grid-container.d.ts +2 -2
- package/dist/index.js +106 -96
- package/dist/input/index.js +85 -76
- package/dist/input/input-block-label.d.ts +1 -0
- package/dist/input/input-props.d.ts +1 -0
- package/dist/table/index.js +106 -96
- package/dist/table/table.d.ts +2 -2
- package/dist/textarea/index.js +13 -6
- package/esm/grid/grid-base.d.ts +2 -2
- package/esm/grid/grid-container.d.ts +2 -2
- package/esm/input/input-block-label.d.ts +1 -0
- package/esm/input/input-block-label.js +13 -6
- package/esm/input/input-field.js +5 -2
- package/esm/input/input-props.d.ts +1 -0
- package/esm/table/table.d.ts +2 -2
- package/esm/table/table.js +20 -18
- package/package.json +1 -1
package/dist/input/index.js
CHANGED
|
@@ -736,81 +736,6 @@ var InputLabel = function InputLabel(_ref) {
|
|
|
736
736
|
};
|
|
737
737
|
var MemoInputLabel = /*#__PURE__*/React.memo(InputLabel);
|
|
738
738
|
|
|
739
|
-
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
740
|
-
var children = _ref.children;
|
|
741
|
-
var theme$1 = theme.useTheme();
|
|
742
|
-
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
743
|
-
className: _JSXStyle.dynamic([["1278828862", [theme$1.palette.accents_6]]]),
|
|
744
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
745
|
-
id: "1278828862",
|
|
746
|
-
dynamic: [theme$1.palette.accents_6],
|
|
747
|
-
children: "label.__jsx-style-dynamic-selector{display:block;font-weight:normal;color:".concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
|
|
748
|
-
})]
|
|
749
|
-
});
|
|
750
|
-
};
|
|
751
|
-
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
752
|
-
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
753
|
-
|
|
754
|
-
var InputIconComponent = function InputIconComponent(_ref) {
|
|
755
|
-
var icon = _ref.icon,
|
|
756
|
-
_ref$clickable = _ref.clickable,
|
|
757
|
-
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
758
|
-
onClick = _ref.onClick;
|
|
759
|
-
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
760
|
-
onClick: onClick,
|
|
761
|
-
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
762
|
-
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
763
|
-
id: "4247656379",
|
|
764
|
-
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
765
|
-
children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
766
|
-
})]
|
|
767
|
-
});
|
|
768
|
-
};
|
|
769
|
-
InputIconComponent.displayName = 'InputIcon';
|
|
770
|
-
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
771
|
-
|
|
772
|
-
var InputIconClear = function InputIconClear(_ref) {
|
|
773
|
-
var onClick = _ref.onClick,
|
|
774
|
-
disabled = _ref.disabled,
|
|
775
|
-
visible = _ref.visible;
|
|
776
|
-
var theme$1 = theme.useTheme();
|
|
777
|
-
var classes = theme.useClasses('clear-icon', {
|
|
778
|
-
visible: visible
|
|
779
|
-
});
|
|
780
|
-
var clickHandler = function clickHandler(event) {
|
|
781
|
-
event.preventDefault();
|
|
782
|
-
event.stopPropagation();
|
|
783
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
784
|
-
onClick && onClick(event);
|
|
785
|
-
};
|
|
786
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
787
|
-
onClick: clickHandler,
|
|
788
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
789
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
790
|
-
viewBox: "0 0 24 24",
|
|
791
|
-
stroke: "currentColor",
|
|
792
|
-
strokeWidth: "1.5",
|
|
793
|
-
strokeLinecap: "round",
|
|
794
|
-
strokeLinejoin: "round",
|
|
795
|
-
fill: "none",
|
|
796
|
-
shapeRendering: "geometricPrecision",
|
|
797
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
798
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
799
|
-
d: "M18 6L6 18",
|
|
800
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
801
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
802
|
-
d: "M6 6l12 12",
|
|
803
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
804
|
-
})]
|
|
805
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
806
|
-
id: "1567030211",
|
|
807
|
-
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
808
|
-
children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
809
|
-
})]
|
|
810
|
-
});
|
|
811
|
-
};
|
|
812
|
-
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
813
|
-
|
|
814
739
|
/* "use client" */
|
|
815
740
|
|
|
816
741
|
var ScalePropKeys = ['width', 'height', 'padding', 'margin', 'w', 'h', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'pl', 'pr', 'pt', 'pb', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'ml', 'mr', 'mt', 'mb', 'px', 'py', 'mx', 'my', 'font', 'unit', 'scale'];
|
|
@@ -995,6 +920,88 @@ var withScale = function withScale(Render) {
|
|
|
995
920
|
return ScaleFC;
|
|
996
921
|
};
|
|
997
922
|
|
|
923
|
+
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
924
|
+
var children = _ref.children,
|
|
925
|
+
_ref$required = _ref.required,
|
|
926
|
+
required = _ref$required === void 0 ? false : _ref$required;
|
|
927
|
+
var theme$1 = theme.useTheme();
|
|
928
|
+
var _useScale = useScale(),
|
|
929
|
+
SCALES = _useScale.SCALES;
|
|
930
|
+
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
931
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
|
|
932
|
+
children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
933
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
|
|
934
|
+
children: "*"
|
|
935
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
936
|
+
id: "588038827",
|
|
937
|
+
dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
|
|
938
|
+
children: "label.__jsx-style-dynamic-selector{display:".concat(typeof children === "string" ? 'block' : 'flex', ";font-weight:normal;color:").concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector .mark-error.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.errorDark, ";margin:0px 3px;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;font-size:").concat(SCALES.font(1.2), ";}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
|
|
939
|
+
})]
|
|
940
|
+
});
|
|
941
|
+
};
|
|
942
|
+
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
943
|
+
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
944
|
+
|
|
945
|
+
var InputIconComponent = function InputIconComponent(_ref) {
|
|
946
|
+
var icon = _ref.icon,
|
|
947
|
+
_ref$clickable = _ref.clickable,
|
|
948
|
+
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
949
|
+
onClick = _ref.onClick;
|
|
950
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
951
|
+
onClick: onClick,
|
|
952
|
+
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
953
|
+
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
954
|
+
id: "4247656379",
|
|
955
|
+
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
956
|
+
children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
957
|
+
})]
|
|
958
|
+
});
|
|
959
|
+
};
|
|
960
|
+
InputIconComponent.displayName = 'InputIcon';
|
|
961
|
+
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
962
|
+
|
|
963
|
+
var InputIconClear = function InputIconClear(_ref) {
|
|
964
|
+
var onClick = _ref.onClick,
|
|
965
|
+
disabled = _ref.disabled,
|
|
966
|
+
visible = _ref.visible;
|
|
967
|
+
var theme$1 = theme.useTheme();
|
|
968
|
+
var classes = theme.useClasses('clear-icon', {
|
|
969
|
+
visible: visible
|
|
970
|
+
});
|
|
971
|
+
var clickHandler = function clickHandler(event) {
|
|
972
|
+
event.preventDefault();
|
|
973
|
+
event.stopPropagation();
|
|
974
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
975
|
+
onClick && onClick(event);
|
|
976
|
+
};
|
|
977
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
978
|
+
onClick: clickHandler,
|
|
979
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
980
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
981
|
+
viewBox: "0 0 24 24",
|
|
982
|
+
stroke: "currentColor",
|
|
983
|
+
strokeWidth: "1.5",
|
|
984
|
+
strokeLinecap: "round",
|
|
985
|
+
strokeLinejoin: "round",
|
|
986
|
+
fill: "none",
|
|
987
|
+
shapeRendering: "geometricPrecision",
|
|
988
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
989
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
990
|
+
d: "M18 6L6 18",
|
|
991
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
992
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
993
|
+
d: "M6 6l12 12",
|
|
994
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
995
|
+
})]
|
|
996
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
997
|
+
id: "1567030211",
|
|
998
|
+
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
999
|
+
children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
1000
|
+
})]
|
|
1001
|
+
});
|
|
1002
|
+
};
|
|
1003
|
+
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
1004
|
+
|
|
998
1005
|
var _excluded$8 = ["children", "tag", "className", "color"];
|
|
999
1006
|
var getTypeColor = function getTypeColor(type, palette) {
|
|
1000
1007
|
var colors = {
|
|
@@ -1874,7 +1881,7 @@ var getColors = function getColors(palette, status) {
|
|
|
1874
1881
|
return colors[status];
|
|
1875
1882
|
};
|
|
1876
1883
|
|
|
1877
|
-
var _excluded$3 = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1884
|
+
var _excluded$3 = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth", "required"];
|
|
1878
1885
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1879
1886
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1880
1887
|
target: el,
|
|
@@ -1920,6 +1927,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1920
1927
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1921
1928
|
_ref$fullWidth = _ref.fullWidth,
|
|
1922
1929
|
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
1930
|
+
required = _ref.required,
|
|
1923
1931
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
1924
1932
|
var theme$1 = theme.useTheme();
|
|
1925
1933
|
var _useScale = useScale(),
|
|
@@ -2005,6 +2013,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2005
2013
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2006
2014
|
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + "with-label",
|
|
2007
2015
|
children: [children && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
|
|
2016
|
+
required: required,
|
|
2008
2017
|
children: children
|
|
2009
2018
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2010
2019
|
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-container', className) || ""),
|
|
@@ -19,6 +19,7 @@ export interface Props {
|
|
|
19
19
|
iconClickable?: boolean;
|
|
20
20
|
className?: string;
|
|
21
21
|
clearable?: boolean;
|
|
22
|
+
required?: boolean;
|
|
22
23
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
24
|
onClearClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
24
25
|
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
package/dist/table/index.js
CHANGED
|
@@ -8,7 +8,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
8
8
|
var reactDom = require('react-dom');
|
|
9
9
|
var pro = require('@helpdice/pro');
|
|
10
10
|
var icons = require('@helpdice/icons');
|
|
11
|
-
var Loading$1 = require('components/loading');
|
|
12
11
|
|
|
13
12
|
function _arrayLikeToArray(r, a) {
|
|
14
13
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -745,81 +744,6 @@ var InputLabel = function InputLabel(_ref) {
|
|
|
745
744
|
};
|
|
746
745
|
var MemoInputLabel = /*#__PURE__*/React.memo(InputLabel);
|
|
747
746
|
|
|
748
|
-
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
749
|
-
var children = _ref.children;
|
|
750
|
-
var theme$1 = theme.useTheme();
|
|
751
|
-
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
752
|
-
className: _JSXStyle.dynamic([["1278828862", [theme$1.palette.accents_6]]]),
|
|
753
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
754
|
-
id: "1278828862",
|
|
755
|
-
dynamic: [theme$1.palette.accents_6],
|
|
756
|
-
children: "label.__jsx-style-dynamic-selector{display:block;font-weight:normal;color:".concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
|
|
757
|
-
})]
|
|
758
|
-
});
|
|
759
|
-
};
|
|
760
|
-
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
761
|
-
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
762
|
-
|
|
763
|
-
var InputIconComponent = function InputIconComponent(_ref) {
|
|
764
|
-
var icon = _ref.icon,
|
|
765
|
-
_ref$clickable = _ref.clickable,
|
|
766
|
-
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
767
|
-
onClick = _ref.onClick;
|
|
768
|
-
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
769
|
-
onClick: onClick,
|
|
770
|
-
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
771
|
-
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
772
|
-
id: "4247656379",
|
|
773
|
-
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
774
|
-
children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
775
|
-
})]
|
|
776
|
-
});
|
|
777
|
-
};
|
|
778
|
-
InputIconComponent.displayName = 'InputIcon';
|
|
779
|
-
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
780
|
-
|
|
781
|
-
var InputIconClear = function InputIconClear(_ref) {
|
|
782
|
-
var onClick = _ref.onClick,
|
|
783
|
-
disabled = _ref.disabled,
|
|
784
|
-
visible = _ref.visible;
|
|
785
|
-
var theme$1 = theme.useTheme();
|
|
786
|
-
var classes = theme.useClasses('clear-icon', {
|
|
787
|
-
visible: visible
|
|
788
|
-
});
|
|
789
|
-
var clickHandler = function clickHandler(event) {
|
|
790
|
-
event.preventDefault();
|
|
791
|
-
event.stopPropagation();
|
|
792
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
793
|
-
onClick && onClick(event);
|
|
794
|
-
};
|
|
795
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
796
|
-
onClick: clickHandler,
|
|
797
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
798
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
799
|
-
viewBox: "0 0 24 24",
|
|
800
|
-
stroke: "currentColor",
|
|
801
|
-
strokeWidth: "1.5",
|
|
802
|
-
strokeLinecap: "round",
|
|
803
|
-
strokeLinejoin: "round",
|
|
804
|
-
fill: "none",
|
|
805
|
-
shapeRendering: "geometricPrecision",
|
|
806
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
807
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
808
|
-
d: "M18 6L6 18",
|
|
809
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
810
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
811
|
-
d: "M6 6l12 12",
|
|
812
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
813
|
-
})]
|
|
814
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
815
|
-
id: "1567030211",
|
|
816
|
-
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
817
|
-
children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
818
|
-
})]
|
|
819
|
-
});
|
|
820
|
-
};
|
|
821
|
-
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
822
|
-
|
|
823
747
|
/* "use client" */
|
|
824
748
|
|
|
825
749
|
var ScalePropKeys = ['width', 'height', 'padding', 'margin', 'w', 'h', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'pl', 'pr', 'pt', 'pb', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'ml', 'mr', 'mt', 'mb', 'px', 'py', 'mx', 'my', 'font', 'unit', 'scale'];
|
|
@@ -1046,6 +970,88 @@ var withScale = function withScale(Render) {
|
|
|
1046
970
|
return ScaleFC;
|
|
1047
971
|
};
|
|
1048
972
|
|
|
973
|
+
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
974
|
+
var children = _ref.children,
|
|
975
|
+
_ref$required = _ref.required,
|
|
976
|
+
required = _ref$required === void 0 ? false : _ref$required;
|
|
977
|
+
var theme$1 = theme.useTheme();
|
|
978
|
+
var _useScale = useScale(),
|
|
979
|
+
SCALES = _useScale.SCALES;
|
|
980
|
+
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
981
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
|
|
982
|
+
children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
983
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
|
|
984
|
+
children: "*"
|
|
985
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
986
|
+
id: "588038827",
|
|
987
|
+
dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
|
|
988
|
+
children: "label.__jsx-style-dynamic-selector{display:".concat(typeof children === "string" ? 'block' : 'flex', ";font-weight:normal;color:").concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector .mark-error.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.errorDark, ";margin:0px 3px;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;font-size:").concat(SCALES.font(1.2), ";}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
|
|
989
|
+
})]
|
|
990
|
+
});
|
|
991
|
+
};
|
|
992
|
+
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
993
|
+
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
994
|
+
|
|
995
|
+
var InputIconComponent = function InputIconComponent(_ref) {
|
|
996
|
+
var icon = _ref.icon,
|
|
997
|
+
_ref$clickable = _ref.clickable,
|
|
998
|
+
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
999
|
+
onClick = _ref.onClick;
|
|
1000
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1001
|
+
onClick: onClick,
|
|
1002
|
+
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
1003
|
+
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1004
|
+
id: "4247656379",
|
|
1005
|
+
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
1006
|
+
children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
1007
|
+
})]
|
|
1008
|
+
});
|
|
1009
|
+
};
|
|
1010
|
+
InputIconComponent.displayName = 'InputIcon';
|
|
1011
|
+
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
1012
|
+
|
|
1013
|
+
var InputIconClear = function InputIconClear(_ref) {
|
|
1014
|
+
var onClick = _ref.onClick,
|
|
1015
|
+
disabled = _ref.disabled,
|
|
1016
|
+
visible = _ref.visible;
|
|
1017
|
+
var theme$1 = theme.useTheme();
|
|
1018
|
+
var classes = theme.useClasses('clear-icon', {
|
|
1019
|
+
visible: visible
|
|
1020
|
+
});
|
|
1021
|
+
var clickHandler = function clickHandler(event) {
|
|
1022
|
+
event.preventDefault();
|
|
1023
|
+
event.stopPropagation();
|
|
1024
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
1025
|
+
onClick && onClick(event);
|
|
1026
|
+
};
|
|
1027
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1028
|
+
onClick: clickHandler,
|
|
1029
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
1030
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
1031
|
+
viewBox: "0 0 24 24",
|
|
1032
|
+
stroke: "currentColor",
|
|
1033
|
+
strokeWidth: "1.5",
|
|
1034
|
+
strokeLinecap: "round",
|
|
1035
|
+
strokeLinejoin: "round",
|
|
1036
|
+
fill: "none",
|
|
1037
|
+
shapeRendering: "geometricPrecision",
|
|
1038
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
1039
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1040
|
+
d: "M18 6L6 18",
|
|
1041
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
1042
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1043
|
+
d: "M6 6l12 12",
|
|
1044
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
1045
|
+
})]
|
|
1046
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1047
|
+
id: "1567030211",
|
|
1048
|
+
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
1049
|
+
children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
1050
|
+
})]
|
|
1051
|
+
});
|
|
1052
|
+
};
|
|
1053
|
+
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
1054
|
+
|
|
1049
1055
|
var _excluded$i = ["children", "tag", "className", "color"];
|
|
1050
1056
|
var getTypeColor = function getTypeColor(type, palette) {
|
|
1051
1057
|
var colors = {
|
|
@@ -1925,7 +1931,7 @@ var getColors$2 = function getColors(palette, status) {
|
|
|
1925
1931
|
return colors[status];
|
|
1926
1932
|
};
|
|
1927
1933
|
|
|
1928
|
-
var _excluded$d = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1934
|
+
var _excluded$d = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth", "required"];
|
|
1929
1935
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1930
1936
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1931
1937
|
target: el,
|
|
@@ -1971,6 +1977,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1971
1977
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1972
1978
|
_ref$fullWidth = _ref.fullWidth,
|
|
1973
1979
|
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
1980
|
+
required = _ref.required,
|
|
1974
1981
|
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
1975
1982
|
var theme$1 = theme.useTheme();
|
|
1976
1983
|
var _useScale = useScale(),
|
|
@@ -2056,6 +2063,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2056
2063
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2057
2064
|
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + "with-label",
|
|
2058
2065
|
children: [children && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
|
|
2066
|
+
required: required,
|
|
2059
2067
|
children: children
|
|
2060
2068
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2061
2069
|
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-container', className) || ""),
|
|
@@ -24164,16 +24172,16 @@ function TableComponent(tableProps) {
|
|
|
24164
24172
|
borderBottomLeftRadius: '5px',
|
|
24165
24173
|
borderBottomRightRadius: '5px'
|
|
24166
24174
|
},
|
|
24167
|
-
className: _JSXStyle.dynamic([["
|
|
24175
|
+
className: _JSXStyle.dynamic([["638332526", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), 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$1.palette.background]]]),
|
|
24168
24176
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
24169
24177
|
style: _objectSpread2({
|
|
24170
24178
|
overflow: 'auto'
|
|
24171
24179
|
}, containerStyle),
|
|
24172
|
-
className: _JSXStyle.dynamic([["
|
|
24180
|
+
className: _JSXStyle.dynamic([["638332526", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), 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$1.palette.background]]]),
|
|
24173
24181
|
children: [/*#__PURE__*/jsxRuntime.jsxs("table", _objectSpread2(_objectSpread2({
|
|
24174
24182
|
ref: ref
|
|
24175
24183
|
}, props), {}, {
|
|
24176
|
-
className: _JSXStyle.dynamic([["
|
|
24184
|
+
className: _JSXStyle.dynamic([["638332526", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), 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$1.palette.background]]]) + " " + (props && props.className != null && props.className || className || ""),
|
|
24177
24185
|
children: [/*#__PURE__*/jsxRuntime.jsx(TableHead, {
|
|
24178
24186
|
stickyHeader: stickyHeader,
|
|
24179
24187
|
onFilters: onFilters,
|
|
@@ -24195,20 +24203,20 @@ function TableComponent(tableProps) {
|
|
|
24195
24203
|
readOnly: readOnly,
|
|
24196
24204
|
onSelected: onSelected
|
|
24197
24205
|
}), children]
|
|
24198
|
-
})), loading === "default" && isLoading ? /*#__PURE__*/jsxRuntime.jsx(Loading
|
|
24206
|
+
})), loading === "default" && isLoading ? /*#__PURE__*/jsxRuntime.jsx(Loading, {}) : null, data.length == 0 && !isLoading ? /*#__PURE__*/jsxRuntime.jsx(Placeholder, {
|
|
24207
|
+
height: "90%",
|
|
24199
24208
|
empty: true,
|
|
24200
24209
|
textOnly: textPlaceholder,
|
|
24201
24210
|
msg: "No Data to show"
|
|
24202
|
-
})]
|
|
24203
|
-
}), cursorPagination || viewLength ? /*#__PURE__*/jsxRuntime.
|
|
24204
|
-
className: _JSXStyle.dynamic([["
|
|
24205
|
-
children: cursorPagination
|
|
24211
|
+
}) : null]
|
|
24212
|
+
}), cursorPagination || viewLength ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
24213
|
+
className: _JSXStyle.dynamic([["638332526", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), 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$1.palette.background]]]) + " " + "table-footer",
|
|
24214
|
+
children: [cursorPagination && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
24206
24215
|
style: {
|
|
24207
24216
|
display: 'flex',
|
|
24208
|
-
gap: 10
|
|
24209
|
-
margin: '10px'
|
|
24217
|
+
gap: 10
|
|
24210
24218
|
},
|
|
24211
|
-
className: _JSXStyle.dynamic([["
|
|
24219
|
+
className: _JSXStyle.dynamic([["638332526", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), 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$1.palette.background]]]),
|
|
24212
24220
|
children: [/*#__PURE__*/jsxRuntime.jsx(Tooltip.Small, {
|
|
24213
24221
|
text: "Previous",
|
|
24214
24222
|
type: "dark",
|
|
@@ -24226,21 +24234,23 @@ function TableComponent(tableProps) {
|
|
|
24226
24234
|
text: "Next",
|
|
24227
24235
|
type: "dark",
|
|
24228
24236
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
24229
|
-
disabled: !nextCursor,
|
|
24237
|
+
disabled: !nextCursor || isLoading,
|
|
24230
24238
|
onClick: function onClick() {
|
|
24231
24239
|
return onNextPage && onNextPage(nextCursor);
|
|
24232
24240
|
},
|
|
24233
24241
|
auto: true,
|
|
24234
24242
|
px: 0.6,
|
|
24235
24243
|
scale: 2 / 3,
|
|
24236
|
-
iconRight: /*#__PURE__*/jsxRuntime.jsx(
|
|
24244
|
+
iconRight: isLoading ? /*#__PURE__*/jsxRuntime.jsx(Loading, {
|
|
24245
|
+
width: "20px",
|
|
24246
|
+
height: "20px"
|
|
24247
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRight, {})
|
|
24237
24248
|
})
|
|
24238
24249
|
})]
|
|
24239
|
-
})
|
|
24250
|
+
}), dataLength && viewLength && onPageChange ? /*#__PURE__*/jsxRuntime.jsxs(Pagination, {
|
|
24240
24251
|
style: {
|
|
24241
24252
|
marginLeft: '10px',
|
|
24242
|
-
marginRight: '10px'
|
|
24243
|
-
marginTop: '10px'
|
|
24253
|
+
marginRight: '10px'
|
|
24244
24254
|
},
|
|
24245
24255
|
onChange: function onChange(pageNumber) {
|
|
24246
24256
|
// Get the range for the current page
|
|
@@ -24256,11 +24266,11 @@ function TableComponent(tableProps) {
|
|
|
24256
24266
|
}), /*#__PURE__*/jsxRuntime.jsx(Pagination.Previous, {
|
|
24257
24267
|
children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeft, {})
|
|
24258
24268
|
})]
|
|
24259
|
-
}) : null
|
|
24269
|
+
}) : null]
|
|
24260
24270
|
}) : null, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
24261
|
-
id: "
|
|
24271
|
+
id: "638332526",
|
|
24262
24272
|
dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), 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$1.palette.background],
|
|
24263
|
-
children: "table.__jsx-style-dynamic-selector{border-collapse:separate;border-spacing:0;--table-font-size:".concat(SCALES.font(1), ";font-size:var(--table-font-size);width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, 'auto'), ";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), ";}.table-footer.__jsx-style-dynamic-selector{background-color:").concat(theme$1.palette.background, ";width:100%;bottom:0;}")
|
|
24273
|
+
children: "table.__jsx-style-dynamic-selector{border-collapse:separate;border-spacing:0;--table-font-size:".concat(SCALES.font(1), ";font-size:var(--table-font-size);width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, 'auto'), ";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), ";}.table-footer.__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;background-color:").concat(theme$1.palette.background, ";width:100%;bottom:0;padding:10px;}")
|
|
24264
24274
|
})]
|
|
24265
24275
|
})
|
|
24266
24276
|
});
|
package/dist/table/table.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { RowErrorMap, TableDataItemBase, TableOnCellClick, TableOnChange, TableOnRowClick, TableRowClassNameHandler } from './table-types';
|
|
3
3
|
import { ScaleProps } from '../use-scale';
|
|
4
4
|
interface Props<TableDataItem extends TableDataItemBase> {
|
|
@@ -26,7 +26,7 @@ interface Props<TableDataItem extends TableDataItemBase> {
|
|
|
26
26
|
nextCursor?: string;
|
|
27
27
|
hasMore?: boolean;
|
|
28
28
|
rowErrors?: RowErrorMap;
|
|
29
|
-
containerStyle?:
|
|
29
|
+
containerStyle?: CSSProperties;
|
|
30
30
|
loading?: string;
|
|
31
31
|
isLoading?: boolean;
|
|
32
32
|
onNextPage?: (next?: string) => void;
|
package/dist/textarea/index.js
CHANGED
|
@@ -1788,14 +1788,21 @@ TextComponent.displayName = 'Text';
|
|
|
1788
1788
|
var Text = withScale(TextComponent);
|
|
1789
1789
|
|
|
1790
1790
|
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
1791
|
-
var children = _ref.children
|
|
1791
|
+
var children = _ref.children,
|
|
1792
|
+
_ref$required = _ref.required,
|
|
1793
|
+
required = _ref$required === void 0 ? false : _ref$required;
|
|
1792
1794
|
var theme$1 = theme.useTheme();
|
|
1795
|
+
var _useScale = useScale(),
|
|
1796
|
+
SCALES = _useScale.SCALES;
|
|
1793
1797
|
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
1794
|
-
className: _JSXStyle.dynamic([["
|
|
1795
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsx(
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1798
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
|
|
1799
|
+
children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1800
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
|
|
1801
|
+
children: "*"
|
|
1802
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1803
|
+
id: "588038827",
|
|
1804
|
+
dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
|
|
1805
|
+
children: "label.__jsx-style-dynamic-selector{display:".concat(typeof children === "string" ? 'block' : 'flex', ";font-weight:normal;color:").concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector .mark-error.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.errorDark, ";margin:0px 3px;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;font-size:").concat(SCALES.font(1.2), ";}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
|
|
1799
1806
|
})]
|
|
1800
1807
|
});
|
|
1801
1808
|
};
|
package/esm/grid/grid-base.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export type GridProps = Props & GridBasicItemProps;
|
|
|
7
7
|
declare const Grid: React.ForwardRefExoticComponent<Props & import("./basic-item").GridBasicComponentProps & {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
style?: React.CSSProperties | undefined;
|
|
10
|
-
onClick?: React.MouseEventHandler<any> | undefined;
|
|
11
10
|
onChange?: React.FormEventHandler<any> | undefined;
|
|
12
11
|
defaultChecked?: boolean | undefined | undefined;
|
|
13
12
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -16,7 +15,7 @@ declare const Grid: React.ForwardRefExoticComponent<Props & import("./basic-item
|
|
|
16
15
|
accessKey?: string | undefined | undefined;
|
|
17
16
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
18
17
|
autoFocus?: boolean | undefined | undefined;
|
|
19
|
-
contentEditable?:
|
|
18
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
20
19
|
contextMenu?: string | undefined | undefined;
|
|
21
20
|
dir?: string | undefined | undefined;
|
|
22
21
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -201,6 +200,7 @@ declare const Grid: React.ForwardRefExoticComponent<Props & import("./basic-item
|
|
|
201
200
|
onWaitingCapture?: React.ReactEventHandler<any> | undefined;
|
|
202
201
|
onAuxClick?: React.MouseEventHandler<any> | undefined;
|
|
203
202
|
onAuxClickCapture?: React.MouseEventHandler<any> | undefined;
|
|
203
|
+
onClick?: React.MouseEventHandler<any> | undefined;
|
|
204
204
|
onClickCapture?: React.MouseEventHandler<any> | undefined;
|
|
205
205
|
onContextMenu?: React.MouseEventHandler<any> | undefined;
|
|
206
206
|
onContextMenuCapture?: React.MouseEventHandler<any> | undefined;
|
|
@@ -10,7 +10,6 @@ export type GridContainerProps = Props & GridBasicItemProps;
|
|
|
10
10
|
declare const GridContainer: React.ForwardRefExoticComponent<Props & import("./basic-item").GridBasicComponentProps & {
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
style?: React.CSSProperties | undefined;
|
|
13
|
-
onClick?: React.MouseEventHandler<any> | undefined;
|
|
14
13
|
onChange?: React.FormEventHandler<any> | undefined;
|
|
15
14
|
defaultChecked?: boolean | undefined | undefined;
|
|
16
15
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -19,7 +18,7 @@ declare const GridContainer: React.ForwardRefExoticComponent<Props & import("./b
|
|
|
19
18
|
accessKey?: string | undefined | undefined;
|
|
20
19
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
21
20
|
autoFocus?: boolean | undefined | undefined;
|
|
22
|
-
contentEditable?:
|
|
21
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
23
22
|
contextMenu?: string | undefined | undefined;
|
|
24
23
|
dir?: string | undefined | undefined;
|
|
25
24
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -204,6 +203,7 @@ declare const GridContainer: React.ForwardRefExoticComponent<Props & import("./b
|
|
|
204
203
|
onWaitingCapture?: React.ReactEventHandler<any> | undefined;
|
|
205
204
|
onAuxClick?: React.MouseEventHandler<any> | undefined;
|
|
206
205
|
onAuxClickCapture?: React.MouseEventHandler<any> | undefined;
|
|
206
|
+
onClick?: React.MouseEventHandler<any> | undefined;
|
|
207
207
|
onClickCapture?: React.MouseEventHandler<any> | undefined;
|
|
208
208
|
onContextMenu?: React.MouseEventHandler<any> | undefined;
|
|
209
209
|
onContextMenuCapture?: React.MouseEventHandler<any> | undefined;
|