@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.
- package/CHANGELOG.md +8 -0
- package/dist/components.css +2 -1
- package/dist/components.css.map +1 -1
- package/dist/components.js +50 -37
- package/dist/components.js.map +1 -1
- package/dist/index.css +2 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +50 -37
- package/dist/index.js.map +1 -1
- package/package.json +18 -4
package/dist/components.js
CHANGED
|
@@ -1196,46 +1196,59 @@ var Checkbox = React4.forwardRef(
|
|
|
1196
1196
|
}
|
|
1197
1197
|
);
|
|
1198
1198
|
if (label || displayHelperText) {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
Inline2,
|
|
1199
|
+
return /* @__PURE__ */ jsx9(
|
|
1200
|
+
Stack2,
|
|
1202
1201
|
{
|
|
1203
|
-
gap: "
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
children:
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
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
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
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
|
}
|