@gridui/input 1.1.6 → 3.0.0
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/README.md +42 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +263 -108
- package/dist/index.js.map +4 -4
- package/dist/input/input.d.ts +2 -4
- package/dist/input-group/input-group.d.ts +11 -0
- package/dist/input-group-addon/input-group-addon.d.ts +11 -0
- package/dist/input-group-button/input-group-button.d.ts +10 -0
- package/dist/password-input/password-input.d.ts +14 -0
- package/dist/search-input/search-input.d.ts +15 -0
- package/dist/shared/input-group-context.d.ts +8 -0
- package/dist/shared/text-control-options.d.ts +10 -0
- package/dist/styles.css +134 -28
- package/dist/textarea/textarea.d.ts +3 -3
- package/docs/catalog.json +64 -1
- package/docs/reference/README.md +11 -0
- package/docs/reference/input-group-addon.md +63 -0
- package/docs/reference/input-group-button.md +99 -0
- package/docs/reference/input-group.md +63 -0
- package/docs/reference/input.md +69 -0
- package/docs/reference/label.md +61 -0
- package/docs/reference/password-input.md +81 -0
- package/docs/reference/search-input.md +87 -0
- package/docs/reference/textarea.md +89 -0
- package/docs/textarea.md +28 -21
- package/package.json +9 -5
- package/dist/textarea/use-textarea-autosize.d.ts +0 -8
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Input
|
|
4
|
+
* @namespace InputGroup
|
|
5
|
+
* @description Input Group
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentPropsWithRef, FC } from "react";
|
|
8
|
+
export type InputGroupProps = ComponentPropsWithRef<"div"> & {
|
|
9
|
+
readonly controlSize?: "standard" | "small";
|
|
10
|
+
};
|
|
11
|
+
export declare const InputGroup: FC<InputGroupProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Input
|
|
4
|
+
* @namespace InputGroupAddon
|
|
5
|
+
* @description Input Group Addon
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentPropsWithRef, FC } from "react";
|
|
8
|
+
export type InputGroupAddonProps = ComponentPropsWithRef<"div"> & {
|
|
9
|
+
readonly align?: "inline-start" | "inline-end" | "block-start" | "block-end";
|
|
10
|
+
};
|
|
11
|
+
export declare const InputGroupAddon: FC<InputGroupAddonProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Input
|
|
4
|
+
* @namespace InputGroupButton
|
|
5
|
+
* @description Input Group Button
|
|
6
|
+
*/
|
|
7
|
+
import { type ButtonProps } from "@gridui/button";
|
|
8
|
+
import type { FC } from "react";
|
|
9
|
+
export type InputGroupButtonProps = ButtonProps;
|
|
10
|
+
export declare const InputGroupButton: FC<InputGroupButtonProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Input
|
|
4
|
+
* @namespace PasswordInput
|
|
5
|
+
* @description Password Input
|
|
6
|
+
*/
|
|
7
|
+
import { type InputProps } from "../input/input";
|
|
8
|
+
import { type FC } from "react";
|
|
9
|
+
export type PasswordInputProps = Omit<InputProps, "type"> & {
|
|
10
|
+
readonly showLabel: string;
|
|
11
|
+
readonly hideLabel: string;
|
|
12
|
+
readonly rootClassName?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const PasswordInput: FC<PasswordInputProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Input
|
|
4
|
+
* @namespace SearchInput
|
|
5
|
+
* @description Search Input
|
|
6
|
+
*/
|
|
7
|
+
import { type InputProps } from "../input/input";
|
|
8
|
+
import { type FC } from "react";
|
|
9
|
+
export type SearchInputProps = Omit<InputProps, "type"> & {
|
|
10
|
+
readonly clearLabel: string;
|
|
11
|
+
readonly loading?: boolean;
|
|
12
|
+
readonly loadingLabel?: string;
|
|
13
|
+
readonly rootClassName?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const SearchInput: FC<SearchInputProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Input
|
|
4
|
+
* @namespace Shared
|
|
5
|
+
* @description Input Group Context
|
|
6
|
+
*/
|
|
7
|
+
export declare const inputGroupContext: import("react").Context<"standard" | "small" | null>;
|
|
8
|
+
export declare const useInputGroupSize: () => "standard" | "small" | null;
|
package/dist/styles.css
CHANGED
|
@@ -1,94 +1,200 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer utilities {
|
|
5
|
-
.gridui-u-box-border {
|
|
5
|
+
.gridui-u-input--box-border {
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
}
|
|
8
|
-
.gridui-u-inline-flex {
|
|
8
|
+
.gridui-u-input--inline-flex {
|
|
9
9
|
display: inline-flex;
|
|
10
10
|
}
|
|
11
|
-
.gridui-u-min-h-
|
|
11
|
+
.gridui-u-input--min-h-\(--_gridui-textarea-min-height\) {
|
|
12
|
+
min-height: var(--_gridui-textarea-min-height);
|
|
13
|
+
}
|
|
14
|
+
.gridui-u-input--min-h-gridui-control {
|
|
12
15
|
min-height: var(--gridui-control-min-height);
|
|
13
16
|
}
|
|
14
|
-
.gridui-u-min-h-gridui-control-small {
|
|
17
|
+
.gridui-u-input--min-h-gridui-control-small {
|
|
15
18
|
min-height: var(--gridui-control-min-height-small);
|
|
16
19
|
}
|
|
17
|
-
.gridui-u-w-
|
|
20
|
+
.gridui-u-input--w-0 {
|
|
21
|
+
width: 0px;
|
|
22
|
+
}
|
|
23
|
+
.gridui-u-input--w-full {
|
|
18
24
|
width: 100%;
|
|
19
25
|
}
|
|
20
|
-
.gridui-u-min-w-0 {
|
|
26
|
+
.gridui-u-input--min-w-0 {
|
|
21
27
|
min-width: 0px;
|
|
22
28
|
}
|
|
23
|
-
.gridui-u-
|
|
29
|
+
.gridui-u-input--flex-1 {
|
|
30
|
+
flex: 1;
|
|
31
|
+
}
|
|
32
|
+
.gridui-u-input--shrink-0 {
|
|
24
33
|
flex-shrink: 0;
|
|
25
34
|
}
|
|
26
|
-
.gridui-u-resize-none {
|
|
35
|
+
.gridui-u-input--resize-none {
|
|
27
36
|
resize: none;
|
|
28
37
|
}
|
|
29
|
-
.gridui-u-resize-y {
|
|
38
|
+
.gridui-u-input--resize-y {
|
|
30
39
|
resize: vertical;
|
|
31
40
|
}
|
|
32
|
-
.gridui-u-items-center {
|
|
41
|
+
.gridui-u-input--items-center {
|
|
33
42
|
align-items: center;
|
|
34
43
|
}
|
|
35
|
-
.gridui-u-gap-gridui-4 {
|
|
44
|
+
.gridui-u-input--gap-gridui-4 {
|
|
36
45
|
gap: var(--gridui-space-4);
|
|
37
46
|
}
|
|
38
|
-
.gridui-u-overflow-auto {
|
|
47
|
+
.gridui-u-input--overflow-auto {
|
|
39
48
|
overflow: auto;
|
|
40
49
|
}
|
|
41
|
-
.gridui-u-rounded-control {
|
|
50
|
+
.gridui-u-input--rounded-control {
|
|
42
51
|
border-radius: var(--gridui-control-radius);
|
|
43
52
|
}
|
|
44
|
-
.gridui-u-border {
|
|
53
|
+
.gridui-u-input--border {
|
|
45
54
|
border-style: var(--tw-border-style);
|
|
46
55
|
border-width: 1px;
|
|
47
56
|
}
|
|
48
|
-
.gridui-u-border-
|
|
57
|
+
.gridui-u-input--border-0 {
|
|
58
|
+
border-style: var(--tw-border-style);
|
|
59
|
+
border-width: 0px;
|
|
60
|
+
}
|
|
61
|
+
.gridui-u-input--border-solid {
|
|
49
62
|
--tw-border-style: solid;
|
|
50
63
|
border-style: solid;
|
|
51
64
|
}
|
|
52
|
-
.gridui-u-border-border {
|
|
65
|
+
.gridui-u-input--border-border {
|
|
53
66
|
border-color: var(--gridui-border);
|
|
54
67
|
}
|
|
55
|
-
.gridui-u-bg-background {
|
|
68
|
+
.gridui-u-input--bg-background {
|
|
56
69
|
background-color: var(--gridui-background);
|
|
57
70
|
}
|
|
58
|
-
.gridui-u-
|
|
71
|
+
.gridui-u-input--bg-transparent {
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
.gridui-u-input--p-gridui-8 {
|
|
59
75
|
padding: var(--gridui-space-8);
|
|
60
76
|
}
|
|
61
|
-
.gridui-u-px-gridui-8 {
|
|
77
|
+
.gridui-u-input--px-gridui-8 {
|
|
62
78
|
padding-inline: var(--gridui-space-8);
|
|
63
79
|
}
|
|
64
|
-
.gridui-u-py-gridui-4 {
|
|
80
|
+
.gridui-u-input--py-gridui-4 {
|
|
65
81
|
padding-block: var(--gridui-space-4);
|
|
66
82
|
}
|
|
67
|
-
.gridui-u-type-input {
|
|
83
|
+
.gridui-u-input--type-input {
|
|
68
84
|
font: var(--gridui-type-input);
|
|
69
85
|
letter-spacing: normal;
|
|
70
86
|
}
|
|
71
|
-
.gridui-u-type-ui {
|
|
87
|
+
.gridui-u-input--type-ui {
|
|
72
88
|
font: var(--gridui-type-ui);
|
|
73
89
|
letter-spacing: normal;
|
|
74
90
|
}
|
|
75
|
-
.gridui-u-text-foreground {
|
|
91
|
+
.gridui-u-input--text-foreground {
|
|
76
92
|
color: var(--gridui-foreground);
|
|
77
93
|
}
|
|
78
|
-
.gridui-u-disabled\:cursor-not-allowed:disabled {
|
|
94
|
+
.gridui-u-input--disabled\:cursor-not-allowed:disabled {
|
|
79
95
|
cursor: not-allowed;
|
|
80
96
|
}
|
|
81
|
-
.gridui-u-disabled\:opacity-50:disabled {
|
|
97
|
+
.gridui-u-input--disabled\:opacity-50:disabled {
|
|
82
98
|
opacity: 50%;
|
|
83
99
|
}
|
|
84
|
-
.gridui-u-aria-invalid\:border-danger-foreground[aria-invalid="true"] {
|
|
100
|
+
.gridui-u-input--aria-invalid\:border-danger-foreground[aria-invalid="true"] {
|
|
85
101
|
border-color: var(--gridui-danger-foreground);
|
|
86
102
|
}
|
|
87
|
-
.gridui-u
|
|
103
|
+
.gridui-u-input--\[\&\>svg\]\:size-gridui-16 > svg {
|
|
88
104
|
width: var(--gridui-space-16);
|
|
89
105
|
height: var(--gridui-space-16);
|
|
90
106
|
}
|
|
91
107
|
}
|
|
108
|
+
@layer components {
|
|
109
|
+
.gridui-input-group {
|
|
110
|
+
--_gridui-input-height: var(--gridui-control-min-height);
|
|
111
|
+
position: relative;
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-wrap: wrap;
|
|
114
|
+
align-items: center;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
min-height: var(--_gridui-input-height);
|
|
117
|
+
width: 100%;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
border: 1px solid var(--gridui-border);
|
|
120
|
+
border-radius: var(--gridui-control-radius);
|
|
121
|
+
color: var(--gridui-foreground);
|
|
122
|
+
background: var(--gridui-background);
|
|
123
|
+
&[data-control-size="small"] {
|
|
124
|
+
--_gridui-input-height: var(--gridui-control-min-height-small);
|
|
125
|
+
}
|
|
126
|
+
> .gridui-control {
|
|
127
|
+
flex: 1;
|
|
128
|
+
width: 0;
|
|
129
|
+
border: 0;
|
|
130
|
+
background: transparent;
|
|
131
|
+
outline: none;
|
|
132
|
+
}
|
|
133
|
+
> textarea.gridui-control {
|
|
134
|
+
flex-basis: 100%;
|
|
135
|
+
width: 100%;
|
|
136
|
+
}
|
|
137
|
+
&:has(> .gridui-control:focus-visible) {
|
|
138
|
+
z-index: var(--gridui-z-interaction);
|
|
139
|
+
outline: var(--gridui-focus-width) solid var(--gridui-focus-color);
|
|
140
|
+
outline-offset: var(--gridui-focus-offset);
|
|
141
|
+
}
|
|
142
|
+
&:has(> .gridui-control[aria-invalid="true"]) {
|
|
143
|
+
border-color: var(--gridui-danger-foreground);
|
|
144
|
+
}
|
|
145
|
+
@media (hover: hover) and (pointer: fine) {
|
|
146
|
+
&:has(> .gridui-control:hover:not(:disabled, [readonly])):not(:has(:focus-visible)) {
|
|
147
|
+
outline: var(--gridui-hover-width) solid var(--gridui-focus-color);
|
|
148
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
149
|
+
outline: var(--gridui-hover-width) solid color-mix(in srgb, var(--gridui-focus-color) var(--gridui-hover-opacity), transparent);
|
|
150
|
+
}
|
|
151
|
+
outline-offset: var(--gridui-hover-offset);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
.gridui-input-group-addon {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex: none;
|
|
158
|
+
align-items: center;
|
|
159
|
+
gap: var(--gridui-space-8);
|
|
160
|
+
min-width: 0;
|
|
161
|
+
padding-inline: var(--gridui-space-8);
|
|
162
|
+
&[data-align="inline-start"] {
|
|
163
|
+
order: -1;
|
|
164
|
+
}
|
|
165
|
+
&[data-align="block-start"], &[data-align="block-end"] {
|
|
166
|
+
flex-basis: 100%;
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
padding-block: var(--gridui-space-8);
|
|
169
|
+
}
|
|
170
|
+
&[data-align="block-start"] {
|
|
171
|
+
order: -2;
|
|
172
|
+
}
|
|
173
|
+
&[data-align="block-end"] {
|
|
174
|
+
order: 2;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
.gridui-input-group-button {
|
|
178
|
+
flex: none;
|
|
179
|
+
}
|
|
180
|
+
.gridui-textarea[data-autosize] {
|
|
181
|
+
--_gridui-textarea-inset: calc(2 * var(--gridui-space-8) + 2px);
|
|
182
|
+
--_gridui-textarea-minimum: var(--gridui-control-min-height);
|
|
183
|
+
field-sizing: content;
|
|
184
|
+
height: auto;
|
|
185
|
+
--_gridui-textarea-min-height: max(var(--_gridui-textarea-minimum), calc(var(--_gridui-textarea-rows) * 1lh + var(--_gridui-textarea-inset)));
|
|
186
|
+
&.gridui-control-small {
|
|
187
|
+
--_gridui-textarea-inset: calc(2 * var(--gridui-space-4) + 2px);
|
|
188
|
+
--_gridui-textarea-minimum: var(--gridui-control-min-height-small);
|
|
189
|
+
}
|
|
190
|
+
&[data-max-rows] {
|
|
191
|
+
max-height: calc(var(--_gridui-textarea-max-rows) * 1lh + var(--_gridui-textarea-inset));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
.gridui-input-group > input[type="search"]::-webkit-search-cancel-button {
|
|
195
|
+
appearance: none;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
92
198
|
@property --tw-border-style {
|
|
93
199
|
syntax: "*";
|
|
94
200
|
inherits: false;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* @namespace Textarea
|
|
5
5
|
* @description Textarea
|
|
6
6
|
*/
|
|
7
|
+
import type { TextControlOptions } from "../shared/text-control-options";
|
|
7
8
|
import { type ComponentPropsWithRef, type FC } from "react";
|
|
8
|
-
export type TextareaProps = ComponentPropsWithRef<"textarea"> & {
|
|
9
|
+
export type TextareaProps = ComponentPropsWithRef<"textarea"> & TextControlOptions & {
|
|
9
10
|
readonly autoSize?: boolean;
|
|
10
11
|
readonly maxHeight?: number;
|
|
11
|
-
readonly
|
|
12
|
-
readonly onValueChange?: (value: string) => void;
|
|
12
|
+
readonly maxRows?: number;
|
|
13
13
|
};
|
|
14
14
|
export declare const Textarea: FC<TextareaProps>;
|
package/docs/catalog.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/input",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"category": "core",
|
|
6
6
|
"description": "GridUI React input",
|
|
7
7
|
"usage": "`Label` owns inline label alignment and an optional decorative `icon` slot. Icons use the standard 16px token size without an ancestor layout styling labels.",
|
|
8
8
|
"documentation": [
|
|
9
9
|
"README.md",
|
|
10
10
|
"docs/common-inputs.md",
|
|
11
|
+
"docs/reference/README.md",
|
|
12
|
+
"docs/reference/input-group-addon.md",
|
|
13
|
+
"docs/reference/input-group-button.md",
|
|
14
|
+
"docs/reference/input-group.md",
|
|
15
|
+
"docs/reference/input.md",
|
|
16
|
+
"docs/reference/label.md",
|
|
17
|
+
"docs/reference/password-input.md",
|
|
18
|
+
"docs/reference/search-input.md",
|
|
19
|
+
"docs/reference/textarea.md",
|
|
11
20
|
"docs/textarea.md"
|
|
12
21
|
],
|
|
13
22
|
"exports": [
|
|
@@ -21,6 +30,36 @@
|
|
|
21
30
|
"kind": "component",
|
|
22
31
|
"importPath": "@gridui/input"
|
|
23
32
|
},
|
|
33
|
+
{
|
|
34
|
+
"name": "InputGroup",
|
|
35
|
+
"kind": "component",
|
|
36
|
+
"importPath": "@gridui/input"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "InputGroupAddon",
|
|
40
|
+
"kind": "component",
|
|
41
|
+
"importPath": "@gridui/input"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "InputGroupAddonProps",
|
|
45
|
+
"kind": "type",
|
|
46
|
+
"importPath": "@gridui/input"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "InputGroupButton",
|
|
50
|
+
"kind": "component",
|
|
51
|
+
"importPath": "@gridui/input"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "InputGroupButtonProps",
|
|
55
|
+
"kind": "type",
|
|
56
|
+
"importPath": "@gridui/input"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "InputGroupProps",
|
|
60
|
+
"kind": "type",
|
|
61
|
+
"importPath": "@gridui/input"
|
|
62
|
+
},
|
|
24
63
|
{
|
|
25
64
|
"name": "InputProps",
|
|
26
65
|
"kind": "type",
|
|
@@ -36,6 +75,26 @@
|
|
|
36
75
|
"kind": "type",
|
|
37
76
|
"importPath": "@gridui/input"
|
|
38
77
|
},
|
|
78
|
+
{
|
|
79
|
+
"name": "PasswordInput",
|
|
80
|
+
"kind": "component",
|
|
81
|
+
"importPath": "@gridui/input"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "PasswordInputProps",
|
|
85
|
+
"kind": "type",
|
|
86
|
+
"importPath": "@gridui/input"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "SearchInput",
|
|
90
|
+
"kind": "component",
|
|
91
|
+
"importPath": "@gridui/input"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "SearchInputProps",
|
|
95
|
+
"kind": "type",
|
|
96
|
+
"importPath": "@gridui/input"
|
|
97
|
+
},
|
|
39
98
|
{
|
|
40
99
|
"name": "Textarea",
|
|
41
100
|
"kind": "component",
|
|
@@ -49,10 +108,14 @@
|
|
|
49
108
|
],
|
|
50
109
|
"styles": [
|
|
51
110
|
"@gridui/theme/styles.css",
|
|
111
|
+
"@gridui/button/styles.css",
|
|
52
112
|
"@gridui/overlay/styles.css",
|
|
53
113
|
"@gridui/input/styles.css"
|
|
54
114
|
],
|
|
55
115
|
"examples": [
|
|
116
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/stories/input-group.stories.tsx",
|
|
117
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/stories/password-input.stories.tsx",
|
|
118
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/stories/search-input.stories.tsx",
|
|
56
119
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/stories/textarea.stories.tsx"
|
|
57
120
|
]
|
|
58
121
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Generated by pnpm docs:storybook. -->
|
|
2
|
+
# Component reference
|
|
3
|
+
|
|
4
|
+
- [Input](input.md)
|
|
5
|
+
- [InputGroup](input-group.md)
|
|
6
|
+
- [InputGroupAddon](input-group-addon.md)
|
|
7
|
+
- [InputGroupButton](input-group-button.md)
|
|
8
|
+
- [Label](label.md)
|
|
9
|
+
- [PasswordInput](password-input.md)
|
|
10
|
+
- [SearchInput](search-input.md)
|
|
11
|
+
- [Textarea](textarea.md)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# InputGroupAddon
|
|
3
|
+
|
|
4
|
+
Compose InputGroupAddon with InputGroup inside the same @gridui/input component family.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/input`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { InputGroupAddon } from "@gridui/input";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/input/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/stories/input-group.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### children
|
|
23
|
+
|
|
24
|
+
``ReactNode`` · Optional
|
|
25
|
+
|
|
26
|
+
Content rendered inside the component.
|
|
27
|
+
|
|
28
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### align
|
|
59
|
+
|
|
60
|
+
``"inline-start" | "inline-end" | "block-start" | "block-end" | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``"inline-start"``
|
|
63
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# InputGroupButton
|
|
3
|
+
|
|
4
|
+
Compose InputGroupButton with InputGroup inside the same @gridui/input component family.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/input`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { InputGroupButton } from "@gridui/input";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/input/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/stories/input-group.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### children
|
|
23
|
+
|
|
24
|
+
``ReactNode`` · Optional
|
|
25
|
+
|
|
26
|
+
Content rendered inside the component.
|
|
27
|
+
|
|
28
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLButtonElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLButtonElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLButtonElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLButtonElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLButtonElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### size
|
|
59
|
+
|
|
60
|
+
``"small" | "standard" | "large" | "extra-large" | null | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Component size preset.
|
|
63
|
+
|
|
64
|
+
### iconMotion
|
|
65
|
+
|
|
66
|
+
``"none" | "outward" | null | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
### variant
|
|
69
|
+
|
|
70
|
+
``"text" | "primary" | "secondary" | "quiet" | "highlight" | "underlined" | null | undefined`` · Optional
|
|
71
|
+
|
|
72
|
+
Visual variant.
|
|
73
|
+
|
|
74
|
+
### layout
|
|
75
|
+
|
|
76
|
+
``"cell" | "standard" | "icon" | "entry" | "rail" | "divided" | null | undefined`` · Optional
|
|
77
|
+
|
|
78
|
+
Layout within the containing region.
|
|
79
|
+
|
|
80
|
+
### startIcon
|
|
81
|
+
|
|
82
|
+
``ReactNode`` · Optional
|
|
83
|
+
|
|
84
|
+
### startIconLayout
|
|
85
|
+
|
|
86
|
+
``"divided" | "inline" | undefined`` · Optional
|
|
87
|
+
|
|
88
|
+
### startIconSize
|
|
89
|
+
|
|
90
|
+
``"standard" | "large" | "extra-large" | undefined`` · Optional
|
|
91
|
+
|
|
92
|
+
### endIcon
|
|
93
|
+
|
|
94
|
+
``ReactNode`` · Optional
|
|
95
|
+
|
|
96
|
+
### loading
|
|
97
|
+
|
|
98
|
+
``boolean | undefined`` · Optional
|
|
99
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# InputGroup
|
|
3
|
+
|
|
4
|
+
Combines a native text control with units, icons, or actions inside one outline. Use block addons for multiline tools.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/input`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { InputGroup } from "@gridui/input";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/input/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/stories/input-group.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### children
|
|
23
|
+
|
|
24
|
+
``ReactNode`` · Optional
|
|
25
|
+
|
|
26
|
+
Content rendered inside the component.
|
|
27
|
+
|
|
28
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### controlSize
|
|
59
|
+
|
|
60
|
+
``"small" | "standard" | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``"standard"``
|
|
63
|
+
|