@ai-matrx/records-ui 0.116.95 → 0.116.96
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 +1 -1
- package/dist/{chunk-DTYCAGIK.js → chunk-YQW2T27M.js} +2 -4
- package/dist/chunk-YQW2T27M.js.map +1 -0
- package/dist/index.cjs +35 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-DTYCAGIK.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -898,7 +898,7 @@ function carriesTimeOfDay(field2, value) {
|
|
|
898
898
|
function timeOfDayWords(value) {
|
|
899
899
|
if (!hasTimePart(value)) return null;
|
|
900
900
|
const at = value instanceof Date ? value : new Date(value);
|
|
901
|
-
return Number.isNaN(at.getTime()) ? null : at.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", ...(0,
|
|
901
|
+
return Number.isNaN(at.getTime()) ? null : at.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", ...(0, import_field_formats3.momentZoneOptions)(at) });
|
|
902
902
|
}
|
|
903
903
|
function hasTimePart(value) {
|
|
904
904
|
if (value instanceof Date || typeof value === "number") return true;
|
|
@@ -921,7 +921,7 @@ function dateFormatFor(field2, value) {
|
|
|
921
921
|
function dateText(field2, value) {
|
|
922
922
|
const format = dateFormatFor(field2, value) ?? (isDateLike(value) ? { id: hasTimePart(value) ? "datetime" : "date" } : void 0);
|
|
923
923
|
if (!format) return null;
|
|
924
|
-
const result = (0,
|
|
924
|
+
const result = (0, import_field_formats2.formatFieldValue)(value, format);
|
|
925
925
|
return result.ok && !result.empty ? result.text : null;
|
|
926
926
|
}
|
|
927
927
|
function isDateLike(value) {
|
|
@@ -965,12 +965,12 @@ function addDays(day2, n) {
|
|
|
965
965
|
function daysBetween(from, to) {
|
|
966
966
|
return Math.round((dayAt(to).getTime() - dayAt(from).getTime()) / 864e5);
|
|
967
967
|
}
|
|
968
|
-
var
|
|
968
|
+
var import_field_formats2, import_field_formats3, BARE_CALENDAR_DATE;
|
|
969
969
|
var init_dates = __esm({
|
|
970
970
|
"src/dates.ts"() {
|
|
971
971
|
"use strict";
|
|
972
|
-
import_field_formats = require("@ai-matrx/design-system/field-formats");
|
|
973
972
|
import_field_formats2 = require("@ai-matrx/design-system/field-formats");
|
|
973
|
+
import_field_formats3 = require("@ai-matrx/design-system/field-formats");
|
|
974
974
|
init_personZone();
|
|
975
975
|
BARE_CALENDAR_DATE = /^(\d{4})-(\d{2})-(\d{2})(?:[T ]00:00(?::00(?:\.0+)?)?)?$/;
|
|
976
976
|
}
|
|
@@ -9814,14 +9814,11 @@ function encodeAt(canvas, type, maxWidth, quality) {
|
|
|
9814
9814
|
return out.toDataURL(type, quality);
|
|
9815
9815
|
}
|
|
9816
9816
|
|
|
9817
|
-
// src/labels.tsx
|
|
9818
|
-
init_dates();
|
|
9819
|
-
|
|
9820
9817
|
// src/looks/designLooks.tsx
|
|
9821
9818
|
var import_react7 = require("react");
|
|
9822
9819
|
var import_icons = require("@ai-matrx/design-system/icons");
|
|
9823
9820
|
var import_design_system2 = require("@ai-matrx/design-system");
|
|
9824
|
-
var
|
|
9821
|
+
var import_field_formats = require("@ai-matrx/design-system/field-formats");
|
|
9825
9822
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
9826
9823
|
var TYPE_SAMPLE = "The quick brown fox jumps over the lazy dog";
|
|
9827
9824
|
var HEX_6 = /^#[0-9a-f]{6}$/i;
|
|
@@ -9848,17 +9845,17 @@ function colorPairContrast(pair, format, context) {
|
|
|
9848
9845
|
if (!ground) return {};
|
|
9849
9846
|
const out = {};
|
|
9850
9847
|
if (ground.light) {
|
|
9851
|
-
const r = (0,
|
|
9848
|
+
const r = (0, import_field_formats.contrastRatio)(pair.light, ground.light);
|
|
9852
9849
|
if (r !== null) out.light = r;
|
|
9853
9850
|
}
|
|
9854
9851
|
if (ground.dark) {
|
|
9855
|
-
const r = (0,
|
|
9852
|
+
const r = (0, import_field_formats.contrastRatio)(pair.dark ?? pair.light, ground.dark);
|
|
9856
9853
|
if (r !== null) out.dark = r;
|
|
9857
9854
|
}
|
|
9858
9855
|
return out;
|
|
9859
9856
|
}
|
|
9860
9857
|
function ContrastMark({ ratio, min }) {
|
|
9861
|
-
const level = (0,
|
|
9858
|
+
const level = (0, import_field_formats.contrastLevel)(ratio, min);
|
|
9862
9859
|
const said2 = `${ratio}:1`;
|
|
9863
9860
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
9864
9861
|
"span",
|
|
@@ -9874,7 +9871,7 @@ function ContrastMark({ ratio, min }) {
|
|
|
9874
9871
|
);
|
|
9875
9872
|
}
|
|
9876
9873
|
function ColorPairView({ value, format }) {
|
|
9877
|
-
const pair = (0,
|
|
9874
|
+
const pair = (0, import_field_formats.readColorPair)(value);
|
|
9878
9875
|
if (!pair) return null;
|
|
9879
9876
|
const contrast = colorPairContrast(pair, format);
|
|
9880
9877
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "color_pair", className: "inline-flex min-w-0 items-center gap-3", children: [
|
|
@@ -9943,7 +9940,7 @@ function ColorWell({
|
|
|
9943
9940
|
] });
|
|
9944
9941
|
}
|
|
9945
9942
|
function ColorPairEditor({ value, onChange, disabled, id, label }) {
|
|
9946
|
-
const pair = (0,
|
|
9943
|
+
const pair = (0, import_field_formats.readColorPair)(value) ?? { light: "" };
|
|
9947
9944
|
const write = (next) => onChange(next.light ? JSON.stringify(next) : null);
|
|
9948
9945
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid grid-cols-[auto_1fr] items-center gap-x-2 gap-y-1.5", children: [
|
|
9949
9946
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs text-muted-foreground", children: "Light" }),
|
|
@@ -9973,7 +9970,7 @@ function ColorPairEditor({ value, onChange, disabled, id, label }) {
|
|
|
9973
9970
|
] });
|
|
9974
9971
|
}
|
|
9975
9972
|
function ColorPairPreview({ value }) {
|
|
9976
|
-
const pair = (0,
|
|
9973
|
+
const pair = (0, import_field_formats.readColorPair)(value);
|
|
9977
9974
|
if (!pair) return null;
|
|
9978
9975
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid h-24 w-full grid-cols-2 overflow-hidden rounded-lg border border-border", children: [
|
|
9979
9976
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex items-end p-2", style: { backgroundColor: pair.light }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs text-foreground", children: "Light" }) }),
|
|
@@ -9981,16 +9978,16 @@ function ColorPairPreview({ value }) {
|
|
|
9981
9978
|
] });
|
|
9982
9979
|
}
|
|
9983
9980
|
function colorPairChecks(value, format, context) {
|
|
9984
|
-
const pair = (0,
|
|
9981
|
+
const pair = (0, import_field_formats.readColorPair)(value);
|
|
9985
9982
|
if (!pair) return [];
|
|
9986
9983
|
const contrast = colorPairContrast(pair, format, context);
|
|
9987
9984
|
const ground = colorPairGround(format, context)?.label ?? "its background";
|
|
9988
9985
|
const out = [];
|
|
9989
9986
|
for (const part of ["light", "dark"]) {
|
|
9990
9987
|
const ratio = contrast[part];
|
|
9991
|
-
if (ratio === void 0 || (0,
|
|
9988
|
+
if (ratio === void 0 || (0, import_field_formats.contrastLevel)(ratio, pair.min) === "pass") continue;
|
|
9992
9989
|
const color = part === "light" ? pair.light : pair.dark ?? pair.light;
|
|
9993
|
-
const need = pair.min ??
|
|
9990
|
+
const need = pair.min ?? import_field_formats.TEXT_CONTRAST;
|
|
9994
9991
|
out.push({
|
|
9995
9992
|
part,
|
|
9996
9993
|
message: `hard to read on ${ground}`,
|
|
@@ -10118,16 +10115,16 @@ function MeasurePreview({ value, format }) {
|
|
|
10118
10115
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: dotted, "data-records-measure-preview": "size", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "h-3 rounded-full bg-primary", style: { width: Math.max(2, clamped) } }) });
|
|
10119
10116
|
}
|
|
10120
10117
|
function TypeStyleView({ value }) {
|
|
10121
|
-
const style = (0,
|
|
10118
|
+
const style = (0, import_field_formats.readTypeStyle)(value);
|
|
10122
10119
|
if (!style) return null;
|
|
10123
10120
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "type_style", className: "flex min-w-0 flex-col items-start gap-1", children: [
|
|
10124
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block max-w-full truncate text-foreground", style: (0,
|
|
10125
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded-md border border-border bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: (0,
|
|
10121
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block max-w-full truncate text-foreground", style: (0, import_field_formats.typeStyleCss)(style), children: TYPE_SAMPLE }),
|
|
10122
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded-md border border-border bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: (0, import_field_formats.typeStyleText)(style) })
|
|
10126
10123
|
] });
|
|
10127
10124
|
}
|
|
10128
10125
|
var FIELD = "grid grid-cols-[6rem_1fr] items-center gap-2";
|
|
10129
10126
|
function TypeStyleEditor({ value, onChange, disabled, id, label }) {
|
|
10130
|
-
const style = (0,
|
|
10127
|
+
const style = (0, import_field_formats.readTypeStyle)(value) ?? { font: "", weight: 400, size: 13, lineHeight: 20, letterSpacing: 0 };
|
|
10131
10128
|
const write = (next) => {
|
|
10132
10129
|
const merged = { ...style };
|
|
10133
10130
|
for (const [k, v] of Object.entries(next)) {
|
|
@@ -10153,7 +10150,7 @@ function TypeStyleEditor({ value, onChange, disabled, id, label }) {
|
|
|
10153
10150
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid grid-cols-[1fr_6rem] gap-2", children: [
|
|
10154
10151
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system2.Select, { value: String(clampWeight(style.weight)), disabled: disabled ?? false, onValueChange: (v) => write({ weight: clampWeight(Number(v)) }), children: [
|
|
10155
10152
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectTrigger, { "aria-label": `${label} weight`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectValue, {}) }),
|
|
10156
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children:
|
|
10153
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children: import_field_formats.TYPE_WEIGHTS.map((w) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectItem, { value: String(w.value), children: w.label }, w.value)) })
|
|
10157
10154
|
] }),
|
|
10158
10155
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UnitInput, { label: `${label} size`, unit: "px", value: style.size, disabled, onChange: (n) => n !== null && write({ size: clampSize(n) }) })
|
|
10159
10156
|
] })
|
|
@@ -10177,8 +10174,8 @@ function UnitInput({
|
|
|
10177
10174
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NumberBox, { label, unit, value, disabled, onChange });
|
|
10178
10175
|
}
|
|
10179
10176
|
function TypeStylePreview({ value }) {
|
|
10180
|
-
const style = (0,
|
|
10181
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex h-28 w-full items-center justify-center overflow-hidden rounded-lg border border-border bg-muted px-4", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "truncate text-foreground", style: style ? (0,
|
|
10177
|
+
const style = (0, import_field_formats.readTypeStyle)(value);
|
|
10178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex h-28 w-full items-center justify-center overflow-hidden rounded-lg border border-border bg-muted px-4", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "truncate text-foreground", style: style ? (0, import_field_formats.typeStyleCss)(style) : void 0, children: style ? TYPE_SAMPLE : "Aa" }) });
|
|
10182
10179
|
}
|
|
10183
10180
|
var THEME_GROUNDS = { light: { ground: "#f4f4f5", card: "#ffffff" }, dark: { ground: "#0b0c0e", card: "#18191c" } };
|
|
10184
10181
|
function ShadowSwatch({ layers, theme, size = "sm" }) {
|
|
@@ -10190,13 +10187,13 @@ function ShadowSwatch({ layers, theme, size = "sm" }) {
|
|
|
10190
10187
|
"data-records-shadow-swatch": theme,
|
|
10191
10188
|
className: (0, import_design_system2.cn)("flex shrink-0 items-center justify-center rounded-md", size === "lg" ? "h-24 w-full" : "h-7 w-11"),
|
|
10192
10189
|
style: { backgroundColor: g.ground },
|
|
10193
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_design_system2.cn)("rounded", size === "lg" ? "h-12 w-20" : "h-3.5 w-6"), style: { backgroundColor: g.card, boxShadow: (0,
|
|
10190
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_design_system2.cn)("rounded", size === "lg" ? "h-12 w-20" : "h-3.5 w-6"), style: { backgroundColor: g.card, boxShadow: (0, import_field_formats.shadowCss)(layers) } })
|
|
10194
10191
|
}
|
|
10195
10192
|
);
|
|
10196
10193
|
}
|
|
10197
|
-
var layersWords =
|
|
10194
|
+
var layersWords = import_field_formats.shadowWords;
|
|
10198
10195
|
function ShadowView({ value }) {
|
|
10199
|
-
const pair = (0,
|
|
10196
|
+
const pair = (0, import_field_formats.readShadowPair)(value);
|
|
10200
10197
|
if (!pair) return null;
|
|
10201
10198
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "shadow", className: "inline-flex min-w-0 items-center gap-2", children: [
|
|
10202
10199
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShadowSwatch, { layers: pair.light, theme: "light" }),
|
|
@@ -10233,7 +10230,7 @@ function ShadowLayersEditor({
|
|
|
10233
10230
|
] });
|
|
10234
10231
|
}
|
|
10235
10232
|
function ShadowEditor({ value, onChange, disabled, id, label }) {
|
|
10236
|
-
const pair = (0,
|
|
10233
|
+
const pair = (0, import_field_formats.readShadowPair)(value) ?? { light: [NEW_LAYER], dark: [NEW_LAYER] };
|
|
10237
10234
|
const own3 = (() => {
|
|
10238
10235
|
const raw = typeof value === "string" && value.trim().startsWith("{") ? value : null;
|
|
10239
10236
|
return raw !== null && raw.includes('"dark"');
|
|
@@ -10270,7 +10267,7 @@ function ShadowEditor({ value, onChange, disabled, id, label }) {
|
|
|
10270
10267
|
] });
|
|
10271
10268
|
}
|
|
10272
10269
|
function ShadowPreview({ value }) {
|
|
10273
|
-
const pair = (0,
|
|
10270
|
+
const pair = (0, import_field_formats.readShadowPair)(value) ?? { light: [NEW_LAYER], dark: [NEW_LAYER] };
|
|
10274
10271
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid w-full grid-cols-2 gap-2", children: [
|
|
10275
10272
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShadowSwatch, { layers: pair.light, theme: "light", size: "lg" }),
|
|
10276
10273
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShadowSwatch, { layers: pair.dark, theme: "dark", size: "lg" })
|
|
@@ -10281,7 +10278,7 @@ function OpacitySwatch({ opacity, size = "sm" }) {
|
|
|
10281
10278
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-hidden": true, className: (0, import_design_system2.cn)("relative inline-block shrink-0 overflow-hidden rounded border border-border", size === "lg" ? "h-24 w-full" : "h-5 w-5"), style: { background: CHECKER }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "absolute inset-0 bg-foreground", style: { opacity } }) });
|
|
10282
10279
|
}
|
|
10283
10280
|
function OpacityView({ value }) {
|
|
10284
|
-
const o = (0,
|
|
10281
|
+
const o = (0, import_field_formats.readOpacity)(value);
|
|
10285
10282
|
if (o === null) return null;
|
|
10286
10283
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "opacity", className: "inline-flex items-center gap-2 tabular-nums", children: [
|
|
10287
10284
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: o }),
|
|
@@ -10290,7 +10287,7 @@ function OpacityView({ value }) {
|
|
|
10290
10287
|
] });
|
|
10291
10288
|
}
|
|
10292
10289
|
function OpacityEditor({ value, onChange, disabled, id, label }) {
|
|
10293
|
-
const o = (0,
|
|
10290
|
+
const o = (0, import_field_formats.readOpacity)(value);
|
|
10294
10291
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex items-center gap-2", children: [
|
|
10295
10292
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NumberBox, { id, label, value: o, unit: "", disabled, className: "w-full max-w-28", onChange: (n) => onChange(n === null ? null : Math.min(1, Math.max(0, n))) }),
|
|
10296
10293
|
o !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: o }) : null,
|
|
@@ -10301,7 +10298,7 @@ function OpacityEditor({ value, onChange, disabled, id, label }) {
|
|
|
10301
10298
|
] });
|
|
10302
10299
|
}
|
|
10303
10300
|
function OpacityPreview({ value }) {
|
|
10304
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: (0,
|
|
10301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: (0, import_field_formats.readOpacity)(value) ?? 0.5, size: "lg" });
|
|
10305
10302
|
}
|
|
10306
10303
|
function MotionTrack({ motion, size = "sm" }) {
|
|
10307
10304
|
const id = `m${Math.round(motion.duration)}-${motion.easing.replace(/[^a-z0-9]/gi, "")}`;
|
|
@@ -10323,27 +10320,27 @@ function MotionTrack({ motion, size = "sm" }) {
|
|
|
10323
10320
|
] });
|
|
10324
10321
|
}
|
|
10325
10322
|
function MotionView({ value }) {
|
|
10326
|
-
const m = (0,
|
|
10323
|
+
const m = (0, import_field_formats.readMotion)(value);
|
|
10327
10324
|
if (!m) return null;
|
|
10328
10325
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "motion", className: "inline-flex items-center gap-2", children: [
|
|
10329
10326
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MotionTrack, { motion: m }),
|
|
10330
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "tabular-nums", children: (0,
|
|
10327
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "tabular-nums", children: (0, import_field_formats.motionText)(m) })
|
|
10331
10328
|
] });
|
|
10332
10329
|
}
|
|
10333
10330
|
function MotionEditor({ value, onChange, disabled, id, label }) {
|
|
10334
|
-
const m = (0,
|
|
10331
|
+
const m = (0, import_field_formats.readMotion)(value) ?? { duration: 200, easing: "ease-out" };
|
|
10335
10332
|
const write = (next) => onChange(JSON.stringify({ ...m, ...next }));
|
|
10336
10333
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
10337
10334
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NumberBox, { id, label: `${label} duration`, value: m.duration, unit: "ms", disabled, className: "w-24", onChange: (n) => n !== null && n >= 0 && write({ duration: n }) }),
|
|
10338
10335
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system2.Select, { value: m.easing, disabled: disabled ?? false, onValueChange: (v) => write({ easing: v }), children: [
|
|
10339
10336
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectTrigger, { "aria-label": `${label} easing`, className: "h-7 w-36 text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectValue, {}) }),
|
|
10340
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children:
|
|
10337
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children: import_field_formats.MOTION_EASINGS.map((e) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectItem, { value: e.value, children: e.label }, e.value)) })
|
|
10341
10338
|
] }),
|
|
10342
10339
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MotionTrack, { motion: m })
|
|
10343
10340
|
] });
|
|
10344
10341
|
}
|
|
10345
10342
|
function MotionPreview({ value }) {
|
|
10346
|
-
const m = (0,
|
|
10343
|
+
const m = (0, import_field_formats.readMotion)(value) ?? { duration: 200, easing: "ease-out" };
|
|
10347
10344
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex h-24 w-full items-center rounded-lg border border-border bg-muted px-4", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MotionTrack, { motion: m, size: "lg" }) });
|
|
10348
10345
|
}
|
|
10349
10346
|
var DESIGN_LOOKS = [
|
|
@@ -11209,7 +11206,7 @@ function isId(value) {
|
|
|
11209
11206
|
return typeof value === "string" && (0, import_uuid2.isUuidShape)(value);
|
|
11210
11207
|
}
|
|
11211
11208
|
function copiesAsWords(field2) {
|
|
11212
|
-
return pointsAtRecords(field2) || isSignatureField(field2) || (0, import_records2.autonumberPrefixOf)(field2) !== ""
|
|
11209
|
+
return pointsAtRecords(field2) || isSignatureField(field2) || (0, import_records2.autonumberPrefixOf)(field2) !== "";
|
|
11213
11210
|
}
|
|
11214
11211
|
function pointsAtRecords(field2) {
|
|
11215
11212
|
return field2.type === "list" || field2.type === "relation";
|
|
@@ -11217,8 +11214,6 @@ function pointsAtRecords(field2) {
|
|
|
11217
11214
|
function shownValue(field2, value, labels) {
|
|
11218
11215
|
if (isSignatureField(field2)) return signatureWords(value);
|
|
11219
11216
|
if ((0, import_records2.autonumberPrefixOf)(field2)) return (0, import_records2.autonumberWords)(field2, value) ?? value;
|
|
11220
|
-
const dateWords2 = isDateField(field2) ? dateText(field2, value) : null;
|
|
11221
|
-
if (dateWords2 !== null) return dateWords2;
|
|
11222
11217
|
const newerWords = value === null || value === void 0 ? null : (0, import_records3.newerKindExportWords)(field2, value);
|
|
11223
11218
|
if (newerWords !== null) return newerWords;
|
|
11224
11219
|
const look = value === null || value === void 0 ? void 0 : registeredLook(shownAsOf(field2));
|