@zentrades-ui/components 0.2.7 → 0.2.8
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/components.js +59 -46
- package/dist/components.js.map +1 -1
- package/dist/index.js +59 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -521,6 +521,7 @@ var TextComponent = forwardRef5(function Text(props, ref) {
|
|
|
521
521
|
} = props;
|
|
522
522
|
const Element = as || DefaultTextElement;
|
|
523
523
|
const variantStyles = applyTextVariantStyles(fontVariant);
|
|
524
|
+
const defaultElementReset = { margin: 0, padding: 0 };
|
|
524
525
|
const truncationStyles = {};
|
|
525
526
|
if (truncate) {
|
|
526
527
|
truncationStyles.overflow = "hidden";
|
|
@@ -551,6 +552,7 @@ var TextComponent = forwardRef5(function Text(props, ref) {
|
|
|
551
552
|
color,
|
|
552
553
|
className,
|
|
553
554
|
style: {
|
|
555
|
+
...defaultElementReset,
|
|
554
556
|
...variantStyles,
|
|
555
557
|
...truncationStyles,
|
|
556
558
|
...style
|
|
@@ -1190,63 +1192,74 @@ var Checkbox = React4.forwardRef(
|
|
|
1190
1192
|
{
|
|
1191
1193
|
className: checkboxIndicator,
|
|
1192
1194
|
style: { maxHeight: boxSize },
|
|
1193
|
-
children: partialChecked ? /* @__PURE__ */ jsx9(MinusIcon, { size: iconSizeMap2[size], strokeWidth:
|
|
1195
|
+
children: partialChecked ? /* @__PURE__ */ jsx9(MinusIcon, { size: iconSizeMap2[size], strokeWidth: 1.5 }) : /* @__PURE__ */ jsx9(CheckIcon, { size: iconSizeMap2[size], strokeWidth: 1.5 })
|
|
1194
1196
|
}
|
|
1195
1197
|
)
|
|
1196
1198
|
}
|
|
1197
1199
|
);
|
|
1198
1200
|
if (label || displayHelperText) {
|
|
1199
|
-
return /* @__PURE__ */
|
|
1201
|
+
return /* @__PURE__ */ jsxs4(
|
|
1200
1202
|
Stack2,
|
|
1201
1203
|
{
|
|
1202
|
-
gap: "
|
|
1204
|
+
gap: "2xs",
|
|
1203
1205
|
style: {
|
|
1204
1206
|
opacity: disabled ? 0.5 : 1
|
|
1205
1207
|
},
|
|
1206
|
-
children:
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
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: "*"
|
|
1208
|
+
children: [
|
|
1209
|
+
/* @__PURE__ */ jsxs4(
|
|
1210
|
+
Inline2,
|
|
1211
|
+
{
|
|
1212
|
+
gap: "sm",
|
|
1213
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
1214
|
+
children: [
|
|
1215
|
+
checkbox,
|
|
1216
|
+
label && /* @__PURE__ */ jsxs4(
|
|
1217
|
+
Inline2,
|
|
1218
|
+
{
|
|
1219
|
+
gap: "2xs",
|
|
1220
|
+
alignItems: "center",
|
|
1221
|
+
onClick: (e) => {
|
|
1222
|
+
if (!disabled) {
|
|
1223
|
+
const button = e.currentTarget.parentElement?.querySelector("button");
|
|
1224
|
+
button?.click();
|
|
1242
1225
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1226
|
+
},
|
|
1227
|
+
children: [
|
|
1228
|
+
/* @__PURE__ */ jsx9(
|
|
1229
|
+
Text2,
|
|
1230
|
+
{
|
|
1231
|
+
as: "label",
|
|
1232
|
+
fontVariant: "text-s-medium",
|
|
1233
|
+
htmlFor: checkboxId,
|
|
1234
|
+
children: label
|
|
1235
|
+
}
|
|
1236
|
+
),
|
|
1237
|
+
required && /* @__PURE__ */ jsx9(
|
|
1238
|
+
Text2,
|
|
1239
|
+
{
|
|
1240
|
+
as: "span",
|
|
1241
|
+
color: "contentTertiary",
|
|
1242
|
+
fontVariant: "text-s-medium",
|
|
1243
|
+
children: "*"
|
|
1244
|
+
}
|
|
1245
|
+
)
|
|
1246
|
+
]
|
|
1247
|
+
}
|
|
1248
|
+
)
|
|
1249
|
+
]
|
|
1250
|
+
}
|
|
1251
|
+
),
|
|
1252
|
+
displayHelperText && /* @__PURE__ */ jsx9(
|
|
1253
|
+
Text2,
|
|
1254
|
+
{
|
|
1255
|
+
fontVariant: "text-s-regular",
|
|
1256
|
+
color: error ? "contentNegative" : "contentTertiary",
|
|
1257
|
+
role: error ? "alert" : void 0,
|
|
1258
|
+
style: { marginLeft: boxSize + 8 },
|
|
1259
|
+
children: displayHelperText
|
|
1260
|
+
}
|
|
1261
|
+
)
|
|
1262
|
+
]
|
|
1250
1263
|
}
|
|
1251
1264
|
);
|
|
1252
1265
|
}
|