@tangle-network/ui 11.28.1 → 11.28.2
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
package/dist/primitives/input.js
CHANGED
|
@@ -8,7 +8,7 @@ import { cva } from "class-variance-authority";
|
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/primitives/input.tsx
|
|
11
|
-
const inputVariants = cva(cn("flex w-full border py-1 placeholder:text-[var(--text-dim)] disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:font-medium
|
|
11
|
+
const inputVariants = cva(cn("flex w-full border py-1 placeholder:text-[var(--text-dim)] disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:font-medium", fieldPresentation, fieldTouchText), {
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
14
|
default: "",
|
package/package.json
CHANGED
|
@@ -63,6 +63,13 @@ describe("shared control presentation", () => {
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
+
it("lets a file input's selector button take the field's text size", () => {
|
|
67
|
+
render(<Input type="file" size="lg" aria-label="Upload" />);
|
|
68
|
+
const classes = screen.getByLabelText("Upload").className.split(" ");
|
|
69
|
+
expect(classes).toContain("text-[length:var(--control-text-lg,1rem)]");
|
|
70
|
+
expect(classes.filter((name) => name.startsWith("file:text-"))).toEqual([]);
|
|
71
|
+
});
|
|
72
|
+
|
|
66
73
|
it("gives icon buttons squares on the same heights", () => {
|
|
67
74
|
render(<><Button size="icon-sm" aria-label="Small" /><Button size="icon" aria-label="Medium" /><Button size="icon-lg" aria-label="Large" /></>);
|
|
68
75
|
expect(screen.getByLabelText("Small").className).toContain("size-[var(--control-height-sm,2rem)]");
|
package/src/primitives/input.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
13
13
|
// and a Button at the same size share a height, text size and corner.
|
|
14
14
|
const inputVariants = cva(
|
|
15
15
|
cn(
|
|
16
|
-
"flex w-full border py-1 placeholder:text-[var(--text-dim)] disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:font-medium
|
|
16
|
+
"flex w-full border py-1 placeholder:text-[var(--text-dim)] disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:font-medium",
|
|
17
17
|
fieldPresentation,
|
|
18
18
|
fieldTouchText,
|
|
19
19
|
),
|