@egov3/system-design 1.2.61 → 1.2.63

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.
@@ -18,5 +18,6 @@ export interface IInputFieldProps extends React.DetailedHTMLProps<React.InputHTM
18
18
  setFocused?: (val: boolean) => void;
19
19
  readOnly?: boolean;
20
20
  dataTestid?: string;
21
+ variant?: "default" | "code";
21
22
  }
22
23
  export declare const InputField: React.ForwardRefExoticComponent<Omit<IInputFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -48,6 +48,7 @@ interface IInputFieldProps extends React__default.DetailedHTMLProps<React__defau
48
48
  setFocused?: (val: boolean) => void;
49
49
  readOnly?: boolean;
50
50
  dataTestid?: string;
51
+ variant?: "default" | "code";
51
52
  }
52
53
 
53
54
  interface RadioGroupItem {
package/dist/esm/index.js CHANGED
@@ -2853,8 +2853,8 @@ var Button = function (_a) {
2853
2853
  : styles$5["btn-square--".concat(size)], disabled ? styles$5["btn-".concat(variant, "--disabled")] : styles$5["btn-".concat(variant)], styles$5.button, className), style: style }, children));
2854
2854
  };
2855
2855
 
2856
- var css_248z$5 = ".InputField-module_inputContainer__f-bIm {\n display: flex;\n align-items: center;\n background-color: var(--surface-surface-1);\n border-radius: 8px;\n padding: 12px 16px;\n}\n\n.InputField-module_inputContainerLabeled__zrQbJ {\n display: block;\n background-color: var(--surface-surface-1);\n border-radius: 8px;\n padding: 12px 16px;\n}\n\n.InputField-module_inputContainerLabeled__zrQbJ label {\n color: var(--text-secondary);\n}\n\n.InputField-module_input__Lgxvm {\n width: 100%;\n border: none;\n background-color: var(--surface-surface-1);\n}\n\n.InputField-module_input__Lgxvm:active,\n.InputField-module_input__Lgxvm:focus {\n outline: none;\n}\n\n.InputField-module_input__Lgxvm::placeholder {\n color: var(--text-disabled-color);\n}\n\n.InputField-module_input__Lgxvm::-webkit-inner-spin-button,\n.InputField-module_input__Lgxvm::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.InputField-module_clearIcon__1KYtM {\n cursor: pointer;\n}\n\n.InputField-module_input--onfocus__cJyDp {\n background-color: var(--surface-surface-3-color);\n}\n\n.InputField-module_input--onfocus__cJyDp .InputField-module_input__Lgxvm {\n background-color: var(--surface-surface-3-color);\n}\n";
2857
- var styles$4 = {"inputContainer":"InputField-module_inputContainer__f-bIm","inputContainerLabeled":"InputField-module_inputContainerLabeled__zrQbJ","input":"InputField-module_input__Lgxvm","clearIcon":"InputField-module_clearIcon__1KYtM","input--onfocus":"InputField-module_input--onfocus__cJyDp"};
2856
+ var css_248z$5 = ".InputField-module_inputContainer__f-bIm {\n display: flex;\n align-items: center;\n background-color: var(--surface-surface-1);\n border-radius: 8px;\n padding: 12px 16px;\n}\n\n.InputField-module_inputContainerLabeled__zrQbJ {\n display: block;\n background-color: var(--surface-surface-1);\n border-radius: 8px;\n padding: 12px 16px;\n}\n\n.InputField-module_inputContainerLabeled__zrQbJ label {\n color: var(--text-secondary);\n}\n\n.InputField-module_input__Lgxvm {\n width: 100%;\n border: none;\n background-color: var(--surface-surface-1);\n}\n\n.InputField-module_input__Lgxvm:active,\n.InputField-module_input__Lgxvm:focus {\n outline: none;\n}\n\n.InputField-module_input__Lgxvm::placeholder {\n color: var(--text-disabled-color);\n}\n\n.InputField-module_input__Lgxvm::-webkit-inner-spin-button,\n.InputField-module_input__Lgxvm::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.InputField-module_clearIcon__1KYtM {\n cursor: pointer;\n}\n\n.InputField-module_input--onfocus__cJyDp {\n background-color: var(--surface-surface-3-color);\n}\n\n.InputField-module_input--onfocus__cJyDp .InputField-module_input__Lgxvm {\n background-color: var(--surface-surface-3-color);\n}\n\n.InputField-module_code__ktf8F { \n text-align: center;\n}";
2857
+ var styles$4 = {"inputContainer":"InputField-module_inputContainer__f-bIm","inputContainerLabeled":"InputField-module_inputContainerLabeled__zrQbJ","input":"InputField-module_input__Lgxvm","clearIcon":"InputField-module_clearIcon__1KYtM","input--onfocus":"InputField-module_input--onfocus__cJyDp","code":"InputField-module_code__ktf8F"};
2858
2858
  styleInject(css_248z$5);
