@helpdice/ui 2.5.9 → 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.
@@ -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) || ""),
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface InputBlockLabelLabel {
3
+ required?: boolean;
3
4
  }
4
5
  declare const InputBlockLabel: React.NamedExoticComponent<React.PropsWithChildren<InputBlockLabelLabel>>;
5
6
  export default InputBlockLabel;
@@ -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;
@@ -744,81 +744,6 @@ var InputLabel = function InputLabel(_ref) {
744
744
  };
745
745
  var MemoInputLabel = /*#__PURE__*/React.memo(InputLabel);
746
746
 
747
- var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
748
- var children = _ref.children;
749
- var theme$1 = theme.useTheme();
750
- return /*#__PURE__*/jsxRuntime.jsxs("label", {
751
- className: _JSXStyle.dynamic([["1278828862", [theme$1.palette.accents_6]]]),
752
- children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
753
- id: "1278828862",
754
- dynamic: [theme$1.palette.accents_6],
755
- 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;}")
756
- })]
757
- });
758
- };
759
- InputBlockLabelComponent.displayName = 'InputBlockLabel';
760
- var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
761
-
762
- var InputIconComponent = function InputIconComponent(_ref) {
763
- var icon = _ref.icon,
764
- _ref$clickable = _ref.clickable,
765
- clickable = _ref$clickable === void 0 ? false : _ref$clickable,
766
- onClick = _ref.onClick;
767
- return /*#__PURE__*/jsxRuntime.jsxs("span", {
768
- onClick: onClick,
769
- className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
770
- children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
771
- id: "4247656379",
772
- dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
773
- 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);}")
774
- })]
775
- });
776
- };
777
- InputIconComponent.displayName = 'InputIcon';
778
- var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
779
-
780
- var InputIconClear = function InputIconClear(_ref) {
781
- var onClick = _ref.onClick,
782
- disabled = _ref.disabled,
783
- visible = _ref.visible;
784
- var theme$1 = theme.useTheme();
785
- var classes = theme.useClasses('clear-icon', {
786
- visible: visible
787
- });
788
- var clickHandler = function clickHandler(event) {
789
- event.preventDefault();
790
- event.stopPropagation();
791
- event.nativeEvent.stopImmediatePropagation();
792
- onClick && onClick(event);
793
- };
794
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
795
- onClick: clickHandler,
796
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
797
- children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
798
- viewBox: "0 0 24 24",
799
- stroke: "currentColor",
800
- strokeWidth: "1.5",
801
- strokeLinecap: "round",
802
- strokeLinejoin: "round",
803
- fill: "none",
804
- shapeRendering: "geometricPrecision",
805
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
806
- children: [/*#__PURE__*/jsxRuntime.jsx("path", {
807
- d: "M18 6L6 18",
808
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
809
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
810
- d: "M6 6l12 12",
811
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
812
- })]
813
- }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
814
- id: "1567030211",
815
- dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
816
- 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);}")
817
- })]
818
- });
819
- };
820
- var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
821
-
822
747
  /* "use client" */
823
748
 
824
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'];
@@ -1045,6 +970,88 @@ var withScale = function withScale(Render) {
1045
970
  return ScaleFC;
1046
971
  };
1047
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
+
1048
1055
  var _excluded$i = ["children", "tag", "className", "color"];
1049
1056
  var getTypeColor = function getTypeColor(type, palette) {
1050
1057
  var colors = {
@@ -1924,7 +1931,7 @@ var getColors$2 = function getColors(palette, status) {
1924
1931
  return colors[status];
1925
1932
  };
1926
1933
 
1927
- 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"];
1928
1935
  var simulateChangeEvent = function simulateChangeEvent(el, event) {
1929
1936
  return _objectSpread2(_objectSpread2({}, event), {}, {
1930
1937
  target: el,
@@ -1970,6 +1977,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1970
1977
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
1971
1978
  _ref$fullWidth = _ref.fullWidth,
1972
1979
  fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
1980
+ required = _ref.required,
1973
1981
  props = _objectWithoutProperties(_ref, _excluded$d);
1974
1982
  var theme$1 = theme.useTheme();
1975
1983
  var _useScale = useScale(),
@@ -2055,6 +2063,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2055
2063
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
2056
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",
2057
2065
  children: [children && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
2066
+ required: required,
2058
2067
  children: children
2059
2068
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2060
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) || ""),
@@ -24163,16 +24172,16 @@ function TableComponent(tableProps) {
24163
24172
  borderBottomLeftRadius: '5px',
24164
24173
  borderBottomRightRadius: '5px'
24165
24174
  },
24166
- className: _JSXStyle.dynamic([["1809040460", [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]]]),
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]]]),
24167
24176
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
24168
24177
  style: _objectSpread2({
24169
24178
  overflow: 'auto'
24170
24179
  }, containerStyle),
