@zentrades-ui/components 0.2.5 → 0.2.7

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.
@@ -1196,46 +1196,59 @@ var Checkbox = React4.forwardRef(
1196
1196
  }
1197
1197
  );
1198
1198
  if (label || displayHelperText) {
1199
- const hasHelperText = Boolean(displayHelperText);
1200
- return /* @__PURE__ */ jsx9(Stack2, { gap: "2xs", children: /* @__PURE__ */ jsxs4(
1201
- Inline2,
1199
+ return /* @__PURE__ */ jsx9(
1200
+ Stack2,
1202
1201
  {
1203
- gap: "sm",
1204
- alignItems: hasHelperText ? "flex-start" : "center",
1205
- opacity: disabled ? "50" : "100",
1206
- cursor: disabled ? "not-allowed" : "pointer",
1207
- children: [
1208
- checkbox,
1209
- /* @__PURE__ */ jsxs4(
1210
- Stack2,
1211
- {
1212
- gap: "none",
1213
- onClick: (e) => {
1214
- if (!disabled) {
1215
- const button = e.currentTarget.parentElement?.querySelector("button");
1216
- button?.click();
1202
+ gap: "2",
1203
+ style: {
1204
+ opacity: disabled ? 0.5 : 1
1205
+ },
1206
+ children: /* @__PURE__ */ jsxs4(
1207
+ Inline2,
1208
+ {
1209
+ gap: "sm",
1210
+ alignItems: "center",
1211
+ cursor: disabled ? "not-allowed" : "pointer",
1212
+ children: [
1213
+ checkbox,
1214
+ /* @__PURE__ */ jsx9(Stack2, { children: label && /* @__PURE__ */ jsxs4(
1215
+ Inline2,
1216
+ {
1217
+ gap: "2xs",
1218
+ alignItems: "center",
1219
+ onClick: (e) => {
1220
+ if (!disabled) {
1221
+ const button = e.currentTarget.parentElement?.querySelector("button");
1222
+ button?.click();
1223
+ }
1224
+ },
1225
+ children: [
1226
+ /* @__PURE__ */ jsx9(
1227
+ Text2,
1228
+ {
1229
+ as: "label",
1230
+ fontVariant: "text-s-medium",
1231
+ htmlFor: checkboxId,
1232
+ children: label
1233
+ }
1234
+ ),
1235
+ required && /* @__PURE__ */ jsx9(
1236
+ Text2,
1237
+ {
1238
+ as: "span",
1239
+ color: "contentTertiary",
1240
+ fontVariant: "text-s-medium",
1241
+ children: "*"
1242
+ }
1243
+ )
1244
+ ]
1217
1245
  }
1218
- },
1219
- children: [
1220
- label && /* @__PURE__ */ jsxs4(Inline2, { gap: "2xs", alignItems: "center", children: [
1221
- /* @__PURE__ */ jsx9(Text2, { as: "label", fontVariant: "text-s-medium", htmlFor: checkboxId, children: label }),
1222
- required && /* @__PURE__ */ jsx9(Text2, { as: "span", color: "contentTertiary", fontVariant: "text-s-medium", children: "*" })
1223
- ] }),
1224
- displayHelperText && /* @__PURE__ */ jsx9(
1225
- Text2,
1226
- {
1227
- fontVariant: "text-s-regular",
1228
- color: error ? "contentNegative" : "contentTertiary",
1229
- role: error ? "alert" : void 0,
1230
- children: displayHelperText
1231
- }
1232
- )
1233
- ]
1234
- }
1235
- )
1236
- ]
1246
+ ) })
1247
+ ]
1248
+ }
1249
+ )
1237
1250
  }
1238
- ) });
1251
+ );
1239
1252
  }
1240
1253
  return checkbox;
1241
1254
  }