@xinghunm/compass-ui 0.8.0 → 0.8.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.d.mts CHANGED
@@ -808,6 +808,108 @@ interface DropdownProps {
808
808
 
809
809
  declare const Dropdown: React__default.FC<DropdownProps>;
810
810
 
811
+ type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
812
+ interface TooltipClassNames {
813
+ /**
814
+ * Custom class name for the trigger root.
815
+ */
816
+ root?: string;
817
+ /**
818
+ * Custom class name for the floating overlay container.
819
+ */
820
+ overlay?: string;
821
+ /**
822
+ * Custom class name for the tooltip content node.
823
+ */
824
+ content?: string;
825
+ /**
826
+ * Custom class name for the tooltip arrow node.
827
+ */
828
+ arrow?: string;
829
+ }
830
+ interface TooltipStyles {
831
+ /**
832
+ * Inline style applied to the trigger root.
833
+ */
834
+ root?: React__default.CSSProperties;
835
+ /**
836
+ * Inline style applied to the floating overlay container.
837
+ */
838
+ overlay?: React__default.CSSProperties;
839
+ /**
840
+ * Inline style applied to the tooltip content node.
841
+ */
842
+ content?: React__default.CSSProperties;
843
+ /**
844
+ * Inline style applied to the tooltip arrow node.
845
+ */
846
+ arrow?: React__default.CSSProperties;
847
+ }
848
+ interface TooltipProps {
849
+ /**
850
+ * Tooltip content
851
+ */
852
+ content?: React__default.ReactNode;
853
+ /**
854
+ * Trigger element. Fragment and non-element nodes will be wrapped with a span.
855
+ */
856
+ children: React__default.ReactNode;
857
+ /**
858
+ * Trigger mode
859
+ * @default 'hover'
860
+ */
861
+ trigger?: 'hover' | 'click';
862
+ /**
863
+ * Tooltip placement
864
+ * @default 'top'
865
+ */
866
+ placement?: TooltipPlacement;
867
+ /**
868
+ * Controlled open state
869
+ */
870
+ open?: boolean;
871
+ /**
872
+ * Default open state
873
+ */
874
+ defaultOpen?: boolean;
875
+ /**
876
+ * Callback when open state changes
877
+ */
878
+ onOpenChange?: (open: boolean) => void;
879
+ /**
880
+ * Whether the tooltip is disabled
881
+ */
882
+ disabled?: boolean;
883
+ /**
884
+ * Mouse enter delay in ms
885
+ * @default 0
886
+ */
887
+ mouseEnterDelay?: number;
888
+ /**
889
+ * Mouse leave delay in ms
890
+ * @default 100
891
+ */
892
+ mouseLeaveDelay?: number;
893
+ /**
894
+ * Custom root element class name
895
+ */
896
+ className?: string;
897
+ /**
898
+ * Custom root element style
899
+ */
900
+ style?: React__default.CSSProperties;
901
+ /**
902
+ * Semantic class names
903
+ */
904
+ classNames?: TooltipClassNames;
905
+ /**
906
+ * Semantic styles
907
+ */
908
+ styles?: TooltipStyles;
909
+ }
910
+
911
+ declare const Tooltip: React__default.FC<TooltipProps>;
912
+
811
913
  interface InputFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
812
914
  /**
813
915
  * The type of input.
@@ -1322,6 +1424,7 @@ interface Theme {
1322
1424
  progress: ProgressTheme;
1323
1425
  steps: StepsTheme;
1324
1426
  input: InputTheme;
1427
+ tooltip: TooltipTheme;
1325
1428
  dropdown: DropdownTheme;
1326
1429
  menu: MenuTheme;
1327
1430
  datePicker: DatePickerTheme;
@@ -1540,6 +1643,16 @@ interface InputTheme {
1540
1643
  activeBorderColor: string;
1541
1644
  hoverBorderColor: string;
1542
1645
  }
1646
+ interface TooltipTheme {
1647
+ zIndex: number;
1648
+ backgroundColor: string;
1649
+ contentColor: string;
1650
+ boxShadow: string;
1651
+ borderRadius: string;
1652
+ padding: string;
1653
+ maxWidth: string;
1654
+ fontSize: string;
1655
+ }
1543
1656
  interface DropdownTheme {
1544
1657
  zIndex: number;
1545
1658
  backgroundColor: string;
@@ -1953,4 +2066,4 @@ type TabsComponent = typeof Tabs & {
1953
2066
  };
1954
2067
  declare const _default: TabsComponent;
1955
2068
 
1956
- 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, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity };
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 };
package/dist/index.d.ts CHANGED
@@ -808,6 +808,108 @@ interface DropdownProps {
808
808
 
809
809
  declare const Dropdown: React__default.FC<DropdownProps>;
810
810
 
811
+ type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
812
+ interface TooltipClassNames {
813
+ /**
814
+ * Custom class name for the trigger root.
815
+ */
816
+ root?: string;
817
+ /**
818
+ * Custom class name for the floating overlay container.
819
+ */
820
+ overlay?: string;
821
+ /**
822
+ * Custom class name for the tooltip content node.
823
+ */
824
+ content?: string;
825
+ /**
826
+ * Custom class name for the tooltip arrow node.
827
+ */
828
+ arrow?: string;
829
+ }
830
+ interface TooltipStyles {
831
+ /**
832
+ * Inline style applied to the trigger root.
833
+ */
834
+ root?: React__default.CSSProperties;
835
+ /**
836
+ * Inline style applied to the floating overlay container.
837
+ */
838
+ overlay?: React__default.CSSProperties;
839
+ /**
840
+ * Inline style applied to the tooltip content node.
841
+ */
842
+ content?: React__default.CSSProperties;
843
+ /**
844
+ * Inline style applied to the tooltip arrow node.
845
+ */
846
+ arrow?: React__default.CSSProperties;
847
+ }
848
+ interface TooltipProps {
849
+ /**
850
+ * Tooltip content
851
+ */
852
+ content?: React__default.ReactNode;
853
+ /**
854
+ * Trigger element. Fragment and non-element nodes will be wrapped with a span.
855
+ */
856
+ children: React__default.ReactNode;
857
+ /**
858
+ * Trigger mode
859
+ * @default 'hover'
860
+ */
861
+ trigger?: 'hover' | 'click';
862
+ /**
863
+ * Tooltip placement
864
+ * @default 'top'
865
+ */
866
+ placement?: TooltipPlacement;
867
+ /**
868
+ * Controlled open state
869
+ */
870
+ open?: boolean;
871
+ /**
872
+ * Default open state
873
+ */
874
+ defaultOpen?: boolean;
875
+ /**
876
+ * Callback when open state changes
877
+ */
878
+ onOpenChange?: (open: boolean) => void;
879
+ /**
880
+ * Whether the tooltip is disabled
881
+ */
882
+ disabled?: boolean;
883
+ /**
884
+ * Mouse enter delay in ms
885
+ * @default 0
886
+ */
887
+ mouseEnterDelay?: number;
888
+ /**
889
+ * Mouse leave delay in ms
890
+ * @default 100
891
+ */
892
+ mouseLeaveDelay?: number;
893
+ /**
894
+ * Custom root element class name
895
+ */
896
+ className?: string;
897
+ /**
898
+ * Custom root element style
899
+ */
900
+ style?: React__default.CSSProperties;
901
+ /**
902
+ * Semantic class names
903
+ */
904
+ classNames?: TooltipClassNames;
905
+ /**
906
+ * Semantic styles
907
+ */
908
+ styles?: TooltipStyles;
909
+ }
910
+
911
+ declare const Tooltip: React__default.FC<TooltipProps>;
912
+
811
913
  interface InputFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
