@hackcove/ui-react 0.8.0 → 0.8.1
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/Textarea.d.ts +10 -3
- package/dist/Textarea.js +5 -4
- package/dist/cx.d.ts +4 -2
- package/dist/cx.js +4 -2
- package/package.json +1 -1
package/dist/Textarea.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { type ControlProps } from "./control.js";
|
|
3
3
|
import type { Unstyled } from "./props.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export type TextareaProps = ControlProps & {
|
|
5
|
+
/** The monospace face, for pasted CSV or statement text, where the columns must line up. Off by default. */
|
|
6
|
+
mono?: boolean | undefined;
|
|
7
|
+
} & Unstyled<Omit<ComponentPropsWithoutRef<"textarea">, "width">>;
|
|
8
|
+
/** A multi-line text input, styled like `Input`. `rows` defaults to 3. Takes `size`, `width` and `mono` too. The `ref` reaches the `<textarea>`, for focus control. */
|
|
9
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<ControlProps & {
|
|
10
|
+
/** The monospace face, for pasted CSV or statement text, where the columns must line up. Off by default. */
|
|
11
|
+
mono?: boolean | undefined;
|
|
12
|
+
} & Unstyled<Omit<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "width">> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
package/dist/Textarea.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import { CONTROL_PAD, controlClass } from "./control.js";
|
|
3
4
|
import { cx } from "./cx.js";
|
|
4
|
-
/** A multi-line text input, styled like `Input`. `rows` defaults to 3. Takes `size` and `
|
|
5
|
-
export function Textarea({ size = "md", width = "full", ...rest }) {
|
|
6
|
-
return (_jsx("textarea", { rows: 3, ...rest, className: cx(controlClass(size, width), CONTROL_PAD[size].x) }));
|
|
7
|
-
}
|
|
5
|
+
/** A multi-line text input, styled like `Input`. `rows` defaults to 3. Takes `size`, `width` and `mono` too. The `ref` reaches the `<textarea>`, for focus control. */
|
|
6
|
+
export const Textarea = forwardRef(function Textarea({ size = "md", width = "full", mono = false, ...rest }, ref) {
|
|
7
|
+
return (_jsx("textarea", { rows: 3, ...rest, ref: ref, className: cx(controlClass(size, width), CONTROL_PAD[size].x, mono && "font-mono") }));
|
|
8
|
+
});
|
package/dist/cx.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export declare const focusRing = "focus-visible:outline-2 focus-visible:outline-
|
|
|
5
5
|
/**
|
|
6
6
|
* On a row or card that holds a stretched link (`link-stretch`): every interactive descendant sits
|
|
7
7
|
* above that link and is clickable on its own. `z-10` needs a position, so each gets `relative`,
|
|
8
|
-
* except one that is already `absolute` and the stretched link itself.
|
|
8
|
+
* except one that is already `absolute` and the stretched link itself. The row or card is `isolate`,
|
|
9
|
+
* its own stacking context: its `z-10` descendants rank only inside it, so they cannot tie with or
|
|
10
|
+
* paint over the page's sticky bars (AppShell's header, a StickyBar).
|
|
9
11
|
*/
|
|
10
|
-
export declare const liftInteractive = "[&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch):not(.absolute)]:relative [&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch)]:z-10";
|
|
12
|
+
export declare const liftInteractive = "isolate [&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch):not(.absolute)]:relative [&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch)]:z-10";
|
package/dist/cx.js
CHANGED
|
@@ -7,6 +7,8 @@ export const focusRing = "focus-visible:outline-2 focus-visible:outline-offset-2
|
|
|
7
7
|
/**
|
|
8
8
|
* On a row or card that holds a stretched link (`link-stretch`): every interactive descendant sits
|
|
9
9
|
* above that link and is clickable on its own. `z-10` needs a position, so each gets `relative`,
|
|
10
|
-
* except one that is already `absolute` and the stretched link itself.
|
|
10
|
+
* except one that is already `absolute` and the stretched link itself. The row or card is `isolate`,
|
|
11
|
+
* its own stacking context: its `z-10` descendants rank only inside it, so they cannot tie with or
|
|
12
|
+
* paint over the page's sticky bars (AppShell's header, a StickyBar).
|
|
11
13
|
*/
|
|
12
|
-
export const liftInteractive = "[&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch):not(.absolute)]:relative [&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch)]:z-10";
|
|
14
|
+
export const liftInteractive = "isolate [&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch):not(.absolute)]:relative [&_:is(a,button,label,select,textarea,input,summary):not(.link-stretch)]:z-10";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hackcove/ui-react",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Hack Cove React components: primitives, typography roles and a safe Markdown renderer, written against Tailwind v4 utilities. Pair with a @hackcove/theme-* package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|