@eqtylab/equality 2.1.1 → 2.1.3
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/badge.module.module.css.module.css +1 -2
- package/dist/code-block.module.module.css.module.css +2 -4
- package/dist/display-field.module.module.css.module.css +1 -2
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/theme-base.css +1 -0
- package/dist/theme-preflight-global.css +1 -3
- package/dist/theme-preflight-scoped.css +1 -3
- package/dist/theme.module.module.css.module.css +2 -1
- package/package.json +1 -1
|
@@ -42,8 +42,6 @@
|
|
|
42
42
|
border-top-width: 1px;
|
|
43
43
|
border-top-color: var(--color-border);
|
|
44
44
|
background-color: var(--color-card-background);
|
|
45
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
46
|
-
monospace;
|
|
47
45
|
font-size: 0.75rem;
|
|
48
46
|
line-height: var(--tw-leading, calc(1 / 0.75));
|
|
49
47
|
flex: 1;
|
|
@@ -51,6 +49,7 @@
|
|
|
51
49
|
flex-direction: column;
|
|
52
50
|
overflow: scroll;
|
|
53
51
|
min-width: calc(0.25rem * 0);
|
|
52
|
+
font-family: var(--font-mono);
|
|
54
53
|
}
|
|
55
54
|
.neutral {
|
|
56
55
|
border-color: var(--color-border);
|
|
@@ -75,10 +74,9 @@
|
|
|
75
74
|
}
|
|
76
75
|
.code-label-text {
|
|
77
76
|
color: var(--color-text-secondary);
|
|
78
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
79
|
-
monospace;
|
|
80
77
|
font-size: 0.75rem;
|
|
81
78
|
line-height: var(--tw-leading, calc(1 / 0.75));
|
|
79
|
+
font-family: var(--font-mono);
|
|
82
80
|
}
|
|
83
81
|
.pre {
|
|
84
82
|
margin-block: calc(0.25rem * 0) !important;
|
|
@@ -65,10 +65,9 @@
|
|
|
65
65
|
display: block;
|
|
66
66
|
width: 100%;
|
|
67
67
|
overflow-y: clip;
|
|
68
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
69
|
-
monospace;
|
|
70
68
|
padding-inline: calc(0.25rem * 3);
|
|
71
69
|
padding-block: calc(0.25rem * 2);
|
|
70
|
+
font-family: var(--font-mono);
|
|
72
71
|
}
|
|
73
72
|
.actions {
|
|
74
73
|
margin-right: calc(0.25rem * 1);
|
package/dist/index.cjs
CHANGED
|
@@ -3289,6 +3289,10 @@ var RELATIVE_DIVISIONS = [
|
|
|
3289
3289
|
{ amount: Number.POSITIVE_INFINITY, unit: "year" }
|
|
3290
3290
|
];
|
|
3291
3291
|
var LIVE_INTERVAL_MS = 3e4;
|
|
3292
|
+
var NO_DATE_PLACEHOLDER = "---";
|
|
3293
|
+
function isMissing(value) {
|
|
3294
|
+
return value == null || typeof value === "string" && value.trim() === "";
|
|
3295
|
+
}
|
|
3292
3296
|
function toDate(value) {
|
|
3293
3297
|
const date = value instanceof Date ? value : new Date(value);
|
|
3294
3298
|
return Number.isNaN(date.getTime()) ? null : date;
|
|
@@ -3319,7 +3323,8 @@ function FormatDate({
|
|
|
3319
3323
|
className,
|
|
3320
3324
|
...props
|
|
3321
3325
|
}) {
|
|
3322
|
-
const
|
|
3326
|
+
const missing = isMissing(date);
|
|
3327
|
+
const parsed = React16__namespace.useMemo(() => isMissing(date) ? null : toDate(date), [date]);
|
|
3323
3328
|
const [now, setNow] = React16__namespace.useState(() => /* @__PURE__ */ new Date());
|
|
3324
3329
|
const [mounted, setMounted] = React16__namespace.useState(false);
|
|
3325
3330
|
const isRelative = displayAs === "relative";
|
|
@@ -3329,8 +3334,11 @@ function FormatDate({
|
|
|
3329
3334
|
const id = setInterval(() => setNow(/* @__PURE__ */ new Date()), LIVE_INTERVAL_MS);
|
|
3330
3335
|
return () => clearInterval(id);
|
|
3331
3336
|
}, [isRelative, live]);
|
|
3337
|
+
if (missing) {
|
|
3338
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(styles56__default.default["format-date"], className), "aria-label": "No date", ...props, children: NO_DATE_PLACEHOLDER });
|
|
3339
|
+
}
|
|
3332
3340
|
if (!parsed) {
|
|
3333
|
-
return /* @__PURE__ */ jsxRuntime.jsx("
|
|
3341
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(styles56__default.default["format-date"], className), ...props, children: "Invalid date" });
|
|
3334
3342
|
}
|
|
3335
3343
|
const machineValue = parsed.toISOString();
|
|
3336
3344
|
const absolute = formatAbsolute(
|