@teja-app/ui 0.0.16 → 0.0.18
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/theme/components/DateInput.d.ts.map +1 -1
- package/dist/theme/components/fieldShell.d.ts +7 -1
- package/dist/theme/components/fieldShell.d.ts.map +1 -1
- package/dist/theme/index.cjs +24 -1
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.js +24 -1
- package/dist/theme/index.js.map +1 -1
- package/package.json +1 -1
package/dist/theme/index.js
CHANGED
|
@@ -1030,11 +1030,29 @@ function FieldShell({
|
|
|
1030
1030
|
full = true,
|
|
1031
1031
|
htmlFor,
|
|
1032
1032
|
testId,
|
|
1033
|
+
uppercaseLabel = false,
|
|
1033
1034
|
children
|
|
1034
1035
|
}) {
|
|
1035
1036
|
const errorNode = fieldErrorNode(error2);
|
|
1036
1037
|
const errored = hasFieldError(error2);
|
|
1037
|
-
const
|
|
1038
|
+
const labelStyle = uppercaseLabel ? {
|
|
1039
|
+
fontSize: 10.5,
|
|
1040
|
+
color: "var(--ink-3)",
|
|
1041
|
+
fontWeight: 600,
|
|
1042
|
+
letterSpacing: "0.06em",
|
|
1043
|
+
textTransform: "uppercase",
|
|
1044
|
+
display: "inline-flex",
|
|
1045
|
+
alignItems: "center",
|
|
1046
|
+
gap: 4
|
|
1047
|
+
} : {
|
|
1048
|
+
fontSize: 11.5,
|
|
1049
|
+
color: "var(--ink-2)",
|
|
1050
|
+
fontWeight: 500,
|
|
1051
|
+
display: "inline-flex",
|
|
1052
|
+
alignItems: "center",
|
|
1053
|
+
gap: 4
|
|
1054
|
+
};
|
|
1055
|
+
const labelText = label ? /* @__PURE__ */ jsxs("span", { style: labelStyle, children: [
|
|
1038
1056
|
label,
|
|
1039
1057
|
required ? /* @__PURE__ */ jsx("span", { style: { color: "var(--danger)" }, children: "*" }) : null
|
|
1040
1058
|
] }) : null;
|
|
@@ -12513,6 +12531,8 @@ function DateInput({
|
|
|
12513
12531
|
const selected = parseDate(value);
|
|
12514
12532
|
const minDate = parseDate(min2 ?? null);
|
|
12515
12533
|
const maxDate = parseDate(max2 ?? null);
|
|
12534
|
+
const captionEnd = maxDate ?? /* @__PURE__ */ new Date();
|
|
12535
|
+
const captionStart = minDate ?? new Date(captionEnd.getFullYear() - 120, 0, 1);
|
|
12516
12536
|
const [month, setMonth2] = useState(() => parseDate(value) ?? /* @__PURE__ */ new Date());
|
|
12517
12537
|
const [lastValue, setLastValue] = useState(value);
|
|
12518
12538
|
if (value !== lastValue) {
|
|
@@ -12614,6 +12634,9 @@ function DateInput({
|
|
|
12614
12634
|
onSelect: handleSelect,
|
|
12615
12635
|
disabled: disabledMatcher,
|
|
12616
12636
|
showOutsideDays: true,
|
|
12637
|
+
captionLayout: "dropdown",
|
|
12638
|
+
startMonth: captionStart,
|
|
12639
|
+
endMonth: captionEnd,
|
|
12617
12640
|
style: RDP_STYLE,
|
|
12618
12641
|
components: {
|
|
12619
12642
|
Chevron: ({ orientation }) => /* @__PURE__ */ jsx(
|