@xinghunm/compass-ui 0.8.1 → 0.8.2
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 +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +94 -94
- package/dist/index.mjs +88 -88
- package/package.json +2 -11
package/dist/index.d.mts
CHANGED
|
@@ -1161,7 +1161,7 @@ interface ModalBaseProps {
|
|
|
1161
1161
|
};
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
|
-
declare const Modal: (props: ModalBaseProps) => React__default.ReactPortal;
|
|
1164
|
+
declare const Modal: (props: ModalBaseProps) => React__default.ReactPortal | null;
|
|
1165
1165
|
|
|
1166
1166
|
interface ModalFuncProps extends Omit<ModalBaseProps, 'isOpen' | 'children'> {
|
|
1167
1167
|
title?: React__default.ReactNode;
|
|
@@ -1664,6 +1664,15 @@ type ThemeMode = 'light' | 'dark';
|
|
|
1664
1664
|
type DeepPartial<T> = {
|
|
1665
1665
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
1666
1666
|
};
|
|
1667
|
+
interface ThemeProviderProps {
|
|
1668
|
+
children: React__default.ReactNode;
|
|
1669
|
+
theme?: DeepPartial<Theme>;
|
|
1670
|
+
lightTheme?: DeepPartial<Theme>;
|
|
1671
|
+
darkTheme?: DeepPartial<Theme>;
|
|
1672
|
+
defaultMode?: ThemeMode;
|
|
1673
|
+
/** Whether to inject CSS variables to :root. Defaults to true. */
|
|
1674
|
+
global?: boolean;
|
|
1675
|
+
}
|
|
1667
1676
|
|
|
1668
1677
|
interface ModalLocale {
|
|
1669
1678
|
okText: string;
|
|
@@ -1755,6 +1764,15 @@ interface ConfigProviderProps {
|
|
|
1755
1764
|
|
|
1756
1765
|
declare const ConfigProvider: React__default.FC<ConfigProviderProps>;
|
|
1757
1766
|
|
|
1767
|
+
interface ThemeContextType {
|
|
1768
|
+
mode: ThemeMode;
|
|
1769
|
+
setMode: (mode: ThemeMode) => void;
|
|
1770
|
+
toggleTheme: () => void;
|
|
1771
|
+
theme: Theme;
|
|
1772
|
+
}
|
|
1773
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
1774
|
+
declare const useTheme: () => ThemeContextType;
|
|
1775
|
+
|
|
1758
1776
|
interface InputNumberProps extends Omit<InputFieldProps, 'onChange' | 'value' | 'defaultValue' | 'type' | 'allowClear'> {
|
|
1759
1777
|
/**
|
|
1760
1778
|
* The current value.
|
|
@@ -2066,4 +2084,4 @@ type TabsComponent = typeof Tabs & {
|
|
|
2066
2084
|
};
|
|
2067
2085
|
declare const _default: TabsComponent;
|
|
2068
2086
|
|
|
2069
|
-
export { AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Button, type ButtonProps, type ColumnType, ConfigProvider, type ConfigProviderProps, type DataNode, DatePicker, type DatePickerProps, type DateRangePickerProps, Dropdown, type DropdownProps, type FieldData, Form, type FormInstance, type FormItemProps, type FormProps, InputField, type InputFieldProps, InputNumber, type InputNumberProps, type ItemType, Menu, type MenuItemProps, type MenuProps, messageWithHook as Message, type MessageProps, ModalWithStatics as Modal, type ModalBaseProps as ModalProps, type NamePath, Pagination, type PaginationProps, Progress, type ProgressProps, type RowSelection, Select, type SelectOption, type SelectProps, type SelectValue, Steps, type StepsProps, type TabItem, type TabPaneProps, Table, type TableProps, _default as Tabs, type TabsProps, Tooltip, type TooltipPlacement, type TooltipProps, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity };
|
|
2087
|
+
export { AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Button, type ButtonProps, type ColumnType, ConfigProvider, type ConfigProviderProps, type DataNode, DatePicker, type DatePickerProps, type DateRangePickerProps, type DeepPartial, Dropdown, type DropdownProps, type FieldData, Form, type FormInstance, type FormItemProps, type FormProps, InputField, type InputFieldProps, InputNumber, type InputNumberProps, type ItemType, Menu, type MenuItemProps, type MenuProps, messageWithHook as Message, type MessageProps, ModalWithStatics as Modal, type ModalBaseProps as ModalProps, type NamePath, Pagination, type PaginationProps, Progress, type ProgressProps, type RowSelection, Select, type SelectOption, type SelectProps, type SelectValue, Steps, type StepsProps, type TabItem, type TabPaneProps, Table, type TableProps, _default as Tabs, type TabsProps, type Theme, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, type TooltipPlacement, type TooltipProps, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1161,7 +1161,7 @@ interface ModalBaseProps {
|
|
|
1161
1161
|
};
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
|
-
declare const Modal: (props: ModalBaseProps) => React__default.ReactPortal;
|
|
1164
|
+
declare const Modal: (props: ModalBaseProps) => React__default.ReactPortal | null;
|
|
1165
1165
|
|
|
1166
1166
|
interface ModalFuncProps extends Omit<ModalBaseProps, 'isOpen' | 'children'> {
|
|
1167
1167
|
title?: React__default.ReactNode;
|
|
@@ -1664,6 +1664,15 @@ type ThemeMode = 'light' | 'dark';
|
|
|
1664
1664
|
type DeepPartial<T> = {
|
|
1665
1665
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
1666
1666
|
};
|
|
1667
|
+
interface ThemeProviderProps {
|
|
1668
|
+
children: React__default.ReactNode;
|
|
1669
|
+
theme?: DeepPartial<Theme>;
|
|
1670
|
+
lightTheme?: DeepPartial<Theme>;
|
|
1671
|
+
darkTheme?: DeepPartial<Theme>;
|
|
1672
|
+
defaultMode?: ThemeMode;
|
|
1673
|
+
/** Whether to inject CSS variables to :root. Defaults to true. */
|
|
1674
|
+
global?: boolean;
|
|
1675
|
+
}
|
|
1667
1676
|
|
|
1668
1677
|
interface ModalLocale {
|
|
1669
1678
|
okText: string;
|
|
@@ -1755,6 +1764,15 @@ interface ConfigProviderProps {
|
|
|
1755
1764
|
|
|
1756
1765
|
declare const ConfigProvider: React__default.FC<ConfigProviderProps>;
|
|
1757
1766
|
|
|
1767
|
+
interface ThemeContextType {
|
|
1768
|
+
mode: ThemeMode;
|
|
1769
|
+
setMode: (mode: ThemeMode) => void;
|
|
1770
|
+
toggleTheme: () => void;
|
|
1771
|
+
theme: Theme;
|
|
1772
|
+
}
|
|
1773
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
1774
|
+
declare const useTheme: () => ThemeContextType;
|
|
1775
|
+
|
|
1758
1776
|
interface InputNumberProps extends Omit<InputFieldProps, 'onChange' | 'value' | 'defaultValue' | 'type' | 'allowClear'> {
|
|
1759
1777
|
/**
|
|
1760
1778
|
* The current value.
|
|
@@ -2066,4 +2084,4 @@ type TabsComponent = typeof Tabs & {
|
|
|
2066
2084
|
};
|
|
2067
2085
|
declare const _default: TabsComponent;
|
|
2068
2086
|
|
|
2069
|
-
export { AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Button, type ButtonProps, type ColumnType, ConfigProvider, type ConfigProviderProps, type DataNode, DatePicker, type DatePickerProps, type DateRangePickerProps, Dropdown, type DropdownProps, type FieldData, Form, type FormInstance, type FormItemProps, type FormProps, InputField, type InputFieldProps, InputNumber, type InputNumberProps, type ItemType, Menu, type MenuItemProps, type MenuProps, messageWithHook as Message, type MessageProps, ModalWithStatics as Modal, type ModalBaseProps as ModalProps, type NamePath, Pagination, type PaginationProps, Progress, type ProgressProps, type RowSelection, Select, type SelectOption, type SelectProps, type SelectValue, Steps, type StepsProps, type TabItem, type TabPaneProps, Table, type TableProps, _default as Tabs, type TabsProps, Tooltip, type TooltipPlacement, type TooltipProps, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity };
|
|
2087
|
+
export { AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Button, type ButtonProps, type ColumnType, ConfigProvider, type ConfigProviderProps, type DataNode, DatePicker, type DatePickerProps, type DateRangePickerProps, type DeepPartial, Dropdown, type DropdownProps, type FieldData, Form, type FormInstance, type FormItemProps, type FormProps, InputField, type InputFieldProps, InputNumber, type InputNumberProps, type ItemType, Menu, type MenuItemProps, type MenuProps, messageWithHook as Message, type MessageProps, ModalWithStatics as Modal, type ModalBaseProps as ModalProps, type NamePath, Pagination, type PaginationProps, Progress, type ProgressProps, type RowSelection, Select, type SelectOption, type SelectProps, type SelectValue, Steps, type StepsProps, type TabItem, type TabPaneProps, Table, type TableProps, _default as Tabs, type TabsProps, type Theme, type ThemeMode, ThemeProvider, type ThemeProviderProps, Tooltip, type TooltipPlacement, type TooltipProps, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity, useTheme };
|