@sunggang/ui-lib 0.3.16 → 0.3.17
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/index.esm2.js +34 -25
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -77263,8 +77263,7 @@ var TextField = function(param) {
|
|
|
77263
77263
|
};
|
|
77264
77264
|
var SingleSelect = function(param) {
|
|
77265
77265
|
var item = param.item;
|
|
77266
|
-
var
|
|
77267
|
-
var _useFormContext = useFormContext(), register = _useFormContext.register, errors = _useFormContext.formState.errors;
|
|
77266
|
+
var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors;
|
|
77268
77267
|
return /*#__PURE__*/ jsx("div", {
|
|
77269
77268
|
className: [
|
|
77270
77269
|
(item === null || item === void 0 ? void 0 : item.className) || "w-full h-24"
|
|
@@ -77285,30 +77284,40 @@ var SingleSelect = function(param) {
|
|
|
77285
77284
|
color: "6f6f6f"
|
|
77286
77285
|
})
|
|
77287
77286
|
}),
|
|
77288
|
-
/*#__PURE__*/ jsx(
|
|
77289
|
-
|
|
77290
|
-
|
|
77291
|
-
|
|
77292
|
-
|
|
77293
|
-
|
|
77294
|
-
|
|
77295
|
-
|
|
77296
|
-
|
|
77297
|
-
|
|
77298
|
-
|
|
77299
|
-
|
|
77300
|
-
|
|
77301
|
-
|
|
77302
|
-
|
|
77303
|
-
|
|
77304
|
-
|
|
77287
|
+
/*#__PURE__*/ jsx(Controller$2, {
|
|
77288
|
+
name: item.name,
|
|
77289
|
+
control: control,
|
|
77290
|
+
rules: item.validateOption,
|
|
77291
|
+
render: function(param) {
|
|
77292
|
+
var field = param.field;
|
|
77293
|
+
var _item_option;
|
|
77294
|
+
return /*#__PURE__*/ jsx("select", _object_spread_props(_object_spread(_object_spread_props(_object_spread({
|
|
77295
|
+
className: [
|
|
77296
|
+
(item === null || item === void 0 ? void 0 : item.disable) || (item === null || item === void 0 ? void 0 : item.disabled) ? "text-[#B0B0B0] bg-[#e5e7eb] cursor-not-allowed" : "bg-white text-[#6f6f6f]",
|
|
77297
|
+
"customSelect w-full h-11 py-2 pr-4 rounded-lg border border-solid border-gray-300 pl-4"
|
|
77298
|
+
].join(" "),
|
|
77299
|
+
style: item.style
|
|
77300
|
+
}, register(item.name, _object_spread({}, item === null || item === void 0 ? void 0 : item.validateOption))), {
|
|
77301
|
+
id: item === null || item === void 0 ? void 0 : item.id,
|
|
77302
|
+
disabled: (item === null || item === void 0 ? void 0 : item.disable) || (item === null || item === void 0 ? void 0 : item.disabled)
|
|
77303
|
+
}), field), {
|
|
77304
|
+
children: item === null || item === void 0 ? void 0 : (_item_option = item.option) === null || _item_option === void 0 ? void 0 : _item_option.map(function(group) {
|
|
77305
|
+
return "label" in group ? /*#__PURE__*/ jsx("optgroup", {
|
|
77306
|
+
label: group.label,
|
|
77307
|
+
children: group.options.map(function(o) {
|
|
77308
|
+
return /*#__PURE__*/ jsx("option", {
|
|
77309
|
+
value: o.value,
|
|
77310
|
+
children: o.name
|
|
77311
|
+
}, o.value);
|
|
77312
|
+
})
|
|
77313
|
+
}, group.label) : /*#__PURE__*/ jsx("option", {
|
|
77314
|
+
value: group.value,
|
|
77315
|
+
children: group.name
|
|
77316
|
+
}, "".concat(group.value, "-").concat(v4()));
|
|
77305
77317
|
})
|
|
77306
|
-
}
|
|
77307
|
-
|
|
77308
|
-
|
|
77309
|
-
}, "".concat(group.value, "-").concat(v4()));
|
|
77310
|
-
})
|
|
77311
|
-
})),
|
|
77318
|
+
}));
|
|
77319
|
+
}
|
|
77320
|
+
}),
|
|
77312
77321
|
validateMsg(errors, item) && /*#__PURE__*/ jsxs("div", {
|
|
77313
77322
|
className: "text-left pt-1 text-xs text-[#EF5533]",
|
|
77314
77323
|
children: [
|