@tangle-network/ui 11.31.2 → 11.31.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/CHANGELOG.md
CHANGED
|
@@ -28,7 +28,7 @@ const FilterField = React.forwardRef(({ className, label, htmlFor, children, ...
|
|
|
28
28
|
...props,
|
|
29
29
|
children: [/* @__PURE__ */ jsx("label", {
|
|
30
30
|
htmlFor,
|
|
31
|
-
className: "whitespace-nowrap text-muted-foreground text-
|
|
31
|
+
className: "whitespace-nowrap text-muted-foreground text-sm",
|
|
32
32
|
children: label
|
|
33
33
|
}), children]
|
|
34
34
|
}));
|
package/package.json
CHANGED
|
@@ -89,4 +89,15 @@ describe("FilterField", () => {
|
|
|
89
89
|
screen.getByRole("combobox"),
|
|
90
90
|
);
|
|
91
91
|
});
|
|
92
|
+
|
|
93
|
+
it("sets its label on the 14px step of the shared scale, never smaller", () => {
|
|
94
|
+
render(
|
|
95
|
+
<FilterField htmlFor="status" label="Status">
|
|
96
|
+
<select id="status" />
|
|
97
|
+
</FilterField>,
|
|
98
|
+
);
|
|
99
|
+
const label = screen.getByText("Status");
|
|
100
|
+
expect(label.className).toMatch(/\btext-sm\b/);
|
|
101
|
+
expect(label.className).not.toMatch(/\btext-xs\b|text-\[/);
|
|
102
|
+
});
|
|
92
103
|
});
|
|
@@ -95,9 +95,10 @@ const FilterField = React.forwardRef<HTMLDivElement, FilterFieldProps>(
|
|
|
95
95
|
className={cn("flex shrink-0 items-center gap-2", className)}
|
|
96
96
|
{...props}
|
|
97
97
|
>
|
|
98
|
+
{/* 14px, the floor for any text a product shows; a 12px label beside a 14px control reads as a footnote. */}
|
|
98
99
|
<label
|
|
99
100
|
htmlFor={htmlFor}
|
|
100
|
-
className="whitespace-nowrap text-muted-foreground text-
|
|
101
|
+
className="whitespace-nowrap text-muted-foreground text-sm"
|
|
101
102
|
>
|
|
102
103
|
{label}
|
|
103
104
|
</label>
|