@mieweb/ui 0.1.0 → 0.2.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/LICENSE +39 -15
- package/README.md +9 -1
- package/dist/brands/index.cjs +7 -7
- package/dist/brands/index.js +2 -2
- package/dist/{chunk-CLNOI5J7.js → chunk-4SMSH4OY.js} +4 -4
- package/dist/chunk-4SMSH4OY.js.map +1 -0
- package/dist/chunk-4T2ZNPTC.js +220 -0
- package/dist/chunk-4T2ZNPTC.js.map +1 -0
- package/dist/chunk-5T3AWNHG.cjs +471 -0
- package/dist/chunk-5T3AWNHG.cjs.map +1 -0
- package/dist/{chunk-LEE3NMNP.cjs → chunk-5UUL5EEO.cjs} +131 -81
- package/dist/chunk-5UUL5EEO.cjs.map +1 -0
- package/dist/chunk-74K3RRU7.cjs +4 -0
- package/dist/{chunk-ZO46CFVN.cjs.map → chunk-74K3RRU7.cjs.map} +1 -1
- package/dist/{chunk-VWXGUNBR.cjs → chunk-AKTUXJPI.cjs} +107 -18
- package/dist/chunk-AKTUXJPI.cjs.map +1 -0
- package/dist/chunk-BV75DAKO.cjs +245 -0
- package/dist/chunk-BV75DAKO.cjs.map +1 -0
- package/dist/{chunk-6DP6RKUA.cjs → chunk-CLJZHS7Y.cjs} +2 -2
- package/dist/{chunk-6DP6RKUA.cjs.map → chunk-CLJZHS7Y.cjs.map} +1 -1
- package/dist/{chunk-NH2JVQ6V.cjs → chunk-I7L6CQXR.cjs} +21 -9
- package/dist/chunk-I7L6CQXR.cjs.map +1 -0
- package/dist/{chunk-BR2XGATJ.cjs → chunk-NNEFAUHV.cjs} +4 -4
- package/dist/chunk-NNEFAUHV.cjs.map +1 -0
- package/dist/{chunk-KJOFWJHV.js → chunk-QSMMFATL.js} +131 -81
- package/dist/chunk-QSMMFATL.js.map +1 -0
- package/dist/{chunk-FIUNOH6W.js → chunk-S4DK5WN6.js} +2 -2
- package/dist/{chunk-FIUNOH6W.js.map → chunk-S4DK5WN6.js.map} +1 -1
- package/dist/chunk-SCV7C55E.cjs +11 -0
- package/dist/chunk-SCV7C55E.cjs.map +1 -0
- package/dist/{chunk-D5IBXXF2.js → chunk-SD44QJIP.js} +20 -8
- package/dist/chunk-SD44QJIP.js.map +1 -0
- package/dist/{chunk-QBWVTJKF.js → chunk-UBRDKNLQ.js} +107 -18
- package/dist/chunk-UBRDKNLQ.js.map +1 -0
- package/dist/chunk-V2DF2GUE.js +3 -0
- package/dist/{chunk-ZQ4XMJH7.js.map → chunk-V2DF2GUE.js.map} +1 -1
- package/dist/chunk-VSQF22GL.js +9 -0
- package/dist/chunk-VSQF22GL.js.map +1 -0
- package/dist/chunk-XVZ4SLQB.js +447 -0
- package/dist/chunk-XVZ4SLQB.js.map +1 -0
- package/dist/components/AudioPlayer/index.cjs +6 -6
- package/dist/components/AudioPlayer/index.d.cts +5 -1
- package/dist/components/AudioPlayer/index.d.ts +5 -1
- package/dist/components/AudioPlayer/index.js +1 -1
- package/dist/components/Modal/index.cjs +11 -10
- package/dist/components/Modal/index.js +3 -2
- package/dist/components/RecordButton/index.cjs +4 -8
- package/dist/components/RecordButton/index.d.cts +57 -44
- package/dist/components/RecordButton/index.d.ts +57 -44
- package/dist/components/RecordButton/index.js +1 -1
- package/dist/components/Select/index.cjs +3 -4
- package/dist/components/Select/index.js +1 -2
- package/dist/components/Slider/index.cjs +25 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.cts +82 -0
- package/dist/components/Slider/index.d.ts +82 -0
- package/dist/components/Slider/index.js +4 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Spinner/index.d.cts +1 -1
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/hooks/index.cjs +3 -2
- package/dist/hooks/index.js +2 -1
- package/dist/index.cjs +1899 -1238
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -25
- package/dist/index.d.ts +68 -25
- package/dist/index.js +1793 -1148
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/index.cjs +6 -1
- package/dist/utils/index.d.cts +14 -1
- package/dist/utils/index.d.ts +14 -1
- package/dist/utils/index.js +2 -1
- package/package.json +7 -7
- package/dist/chunk-BR2XGATJ.cjs.map +0 -1
- package/dist/chunk-CLNOI5J7.js.map +0 -1
- package/dist/chunk-D5IBXXF2.js.map +0 -1
- package/dist/chunk-FQ5G7J24.js +0 -297
- package/dist/chunk-FQ5G7J24.js.map +0 -1
- package/dist/chunk-HLW3XD5R.cjs +0 -322
- package/dist/chunk-HLW3XD5R.cjs.map +0 -1
- package/dist/chunk-KJOFWJHV.js.map +0 -1
- package/dist/chunk-LEE3NMNP.cjs.map +0 -1
- package/dist/chunk-NH2JVQ6V.cjs.map +0 -1
- package/dist/chunk-QBWVTJKF.js.map +0 -1
- package/dist/chunk-VWXGUNBR.cjs.map +0 -1
- package/dist/chunk-ZO46CFVN.cjs +0 -4
- package/dist/chunk-ZQ4XMJH7.js +0 -3
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunkI7L6CQXR_cjs = require('../../chunk-I7L6CQXR.cjs');
|
|
4
|
+
require('../../chunk-NNEFAUHV.cjs');
|
|
5
5
|
require('../../chunk-FHY3K6PL.cjs');
|
|
6
|
+
require('../../chunk-SCV7C55E.cjs');
|
|
6
7
|
require('../../chunk-OR5DRJCW.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
Object.defineProperty(exports, "Modal", {
|
|
11
12
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkI7L6CQXR_cjs.Modal; }
|
|
13
14
|
});
|
|
14
15
|
Object.defineProperty(exports, "ModalBody", {
|
|
15
16
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkI7L6CQXR_cjs.ModalBody; }
|
|
17
18
|
});
|
|
18
19
|
Object.defineProperty(exports, "ModalClose", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkI7L6CQXR_cjs.ModalClose; }
|
|
21
22
|
});
|
|
22
23
|
Object.defineProperty(exports, "ModalFooter", {
|
|
23
24
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkI7L6CQXR_cjs.ModalFooter; }
|
|
25
26
|
});
|
|
26
27
|
Object.defineProperty(exports, "ModalHeader", {
|
|
27
28
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkI7L6CQXR_cjs.ModalHeader; }
|
|
29
30
|
});
|
|
30
31
|
Object.defineProperty(exports, "ModalTitle", {
|
|
31
32
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkI7L6CQXR_cjs.ModalTitle; }
|
|
33
34
|
});
|
|
34
35
|
Object.defineProperty(exports, "modalContentVariants", {
|
|
35
36
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkI7L6CQXR_cjs.modalContentVariants; }
|
|
37
38
|
});
|
|
38
39
|
Object.defineProperty(exports, "modalOverlayVariants", {
|
|
39
40
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkI7L6CQXR_cjs.modalOverlayVariants; }
|
|
41
42
|
});
|
|
42
43
|
//# sourceMappingURL=index.cjs.map
|
|
43
44
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from '../../chunk-SD44QJIP.js';
|
|
2
|
+
import '../../chunk-4SMSH4OY.js';
|
|
3
3
|
import '../../chunk-T4ME7QCT.js';
|
|
4
|
+
import '../../chunk-VSQF22GL.js';
|
|
4
5
|
import '../../chunk-F3SOEIN2.js';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5T3AWNHG_cjs = require('../../chunk-5T3AWNHG.cjs');
|
|
4
4
|
require('../../chunk-OR5DRJCW.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "RecordButton", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk5T3AWNHG_cjs.RecordButton; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "formatDuration", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk5T3AWNHG_cjs.formatDuration; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "recordButtonVariants", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "recordingIndicatorVariants", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return chunkHLW3XD5R_cjs.recordingIndicatorVariants; }
|
|
18
|
+
get: function () { return chunk5T3AWNHG_cjs.recordButtonVariants; }
|
|
23
19
|
});
|
|
24
20
|
//# sourceMappingURL=index.cjs.map
|
|
25
21
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import * as React from 'react';
|
|
4
|
-
import { VariantProps } from 'class-variance-authority';
|
|
5
3
|
|
|
6
|
-
type RecordButtonState = 'idle' | 'recording' | 'processing';
|
|
4
|
+
type RecordButtonState = 'idle' | 'recording' | 'processing' | 'disabled' | 'error' | 'success';
|
|
5
|
+
type RecordButtonVariant = 'default' | 'outline' | 'ghost' | 'minimal';
|
|
6
|
+
type RecordButtonSize = 'sm' | 'md' | 'lg';
|
|
7
7
|
/** Transcription state for integration with transcription services */
|
|
8
8
|
type TranscriptionState = 'idle' | 'recording' | 'transcribing' | 'streaming' | 'complete' | 'error';
|
|
9
9
|
interface TranscriptionResult {
|
|
@@ -14,23 +14,17 @@ interface TranscriptionResult {
|
|
|
14
14
|
/** Confidence score (0-1) if available */
|
|
15
15
|
confidence?: number;
|
|
16
16
|
}
|
|
17
|
-
interface RecordButtonProps extends
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
/** Whether the button is disabled */
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/** Additional class name */
|
|
31
|
-
className?: string;
|
|
32
|
-
/** Accessible label */
|
|
33
|
-
'aria-label'?: string;
|
|
17
|
+
interface RecordButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
18
|
+
/** Current state of the button */
|
|
19
|
+
state?: RecordButtonState;
|
|
20
|
+
/** Size of the button */
|
|
21
|
+
size?: RecordButtonSize;
|
|
22
|
+
/** Visual style variant */
|
|
23
|
+
variant?: RecordButtonVariant;
|
|
24
|
+
/** Show waveform bars when recording (instead of stop icon) */
|
|
25
|
+
showWaveform?: boolean;
|
|
26
|
+
/** Show pulse rings when recording */
|
|
27
|
+
showPulse?: boolean;
|
|
34
28
|
/** Show recording duration while recording */
|
|
35
29
|
showDuration?: boolean;
|
|
36
30
|
/** Custom idle icon */
|
|
@@ -41,43 +35,62 @@ interface RecordButtonProps extends VariantProps<typeof recordButtonVariants> {
|
|
|
41
35
|
transcriptionState?: TranscriptionState;
|
|
42
36
|
/** Show transcription state indicator */
|
|
43
37
|
showTranscriptionState?: boolean;
|
|
38
|
+
/** Callback when recording is complete with the audio blob */
|
|
39
|
+
onRecordingComplete?: (blob: Blob, duration: number) => void;
|
|
40
|
+
/** Callback when recording starts */
|
|
41
|
+
onRecordingStart?: () => void;
|
|
42
|
+
/** Callback when a recording error occurs */
|
|
43
|
+
onRecordingError?: (error: Error) => void;
|
|
44
|
+
/** Maximum recording duration in seconds (0 for unlimited) */
|
|
45
|
+
maxDuration?: number;
|
|
46
|
+
/** Audio MIME type */
|
|
47
|
+
mimeType?: string;
|
|
44
48
|
}
|
|
45
49
|
declare const recordButtonVariants: (props?: ({
|
|
46
|
-
variant?: "
|
|
47
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
48
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
49
|
-
declare const recordingIndicatorVariants: (props?: ({
|
|
50
|
+
variant?: "ghost" | "outline" | "default" | "minimal" | null | undefined;
|
|
50
51
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
51
52
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
52
53
|
declare function formatDuration(seconds: number): string;
|
|
53
54
|
/**
|
|
54
|
-
* A
|
|
55
|
-
*
|
|
55
|
+
* A voice recording button with 6 states and 4 visual variants.
|
|
56
|
+
* Supports pulse animations, waveform visualization, and transcription integration.
|
|
57
|
+
*
|
|
58
|
+
* ## Controlled vs Uncontrolled Mode
|
|
59
|
+
*
|
|
60
|
+
* **Uncontrolled mode** (default): The component manages its own recording state.
|
|
61
|
+
* Use `onRecordingComplete`, `onRecordingStart`, and `onRecordingError` callbacks.
|
|
62
|
+
*
|
|
63
|
+
* **Controlled mode**: When the `state` prop is provided, the component becomes
|
|
64
|
+
* controlled and you must manage state changes externally. Note: In controlled mode,
|
|
65
|
+
* the internal MediaRecorder functionality is disabled - you must implement your own
|
|
66
|
+
* recording logic.
|
|
67
|
+
*
|
|
68
|
+
* ## State Precedence
|
|
69
|
+
*
|
|
70
|
+
* When multiple state-controlling props are provided, they follow this precedence:
|
|
71
|
+
* 1. `disabled` prop (highest priority)
|
|
72
|
+
* 2. `transcriptionState` prop
|
|
73
|
+
* 3. `state` prop
|
|
74
|
+
* 4. Internal state (uncontrolled)
|
|
56
75
|
*
|
|
57
76
|
* @example
|
|
58
77
|
* ```tsx
|
|
59
|
-
* //
|
|
78
|
+
* // Uncontrolled with recording callbacks
|
|
60
79
|
* <RecordButton
|
|
61
|
-
* onRecordingComplete={(blob, duration) =>
|
|
62
|
-
*
|
|
63
|
-
* }}
|
|
80
|
+
* onRecordingComplete={(blob, duration) => console.log('Recorded:', blob)}
|
|
81
|
+
* onRecordingError={(error) => console.error('Recording failed:', error)}
|
|
64
82
|
* />
|
|
65
83
|
*
|
|
66
|
-
* //
|
|
67
|
-
* <
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* </div>
|
|
72
|
-
* </div>
|
|
84
|
+
* // Controlled state (requires external recording implementation)
|
|
85
|
+
* <RecordButton state="idle" onClick={handleClick} />
|
|
86
|
+
*
|
|
87
|
+
* // Different variants
|
|
88
|
+
* <RecordButton variant="outline" size="lg" />
|
|
73
89
|
*
|
|
74
|
-
* // With
|
|
75
|
-
* <RecordButton
|
|
90
|
+
* // With waveform animation
|
|
91
|
+
* <RecordButton state="recording" showWaveform showPulse />
|
|
76
92
|
* ```
|
|
77
93
|
*/
|
|
78
|
-
declare
|
|
79
|
-
declare namespace RecordButton {
|
|
80
|
-
var displayName: string;
|
|
81
|
-
}
|
|
94
|
+
declare const RecordButton: React.ForwardRefExoticComponent<RecordButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
82
95
|
|
|
83
|
-
export { RecordButton, type RecordButtonProps, type RecordButtonState, type TranscriptionResult, type TranscriptionState, formatDuration, recordButtonVariants
|
|
96
|
+
export { RecordButton, type RecordButtonProps, type RecordButtonSize, type RecordButtonState, type RecordButtonVariant, type TranscriptionResult, type TranscriptionState, formatDuration, recordButtonVariants };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import * as React from 'react';
|
|
4
|
-
import { VariantProps } from 'class-variance-authority';
|
|
5
3
|
|
|
6
|
-
type RecordButtonState = 'idle' | 'recording' | 'processing';
|
|
4
|
+
type RecordButtonState = 'idle' | 'recording' | 'processing' | 'disabled' | 'error' | 'success';
|
|
5
|
+
type RecordButtonVariant = 'default' | 'outline' | 'ghost' | 'minimal';
|
|
6
|
+
type RecordButtonSize = 'sm' | 'md' | 'lg';
|
|
7
7
|
/** Transcription state for integration with transcription services */
|
|
8
8
|
type TranscriptionState = 'idle' | 'recording' | 'transcribing' | 'streaming' | 'complete' | 'error';
|
|
9
9
|
interface TranscriptionResult {
|
|
@@ -14,23 +14,17 @@ interface TranscriptionResult {
|
|
|
14
14
|
/** Confidence score (0-1) if available */
|
|
15
15
|
confidence?: number;
|
|
16
16
|
}
|
|
17
|
-
interface RecordButtonProps extends
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
/** Whether the button is disabled */
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/** Additional class name */
|
|
31
|
-
className?: string;
|
|
32
|
-
/** Accessible label */
|
|
33
|
-
'aria-label'?: string;
|
|
17
|
+
interface RecordButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
18
|
+
/** Current state of the button */
|
|
19
|
+
state?: RecordButtonState;
|
|
20
|
+
/** Size of the button */
|
|
21
|
+
size?: RecordButtonSize;
|
|
22
|
+
/** Visual style variant */
|
|
23
|
+
variant?: RecordButtonVariant;
|
|
24
|
+
/** Show waveform bars when recording (instead of stop icon) */
|
|
25
|
+
showWaveform?: boolean;
|
|
26
|
+
/** Show pulse rings when recording */
|
|
27
|
+
showPulse?: boolean;
|
|
34
28
|
/** Show recording duration while recording */
|
|
35
29
|
showDuration?: boolean;
|
|
36
30
|
/** Custom idle icon */
|
|
@@ -41,43 +35,62 @@ interface RecordButtonProps extends VariantProps<typeof recordButtonVariants> {
|
|
|
41
35
|
transcriptionState?: TranscriptionState;
|
|
42
36
|
/** Show transcription state indicator */
|
|
43
37
|
showTranscriptionState?: boolean;
|
|
38
|
+
/** Callback when recording is complete with the audio blob */
|
|
39
|
+
onRecordingComplete?: (blob: Blob, duration: number) => void;
|
|
40
|
+
/** Callback when recording starts */
|
|
41
|
+
onRecordingStart?: () => void;
|
|
42
|
+
/** Callback when a recording error occurs */
|
|
43
|
+
onRecordingError?: (error: Error) => void;
|
|
44
|
+
/** Maximum recording duration in seconds (0 for unlimited) */
|
|
45
|
+
maxDuration?: number;
|
|
46
|
+
/** Audio MIME type */
|
|
47
|
+
mimeType?: string;
|
|
44
48
|
}
|
|
45
49
|
declare const recordButtonVariants: (props?: ({
|
|
46
|
-
variant?: "
|
|
47
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
48
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
49
|
-
declare const recordingIndicatorVariants: (props?: ({
|
|
50
|
+
variant?: "ghost" | "outline" | "default" | "minimal" | null | undefined;
|
|
50
51
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
51
52
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
52
53
|
declare function formatDuration(seconds: number): string;
|
|
53
54
|
/**
|
|
54
|
-
* A
|
|
55
|
-
*
|
|
55
|
+
* A voice recording button with 6 states and 4 visual variants.
|
|
56
|
+
* Supports pulse animations, waveform visualization, and transcription integration.
|
|
57
|
+
*
|
|
58
|
+
* ## Controlled vs Uncontrolled Mode
|
|
59
|
+
*
|
|
60
|
+
* **Uncontrolled mode** (default): The component manages its own recording state.
|
|
61
|
+
* Use `onRecordingComplete`, `onRecordingStart`, and `onRecordingError` callbacks.
|
|
62
|
+
*
|
|
63
|
+
* **Controlled mode**: When the `state` prop is provided, the component becomes
|
|
64
|
+
* controlled and you must manage state changes externally. Note: In controlled mode,
|
|
65
|
+
* the internal MediaRecorder functionality is disabled - you must implement your own
|
|
66
|
+
* recording logic.
|
|
67
|
+
*
|
|
68
|
+
* ## State Precedence
|
|
69
|
+
*
|
|
70
|
+
* When multiple state-controlling props are provided, they follow this precedence:
|
|
71
|
+
* 1. `disabled` prop (highest priority)
|
|
72
|
+
* 2. `transcriptionState` prop
|
|
73
|
+
* 3. `state` prop
|
|
74
|
+
* 4. Internal state (uncontrolled)
|
|
56
75
|
*
|
|
57
76
|
* @example
|
|
58
77
|
* ```tsx
|
|
59
|
-
* //
|
|
78
|
+
* // Uncontrolled with recording callbacks
|
|
60
79
|
* <RecordButton
|
|
61
|
-
* onRecordingComplete={(blob, duration) =>
|
|
62
|
-
*
|
|
63
|
-
* }}
|
|
80
|
+
* onRecordingComplete={(blob, duration) => console.log('Recorded:', blob)}
|
|
81
|
+
* onRecordingError={(error) => console.error('Recording failed:', error)}
|
|
64
82
|
* />
|
|
65
83
|
*
|
|
66
|
-
* //
|
|
67
|
-
* <
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* </div>
|
|
72
|
-
* </div>
|
|
84
|
+
* // Controlled state (requires external recording implementation)
|
|
85
|
+
* <RecordButton state="idle" onClick={handleClick} />
|
|
86
|
+
*
|
|
87
|
+
* // Different variants
|
|
88
|
+
* <RecordButton variant="outline" size="lg" />
|
|
73
89
|
*
|
|
74
|
-
* // With
|
|
75
|
-
* <RecordButton
|
|
90
|
+
* // With waveform animation
|
|
91
|
+
* <RecordButton state="recording" showWaveform showPulse />
|
|
76
92
|
* ```
|
|
77
93
|
*/
|
|
78
|
-
declare
|
|
79
|
-
declare namespace RecordButton {
|
|
80
|
-
var displayName: string;
|
|
81
|
-
}
|
|
94
|
+
declare const RecordButton: React.ForwardRefExoticComponent<RecordButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
82
95
|
|
|
83
|
-
export { RecordButton, type RecordButtonProps, type RecordButtonState, type TranscriptionResult, type TranscriptionState, formatDuration, recordButtonVariants
|
|
96
|
+
export { RecordButton, type RecordButtonProps, type RecordButtonSize, type RecordButtonState, type RecordButtonVariant, type TranscriptionResult, type TranscriptionState, formatDuration, recordButtonVariants };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { RecordButton, formatDuration, recordButtonVariants
|
|
1
|
+
export { RecordButton, formatDuration, recordButtonVariants } from '../../chunk-XVZ4SLQB.js';
|
|
2
2
|
import '../../chunk-F3SOEIN2.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-SWMRCGL4.cjs');
|
|
3
|
+
var chunk5UUL5EEO_cjs = require('../../chunk-5UUL5EEO.cjs');
|
|
5
4
|
require('../../chunk-FHY3K6PL.cjs');
|
|
6
5
|
require('../../chunk-OR5DRJCW.cjs');
|
|
7
6
|
|
|
@@ -9,11 +8,11 @@ require('../../chunk-OR5DRJCW.cjs');
|
|
|
9
8
|
|
|
10
9
|
Object.defineProperty(exports, "Select", {
|
|
11
10
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunk5UUL5EEO_cjs.Select; }
|
|
13
12
|
});
|
|
14
13
|
Object.defineProperty(exports, "selectTriggerVariants", {
|
|
15
14
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunk5UUL5EEO_cjs.selectTriggerVariants; }
|
|
17
16
|
});
|
|
18
17
|
//# sourceMappingURL=index.cjs.map
|
|
19
18
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { Select, selectTriggerVariants } from '../../chunk-
|
|
2
|
-
import '../../chunk-OT36EMM5.js';
|
|
1
|
+
export { Select, selectTriggerVariants } from '../../chunk-QSMMFATL.js';
|
|
3
2
|
import '../../chunk-T4ME7QCT.js';
|
|
4
3
|
import '../../chunk-F3SOEIN2.js';
|
|
5
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkBV75DAKO_cjs = require('../../chunk-BV75DAKO.cjs');
|
|
4
|
+
require('../../chunk-OR5DRJCW.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "Slider", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkBV75DAKO_cjs.Slider; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "sliderRangeVariants", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkBV75DAKO_cjs.sliderRangeVariants; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "sliderThumbVariants", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkBV75DAKO_cjs.sliderThumbVariants; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "sliderTrackVariants", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkBV75DAKO_cjs.sliderTrackVariants; }
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=index.cjs.map
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const sliderTrackVariants: (props?: ({
|
|
6
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
declare const sliderRangeVariants: (props?: ({
|
|
9
|
+
variant?: "danger" | "default" | "success" | "warning" | "neutral" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
declare const sliderThumbVariants: (props?: ({
|
|
12
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
13
|
+
variant?: "danger" | "default" | "success" | "warning" | "neutral" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface SliderProps extends VariantProps<typeof sliderTrackVariants>, VariantProps<typeof sliderRangeVariants> {
|
|
16
|
+
/** Current value (controlled) */
|
|
17
|
+
value?: number;
|
|
18
|
+
/** Default value (uncontrolled) */
|
|
19
|
+
defaultValue?: number;
|
|
20
|
+
/** Minimum value */
|
|
21
|
+
min?: number;
|
|
22
|
+
/** Maximum value */
|
|
23
|
+
max?: number;
|
|
24
|
+
/** Step increment */
|
|
25
|
+
step?: number;
|
|
26
|
+
/** Callback when value changes */
|
|
27
|
+
onValueChange?: (value: number) => void;
|
|
28
|
+
/** Callback when interaction ends (mouseup / touchend) */
|
|
29
|
+
onValueCommit?: (value: number) => void;
|
|
30
|
+
/** Whether the slider is disabled */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Label for the slider */
|
|
33
|
+
label?: string;
|
|
34
|
+
/** Show the current value */
|
|
35
|
+
showValue?: boolean;
|
|
36
|
+
/** Format the displayed value */
|
|
37
|
+
formatValue?: (value: number) => string;
|
|
38
|
+
/** Description text below the label */
|
|
39
|
+
description?: string;
|
|
40
|
+
/** Min label displayed below the track (left) */
|
|
41
|
+
minLabel?: string;
|
|
42
|
+
/** Max label displayed below the track (right) */
|
|
43
|
+
maxLabel?: string;
|
|
44
|
+
/** Additional class name for the root container */
|
|
45
|
+
className?: string;
|
|
46
|
+
/** Additional class name for the track */
|
|
47
|
+
trackClassName?: string;
|
|
48
|
+
/** ID for the underlying input */
|
|
49
|
+
id?: string;
|
|
50
|
+
/** Name for form submission */
|
|
51
|
+
name?: string;
|
|
52
|
+
/** Accessible label for the slider */
|
|
53
|
+
'aria-label'?: string;
|
|
54
|
+
/** ID of the element that labels the slider */
|
|
55
|
+
'aria-labelledby'?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A fully branded, accessible slider/range input component.
|
|
59
|
+
*
|
|
60
|
+
* Uses brand design tokens for colors, border-radius, and sizing.
|
|
61
|
+
* Supports controlled and uncontrolled usage, labels, descriptions,
|
|
62
|
+
* min/max labels, value display, and multiple color variants.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Slider label="Volume" min={0} max={100} defaultValue={50} />
|
|
67
|
+
* <Slider
|
|
68
|
+
* label="Border Radius"
|
|
69
|
+
* min={0}
|
|
70
|
+
* max={32}
|
|
71
|
+
* value={radius}
|
|
72
|
+
* onValueChange={setRadius}
|
|
73
|
+
* showValue
|
|
74
|
+
* formatValue={(v) => `${v}px`}
|
|
75
|
+
* minLabel="Square"
|
|
76
|
+
* maxLabel="Rounded"
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
|
|
81
|
+
|
|
82
|
+
export { Slider, type SliderProps, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const sliderTrackVariants: (props?: ({
|
|
6
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
declare const sliderRangeVariants: (props?: ({
|
|
9
|
+
variant?: "danger" | "default" | "success" | "warning" | "neutral" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
declare const sliderThumbVariants: (props?: ({
|
|
12
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
13
|
+
variant?: "danger" | "default" | "success" | "warning" | "neutral" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface SliderProps extends VariantProps<typeof sliderTrackVariants>, VariantProps<typeof sliderRangeVariants> {
|
|
16
|
+
/** Current value (controlled) */
|
|
17
|
+
value?: number;
|
|
18
|
+
/** Default value (uncontrolled) */
|
|
19
|
+
defaultValue?: number;
|
|
20
|
+
/** Minimum value */
|
|
21
|
+
min?: number;
|
|
22
|
+
/** Maximum value */
|
|
23
|
+
max?: number;
|
|
24
|
+
/** Step increment */
|
|
25
|
+
step?: number;
|
|
26
|
+
/** Callback when value changes */
|
|
27
|
+
onValueChange?: (value: number) => void;
|
|
28
|
+
/** Callback when interaction ends (mouseup / touchend) */
|
|
29
|
+
onValueCommit?: (value: number) => void;
|
|
30
|
+
/** Whether the slider is disabled */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Label for the slider */
|
|
33
|
+
label?: string;
|
|
34
|
+
/** Show the current value */
|
|
35
|
+
showValue?: boolean;
|
|
36
|
+
/** Format the displayed value */
|
|
37
|
+
formatValue?: (value: number) => string;
|
|
38
|
+
/** Description text below the label */
|
|
39
|
+
description?: string;
|
|
40
|
+
/** Min label displayed below the track (left) */
|
|
41
|
+
minLabel?: string;
|
|
42
|
+
/** Max label displayed below the track (right) */
|
|
43
|
+
maxLabel?: string;
|
|
44
|
+
/** Additional class name for the root container */
|
|
45
|
+
className?: string;
|
|
46
|
+
/** Additional class name for the track */
|
|
47
|
+
trackClassName?: string;
|
|
48
|
+
/** ID for the underlying input */
|
|
49
|
+
id?: string;
|
|
50
|
+
/** Name for form submission */
|
|
51
|
+
name?: string;
|
|
52
|
+
/** Accessible label for the slider */
|
|
53
|
+
'aria-label'?: string;
|
|
54
|
+
/** ID of the element that labels the slider */
|
|
55
|
+
'aria-labelledby'?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A fully branded, accessible slider/range input component.
|
|
59
|
+
*
|
|
60
|
+
* Uses brand design tokens for colors, border-radius, and sizing.
|
|
61
|
+
* Supports controlled and uncontrolled usage, labels, descriptions,
|
|
62
|
+
* min/max labels, value display, and multiple color variants.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Slider label="Volume" min={0} max={100} defaultValue={50} />
|
|
67
|
+
* <Slider
|
|
68
|
+
* label="Border Radius"
|
|
69
|
+
* min={0}
|
|
70
|
+
* max={32}
|
|
71
|
+
* value={radius}
|
|
72
|
+
* onValueChange={setRadius}
|
|
73
|
+
* showValue
|
|
74
|
+
* formatValue={(v) => `${v}px`}
|
|
75
|
+
* minLabel="Square"
|
|
76
|
+
* maxLabel="Rounded"
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
|
|
81
|
+
|
|
82
|
+
export { Slider, type SliderProps, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
|
|
6
6
|
declare const spinnerVariants: (props?: ({
|
|
7
7
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
8
|
-
variant?: "
|
|
8
|
+
variant?: "white" | "default" | "muted" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof spinnerVariants> {
|
|
11
11
|
/** Accessible label for the spinner */
|
|
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
|
|
6
6
|
declare const spinnerVariants: (props?: ({
|
|
7
7
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
8
|
-
variant?: "
|
|
8
|
+
variant?: "white" | "default" | "muted" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof spinnerVariants> {
|
|
11
11
|
/** Accessible label for the spinner */
|