@helpdice/ui 2.2.3 → 2.2.5
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 +55 -45
- package/dist/container/box.d.ts +1 -0
- package/dist/container/index.js +686 -8
- package/dist/index.js +77 -47
- package/dist/input/currency-input/components/CurrencyInput.d.ts +35 -2
- package/dist/input/currency-input/components/CurrencyInputProps.d.ts +1 -0
- package/dist/input/index.js +55 -45
- package/dist/input/input-props.d.ts +1 -0
- package/dist/input/phone-input/phone.d.ts +34 -2
- package/dist/table/index.js +55 -45
- package/esm/container/box.d.ts +1 -0
- package/esm/container/box.js +25 -3
- package/esm/input/currency-input/components/CurrencyInput.d.ts +35 -2
- package/esm/input/currency-input/components/CurrencyInput.js +18 -12
- package/esm/input/currency-input/components/CurrencyInputProps.d.ts +1 -0
- package/esm/input/input-field.js +14 -13
- package/esm/input/input-props.d.ts +1 -0
- package/esm/input/phone-input/phone.d.ts +34 -2
- package/esm/input/phone-input/phone.js +22 -21
- package/package.json +1 -1
|
@@ -1038,7 +1038,7 @@ var withScale = function withScale(Render) {
|
|
|
1038
1038
|
return ScaleFC;
|
|
1039
1039
|
};
|
|
1040
1040
|
|
|
1041
|
-
var _excluded$5 = ["label", "labelRight", "color", "
|
|
1041
|
+
var _excluded$5 = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "fullWidth"];
|
|
1042
1042
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1043
1043
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1044
1044
|
target: el,
|
|
@@ -1048,9 +1048,10 @@ var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
|
1048
1048
|
var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1049
1049
|
var label = _ref.label,
|
|
1050
1050
|
labelRight = _ref.labelRight,
|
|
1051
|
-
_ref$color = _ref.color,
|
|
1052
|
-
_color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
1053
1051
|
error = _ref.error,
|
|
1052
|
+
_ref$color = _ref.color,
|
|
1053
|
+
_color = _ref$color === void 0 ? error ? 'error' : 'default' : _ref$color,
|
|
1054
|
+
helperText = _ref.helperText,
|
|
1054
1055
|
_ref$type = _ref.type,
|
|
1055
1056
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1056
1057
|
icon = _ref.icon,
|
|
@@ -1160,11 +1161,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1160
1161
|
var inputProps = _objectSpread2(_objectSpread2({}, props), controlledValue);
|
|
1161
1162
|
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
1162
1163
|
return /*#__PURE__*/React.createElement("div", {
|
|
1163
|
-
className: _JSXStyle.dynamic([["
|
|
1164
|
+
className: _JSXStyle.dynamic([["2582554466", [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"
|
|
1164
1165
|
}, children && /*#__PURE__*/React.createElement(InputBlockLabel, null, children), /*#__PURE__*/React.createElement("div", {
|
|
1165
|
-
className: _JSXStyle.dynamic([["
|
|
1166
|
+
className: _JSXStyle.dynamic([["2582554466", [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) || "")
|
|
1166
1167
|
}, label && /*#__PURE__*/React.createElement(MemoInputLabel, null, label), /*#__PURE__*/React.createElement("div", {
|
|
1167
|
-
className: _JSXStyle.dynamic([["
|
|
1168
|
+
className: _JSXStyle.dynamic([["2582554466", [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-wrapper', {
|
|
1168
1169
|
hover: hover,
|
|
1169
1170
|
disabled: disabled
|
|
1170
1171
|
}, labelClasses) || "")
|
|
@@ -1181,7 +1182,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1181
1182
|
onChange: changeHandler,
|
|
1182
1183
|
autoComplete: autoComplete
|
|
1183
1184
|
}, inputProps, {
|
|
1184
|
-
className: _JSXStyle.dynamic([["
|
|
1185
|
+
className: _JSXStyle.dynamic([["2582554466", [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]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || theme.useClasses({
|
|
1185
1186
|
disabled: disabled
|
|
1186
1187
|
}, iconClasses) || "")
|
|
1187
1188
|
})), clearable && /*#__PURE__*/React.createElement(MemoInputIconClear, {
|
|
@@ -1193,8 +1194,8 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1193
1194
|
}, iconProps))), labelRight && /*#__PURE__*/React.createElement(MemoInputLabel, {
|
|
1194
1195
|
isRight: true
|
|
1195
1196
|
}, labelRight), /*#__PURE__*/React.createElement("br", {
|
|
1196
|
-
className: _JSXStyle.dynamic([["
|
|
1197
|
-
})),
|
|
1197
|
+
className: _JSXStyle.dynamic([["2582554466", [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]]])
|
|
1198
|
+
})), helperText && /*#__PURE__*/React.createElement("p", {
|
|
1198
1199
|
style: {
|
|
1199
1200
|
marginTop: 0.4,
|
|
1200
1201
|
marginRight: 0,
|
|
@@ -1202,11 +1203,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1202
1203
|
marginBottom: '0.4rem',
|
|
1203
1204
|
textAlign: 'left'
|
|
1204
1205
|
},
|
|
1205
|
-
className: _JSXStyle.dynamic([["
|
|
1206
|
-
},
|
|
1207
|
-
id: "
|
|
1206
|
+
className: _JSXStyle.dynamic([["2582554466", [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]]]) + " " + ((error ? "input-error" : '') || "")
|
|
1207
|
+
}, "\xA0", helperText), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
1208
|
+
id: "2582554466",
|
|
1208
1209
|
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), color, theme$1.palette.accents_3, theme$1.palette.background, color]
|
|
1209
|
-
}, ".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-error.__jsx-style-dynamic-selector{color:#
|
|
1210
|
+
}, ".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-error.__jsx-style-dynamic-selector{color:#e00;}.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(color, ";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;}")));
|
|
1210
1211
|
});
|
|
1211
1212
|
InputComponent.displayName = 'Input';
|
|
1212
1213
|
var Input = withScale(InputComponent);
|
|
@@ -2713,21 +2714,22 @@ function PhoneInput(_ref) {
|
|
|
2713
2714
|
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
2714
2715
|
return /*#__PURE__*/React.createElement("div", {
|
|
2715
2716
|
ref: dropdownRef,
|
|
2716
|
-
className: _JSXStyle.dynamic([["
|
|
2717
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "with-label ".concat(isFocused ? 'focused' : '')
|
|
2717
2718
|
}, children && /*#__PURE__*/React.createElement(InputBlockLabel, null, children), /*#__PURE__*/React.createElement("div", {
|
|
2718
|
-
className: _JSXStyle.dynamic([["
|
|
2719
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "input-wrapper"
|
|
2719
2720
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2720
2721
|
onClick: function onClick() {
|
|
2721
2722
|
return setDropdownOpen(!dropdownOpen);
|
|
2722
2723
|
},
|
|
2723
|
-
className: _JSXStyle.dynamic([["
|
|
2724
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-toggle"
|
|
2724
2725
|
}, /*#__PURE__*/React.createElement("span", {
|
|
2725
2726
|
style: {
|
|
2726
2727
|
display: 'flex',
|
|
2727
2728
|
alignItems: 'center',
|
|
2728
|
-
gap: 5
|
|
2729
|
+
gap: 5,
|
|
2730
|
+
paddingRight: '15px'
|
|
2729
2731
|
},
|
|
2730
|
-
className: _JSXStyle.dynamic([["
|
|
2732
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2731
2733
|
}, /*#__PURE__*/React.createElement("img", {
|
|
2732
2734
|
loading: "lazy",
|
|
2733
2735
|
width: "20",
|
|
@@ -2735,9 +2737,9 @@ function PhoneInput(_ref) {
|
|
|
2735
2737
|
src: "https://flagcdn.com/w20/".concat(selectedCountry.code.toLowerCase(), ".png"),
|
|
2736
2738
|
srcSet: "https://flagcdn.com/w40/".concat(selectedCountry.code.toLowerCase(), ".png 2x"),
|
|
2737
2739
|
alt: "".concat(selectedCountry.label, " Flag"),
|
|
2738
|
-
className: _JSXStyle.dynamic([["
|
|
2740
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2739
2741
|
}), /*#__PURE__*/React.createElement("span", {
|
|
2740
|
-
className: _JSXStyle.dynamic([["
|
|
2742
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2741
2743
|
}, selectedCountry.phone))), /*#__PURE__*/React.createElement("input", {
|
|
2742
2744
|
type: "tel",
|
|
2743
2745
|
placeholder: placeholder,
|
|
@@ -2749,9 +2751,9 @@ function PhoneInput(_ref) {
|
|
|
2749
2751
|
onBlur: function onBlur() {
|
|
2750
2752
|
return setIsFocused(false);
|
|
2751
2753
|
},
|
|
2752
|
-
className: _JSXStyle.dynamic([["
|
|
2754
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "phone-input"
|
|
2753
2755
|
})), dropdownOpen && /*#__PURE__*/React.createElement("div", {
|
|
2754
|
-
className: _JSXStyle.dynamic([["
|
|
2756
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown"
|
|
2755
2757
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2756
2758
|
type: "text",
|
|
2757
2759
|
placeholder: "Search country...",
|
|
@@ -2759,23 +2761,23 @@ function PhoneInput(_ref) {
|
|
|
2759
2761
|
onChange: function onChange(e) {
|
|
2760
2762
|
return setSearchTerm(e.target.value);
|
|
2761
2763
|
},
|
|
2762
|
-
className: _JSXStyle.dynamic([["
|
|
2764
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "search-input"
|
|
2763
2765
|
}), /*#__PURE__*/React.createElement("div", {
|
|
2764
|
-
className: _JSXStyle.dynamic([["
|
|
2766
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "country-list"
|
|
2765
2767
|
}, filteredCountries.length > 0 ? filteredCountries.map(function (c) {
|
|
2766
2768
|
return /*#__PURE__*/React.createElement("div", {
|
|
2767
2769
|
key: c.code,
|
|
2768
2770
|
onClick: function onClick() {
|
|
2769
2771
|
return handleSelectCountry(c);
|
|
2770
2772
|
},
|
|
2771
|
-
className: _JSXStyle.dynamic([["
|
|
2773
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item"
|
|
2772
2774
|
}, /*#__PURE__*/React.createElement("span", {
|
|
2773
2775
|
style: {
|
|
2774
2776
|
display: 'flex',
|
|
2775
2777
|
alignItems: 'center',
|
|
2776
2778
|
gap: 5
|
|
2777
2779
|
},
|
|
2778
|
-
className: _JSXStyle.dynamic([["
|
|
2780
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2779
2781
|
}, /*#__PURE__*/React.createElement("img", {
|
|
2780
2782
|
loading: "lazy",
|
|
2781
2783
|
width: "23",
|
|
@@ -2783,20 +2785,21 @@ function PhoneInput(_ref) {
|
|
|
2783
2785
|
src: "https://flagcdn.com/w20/".concat(c.code.toLowerCase(), ".png"),
|
|
2784
2786
|
srcSet: "https://flagcdn.com/w40/".concat(c.code.toLowerCase(), ".png 2x"),
|
|
2785
2787
|
alt: "".concat(c.label, " Flag"),
|
|
2786
|
-
className: _JSXStyle.dynamic([["
|
|
2788
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2787
2789
|
}), c.phone, " ", /*#__PURE__*/React.createElement("span", {
|
|
2788
2790
|
style: {
|
|
2789
2791
|
color: 'grey'
|
|
2790
2792
|
},
|
|
2791
|
-
className: _JSXStyle.dynamic([["
|
|
2793
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
2792
2794
|
}, c.label)));
|
|
2793
2795
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
2794
|
-
className: _JSXStyle.dynamic([["
|
|
2796
|
+
className: _JSXStyle.dynamic([["2480261071", [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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item disabled"
|
|
2795
2797
|
}, "No results"))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
2796
|
-
id: "
|
|
2797
|
-
dynamic: [SCALES.width(1, defaultWidth), SCALES.
|
|
2798
|
-
}, ".
|
|
2798
|
+
id: "2480261071",
|
|
2799
|
+
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), hoverBorder, borderColor, SCALES.width(1, defaultWidth), borderColor, SCALES.width(1, defaultWidth), theme$1.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme$1.type == 'dark' ? '#3a3d3d' : '#efefef']
|
|
2800
|
+
}, ".with-label.__jsx-style-dynamic-selector{position:relative;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), ";}.phone-input-container.focused.__jsx-style-dynamic-selector{outline:1px solid ").concat(hoverBorder, ";border-radius:6px;}.input-wrapper.__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;border:1px solid ").concat(borderColor, ";width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);border-radius:6px;overflow:hidden;}.dropdown-toggle.__jsx-style-dynamic-selector{padding:7px 12px;border-radius:6px 0px 0px 6px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;border-right:1px solid ").concat(borderColor, ";}.phone-input.__jsx-style-dynamic-selector{width:100%;min-width:0;padding:5px 10px;background-color:transparent;font-size:14px;border:none;}.phone-input.__jsx-style-dynamic-selector:focus{outline:none;}.dropdown.__jsx-style-dynamic-selector{position:absolute;top:100%;left:0;width:").concat(SCALES.width(1, defaultWidth), ";background:").concat(theme$1.type == 'dark' ? 'black' : 'white', ";border:1px solid ").concat(borderColor, ";border-radius:6px;margin-top:4px;z-index:999;box-shadow:0 4px 10px rgba(0,0,0,0.1);}.search-input.__jsx-style-dynamic-selector{width:100%;padding:8px 10px;border:none;background-color:transparent;border-bottom:1px solid ").concat(borderColor, ";font-size:14px;}.search-input.__jsx-style-dynamic-selector:focus{outline:none;}.country-list.__jsx-style-dynamic-selector{max-height:200px;overflow-y:auto;}.dropdown-item.__jsx-style-dynamic-selector{padding:10px;cursor:pointer;font-size:14px;}.dropdown-item.__jsx-style-dynamic-selector:hover{background:").concat(theme$1.type == 'dark' ? '#3a3d3d' : '#efefef', ";}.dropdown-item.disabled.__jsx-style-dynamic-selector{color:#888;cursor:default;}")));
|
|
2799
2801
|
}
|
|
2802
|
+
var PhoneInput$1 = withScale(PhoneInput);
|
|
2800
2803
|
|
|
2801
2804
|
/**
|
|
2802
2805
|
* Escape regex char
|
|
@@ -3184,7 +3187,7 @@ var repositionCursor = function repositionCursor(_ref) {
|
|
|
3184
3187
|
};
|
|
3185
3188
|
};
|
|
3186
3189
|
|
|
3187
|
-
var _excluded$2 = ["allowDecimals", "allowNegativeValue", "id", "name", "className", "customInput", "decimalsLimit", "defaultValue", "disabled", "maxLength", "value", "onValueChange", "fixedDecimalLength", "placeholder", "decimalScale", "prefix", "suffix", "intlConfig", "step", "min", "max", "disableGroupSeparators", "disableAbbreviations", "decimalSeparator", "groupSeparator", "onChange", "onFocus", "onBlur", "onKeyDown", "onKeyUp", "transformRawValue", "formatValueOnBlur", "children"];
|
|
3190
|
+
var _excluded$2 = ["allowDecimals", "allowNegativeValue", "id", "name", "className", "customInput", "decimalsLimit", "defaultValue", "disabled", "maxLength", "value", "onValueChange", "fixedDecimalLength", "placeholder", "decimalScale", "prefix", "suffix", "intlConfig", "fullWidth", "step", "min", "max", "disableGroupSeparators", "disableAbbreviations", "decimalSeparator", "groupSeparator", "onChange", "onFocus", "onBlur", "onKeyDown", "onKeyUp", "transformRawValue", "formatValueOnBlur", "children"];
|
|
3188
3191
|
var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3189
3192
|
var _ref$allowDecimals = _ref.allowDecimals,
|
|
3190
3193
|
allowDecimals = _ref$allowDecimals === void 0 ? true : _ref$allowDecimals,
|
|
@@ -3207,6 +3210,7 @@ var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3207
3210
|
prefix = _ref.prefix,
|
|
3208
3211
|
suffix = _ref.suffix,
|
|
3209
3212
|
intlConfig = _ref.intlConfig,
|
|
3213
|
+
fullWidth = _ref.fullWidth,
|
|
3210
3214
|
step = _ref.step,
|
|
3211
3215
|
min = _ref.min,
|
|
3212
3216
|
max = _ref.max,
|
|
@@ -3226,7 +3230,10 @@ var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3226
3230
|
formatValueOnBlur = _ref$formatValueOnBlu === void 0 ? true : _ref$formatValueOnBlu,
|
|
3227
3231
|
children = _ref.children,
|
|
3228
3232
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3233
|
+
var _useScale = useScale(),
|
|
3234
|
+
SCALES = _useScale.SCALES;
|
|
3229
3235
|
var theme$1 = theme.useTheme();
|
|
3236
|
+
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
3230
3237
|
if (_decimalSeparator && isNumber(_decimalSeparator)) {
|
|
3231
3238
|
throw new Error('decimalSeparator cannot be a number');
|
|
3232
3239
|
}
|
|
@@ -3494,14 +3501,9 @@ var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3494
3501
|
var CustomInput = customInput;
|
|
3495
3502
|
return /*#__PURE__*/React.createElement(CustomInput, inputProps);
|
|
3496
3503
|
}
|
|
3497
|
-
return /*#__PURE__*/React.createElement("div",
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
marginBottom: '0.7rem',
|
|
3501
|
-
fontSize: '14px',
|
|
3502
|
-
fontWeight: 'light'
|
|
3503
|
-
}
|
|
3504
|
-
}, children), /*#__PURE__*/React.createElement("input", _extends({}, inputProps, {
|
|
3504
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3505
|
+
className: _JSXStyle.dynamic([["1592876518", [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)]]]) + " " + "with-label"
|
|
3506
|
+
}, children && /*#__PURE__*/React.createElement(InputBlockLabel, null, children), /*#__PURE__*/React.createElement("input", _extends({}, inputProps, {
|
|
3505
3507
|
style: {
|
|
3506
3508
|
textAlign: 'right',
|
|
3507
3509
|
border: "1px solid ".concat(theme$1.palette.border),
|
|
@@ -3513,15 +3515,23 @@ var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3513
3515
|
width: 'auto',
|
|
3514
3516
|
background: 'transparent',
|
|
3515
3517
|
minWidth: '200px'
|
|
3516
|
-
}
|
|
3517
|
-
|
|
3518
|
+
},
|
|
3519
|
+
className: _JSXStyle.dynamic([["1592876518", [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)]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || "")
|
|
3520
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
3521
|
+
id: "1592876518",
|
|
3522
|
+
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)]
|
|
3523
|
+
}, ".with-label.__jsx-style-dynamic-selector{position:relative;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), ";}")));
|
|
3518
3524
|
});
|
|
3519
3525
|
|
|
3526
|
+
// CurrencyInput.displayName = 'CurrencyInput';
|
|
3527
|
+
|
|
3528
|
+
var CurrencyInput = withScale(InputCurrency);
|
|
3529
|
+
|
|
3520
3530
|
/* "use client" */
|
|
3521
3531
|
Input.Textarea = Textarea;
|
|
3522
3532
|
Input.Password = InputPassword;
|
|
3523
|
-
Input.Phone = PhoneInput;
|
|
3524
|
-
Input.Currency =
|
|
3533
|
+
Input.Phone = PhoneInput$1;
|
|
3534
|
+
Input.Currency = CurrencyInput;
|
|
3525
3535
|
|
|
3526
3536
|
/* "use client" */
|
|
3527
3537
|
|