@zentrades-ui/components 0.2.6 → 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,55 +1196,57 @@ var Checkbox = React4.forwardRef(
1196
1196
  }
1197
1197
  );
1198
1198
  if (label || displayHelperText) {
1199
- return /* @__PURE__ */ jsxs4(
1200
- "div",
1199
+ return /* @__PURE__ */ jsx9(
1200
+ Stack2,
1201
1201
  {
1202
+ gap: "2",
1202
1203
  style: {
1203
- display: "flex",
1204
- flexDirection: "column",
1205
- gap: "2px",
1206
1204
  opacity: disabled ? 0.5 : 1
1207
1205
  },
1208
- children: [
1209
- /* @__PURE__ */ jsxs4(
1210
- Inline2,
1211
- {
1212
- gap: "sm",
1213
- alignItems: "center",
1214
- cursor: disabled ? "not-allowed" : "pointer",
1215
- children: [
1216
- checkbox,
1217
- label && /* @__PURE__ */ jsxs4(
1218
- Inline2,
1219
- {
1220
- gap: "2xs",
1221
- alignItems: "center",
1222
- onClick: (e) => {
1223
- if (!disabled) {
1224
- const button = e.currentTarget.parentElement?.querySelector("button");
1225
- button?.click();
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
1226
1233
  }
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
- ]
1232
- }
1233
- )
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
- }
1246
- )
1247
- ]
1234
+ ),
1235
+ required && /* @__PURE__ */ jsx9(
1236
+ Text2,
1237
+ {
1238
+ as: "span",
1239
+ color: "contentTertiary",
1240
+ fontVariant: "text-s-medium",
1241
+ children: "*"
1242
+ }
1243
+ )
1244
+ ]
1245
+ }
1246
+ ) })
1247
+ ]
1248
+ }
1249
+ )
1248
1250
  }
1249
1251
  );
1250
1252
  }