@refraction-ui/react 0.19.0 → 0.19.1
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.cjs +3741 -2609
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -18
- package/dist/index.js.map +1 -1
- package/dist/internal/command-input/index.d.cts +10 -2
- package/dist/internal/command-input/index.d.ts +10 -2
- package/dist/internal/react-date-picker/index.d.cts +1 -0
- package/dist/internal/react-date-picker/index.d.ts +1 -0
- package/dist/module-X3HTTRQK.js +6438 -0
- package/dist/module-X3HTTRQK.js.map +1 -0
- package/package.json +1 -1
- package/dist/module-XHEQRMQB.js +0 -5320
- package/dist/module-XHEQRMQB.js.map +0 -1
|
@@ -26,16 +26,24 @@ interface CommandInputOptions {
|
|
|
26
26
|
onCommandCommit?: (trigger: Trigger, text: string) => void;
|
|
27
27
|
onCommandCancel?: () => void;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Minimal keyboard-event surface {@link CommandInput.handleKeyDown} needs.
|
|
31
|
+
* DOM `KeyboardEvent`s and framework synthetic events (e.g. React's) both
|
|
32
|
+
* satisfy this structurally, so adapters can pass their events without casts.
|
|
33
|
+
*/
|
|
34
|
+
interface CommandKeyEvent {
|
|
35
|
+
preventDefault(): void;
|
|
36
|
+
}
|
|
29
37
|
declare class CommandInput {
|
|
30
38
|
private state;
|
|
31
39
|
private options;
|
|
32
40
|
constructor(options: CommandInputOptions);
|
|
33
41
|
handleInput(text: string, cursorPosition: number): void;
|
|
34
|
-
handleKeyDown(key: string, event?:
|
|
42
|
+
handleKeyDown(key: string, event?: CommandKeyEvent): void;
|
|
35
43
|
get value(): InputNode[];
|
|
36
44
|
getState(): CommandInputState;
|
|
37
45
|
private parseInput;
|
|
38
46
|
private notifyStateChange;
|
|
39
47
|
}
|
|
40
48
|
|
|
41
|
-
export { CommandInput, type CommandInputOptions, type CommandInputState, type CommandNode, type InputNode, type TextNode, type Trigger };
|
|
49
|
+
export { CommandInput, type CommandInputOptions, type CommandInputState, type CommandKeyEvent, type CommandNode, type InputNode, type TextNode, type Trigger };
|
|
@@ -26,16 +26,24 @@ interface CommandInputOptions {
|
|
|
26
26
|
onCommandCommit?: (trigger: Trigger, text: string) => void;
|
|
27
27
|
onCommandCancel?: () => void;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Minimal keyboard-event surface {@link CommandInput.handleKeyDown} needs.
|
|
31
|
+
* DOM `KeyboardEvent`s and framework synthetic events (e.g. React's) both
|
|
32
|
+
* satisfy this structurally, so adapters can pass their events without casts.
|
|
33
|
+
*/
|
|
34
|
+
interface CommandKeyEvent {
|
|
35
|
+
preventDefault(): void;
|
|
36
|
+
}
|
|
29
37
|
declare class CommandInput {
|
|
30
38
|
private state;
|
|
31
39
|
private options;
|
|
32
40
|
constructor(options: CommandInputOptions);
|
|
33
41
|
handleInput(text: string, cursorPosition: number): void;
|
|
34
|
-
handleKeyDown(key: string, event?:
|
|
42
|
+
handleKeyDown(key: string, event?: CommandKeyEvent): void;
|
|
35
43
|
get value(): InputNode[];
|
|
36
44
|
getState(): CommandInputState;
|
|
37
45
|
private parseInput;
|
|
38
46
|
private notifyStateChange;
|
|
39
47
|
}
|
|
40
48
|
|
|
41
|
-
export { CommandInput, type CommandInputOptions, type CommandInputState, type CommandNode, type InputNode, type TextNode, type Trigger };
|
|
49
|
+
export { CommandInput, type CommandInputOptions, type CommandInputState, type CommandKeyEvent, type CommandNode, type InputNode, type TextNode, type Trigger };
|
|
@@ -7,6 +7,7 @@ interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
|
|
|
7
7
|
minDate?: Date;
|
|
8
8
|
maxDate?: Date;
|
|
9
9
|
showTime?: boolean;
|
|
10
|
+
/** Display format for the selected-date text shown next to the input (e.g. 'DD/MM/YYYY'). The native input value itself stays ISO (`YYYY-MM-DD`). */
|
|
10
11
|
format?: string;
|
|
11
12
|
placeholder?: string;
|
|
12
13
|
}
|
|
@@ -7,6 +7,7 @@ interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
|
|
|
7
7
|
minDate?: Date;
|
|
8
8
|
maxDate?: Date;
|
|
9
9
|
showTime?: boolean;
|
|
10
|
+
/** Display format for the selected-date text shown next to the input (e.g. 'DD/MM/YYYY'). The native input value itself stays ISO (`YYYY-MM-DD`). */
|
|
10
11
|
format?: string;
|
|
11
12
|
placeholder?: string;
|
|
12
13
|
}
|