@reapit/elements 5.0.0-beta.13 → 5.0.0-beta.15
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/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/components/accordion/accordion.stories.d.ts +6 -0
- package/dist/cjs/src/components/button/__styles__/index.d.ts +2 -1
- package/dist/cjs/src/components/button/button.d.ts +9 -1
- package/dist/cjs/src/components/button/button.stories.d.ts +6 -1
- package/dist/cjs/src/components/button-group/__tests__/button-group.test.d.ts +1 -0
- package/dist/cjs/src/components/button-group/button-group.d.ts +6 -0
- package/dist/cjs/src/components/button-group/button-group.stories.d.ts +34 -0
- package/dist/cjs/src/components/button-group/index.d.ts +2 -0
- package/dist/cjs/src/components/button-group/styles.d.ts +2 -0
- package/dist/cjs/src/components/textarea/__tests__/use-resize-textarea-effect.test.d.ts +1 -0
- package/dist/cjs/src/components/textarea/__tests__/use-resize-textarea-onchange.test.d.ts +1 -0
- package/dist/cjs/src/components/textarea/index.d.ts +1 -1
- package/dist/cjs/src/components/textarea/is-css-content-fieldsizing-supported.d.ts +2 -0
- package/dist/cjs/src/components/textarea/styles.d.ts +39 -0
- package/dist/cjs/src/components/textarea/sync-textarea-height.d.ts +7 -0
- package/dist/cjs/src/components/textarea/textarea.atoms.d.ts +66 -0
- package/dist/cjs/src/components/textarea/textarea.d.ts +12 -6
- package/dist/cjs/src/components/textarea/textarea.stories.d.ts +59 -14
- package/dist/cjs/src/components/textarea/use-resize-textarea-effect.d.ts +9 -0
- package/dist/cjs/src/components/textarea/use-resize-textarea-onchange.d.ts +9 -0
- package/dist/cjs/src/helpers/mergeRefs.d.ts +7 -0
- package/dist/cjs/src/index.d.ts +2 -1
- package/dist/cjs/src/storybook/figma/guidelines-images/index.d.ts +4 -0
- package/dist/cjs/src/storybook/figma/index.d.ts +9 -0
- package/dist/esm/assets/{asset-BDb_LRz7 → asset-Dw8e5-8p} +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/components/accordion/accordion.stories.d.ts +6 -0
- package/dist/esm/src/components/button/__styles__/index.d.ts +2 -1
- package/dist/esm/src/components/button/button.d.ts +9 -1
- package/dist/esm/src/components/button/button.stories.d.ts +6 -1
- package/dist/esm/src/components/button-group/__tests__/button-group.test.d.ts +1 -0
- package/dist/esm/src/components/button-group/button-group.d.ts +6 -0
- package/dist/esm/src/components/button-group/button-group.stories.d.ts +34 -0
- package/dist/esm/src/components/button-group/index.d.ts +2 -0
- package/dist/esm/src/components/button-group/styles.d.ts +2 -0
- package/dist/esm/src/components/textarea/__tests__/use-resize-textarea-effect.test.d.ts +1 -0
- package/dist/esm/src/components/textarea/__tests__/use-resize-textarea-onchange.test.d.ts +1 -0
- package/dist/esm/src/components/textarea/index.d.ts +1 -1
- package/dist/esm/src/components/textarea/is-css-content-fieldsizing-supported.d.ts +2 -0
- package/dist/esm/src/components/textarea/styles.d.ts +39 -0
- package/dist/esm/src/components/textarea/sync-textarea-height.d.ts +7 -0
- package/dist/esm/src/components/textarea/textarea.atoms.d.ts +66 -0
- package/dist/esm/src/components/textarea/textarea.d.ts +12 -6
- package/dist/esm/src/components/textarea/textarea.stories.d.ts +59 -14
- package/dist/esm/src/components/textarea/use-resize-textarea-effect.d.ts +9 -0
- package/dist/esm/src/components/textarea/use-resize-textarea-onchange.d.ts +9 -0
- package/dist/esm/src/helpers/mergeRefs.d.ts +7 -0
- package/dist/esm/src/index.d.ts +2 -1
- package/dist/esm/src/storybook/figma/guidelines-images/index.d.ts +4 -0
- package/dist/esm/src/storybook/figma/index.d.ts +9 -0
- package/dist/index.css +12 -5
- package/package.json +2 -1
- package/dist/cjs/src/components/textarea/__styles__/index.d.ts +0 -3
- package/dist/esm/src/components/textarea/__styles__/index.d.ts +0 -3
|
@@ -4,5 +4,11 @@ declare const meta: Meta<typeof Accordion>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
export declare const StylesOnlyUsage: {
|
|
6
6
|
render: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
parameters: {
|
|
8
|
+
design: {
|
|
9
|
+
type: string;
|
|
10
|
+
url: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
7
13
|
};
|
|
8
14
|
export declare const ReactUsage: StoryObj<typeof Accordion>;
|
|
@@ -10,5 +10,6 @@ export declare const elButtonGroupAlignRight: import("@linaria/core").LinariaCla
|
|
|
10
10
|
export declare const elButtonGroupAlignCenter: import("@linaria/core").LinariaClassName;
|
|
11
11
|
export declare const elButtonFixedWidth: import("@linaria/core").LinariaClassName;
|
|
12
12
|
export declare const ElButton: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
13
|
-
|
|
13
|
+
/** @deprecated **/
|
|
14
|
+
export declare const DeprecatedElButtonGroup: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
14
15
|
export declare const ElButtonGroupInner: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -19,11 +19,19 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
19
19
|
export interface FloatingButtonProps extends ButtonProps {
|
|
20
20
|
icon: IconNames;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* A subset of button, button group should not be used.
|
|
24
|
+
* @deprecated Will be removed in future major version. Use `button-group` as parent component.
|
|
25
|
+
*/
|
|
22
26
|
export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
27
|
alignment?: ButtonGroupAlignment;
|
|
24
28
|
}
|
|
25
29
|
export declare const resolveButtonClassName: (intent?: Intent) => string;
|
|
26
30
|
export declare const handleButtonClick: (onClick?: MouseEventHandler<HTMLButtonElement>) => (e: MouseEvent<HTMLButtonElement>) => void;
|
|
27
31
|
export declare const Button: FC<ButtonProps>;
|
|
28
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Moved to its own component `ButtonGroup`.
|
|
34
|
+
* @deprecated `alignment` prop will not be supported in new ButtonGroup component.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DeprecatedButtonGroup: FC<ButtonGroupProps>;
|
|
29
37
|
export declare const FloatingButton: FC<FloatingButtonProps>;
|
|
@@ -34,7 +34,12 @@ export declare const StandardAttributes: {
|
|
|
34
34
|
'aria-label': string;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @deprecated This ButtonGroup is deprecated. Use the new ButtonGroup component instead.
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export declare const DeprecatedGroup: {
|
|
38
43
|
render: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
|
39
44
|
name: string;
|
|
40
45
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ButtonGroup } from './button-group';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
declare const meta: Meta<typeof ButtonGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Default: {
|
|
6
|
+
render: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
parameters: {
|
|
8
|
+
design: {
|
|
9
|
+
type: string;
|
|
10
|
+
url: string;
|
|
11
|
+
allowFullscreen: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const WithPrimaryButton: {
|
|
16
|
+
render: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
parameters: {
|
|
18
|
+
design: {
|
|
19
|
+
type: string;
|
|
20
|
+
url: string;
|
|
21
|
+
allowFullscreen: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const WithIconOnlyButton: {
|
|
26
|
+
render: ({}: {}) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
parameters: {
|
|
28
|
+
design: {
|
|
29
|
+
type: string;
|
|
30
|
+
url: string;
|
|
31
|
+
allowFullscreen: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './styles';
|
|
2
2
|
export * from './textarea';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { CSSProperties, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
export declare const elTextAreaHasError: import("@linaria/core").LinariaClassName;
|
|
3
|
+
export type ContentFieldSizing = 'content';
|
|
4
|
+
export type FixedFieldSizing = 'fixed';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
*/
|
|
8
|
+
export type ManualFieldSizing = 'manual';
|
|
9
|
+
interface RestrictedTextareaHTMLAttributes extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'cols' | 'rows'> {
|
|
10
|
+
}
|
|
11
|
+
interface TextAreaCSSProperties extends CSSProperties {
|
|
12
|
+
'--textarea-max-rows': number;
|
|
13
|
+
'--textarea-min-rows': number;
|
|
14
|
+
}
|
|
15
|
+
export interface ElTextAreaProps extends RestrictedTextareaHTMLAttributes {
|
|
16
|
+
/**
|
|
17
|
+
* Indicates whether the text area has a form validation error or not. Provided as an escape-hatch
|
|
18
|
+
* for when you cannot rely on the [`:invalid` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid)
|
|
19
|
+
* and need to control the error state manually.
|
|
20
|
+
*/
|
|
21
|
+
hasError?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Determines how the text area will be sized.
|
|
24
|
+
* - `content` will allow the text area to size itself to its content;
|
|
25
|
+
* - `fixed` will size the text area to a specific number of rows;
|
|
26
|
+
* - `manual` **(deprecated)** will allow the user to size the text area themselves.
|
|
27
|
+
*/
|
|
28
|
+
'data-field-sizing': ContentFieldSizing | FixedFieldSizing | ManualFieldSizing;
|
|
29
|
+
/**
|
|
30
|
+
* Standard style prop that additionally allows the min and max row CSS variables for the text area
|
|
31
|
+
* to be overridden.
|
|
32
|
+
*/
|
|
33
|
+
style?: TextAreaCSSProperties;
|
|
34
|
+
}
|
|
35
|
+
export declare const ElTextArea: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLTextAreaElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & ElTextAreaProps>;
|
|
36
|
+
export declare const ElShadowTextArea: import("@linaria/react").WYWEvalMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLTextAreaElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & ElTextAreaProps & {
|
|
37
|
+
as?: import("react").ElementType<any> | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Makes the CSS height of the `to` text area equal to the scroll height of the `from` text area.
|
|
3
|
+
*
|
|
4
|
+
* @param from The text area element whose height we want to copy
|
|
5
|
+
* @param to The text area element whose height we want to set
|
|
6
|
+
*/
|
|
7
|
+
export default function syncTextAreaHeight(from: HTMLTextAreaElement, to: HTMLTextAreaElement): void;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ContentFieldSizing, FixedFieldSizing, ManualFieldSizing, type ElTextAreaProps } from './styles';
|
|
3
|
+
interface BaseTextAreaProps extends Omit<ElTextAreaProps, 'data-field-sizing'> {
|
|
4
|
+
}
|
|
5
|
+
export interface ContentFieldSizingTextAreaProps extends BaseTextAreaProps {
|
|
6
|
+
/**
|
|
7
|
+
* Allows the text area to automatically size itself based on its content, within the specified
|
|
8
|
+
* minimum and maximum number of rows.
|
|
9
|
+
*/
|
|
10
|
+
fieldSizing: ContentFieldSizing;
|
|
11
|
+
/**
|
|
12
|
+
* The maximum number of rows to which the text area should be sized. Provides the upper bound
|
|
13
|
+
* for the text area to grow to, except where an explicit value for `rows` is defined.
|
|
14
|
+
*
|
|
15
|
+
* @default Infinity
|
|
16
|
+
*/
|
|
17
|
+
maxRows?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The minimum number of rows to which the text area should be sized. Provides the lower bound
|
|
20
|
+
* for the text area to shrink to, except where an explicit value for `rows` is defined. The
|
|
21
|
+
* [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows)
|
|
22
|
+
* highlight that the default number of rows is 2.
|
|
23
|
+
*
|
|
24
|
+
* @default 3
|
|
25
|
+
*/
|
|
26
|
+
minRows?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* An text area that automatically resizes based on its content between a minimum and maximum number of rows.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ContentFieldSizingTextArea: import("react").ForwardRefExoticComponent<ContentFieldSizingTextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
32
|
+
export interface FixedFieldSizingTextAreaProps extends BaseTextAreaProps {
|
|
33
|
+
/**
|
|
34
|
+
* Ensures the text area has a fixed size based on the specified number of rows.
|
|
35
|
+
*/
|
|
36
|
+
fieldSizing: FixedFieldSizing;
|
|
37
|
+
/**
|
|
38
|
+
* The exact number of rows to which the text area should be sized.
|
|
39
|
+
*
|
|
40
|
+
* @default 3
|
|
41
|
+
*/
|
|
42
|
+
rows?: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A fixed-sized text area.
|
|
46
|
+
*/
|
|
47
|
+
export declare const FixedFieldSizingTextArea: import("react").ForwardRefExoticComponent<FixedFieldSizingTextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
48
|
+
export interface ManualFieldSizingTextAreaProps extends BaseTextAreaProps {
|
|
49
|
+
/**
|
|
50
|
+
* Allows the text area to be manually sized by users.
|
|
51
|
+
* @deprecated `manual` is deprecated. Please use `content` or `fixed` field sizing instead.
|
|
52
|
+
*/
|
|
53
|
+
fieldSizing: ManualFieldSizing;
|
|
54
|
+
/**
|
|
55
|
+
* The exact number of rows to which the text area should be _initially_ sized.
|
|
56
|
+
*
|
|
57
|
+
* @default 3
|
|
58
|
+
*/
|
|
59
|
+
initialRows?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A manually-resizable text area. Should not be used.
|
|
63
|
+
* @deprecated Will be removed in future major version. Use `content` or `fixed` field sizing instead.
|
|
64
|
+
*/
|
|
65
|
+
export declare const ManualFieldSizingTextArea: import("react").ForwardRefExoticComponent<ManualFieldSizingTextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
66
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ContentFieldSizingTextAreaProps, FixedFieldSizingTextAreaProps, ManualFieldSizingTextAreaProps } from './textarea.atoms';
|
|
3
|
+
export type TextAreaProps = ContentFieldSizingTextAreaProps | FixedFieldSizingTextAreaProps | ManualFieldSizingTextAreaProps;
|
|
4
|
+
/**
|
|
5
|
+
* An (almost) standard HTML/JSX `<textarea>` for use in forms.
|
|
6
|
+
*
|
|
7
|
+
* Can automatically resize itself between a minimum and/or maximum number of lines of text (rows). This
|
|
8
|
+
* resizing behaviour is available for CSS-only consumers on Chrome and Edge. For browsers that do not yet
|
|
9
|
+
* support the [field-sizing](https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing) property, we
|
|
10
|
+
* fallback to a JS-based resizing solution that is only available to React-based consumers.
|
|
11
|
+
*/
|
|
12
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,15 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { TextArea } from './index';
|
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("./textarea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const BasicUsage:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
export declare const BasicUsage: StoryObj<typeof TextArea>;
|
|
7
|
+
/**
|
|
8
|
+
* A TextArea can be invalid in three ways:
|
|
9
|
+
*
|
|
10
|
+
* - Applying any of the standard [HTML form validation attributes](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation#using_built-in_form_validation) and providing a value that does not meet these constraints;
|
|
11
|
+
* - Using custom [constraint validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation); or,
|
|
12
|
+
* - By explicitly setting `hasError` component prop to true (or the `el-text-area-has-error` class if using CSS only).
|
|
13
|
+
*
|
|
14
|
+
* The following example demonstrates a required text area that has no value, which is excersing option (1) above.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Invalid: StoryObj<typeof TextArea>;
|
|
17
|
+
/**
|
|
18
|
+
* A Text area can be disabled in forms to prevent their use. When disabled, the text area cannot be focused and its
|
|
19
|
+
* value will not be submitted with the form.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Disabled: StoryObj<typeof TextArea>;
|
|
22
|
+
/**
|
|
23
|
+
* A Text area can also be marked as read-only in forms to prevent their current value being changed. Unlike a disabled
|
|
24
|
+
* text area, a read-only text area can still be focused, and its value will still be submitted with the form.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ReadOnly: StoryObj<typeof TextArea>;
|
|
27
|
+
/**
|
|
28
|
+
* Text area's can automatically grow or shrink between a min and/or max row count. The min and max rows define the
|
|
29
|
+
* number of lines of text that should be visible within the text area. If the number of lines exceeds the specified
|
|
30
|
+
* maximum, the text area's content will overflow with a scrollbar.
|
|
31
|
+
*
|
|
32
|
+
* **Note:** This resizing behaviour is available for CSS-only consumers on Chrome and Edge. For browsers that do not
|
|
33
|
+
* yet support the [field-sizing](https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing) property, we fallback
|
|
34
|
+
* to a JS-based resizing solution that is only available to React-based consumers.
|
|
35
|
+
*
|
|
36
|
+
* This example demonstrates resizing behaviour for an *uncontrolled* text area.
|
|
37
|
+
*/
|
|
38
|
+
export declare const UncontrolledResizing: StoryObj<typeof TextArea>;
|
|
39
|
+
/**
|
|
40
|
+
* This next example demonstrates auto-sizing behaviour for a *controlled* text area.
|
|
41
|
+
*
|
|
42
|
+
* **Note:** to change the value of the text area, you will need to use the `value` control when viewing the
|
|
43
|
+
* story individually.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ControlledResizing: StoryObj<typeof TextArea>;
|
|
46
|
+
/**
|
|
47
|
+
* Importantly, when an explicit row count is specified, no resizing will occur, whether the text area's
|
|
48
|
+
* value is controlled or not. This allows text areas to have a fixed size when necessary.
|
|
49
|
+
*/
|
|
50
|
+
export declare const FixedSize: StoryObj<typeof TextArea>;
|
|
51
|
+
/**
|
|
52
|
+
* To continue using the Elements v4 `TextArea` behaviour where manual resizing was permitted, consumers can
|
|
53
|
+
* use `fieldSizing="manual"`.
|
|
54
|
+
*
|
|
55
|
+
* **This option is deprecated and will be removed in a future version.** Prefer either `content` or `fixed`
|
|
56
|
+
* field sizing.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated
|
|
59
|
+
*/
|
|
60
|
+
export declare const ManualSizing: StoryObj<typeof TextArea>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
type UseResizeTextAreaEffectConfig = {
|
|
3
|
+
isEnabled: boolean;
|
|
4
|
+
shadowTextAreaRef: RefObject<HTMLTextAreaElement>;
|
|
5
|
+
textAreaRef: RefObject<HTMLTextAreaElement>;
|
|
6
|
+
value?: unknown;
|
|
7
|
+
};
|
|
8
|
+
export default function useResizeTextAreaEffect({ isEnabled, shadowTextAreaRef, textAreaRef, value, }: UseResizeTextAreaEffectConfig): void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChangeEventHandler, RefObject } from 'react';
|
|
2
|
+
type UseResizeTextAreaOnChangeConfig = {
|
|
3
|
+
isEnabled: boolean;
|
|
4
|
+
shadowTextAreaRef: RefObject<HTMLTextAreaElement>;
|
|
5
|
+
textAreaRef: RefObject<HTMLTextAreaElement>;
|
|
6
|
+
};
|
|
7
|
+
type UseResizeTextAreaOnChangeDecorator = (onChange?: ChangeEventHandler) => ChangeEventHandler;
|
|
8
|
+
export default function useResizeTextAreaOnChange({ isEnabled, shadowTextAreaRef, textAreaRef, }: UseResizeTextAreaOnChangeConfig): UseResizeTextAreaOnChangeDecorator;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Ref, RefCallback } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Combine multiple React refs into a single ref function. This is used mostly when you
|
|
4
|
+
* need to allow consumers to forward refs to an internal component that is already
|
|
5
|
+
* receiving a ref.
|
|
6
|
+
*/
|
|
7
|
+
export default function mergeRefs<T = unknown>(...refs: Array<Ref<T> | RefCallback<T>>): RefCallback<T>;
|
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export * from './styles/typography';
|
|
|
8
8
|
export * from './styles/helpers';
|
|
9
9
|
export * from './styles/media';
|
|
10
10
|
export * from './styles/states';
|
|
11
|
-
export
|
|
11
|
+
export { Button, FloatingButton } from './components/button';
|
|
12
|
+
export * from './components/button-group';
|
|
12
13
|
export * from './components/card';
|
|
13
14
|
export * from './components/grid';
|
|
14
15
|
export * from './components/icon';
|