@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.
- package/CHANGELOG.md +11 -0
- package/dist/DEV/bricks/DropdownMenu.js +20 -1
- package/dist/DEV/bricks/Icon.js +31 -0
- package/dist/DEV/bricks/Select.js +3 -2
- package/dist/DEV/bricks/TextBox.js +27 -2
- package/dist/DEV/bricks/Tree.js +79 -55
- package/dist/DEV/bricks/styles.css.js +1 -1
- package/dist/DEV/bricks/~hooks.js +6 -6
- package/dist/bricks/DropdownMenu.d.ts +13 -1
- package/dist/bricks/DropdownMenu.js +19 -1
- package/dist/bricks/Icon.d.ts +3 -0
- package/dist/bricks/Icon.js +30 -0
- package/dist/bricks/Select.d.ts +8 -1
- package/dist/bricks/Select.js +3 -2
- package/dist/bricks/TextBox.d.ts +23 -2
- package/dist/bricks/TextBox.js +26 -2
- package/dist/bricks/Tree.js +79 -55
- package/dist/bricks/styles.css.js +1 -1
- package/dist/bricks/~hooks.d.ts +4 -3
- package/dist/bricks/~hooks.js +6 -6
- package/package.json +1 -1
- package/dist/DEV/bricks/Textarea.js +0 -32
- package/dist/bricks/Textarea.d.ts +0 -24
- package/dist/bricks/Textarea.js +0 -31
|
@@ -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 {};
|
package/dist/bricks/Textarea.js
DELETED
|
@@ -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
|
-
};
|