@zentrades-ui/components 0.2.4 → 0.2.6
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/CHANGELOG.md +14 -0
- package/dist/components.css +2 -1
- package/dist/components.css.map +1 -1
- package/dist/components.js +38 -27
- package/dist/components.js.map +1 -1
- package/dist/index.css +2 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +38 -27
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1196,46 +1196,57 @@ var Checkbox = React4.forwardRef(
|
|
|
1196
1196
|
}
|
|
1197
1197
|
);
|
|
1198
1198
|
if (label || displayHelperText) {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
Inline2,
|
|
1199
|
+
return /* @__PURE__ */ jsxs4(
|
|
1200
|
+
"div",
|
|
1202
1201
|
{
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1202
|
+
style: {
|
|
1203
|
+
display: "flex",
|
|
1204
|
+
flexDirection: "column",
|
|
1205
|
+
gap: "2px",
|
|
1206
|
+
opacity: disabled ? 0.5 : 1
|
|
1207
|
+
},
|
|
1207
1208
|
children: [
|
|
1208
|
-
checkbox,
|
|
1209
1209
|
/* @__PURE__ */ jsxs4(
|
|
1210
|
-
|
|
1210
|
+
Inline2,
|
|
1211
1211
|
{
|
|
1212
|
-
gap: "
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
const button = e.currentTarget.parentElement?.querySelector("button");
|
|
1216
|
-
button?.click();
|
|
1217
|
-
}
|
|
1218
|
-
},
|
|
1212
|
+
gap: "sm",
|
|
1213
|
+
alignItems: "center",
|
|
1214
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
1219
1215
|
children: [
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
] }),
|
|
1224
|
-
displayHelperText && /* @__PURE__ */ jsx9(
|
|
1225
|
-
Text2,
|
|
1216
|
+
checkbox,
|
|
1217
|
+
label && /* @__PURE__ */ jsxs4(
|
|
1218
|
+
Inline2,
|
|
1226
1219
|
{
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1220
|
+
gap: "2xs",
|
|
1221
|
+
alignItems: "center",
|
|
1222
|
+
onClick: (e) => {
|
|
1223
|
+
if (!disabled) {
|
|
1224
|
+
const button = e.currentTarget.parentElement?.querySelector("button");
|
|
1225
|
+
button?.click();
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
children: [
|
|
1229
|
+
/* @__PURE__ */ jsx9(Text2, { as: "label", fontVariant: "text-s-medium", htmlFor: checkboxId, children: label }),
|
|
1230
|
+
required && /* @__PURE__ */ jsx9(Text2, { as: "span", color: "contentTertiary", fontVariant: "text-s-medium", children: "*" })
|
|
1231
|
+
]
|
|
1231
1232
|
}
|
|
1232
1233
|
)
|
|
1233
1234
|
]
|
|
1234
1235
|
}
|
|
1236
|
+
),
|
|
1237
|
+
displayHelperText && /* @__PURE__ */ jsx9(
|
|
1238
|
+
Text2,
|
|
1239
|
+
{
|
|
1240
|
+
fontVariant: "text-s-regular",
|
|
1241
|
+
color: error ? "contentNegative" : "contentTertiary",
|
|
1242
|
+
role: error ? "alert" : void 0,
|
|
1243
|
+
style: { marginLeft: boxSize + 8 },
|
|
1244
|
+
children: displayHelperText
|
|
1245
|
+
}
|
|
1235
1246
|
)
|
|
1236
1247
|
]
|
|
1237
1248
|
}
|
|
1238
|
-
)
|
|
1249
|
+
);
|
|
1239
1250
|
}
|
|
1240
1251
|
return checkbox;
|
|
1241
1252
|
}
|