812
914
  /**
813
915
  * The type of input.
@@ -1322,6 +1424,7 @@ interface Theme {
1322
1424
  progress: ProgressTheme;
1323
1425
  steps: StepsTheme;
1324
1426
  input: InputTheme;
1427
+ tooltip: TooltipTheme;
1325
1428
  dropdown: DropdownTheme;
1326
1429
  menu: MenuTheme;
1327
1430
  datePicker: DatePickerTheme;
@@ -1540,6 +1643,16 @@ interface InputTheme {
1540
1643
  activeBorderColor: string;
1541
1644
  hoverBorderColor: string;
1542
1645
  }
1646
+ interface TooltipTheme {
1647
+ zIndex: number;
1648
+ backgroundColor: string;
1649
+ contentColor: string;
1650
+ boxShadow: string;
1651
+ borderRadius: string;
1652
+ padding: string;
1653
+ maxWidth: string;
1654
+ fontSize: string;
1655
+ }
1543
1656
  interface DropdownTheme {
1544
1657
  zIndex: number;
1545
1658
  backgroundColor: string;
@@ -1953,4 +2066,4 @@ type TabsComponent = typeof Tabs & {
1953
2066
  };
1954
2067
  declare const _default: TabsComponent;
1955
2068
 
1956
- 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, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity };
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 };