@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.
- package/dist/cjs/components/InputField/index.d.ts +1 -0
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/InputField/index.d.ts +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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>>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -2855,8 +2855,8 @@ var Button = function (_a) {
|
|
|
2855
2855
|
: 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));
|
|
2856
2856
|
};
|
|
2857
2857
|
|
|
2858
|
-
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";
|
|
2859
|
-
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"};
|
|
2858
|
+
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}";
|
|
2859
|
+
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"};
|
|
2860
2860
|
styleInject(css_248z$5);
|
|
2861
2861
|
|
|
2862
2862
|
/******************************************************************************
|
|
@@ -2910,7 +2910,7 @@ var ClearIcon = function (_a) {
|
|
|
2910
2910
|
|
|
2911
2911
|
// InputField.tsx
|
|
2912
2912
|
var InputField = react.exports.forwardRef(function (_a, ref) {
|
|
2913
|
-
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;
|
|
2913
|
+
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;
|
|
2914
2914
|
var handleClear = function () {
|
|
2915
2915
|
if (onChange) {
|
|
2916
2916
|
onChange({
|
|
@@ -2936,7 +2936,7 @@ var InputField = react.exports.forwardRef(function (_a, ref) {
|
|
|
2936
2936
|
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 },
|
|
2937
2937
|
labelText.length > 0 && (React.createElement("label", { htmlFor: id, "data-testid": "InputField_LABEL" }, labelText)),
|
|
2938
2938
|
inputLeftIcon,
|
|
2939
|
-
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 }),
|
|
2939
|
+
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 }),
|
|
2940
2940
|
isClearable && value && (React.createElement(ClearIcon, { fill: "red", pathFill: "#758393", className: styles$4.clearIcon, onClick: handleClear }))));
|
|
2941
2941
|
});
|
|
2942
2942
|
|