@itwin/itwinui-react 5.0.0-alpha.2 → 5.0.0-alpha.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.
@@ -1,32 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import * as Ariakit from "@ariakit/react";
3
- import cx from "classnames";
4
- import { useFieldDescribedBy, useFieldId } from "./Field.js";
5
- import { forwardRef } from "./~utils.js";
6
- const Textarea = forwardRef(
7
- (props, forwardedRef) => {
8
- const fieldId = useFieldId();
9
- const describedBy = useFieldDescribedBy(props["aria-describedby"]);
10
- return /* @__PURE__ */ jsx(
11
- Ariakit.Role.textarea,
12
- {
13
- id: fieldId,
14
- ...props,
15
- className: cx("\u{1F95D}-text-box", props.className),
16
- "aria-describedby": describedBy,
17
- render: /* @__PURE__ */ jsx(
18
- Ariakit.Focusable,
19
- {
20
- accessibleWhenDisabled: true,
21
- render: props.render || /* @__PURE__ */ jsx("textarea", {})
22
- }
23
- ),
24
- ref: forwardedRef
25
- }
26
- );
27
- }
28
- );
29
- DEV: Textarea.displayName = "Textarea";
30
- export {
31
- Textarea
32
- };
@@ -1,24 +0,0 @@
1
- import { type FocusableProps } from "./~utils.js";
2
- interface TextareaProps extends FocusableProps<"textarea"> {
3
- }
4
- /**
5
- * A styled textarea element that allows users to enter multiline text values.
6
- *
7
- * Example usage:
8
- * ```tsx
9
- * <TextBox.Textarea defaultValue="Hello" />
10
- * ```
11
- *
12
- * Works well with the `Field` and `Label` components.
13
- * ```tsx
14
- * <Field>
15
- * <Label>Leave a comment, be kind</Label>
16
- * <TextBox.Textarea />
17
- * </Field>
18
- * ```
19
- *
20
- * Underneath, it's an HTML textarea, i.e. `<textarea>`, so it supports the same props, including
21
- * `value`, `defaultValue`, `onChange`, and `disabled`.
22
- */
23
- export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLElement | HTMLTextAreaElement>>;
24
- export {};
@@ -1,31 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import * as Ariakit from "@ariakit/react";
3
- import cx from "classnames";
4
- import { useFieldDescribedBy, useFieldId } from "./Field.js";
5
- import { forwardRef } from "./~utils.js";
6
- const Textarea = forwardRef(
7
- (props, forwardedRef) => {
8
- const fieldId = useFieldId();
9
- const describedBy = useFieldDescribedBy(props["aria-describedby"]);
10
- return /* @__PURE__ */ jsx(
11
- Ariakit.Role.textarea,
12
- {
13
- id: fieldId,
14
- ...props,
15
- className: cx("\u{1F95D}-text-box", props.className),
16
- "aria-describedby": describedBy,
17
- render: /* @__PURE__ */ jsx(
18
- Ariakit.Focusable,
19
- {
20
- accessibleWhenDisabled: true,
21
- render: props.render || /* @__PURE__ */ jsx("textarea", {})
22
- }
23
- ),
24
- ref: forwardedRef
25
- }
26
- );
27
- }
28
- );
29
- export {
30
- Textarea
31
- };