2859
2859
 
2860
2860
  /******************************************************************************
@@ -2908,7 +2908,7 @@ var ClearIcon = function (_a) {
2908
2908
 
2909
2909
  // InputField.tsx
2910
2910
  var InputField = react.exports.forwardRef(function (_a, ref) {
2911
- var onFocus = _a.onFocus, onBlur = _a.onBlur, onChange = _a.onChange, onEnterPress = _a.onEnterPress, _b = _a.value, value = _b === void 0 ? "" : _b, inputLeftIcon = _a.inputLeftIcon, _c = _a.placeholder, placeholder = _c === void 0 ? "" : _c, _d = _a.className, className = _d === void 0 ? "" : _d, style = _a.style, _e = _a.isClearable, isClearable = _e === void 0 ? false : _e, _f = _a.type, type = _f === void 0 ? "text" : _f, id = _a.id, _g = _a.labelText, labelText = _g === void 0 ? "" : _g, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? "" : _h, _j = _a.focused, focused = _j === void 0 ? false : _j, _k = _a.setFocused, setFocused = _k === void 0 ? function () { } : _k, _l = _a.readOnly, readOnly = _l === void 0 ? false : _l, _m = _a.dataTestid, dataTestid = _m === void 0 ? "InputField_MAIN" : _m;
2911
+ var onFocus = _a.onFocus, onBlur = _a.onBlur, onChange = _a.onChange, onEnterPress = _a.onEnterPress, _b = _a.value, value = _b === void 0 ? "" : _b, inputLeftIcon = _a.inputLeftIcon, _c = _a.placeholder, placeholder = _c === void 0 ? "" : _c, _d = _a.className, className = _d === void 0 ? "" : _d, style = _a.style, _e = _a.isClearable, isClearable = _e === void 0 ? false : _e, _f = _a.type, type = _f === void 0 ? "text" : _f, id = _a.id, _g = _a.labelText, labelText = _g === void 0 ? "" : _g, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? "" : _h, _j = _a.focused, focused = _j === void 0 ? false : _j, _k = _a.setFocused, setFocused = _k === void 0 ? function () { } : _k, _l = _a.readOnly, readOnly = _l === void 0 ? false : _l, _m = _a.dataTestid, dataTestid = _m === void 0 ? "InputField_MAIN" : _m, _o = _a.variant, variant = _o === void 0 ? "default" : _o;
2912
2912
  var handleClear = function () {
2913
2913
  if (onChange) {
2914
2914
  onChange({
@@ -2934,7 +2934,7 @@ var InputField = react.exports.forwardRef(function (_a, ref) {
2934
2934
  return (React.createElement("div", { "data-testid": dataTestid, className: joinClasses(styles$4[labelText.length ? "inputContainerLabeled" : "inputContainer"], focused ? styles$4["input--onfocus"] : undefined, type === "text" ? typography.body1Regular : undefined, styles$4["input-".concat(type === null || type === void 0 ? void 0 : type.toLocaleLowerCase())], className), style: style },
2935
2935
  labelText.length > 0 && (React.createElement("label", { htmlFor: id, "data-testid": "InputField_LABEL" }, labelText)),
2936
2936
  inputLeftIcon,
2937
- React.createElement("input", { ref: ref, "data-testid": "InputField_INPUT", "aria-label": ariaLabel, id: id, type: type, className: styles$4.input, placeholder: placeholder, "aria-placeholder": placeholder, onFocus: handleFocus, onBlur: handleBlur, onChange: onChange, onKeyDown: handleKeyDown, value: value, readOnly: readOnly }),
2937
+ React.createElement("input", { ref: ref, "data-testid": "InputField_INPUT", "aria-label": ariaLabel, id: id, type: type, className: joinClasses(styles$4.input, variant === "code" ? styles$4.code : undefined), placeholder: placeholder, "aria-placeholder": placeholder, onFocus: handleFocus, onBlur: handleBlur, onChange: onChange, onKeyDown: handleKeyDown, value: value, readOnly: readOnly }),
2938
2938
  isClearable && value && (React.createElement(ClearIcon, { fill: "red", pathFill: "#758393", className: styles$4.clearIcon, onClick: handleClear }))));
2939
2939
  });
2940
2940