@timeax/form-palette 0.0.11 → 0.0.13
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/index.d.mts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +36 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -42260,6 +42260,40 @@ function renderHelperSlot(root2, slot, classes) {
|
|
|
42260
42260
|
return null;
|
|
42261
42261
|
}
|
|
42262
42262
|
}
|
|
42263
|
+
function mergeClass(legacy, next) {
|
|
42264
|
+
const value = [legacy, next].filter(Boolean).join(" ");
|
|
42265
|
+
return value || void 0;
|
|
42266
|
+
}
|
|
42267
|
+
function getClasses(props) {
|
|
42268
|
+
var _a;
|
|
42269
|
+
const legacy = (_a = props.classes) != null ? _a : {};
|
|
42270
|
+
return {
|
|
42271
|
+
root: mergeClass(legacy.root, props.className),
|
|
42272
|
+
labelRow: mergeClass(legacy.labelRow, props.labelRowClassName),
|
|
42273
|
+
inlineRow: mergeClass(legacy.inlineRow, props.inlineRowClassName),
|
|
42274
|
+
label: mergeClass(legacy.label, props.labelClassName),
|
|
42275
|
+
sublabel: mergeClass(legacy.sublabel, props.sublabelClassName),
|
|
42276
|
+
description: mergeClass(
|
|
42277
|
+
legacy.description,
|
|
42278
|
+
props.descriptionClassName
|
|
42279
|
+
),
|
|
42280
|
+
helpText: mergeClass(legacy.helpText, props.helpTextClassName),
|
|
42281
|
+
error: mergeClass(legacy.error, props.errorClassName),
|
|
42282
|
+
group: mergeClass(legacy.group, props.groupClassName),
|
|
42283
|
+
content: mergeClass(legacy.content, props.contentClassName),
|
|
42284
|
+
variant: mergeClass(legacy.variant, props.variantClassName),
|
|
42285
|
+
inlineInputColumn: mergeClass(
|
|
42286
|
+
legacy.inlineInputColumn,
|
|
42287
|
+
props.inlineInputColumnClassName
|
|
42288
|
+
),
|
|
42289
|
+
inlineLabelColumn: mergeClass(
|
|
42290
|
+
legacy.inlineLabelColumn,
|
|
42291
|
+
props.inlineLabelColumnClassName
|
|
42292
|
+
),
|
|
42293
|
+
required: mergeClass(legacy.required, props.requiredClassName),
|
|
42294
|
+
tag: mergeClass(legacy.tag, props.tagClassName)
|
|
42295
|
+
};
|
|
42296
|
+
}
|
|
42263
42297
|
function InputField(props) {
|
|
42264
42298
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
42265
42299
|
const {
|
|
@@ -42300,7 +42334,7 @@ function InputField(props) {
|
|
|
42300
42334
|
// Field wrapper props
|
|
42301
42335
|
className,
|
|
42302
42336
|
style,
|
|
42303
|
-
classes,
|
|
42337
|
+
classes: _depreciated,
|
|
42304
42338
|
// Everything else → forwarded to variant
|
|
42305
42339
|
...rest
|
|
42306
42340
|
} = props;
|
|
@@ -42315,6 +42349,7 @@ function InputField(props) {
|
|
|
42315
42349
|
}
|
|
42316
42350
|
return null;
|
|
42317
42351
|
}
|
|
42352
|
+
const classes = getClasses(props);
|
|
42318
42353
|
const layout = React54.useMemo(() => {
|
|
42319
42354
|
var _a2;
|
|
42320
42355
|
const defaultsLayout = (_a2 = module2.defaults) == null ? void 0 : _a2.layout;
|