@helpdice/ui 2.5.9 → 2.6.0-beta.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/auto-complete/index.js +94 -85
- package/dist/grid/grid-base.d.ts +2 -2
- package/dist/grid/grid-container.d.ts +2 -2
- package/dist/index.js +115 -104
- package/dist/input/index.js +94 -85
- package/dist/input/input-block-label.d.ts +1 -0
- package/dist/input/input-props.d.ts +1 -0
- package/dist/table/index.js +115 -104
- 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 +14 -11
- package/esm/input/input-props.d.ts +1 -0
- package/esm/table/table.d.ts +2 -2
- package/esm/table/table.js +19 -17
- package/package.json +1 -1
|
@@ -737,81 +737,6 @@ var InputLabel = function InputLabel(_ref) {
|
|
|
737
737
|
};
|
|
738
738
|
var MemoInputLabel = /*#__PURE__*/React.memo(InputLabel);
|
|
739
739
|
|
|
740
|
-
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
741
|
-
var children = _ref.children;
|
|
742
|
-
var theme$1 = theme.useTheme();
|
|
743
|
-
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
744
|
-
className: _JSXStyle.dynamic([["1278828862", [theme$1.palette.accents_6]]]),
|
|
745
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
746
|
-
id: "1278828862",
|
|
747
|
-
dynamic: [theme$1.palette.accents_6],
|
|
748
|
-
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;}")
|
|
749
|
-
})]
|
|
750
|
-
});
|
|
751
|
-
};
|
|
752
|
-
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
753
|
-
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
754
|
-
|
|
755
|
-
var InputIconComponent = function InputIconComponent(_ref) {
|
|
756
|
-
var icon = _ref.icon,
|
|
757
|
-
_ref$clickable = _ref.clickable,
|
|
758
|
-
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
759
|
-
onClick = _ref.onClick;
|
|
760
|
-
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
761
|
-
onClick: onClick,
|
|
762
|
-
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
763
|
-
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
764
|
-
id: "4247656379",
|
|
765
|
-
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
766
|
-
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);}")
|
|
767
|
-
})]
|
|
768
|
-
});
|
|
769
|
-
};
|
|
770
|
-
InputIconComponent.displayName = 'InputIcon';
|
|
771
|
-
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
772
|
-
|
|
773
|
-
var InputIconClear = function InputIconClear(_ref) {
|
|
774
|
-
var onClick = _ref.onClick,
|
|
775
|
-
disabled = _ref.disabled,
|
|
776
|
-
visible = _ref.visible;
|
|
777
|
-
var theme$1 = theme.useTheme();
|
|
778
|
-
var classes = theme.useClasses('clear-icon', {
|
|
779
|
-
visible: visible
|
|
780
|
-
});
|
|
781
|
-
var clickHandler = function clickHandler(event) {
|
|
782
|
-
event.preventDefault();
|
|
783
|
-
event.stopPropagation();
|
|
784
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
785
|
-
onClick && onClick(event);
|
|
786
|
-
};
|
|
787
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
788
|
-
onClick: clickHandler,
|
|
789
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
790
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
791
|
-
viewBox: "0 0 24 24",
|
|
792
|
-
stroke: "currentColor",
|
|
793
|
-
strokeWidth: "1.5",
|
|
794
|
-
strokeLinecap: "round",
|
|
795
|
-
strokeLinejoin: "round",
|
|
796
|
-
fill: "none",
|
|
797
|
-
shapeRendering: "geometricPrecision",
|
|
798
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
799
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
800
|
-
d: "M18 6L6 18",
|
|
801
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
802
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
803
|
-
d: "M6 6l12 12",
|
|
804
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
805
|
-
})]
|
|
806
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
807
|
-
id: "1567030211",
|
|
808
|
-
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
809
|
-
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);}")
|
|
810
|
-
})]
|
|
811
|
-
});
|
|
812
|
-
};
|
|
813
|
-
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
814
|
-
|
|
815
740
|
/* "use client" */
|
|
816
741
|
|
|
817
742
|
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'];
|
|
@@ -1009,6 +934,88 @@ var withScale = function withScale(Render) {
|
|
|
1009
934
|
return ScaleFC;
|
|
1010
935
|
};
|
|
1011
936
|
|
|
937
|
+
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
|
|
938
|
+
var children = _ref.children,
|
|
939
|
+
_ref$required = _ref.required,
|
|
940
|
+
required = _ref$required === void 0 ? false : _ref$required;
|
|
941
|
+
var theme$1 = theme.useTheme();
|
|
942
|
+
var _useScale = useScale(),
|
|
943
|
+
SCALES = _useScale.SCALES;
|
|
944
|
+
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
945
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
|
|
946
|
+
children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
947
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
|
|
948
|
+
children: "*"
|
|
949
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
950
|
+
id: "588038827",
|
|
951
|
+
dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
|
|
952
|
+
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;}")
|
|
953
|
+
})]
|
|
954
|
+
});
|
|
955
|
+
};
|
|
956
|
+
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
957
|
+
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
958
|
+
|
|
959
|
+
var InputIconComponent = function InputIconComponent(_ref) {
|
|
960
|
+
var icon = _ref.icon,
|
|
961
|
+
_ref$clickable = _ref.clickable,
|
|
962
|
+
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
963
|
+
onClick = _ref.onClick;
|
|
964
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
965
|
+
onClick: onClick,
|
|
966
|
+
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
967
|
+
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
968
|
+
id: "4247656379",
|
|
969
|
+
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
970
|
+
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);}")
|
|
971
|
+
})]
|
|
972
|
+
});
|
|
973
|
+
};
|
|
974
|
+
InputIconComponent.displayName = 'InputIcon';
|
|
975
|
+
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
976
|
+
|
|
977
|
+
var InputIconClear = function InputIconClear(_ref) {
|
|
978
|
+
var onClick = _ref.onClick,
|
|
979
|
+
disabled = _ref.disabled,
|
|
980
|
+
visible = _ref.visible;
|
|
981
|
+
var theme$1 = theme.useTheme();
|
|
982
|
+
var classes = theme.useClasses('clear-icon', {
|
|
983
|
+
visible: visible
|
|
984
|
+
});
|
|
985
|
+
var clickHandler = function clickHandler(event) {
|
|
986
|
+
event.preventDefault();
|
|
987
|
+
event.stopPropagation();
|
|
988
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
989
|
+
onClick && onClick(event);
|
|
990
|
+
};
|
|
991
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
992
|
+
onClick: clickHandler,
|
|
993
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
994
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
995
|
+
viewBox: "0 0 24 24",
|
|
996
|
+
stroke: "currentColor",
|
|
997
|
+
strokeWidth: "1.5",
|
|
998
|
+
strokeLinecap: "round",
|
|
999
|
+
strokeLinejoin: "round",
|
|
1000
|
+
fill: "none",
|
|
1001
|
+
shapeRendering: "geometricPrecision",
|
|
1002
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
1003
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1004
|
+
d: "M18 6L6 18",
|
|
1005
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
1006
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1007
|
+
d: "M6 6l12 12",
|
|
1008
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
1009
|
+
})]
|
|
1010
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1011
|
+
id: "1567030211",
|
|
1012
|
+
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
1013
|
+
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);}")
|
|
1014
|
+
})]
|
|
1015
|
+
});
|
|
1016
|
+
};
|
|
1017
|
+
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
1018
|
+
|
|
1012
1019
|
var _excluded$9 = ["children", "tag", "className", "color"];
|
|
1013
1020
|
var getTypeColor = function getTypeColor(type, palette) {
|
|
1014
1021
|
var colors = {
|
|
@@ -1888,7 +1895,7 @@ var getColors = function getColors(palette, status) {
|
|
|
1888
1895
|
return colors[status];
|
|
1889
1896
|
};
|
|
1890
1897
|
|
|
1891
|
-
var _excluded$4 = ["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"];
|
|
1898
|
+
var _excluded$4 = ["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"];
|
|
1892
1899
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1893
1900
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1894
1901
|
target: el,
|
|
@@ -1934,6 +1941,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1934
1941
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1935
1942
|
_ref$fullWidth = _ref.fullWidth,
|
|
1936
1943
|
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
1944
|
+
required = _ref.required,
|
|
1937
1945
|
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
1938
1946
|
var theme$1 = theme.useTheme();
|
|
1939
1947
|
var _useScale = useScale(),
|
|
@@ -1962,7 +1970,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1962
1970
|
}, [icon, iconRight]);
|
|
1963
1971
|
var _useMemo = React.useMemo(function () {
|
|
1964
1972
|
return getColors(theme$1.palette, _color);
|
|
1965
|
-
}, [theme$1.palette,
|
|
1973
|
+
}, [theme$1.palette, _color]),
|
|
1966
1974
|
color = _useMemo.color,
|
|
1967
1975
|
borderColor = _useMemo.borderColor,
|
|
1968
1976
|
hoverBorder = _useMemo.hoverBorder;
|
|
@@ -2017,15 +2025,16 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2017
2025
|
var inputProps = _objectSpread2(_objectSpread2({}, props), controlledValue);
|
|
2018
2026
|
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
2019
2027
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2020
|
-
className: _JSXStyle.dynamic([["
|
|
2028
|
+
className: _JSXStyle.dynamic([["2371903369", [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), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + "with-label",
|
|
2021
2029
|
children: [children && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
|
|
2030
|
+
required: required,
|
|
2022
2031
|
children: children
|
|
2023
2032
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2024
|
-
className: _JSXStyle.dynamic([["
|
|
2033
|
+
className: _JSXStyle.dynamic([["2371903369", [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), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-container', className) || ""),
|
|
2025
2034
|
children: [label && /*#__PURE__*/jsxRuntime.jsx(MemoInputLabel, {
|
|
2026
2035
|
children: label
|
|
2027
2036
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2028
|
-
className: _JSXStyle.dynamic([["
|
|
2037
|
+
className: _JSXStyle.dynamic([["2371903369", [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), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-wrapper', {
|
|
2029
2038
|
hover: hover,
|
|
2030
2039
|
disabled: disabled
|
|
2031
2040
|
}, labelClasses) || ""),
|
|
@@ -2043,7 +2052,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2043
2052
|
autoComplete: autoComplete,
|
|
2044
2053
|
onKeyDown: handleKeyDown
|
|
2045
2054
|
}, inputProps), {}, {
|
|
2046
|
-
className: _JSXStyle.dynamic([["
|
|
2055
|
+
className: _JSXStyle.dynamic([["2371903369", [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), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || theme.useClasses({
|
|
2047
2056
|
disabled: disabled
|
|
2048
2057
|
}, iconClasses) || "")
|
|
2049
2058
|
})), clearable && /*#__PURE__*/jsxRuntime.jsx(MemoInputIconClear, {
|
|
@@ -2057,7 +2066,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2057
2066
|
isRight: true,
|
|
2058
2067
|
children: labelRight
|
|
2059
2068
|
}), /*#__PURE__*/jsxRuntime.jsx("br", {
|
|
2060
|
-
className: _JSXStyle.dynamic([["
|
|
2069
|
+
className: _JSXStyle.dynamic([["2371903369", [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), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]])
|
|
2061
2070
|
})]
|
|
2062
2071
|
}), helperText && /*#__PURE__*/jsxRuntime.jsxs(Text, {
|
|
2063
2072
|
font: 0.8,
|
|
@@ -2071,9 +2080,9 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2071
2080
|
color: error ? "error" : 'default',
|
|
2072
2081
|
children: ["\xA0", helperText]
|
|
2073
2082
|
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
2074
|
-
id: "
|
|
2075
|
-
dynamic: [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),
|
|
2076
|
-
children: ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";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), ";}.input-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;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme$1.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme$1.palette.accents_1, ";border-color:").concat(theme$1.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(
|
|
2083
|
+
id: "2371903369",
|
|
2084
|
+
dynamic: [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), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color],
|
|
2085
|
+
children: ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";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), ";}.input-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;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme$1.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme$1.palette.accents_1, ";border-color:").concat(theme$1.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(theme$1.palette.foreground, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme$1.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")
|
|
2077
2086
|
})]
|
|
2078
2087
|
});
|
|
2079
2088
|
});
|
package/dist/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;
|