@me1a/ui 2.2.11 → 2.6.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/dist/index.d.mts +8 -8
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/markdown-editor/index.d.mts +28 -0
- package/dist/markdown-editor/index.mjs +2 -0
- package/dist/markdown-editor/index.mjs.map +1 -0
- package/dist/rhf-select/index.d.mts +7 -7
- package/dist/rhf-select/index.mjs +1 -1
- package/dist/rhf-select/index.mjs.map +1 -1
- package/package.json +10 -1
package/dist/index.d.mts
CHANGED
|
@@ -733,27 +733,27 @@ type ResizableHandleProps = ComponentProps<typeof ResizablePrimitive.PanelResize
|
|
|
733
733
|
withHandle?: boolean;
|
|
734
734
|
};
|
|
735
735
|
|
|
736
|
-
type SelectOption = {
|
|
737
|
-
id:
|
|
736
|
+
type SelectOption<T extends string | number = string | number> = {
|
|
737
|
+
id: T;
|
|
738
738
|
label: string;
|
|
739
739
|
startIcon?: React$1.ReactNode;
|
|
740
740
|
endIcon?: React$1.ReactNode;
|
|
741
741
|
className?: string;
|
|
742
742
|
disabled?: boolean;
|
|
743
743
|
};
|
|
744
|
-
type SelectProps = {
|
|
744
|
+
type SelectProps<T extends string | number = string | number> = {
|
|
745
745
|
/** Whether the select is searchable */
|
|
746
746
|
searchable?: boolean;
|
|
747
747
|
/** Whether the select should take up the full width of its container */
|
|
748
748
|
fullWidth?: boolean;
|
|
749
749
|
/** Currently selected value */
|
|
750
|
-
value:
|
|
750
|
+
value: T;
|
|
751
751
|
/** Array of options to display in the select */
|
|
752
|
-
options: SelectOption[];
|
|
752
|
+
options: SelectOption<T>[];
|
|
753
753
|
/** Callback fired when the value changes */
|
|
754
|
-
onChange: (value:
|
|
754
|
+
onChange: (value: T) => void;
|
|
755
755
|
/** Render a custom CommandList for the select, if not provided, the select will render a default CommandList with the options */
|
|
756
|
-
renderCommandList?: (options: SelectOption[]) => React$1.ReactNode;
|
|
756
|
+
renderCommandList?: (options: SelectOption<T>[]) => React$1.ReactNode;
|
|
757
757
|
/** Placeholder text to show when no value is selected */
|
|
758
758
|
placeholder?: string;
|
|
759
759
|
/** Whether the select is disabled */
|
|
@@ -786,7 +786,7 @@ type SelectProps = {
|
|
|
786
786
|
* />
|
|
787
787
|
* ```
|
|
788
788
|
*/
|
|
789
|
-
declare function Select({ options, value, onChange, placeholder, disabled, required, error, className, fullWidth, searchable, id, renderCommandList }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
789
|
+
declare function Select<T extends string | number = string | number>({ options, value, onChange, placeholder, disabled, required, error, className, fullWidth, searchable, id, renderCommandList }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
790
790
|
|
|
791
791
|
type MultiSelectOption = {
|
|
792
792
|
id: string;
|
package/dist/index.mjs
CHANGED
|
@@ -35,6 +35,7 @@ export * from "./avatar/index.mjs"
|
|
|
35
35
|
export * from "./accordion/index.mjs"
|
|
36
36
|
export * from "./tabs/index.mjs"
|
|
37
37
|
export * from "./navigation-menu/index.mjs"
|
|
38
|
+
export * from "./markdown-editor/index.mjs"
|
|
38
39
|
export * from "./card/index.mjs"
|
|
39
40
|
export * from "./sidebar/index.mjs"
|
|
40
41
|
export * from "./dropdown-menu/index.mjs"
|