24171
- className: _JSXStyle.dynamic([["1809040460", [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]]]),
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]]]),
24172
24181
  children: [/*#__PURE__*/jsxRuntime.jsxs("table", _objectSpread2(_objectSpread2({
24173
24182
  ref: ref
24174
24183
  }, props), {}, {
24175
- className: _JSXStyle.dynamic([["1809040460", [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 || ""),
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 || ""),
24176
24185
  children: [/*#__PURE__*/jsxRuntime.jsx(TableHead, {
24177
24186
  stickyHeader: stickyHeader,
24178
24187
  onFilters: onFilters,
@@ -24194,20 +24203,20 @@ function TableComponent(tableProps) {
24194
24203
  readOnly: readOnly,
24195
24204
  onSelected: onSelected
24196
24205
  }), children]
24197
- })), loading === "default" && isLoading ? /*#__PURE__*/jsxRuntime.jsx(Loading, {}) : data.length == 0 && /*#__PURE__*/jsxRuntime.jsx(Placeholder, {
24206
+ })), loading === "default" && isLoading ? /*#__PURE__*/jsxRuntime.jsx(Loading, {}) : null, data.length == 0 && !isLoading ? /*#__PURE__*/jsxRuntime.jsx(Placeholder, {
24207
+ height: "90%",
24198
24208
  empty: true,
24199
24209
  textOnly: textPlaceholder,
24200
24210
  msg: "No Data to show"
24201
- })]
24202
- }), cursorPagination || viewLength ? /*#__PURE__*/jsxRuntime.jsx("div", {
24203
- className: _JSXStyle.dynamic([["1809040460", [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",
24204
- children: cursorPagination ? /*#__PURE__*/jsxRuntime.jsxs("div", {
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", {
24205
24215
  style: {
24206
24216
  display: 'flex',
24207
- gap: 10,
24208
- margin: '10px'
24217
+ gap: 10
24209
24218
  },
24210
- className: _JSXStyle.dynamic([["1809040460", [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]]]),
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]]]),
24211
24220
  children: [/*#__PURE__*/jsxRuntime.jsx(Tooltip.Small, {
24212
24221
  text: "Previous",
24213
24222
  type: "dark",
@@ -24225,21 +24234,23 @@ function TableComponent(tableProps) {
24225
24234
  text: "Next",
24226
24235
  type: "dark",
24227
24236
  children: /*#__PURE__*/jsxRuntime.jsx(Button, {
24228
- disabled: !nextCursor,
24237
+ disabled: !nextCursor || isLoading,
24229
24238
  onClick: function onClick() {
24230
24239
  return onNextPage && onNextPage(nextCursor);
24231
24240
  },
24232
24241
  auto: true,
24233
24242
  px: 0.6,
24234
24243
  scale: 2 / 3,
24235
- iconRight: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRight, {})
24244
+ iconRight: isLoading ? /*#__PURE__*/jsxRuntime.jsx(Loading, {
24245
+ width: "20px",
24246
+ height: "20px"
24247
+ }) : /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRight, {})
24236
24248
  })
24237
24249
  })]
24238
- }) : dataLength && viewLength && onPageChange ? /*#__PURE__*/jsxRuntime.jsxs(Pagination, {
24250
+ }), dataLength && viewLength && onPageChange ? /*#__PURE__*/jsxRuntime.jsxs(Pagination, {
24239
24251
  style: {
24240
24252
  marginLeft: '10px',
24241
- marginRight: '10px',
24242
- marginTop: '10px'
24253
+ marginRight: '10px'
24243
24254
  },
24244
24255
  onChange: function onChange(pageNumber) {
24245
24256
  // Get the range for the current page
@@ -24255,11 +24266,11 @@ function TableComponent(tableProps) {
24255
24266
  }), /*#__PURE__*/jsxRuntime.jsx(Pagination.Previous, {
24256
24267
  children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeft, {})
24257
24268
  })]
24258
- }) : null
24269
+ }) : null]
24259
24270
  }) : null, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
24260
- id: "1809040460",
24271
+ id: "638332526",
24261
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],
24262
- 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;}")
24263
24274
  })]
24264
24275
  })
24265
24276
  });
@@ -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?: object;
29
+ containerStyle?: CSSProperties;
30
30
  loading?: string;
31
31
  isLoading?: boolean;
32
32
  onNextPage?: (next?: string) => void;
@@ -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([["1278828862", [theme$1.palette.accents_6]]]),
1795
- children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1796
- id: "1278828862",
1797
- dynamic: [theme$1.palette.accents_6],
1798
- 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;}")
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
  };
@@ -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?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
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?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
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;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface InputBlockLabelLabel {
3
+ required?: boolean;
3
4
  }
4
5
  declare const InputBlockLabel: React.NamedExoticComponent<React.PropsWithChildren<InputBlockLabelLabel>>;
5
6
  export default InputBlockLabel;