@destyler/dynamic 0.0.7-beta.5 → 0.0.7-beta.9
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/index.d.ts +320 -317
- package/dist/index.js +1049 -0
- package/package.json +14 -20
- package/dist/index.cjs +0 -1032
- package/dist/index.d.cts +0 -356
- package/dist/index.d.mts +0 -356
- package/dist/index.mjs +0 -1024
package/dist/index.d.ts
CHANGED
|
@@ -1,356 +1,359 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { LiveRegion } from '@zag-js/live-region';
|
|
8
|
-
|
|
9
|
-
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "label" | "control" | "input" | "clearTrigger" | "item" | "itemPreview" | "itemInput" | "itemText" | "itemDeleteTrigger">;
|
|
1
|
+
import * as _destyler_anatomy0 from "@destyler/anatomy";
|
|
2
|
+
import { FocusOutsideEvent, InteractOutsideEvent, InteractOutsideHandlers, PointerDownOutsideEvent } from "@destyler/interact-outside";
|
|
3
|
+
import { LiveRegion } from "@destyler/live-region";
|
|
4
|
+
import * as _destyler_xstate0 from "@destyler/xstate";
|
|
5
|
+
import { AnyEventObject, XSend, XState } from "@destyler/xstate";
|
|
6
|
+
import { CommonProperties, DirectionProperty, NormalizeProps, PropTypes, RequiredBy } from "@destyler/types";
|
|
10
7
|
|
|
8
|
+
//#region src/anatomy.d.ts
|
|
9
|
+
declare const anatomy: _destyler_anatomy0.AnatomyInstance<"root" | "input" | "label" | "control" | "item" | "itemDeleteTrigger" | "itemInput" | "clearTrigger" | "itemPreview" | "itemText">;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/types.d.ts
|
|
11
12
|
interface ValueChangeDetails {
|
|
12
|
-
|
|
13
|
+
value: string[];
|
|
13
14
|
}
|
|
14
15
|
interface InputValueChangeDetails {
|
|
15
|
-
|
|
16
|
+
inputValue: string;
|
|
16
17
|
}
|
|
17
18
|
interface HighlightChangeDetails {
|
|
18
|
-
|
|
19
|
+
highlightedValue: string | null;
|
|
19
20
|
}
|
|
20
21
|
type ValidityState = 'rangeOverflow' | 'invalidTag';
|
|
21
22
|
interface ValidityChangeDetails {
|
|
22
|
-
|
|
23
|
+
reason: ValidityState;
|
|
23
24
|
}
|
|
24
25
|
interface ValidateArgs {
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
inputValue: string;
|
|
27
|
+
value: string[];
|
|
27
28
|
}
|
|
28
29
|
interface IntlTranslations {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
clearTriggerLabel: string;
|
|
31
|
+
deleteTagTriggerLabel: (value: string) => string;
|
|
32
|
+
tagSelected: (value: string) => string;
|
|
33
|
+
tagAdded: (value: string) => string;
|
|
34
|
+
tagsPasted: (value: string[]) => string;
|
|
35
|
+
tagEdited: (value: string) => string;
|
|
36
|
+
tagUpdated: (value: string) => string;
|
|
37
|
+
tagDeleted: (value: string) => string;
|
|
38
|
+
noTagsSelected?: string | undefined;
|
|
39
|
+
inputLabel?: (count: number) => string;
|
|
39
40
|
}
|
|
40
41
|
type Log = {
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
type: 'add' | 'update' | 'delete' | 'select';
|
|
43
|
+
value: string;
|
|
43
44
|
} | {
|
|
44
|
-
|
|
45
|
+
type: 'clear';
|
|
45
46
|
} | {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
type: 'paste';
|
|
48
|
+
values: string[];
|
|
48
49
|
} | {
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
type: 'set';
|
|
51
|
+
values: string[];
|
|
51
52
|
};
|
|
52
53
|
type ElementIds = Partial<{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
root: string;
|
|
55
|
+
input: string;
|
|
56
|
+
hiddenInput: string;
|
|
57
|
+
clearBtn: string;
|
|
58
|
+
label: string;
|
|
59
|
+
control: string;
|
|
60
|
+
item: (opts: ItemProps) => string;
|
|
61
|
+
itemDeleteTrigger: (opts: ItemProps) => string;
|
|
62
|
+
itemInput: (opts: ItemProps) => string;
|
|
62
63
|
}>;
|
|
63
64
|
interface PublicContext extends DirectionProperty, CommonProperties, InteractOutsideHandlers {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
65
|
+
/**
|
|
66
|
+
* The ids of the elements in the tags input. Useful for composition.
|
|
67
|
+
*/
|
|
68
|
+
ids?: ElementIds | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Specifies the localized strings that identifies the accessibility elements and their states
|
|
71
|
+
*/
|
|
72
|
+
translations: IntlTranslations;
|
|
73
|
+
/**
|
|
74
|
+
* The max length of the input.
|
|
75
|
+
*/
|
|
76
|
+
maxLength?: number | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The character that serves has:
|
|
79
|
+
* - event key to trigger the addition of a new tag
|
|
80
|
+
* - character used to split tags when pasting into the input
|
|
81
|
+
*
|
|
82
|
+
* @default ","
|
|
83
|
+
*/
|
|
84
|
+
delimiter?: string | RegExp | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the input should be auto-focused
|
|
87
|
+
*/
|
|
88
|
+
autoFocus?: boolean | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the tags input should be disabled
|
|
91
|
+
*/
|
|
92
|
+
disabled?: boolean | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the tags input should be read-only
|
|
95
|
+
*/
|
|
96
|
+
readOnly?: boolean | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Whether the tags input is invalid
|
|
99
|
+
*/
|
|
100
|
+
invalid?: boolean | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the tags input is required
|
|
103
|
+
*/
|
|
104
|
+
required?: boolean | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Whether a tag can be edited after creation, by pressing `Enter` or double clicking.
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
editable?: boolean | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* The tag input's value
|
|
112
|
+
*/
|
|
113
|
+
inputValue: string;
|
|
114
|
+
/**
|
|
115
|
+
* The tag values
|
|
116
|
+
*/
|
|
117
|
+
value: string[];
|
|
118
|
+
/**
|
|
119
|
+
* Callback fired when the tag values is updated
|
|
120
|
+
*/
|
|
121
|
+
onValueChange?: (details: ValueChangeDetails) => void;
|
|
122
|
+
/**
|
|
123
|
+
* Callback fired when the input value is updated
|
|
124
|
+
*/
|
|
125
|
+
onInputValueChange?: (details: InputValueChangeDetails) => void;
|
|
126
|
+
/**
|
|
127
|
+
* Callback fired when a tag is highlighted by pointer or keyboard navigation
|
|
128
|
+
*/
|
|
129
|
+
onHighlightChange?: (details: HighlightChangeDetails) => void;
|
|
130
|
+
/**
|
|
131
|
+
* Callback fired when the max tag count is reached or the `validateTag` function returns `false`
|
|
132
|
+
*/
|
|
133
|
+
onValueInvalid?: (details: ValidityChangeDetails) => void;
|
|
134
|
+
/**
|
|
135
|
+
* Returns a boolean that determines whether a tag can be added.
|
|
136
|
+
* Useful for preventing duplicates or invalid tag values.
|
|
137
|
+
*/
|
|
138
|
+
validate?: (details: ValidateArgs) => boolean;
|
|
139
|
+
/**
|
|
140
|
+
* The behavior of the tags input when the input is blurred
|
|
141
|
+
* - `"add"`: add the input value as a new tag
|
|
142
|
+
* - `"clear"`: clear the input value
|
|
143
|
+
*/
|
|
144
|
+
blurBehavior?: 'clear' | 'add' | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* Whether to add a tag when you paste values into the tag input
|
|
147
|
+
* @default false
|
|
148
|
+
*/
|
|
149
|
+
addOnPaste?: boolean | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* The max number of tags
|
|
152
|
+
* @default Infinity
|
|
153
|
+
*/
|
|
154
|
+
max: number;
|
|
155
|
+
/**
|
|
156
|
+
* Whether to allow tags to exceed max. In this case,
|
|
157
|
+
* we'll attach `data-invalid` to the root
|
|
158
|
+
*/
|
|
159
|
+
allowOverflow?: boolean | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* The name attribute for the input. Useful for form submissions
|
|
162
|
+
*/
|
|
163
|
+
name?: string | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* The associate form of the underlying input element.
|
|
166
|
+
*/
|
|
167
|
+
form?: string | undefined;
|
|
167
168
|
}
|
|
168
169
|
type UserDefinedContext = RequiredBy<PublicContext, 'id'>;
|
|
169
170
|
type ComputedContext = Readonly<{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
171
|
+
/**
|
|
172
|
+
* @computed
|
|
173
|
+
* The string value of the tags input
|
|
174
|
+
*/
|
|
175
|
+
valueAsString: string;
|
|
176
|
+
/**
|
|
177
|
+
* @computed
|
|
178
|
+
* The trimmed value of the input
|
|
179
|
+
*/
|
|
180
|
+
trimmedInputValue: string;
|
|
181
|
+
/**
|
|
182
|
+
* @computed
|
|
183
|
+
* Whether the tags input is interactive
|
|
184
|
+
*/
|
|
185
|
+
isInteractive: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* @computed
|
|
188
|
+
* Whether the tags input is at the maximum allowed number of tags
|
|
189
|
+
*/
|
|
190
|
+
isAtMax: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* @computed
|
|
193
|
+
* The total number of tags
|
|
194
|
+
*/
|
|
195
|
+
count: number;
|
|
196
|
+
/**
|
|
197
|
+
* @computed
|
|
198
|
+
* Whether the tags input is exceeding the max number of tags
|
|
199
|
+
*/
|
|
200
|
+
isOverflowing: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* @computed
|
|
203
|
+
* Whether the tags input is disabled
|
|
204
|
+
*/
|
|
205
|
+
isDisabled: boolean;
|
|
205
206
|
}>;
|
|
206
207
|
interface PrivateContext {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
interface MachineContext extends PublicContext, ComputedContext, PrivateContext {
|
|
208
|
+
/**
|
|
209
|
+
* @internal
|
|
210
|
+
* The output log for the screen reader to speak
|
|
211
|
+
*/
|
|
212
|
+
log: {
|
|
213
|
+
current: Log | null;
|
|
214
|
+
prev: Log | null;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* @internal
|
|
218
|
+
* The live region to announce changes to the user
|
|
219
|
+
*/
|
|
220
|
+
liveRegion: LiveRegion | null;
|
|
221
|
+
/**
|
|
222
|
+
* @internal
|
|
223
|
+
* The `id` of the currently highlighted tag
|
|
224
|
+
*/
|
|
225
|
+
highlightedTagId: string | null;
|
|
226
|
+
/**
|
|
227
|
+
* @internal
|
|
228
|
+
* The index of the deleted tag. Used to determine the next tag to focus.
|
|
229
|
+
*/
|
|
230
|
+
idx?: number | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* @internal
|
|
233
|
+
* The `id` of the currently edited tag
|
|
234
|
+
*/
|
|
235
|
+
editedTagId: string | null;
|
|
236
|
+
/**
|
|
237
|
+
* @internal
|
|
238
|
+
* The value of the currently edited tag
|
|
239
|
+
*/
|
|
240
|
+
editedTagValue: string;
|
|
241
|
+
/**
|
|
242
|
+
* @internal
|
|
243
|
+
* Whether the fieldset is disabled
|
|
244
|
+
*/
|
|
245
|
+
fieldsetDisabled: boolean;
|
|
247
246
|
}
|
|
247
|
+
interface MachineContext extends PublicContext, ComputedContext, PrivateContext {}
|
|
248
248
|
interface MachineState {
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
value: 'idle' | 'navigating:tag' | 'focused:input' | 'editing:tag';
|
|
250
|
+
tags: 'focused' | 'editing';
|
|
251
251
|
}
|
|
252
|
-
type State =
|
|
253
|
-
type Send =
|
|
252
|
+
type State = XState<MachineContext, MachineState>;
|
|
253
|
+
type Send = XSend<AnyEventObject>;
|
|
254
254
|
interface ItemProps {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
index: string | number;
|
|
256
|
+
value: string;
|
|
257
|
+
disabled?: boolean | undefined;
|
|
258
258
|
}
|
|
259
259
|
interface ItemState {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
260
|
+
/**
|
|
261
|
+
* The underlying id of the item
|
|
262
|
+
*/
|
|
263
|
+
id: string;
|
|
264
|
+
/**
|
|
265
|
+
* Whether the item is being edited
|
|
266
|
+
*/
|
|
267
|
+
editing: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Whether the item is highlighted
|
|
270
|
+
*/
|
|
271
|
+
highlighted: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Whether the item is disabled
|
|
274
|
+
*/
|
|
275
|
+
disabled: boolean;
|
|
276
276
|
}
|
|
277
277
|
interface MachineApi<T extends PropTypes = PropTypes> {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Whether the tags are empty
|
|
280
|
+
*/
|
|
281
|
+
empty: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* The value of the tags entry input.
|
|
284
|
+
*/
|
|
285
|
+
inputValue: string;
|
|
286
|
+
/**
|
|
287
|
+
* The value of the tags as an array of strings.
|
|
288
|
+
*/
|
|
289
|
+
value: string[];
|
|
290
|
+
/**
|
|
291
|
+
* The value of the tags as a string.
|
|
292
|
+
*/
|
|
293
|
+
valueAsString: string;
|
|
294
|
+
/**
|
|
295
|
+
* The number of the tags.
|
|
296
|
+
*/
|
|
297
|
+
count: number;
|
|
298
|
+
/**
|
|
299
|
+
* Whether the tags have reached the max limit.
|
|
300
|
+
*/
|
|
301
|
+
atMax: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Function to set the value of the tags.
|
|
304
|
+
*/
|
|
305
|
+
setValue: (value: string[]) => void;
|
|
306
|
+
/**
|
|
307
|
+
* Function to clear the value of the tags.
|
|
308
|
+
*/
|
|
309
|
+
clearValue: (id?: string) => void;
|
|
310
|
+
/**
|
|
311
|
+
* Function to add a tag to the tags.
|
|
312
|
+
*/
|
|
313
|
+
addValue: (value: string) => void;
|
|
314
|
+
/**
|
|
315
|
+
* Function to set the value of a tag at the given index.
|
|
316
|
+
*/
|
|
317
|
+
setValueAtIndex: (index: number, value: string) => void;
|
|
318
|
+
/**
|
|
319
|
+
* Function to set the value of the tags entry input.
|
|
320
|
+
*/
|
|
321
|
+
setInputValue: (value: string) => void;
|
|
322
|
+
/**
|
|
323
|
+
* Function to clear the value of the tags entry input.
|
|
324
|
+
*/
|
|
325
|
+
clearInputValue: () => void;
|
|
326
|
+
/**
|
|
327
|
+
* Function to focus the tags entry input.
|
|
328
|
+
*/
|
|
329
|
+
focus: () => void;
|
|
330
|
+
/**
|
|
331
|
+
* Returns the state of a tag
|
|
332
|
+
*/
|
|
333
|
+
getItemState: (props: ItemProps) => ItemState;
|
|
334
|
+
getRootProps: () => T['element'];
|
|
335
|
+
getLabelProps: () => T['label'];
|
|
336
|
+
getControlProps: () => T['element'];
|
|
337
|
+
getInputProps: () => T['input'];
|
|
338
|
+
getHiddenInputProps: () => T['input'];
|
|
339
|
+
getClearTriggerProps: () => T['button'];
|
|
340
|
+
getItemProps: (options: ItemProps) => T['element'];
|
|
341
|
+
getItemPreviewProps: (options: ItemProps) => T['element'];
|
|
342
|
+
getItemTextProps: (options: ItemProps) => T['element'];
|
|
343
|
+
getItemInputProps: (options: ItemProps) => T['input'];
|
|
344
|
+
getItemDeleteTriggerProps: (options: ItemProps) => T['button'];
|
|
345
345
|
}
|
|
346
|
-
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/connect.d.ts
|
|
347
348
|
declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): MachineApi<T>;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/machine.d.ts
|
|
351
|
+
declare function machine(userContext: UserDefinedContext): _destyler_xstate0.Machine<MachineContext, MachineState, _destyler_xstate0.AnyEventObject>;
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/props.d.ts
|
|
354
|
+
declare const props: ("id" | "ids" | "translations" | "maxLength" | "delimiter" | "autoFocus" | "disabled" | "readOnly" | "invalid" | "required" | "editable" | "inputValue" | "value" | "onValueChange" | "onInputValueChange" | "onHighlightChange" | "onValueInvalid" | "validate" | "blurBehavior" | "addOnPaste" | "max" | "allowOverflow" | "name" | "form" | "dir" | "getRootNode" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside")[];
|
|
355
|
+
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "id" | "ids" | "translations" | "maxLength" | "delimiter" | "autoFocus" | "disabled" | "readOnly" | "invalid" | "required" | "editable" | "inputValue" | "value" | "onValueChange" | "onInputValueChange" | "onHighlightChange" | "onValueInvalid" | "validate" | "blurBehavior" | "addOnPaste" | "max" | "allowOverflow" | "name" | "form" | "dir" | "getRootNode" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside">];
|
|
353
356
|
declare const itemProps: (keyof ItemProps)[];
|
|
354
357
|
declare const splitItemProps: <Props extends ItemProps>(props: Props) => [ItemProps, Omit<Props, keyof ItemProps>];
|
|
355
|
-
|
|
356
|
-
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type HighlightChangeDetails, type InputValueChangeDetails, type IntlTranslations, type ItemProps, type ItemState, type ValidateArgs, type ValidityChangeDetails, type ValueChangeDetails, anatomy, connect, itemProps, machine, props, splitItemProps, splitProps };
|
|
358
|
+
//#endregion
|
|
359
|
+
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type FocusOutsideEvent, type HighlightChangeDetails, type InputValueChangeDetails, type InteractOutsideEvent, type IntlTranslations, type ItemProps, type ItemState, type PointerDownOutsideEvent, type ValidateArgs, type ValidityChangeDetails, type ValueChangeDetails, anatomy, connect, itemProps, machine, props, splitItemProps, splitProps };
|