@officesdk/design 0.1.2 → 0.1.5
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/components/{index.d.ts → cjs/index.d.ts} +76 -2
- package/dist/components/{index.js → cjs/index.js} +596 -212
- package/dist/components/cjs/index.js.map +1 -0
- package/dist/components/{index.d.mts → esm/index.d.ts} +76 -2
- package/dist/components/{index.mjs → esm/index.js} +594 -213
- package/dist/components/esm/index.js.map +1 -0
- package/dist/icons/cjs/index.js.map +1 -0
- package/dist/icons/{index.mjs → esm/index.js} +2 -2
- package/dist/icons/esm/index.js.map +1 -0
- package/dist/theme/{index.js → cjs/index.js} +56 -1
- package/dist/theme/cjs/index.js.map +1 -0
- package/dist/theme/{index.mjs → esm/index.js} +58 -3
- package/dist/theme/esm/index.js.map +1 -0
- package/dist/utils/cjs/index.js.map +1 -0
- package/dist/utils/{index.mjs → esm/index.js} +2 -2
- package/dist/utils/esm/index.js.map +1 -0
- package/package.json +24 -21
- package/dist/components/index.js.map +0 -1
- package/dist/components/index.mjs.map +0 -1
- package/dist/icons/index.js.map +0 -1
- package/dist/icons/index.mjs.map +0 -1
- package/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/index.mjs.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs.map +0 -1
- /package/dist/icons/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/icons/{index.js → cjs/index.js} +0 -0
- /package/dist/icons/{index.d.mts → esm/index.d.ts} +0 -0
- /package/dist/theme/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/theme/{index.d.mts → esm/index.d.ts} +0 -0
- /package/dist/utils/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/utils/{index.js → cjs/index.js} +0 -0
- /package/dist/utils/{index.d.mts → esm/index.d.mts} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
|
|
3
|
+
import { ThemedStyledInterface } from 'styled-components';
|
|
4
|
+
import { CommonThemeConfig } from '@officesdk/editor-sdk-core/shared';
|
|
3
5
|
|
|
4
6
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
7
|
/**
|
|
@@ -758,7 +760,7 @@ interface TooltipProps extends Partial<TooltipProps$1> {
|
|
|
758
760
|
/**
|
|
759
761
|
* Tooltip content
|
|
760
762
|
*/
|
|
761
|
-
content
|
|
763
|
+
content?: React.ReactNode;
|
|
762
764
|
/**
|
|
763
765
|
* Tooltip variant
|
|
764
766
|
*/
|
|
@@ -803,6 +805,74 @@ interface TooltipProps extends Partial<TooltipProps$1> {
|
|
|
803
805
|
*/
|
|
804
806
|
declare const Tooltip: React.FC<TooltipProps>;
|
|
805
807
|
|
|
808
|
+
interface ToolbarButtonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
809
|
+
/**
|
|
810
|
+
* Whether the button is disabled
|
|
811
|
+
*/
|
|
812
|
+
disabled?: boolean;
|
|
813
|
+
/**
|
|
814
|
+
* Whether the button is in active state
|
|
815
|
+
*/
|
|
816
|
+
active?: boolean;
|
|
817
|
+
/**
|
|
818
|
+
* Icon to display
|
|
819
|
+
*/
|
|
820
|
+
icon?: React.ReactNode;
|
|
821
|
+
/**
|
|
822
|
+
* Label text
|
|
823
|
+
*/
|
|
824
|
+
label?: string;
|
|
825
|
+
/**
|
|
826
|
+
* Whether to show dropdown arrow
|
|
827
|
+
*/
|
|
828
|
+
hasDropdown?: boolean;
|
|
829
|
+
/**
|
|
830
|
+
* Whether the dropdown section is clickable separately
|
|
831
|
+
*/
|
|
832
|
+
splitDropdown?: boolean;
|
|
833
|
+
/**
|
|
834
|
+
* Click handler for main button
|
|
835
|
+
*/
|
|
836
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
837
|
+
/**
|
|
838
|
+
* Click handler for dropdown section
|
|
839
|
+
*/
|
|
840
|
+
onDropdownClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
841
|
+
/**
|
|
842
|
+
* Custom className
|
|
843
|
+
*/
|
|
844
|
+
className?: string;
|
|
845
|
+
/**
|
|
846
|
+
* Custom style
|
|
847
|
+
*/
|
|
848
|
+
style?: React.CSSProperties;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* ToolbarButton Component
|
|
852
|
+
*
|
|
853
|
+
* A toolbar button with optional icon, label, and dropdown functionality
|
|
854
|
+
*
|
|
855
|
+
* @example
|
|
856
|
+
* // Icon only button
|
|
857
|
+
* <ToolbarButton icon={<Icon />} />
|
|
858
|
+
*
|
|
859
|
+
* @example
|
|
860
|
+
* // Button with label and dropdown
|
|
861
|
+
* <ToolbarButton icon={<Icon />} label="Format" hasDropdown />
|
|
862
|
+
*
|
|
863
|
+
* @example
|
|
864
|
+
* // Button with split dropdown
|
|
865
|
+
* <ToolbarButton
|
|
866
|
+
* icon={<Icon />}
|
|
867
|
+
* label="Format"
|
|
868
|
+
* hasDropdown
|
|
869
|
+
* splitDropdown
|
|
870
|
+
* onClick={handleClick}
|
|
871
|
+
* onDropdownClick={handleDropdownClick}
|
|
872
|
+
* />
|
|
873
|
+
*/
|
|
874
|
+
declare const ToolbarButton: React.FC<ToolbarButtonProps>;
|
|
875
|
+
|
|
806
876
|
type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
|
|
807
877
|
interface ToastConfig {
|
|
808
878
|
/**
|
|
@@ -993,4 +1063,8 @@ declare const createUIConfig: (config: UIConfig) => UIConfig;
|
|
|
993
1063
|
*/
|
|
994
1064
|
declare const mergeUIConfig: (baseConfig: UIConfig, ...configs: Partial<UIConfig>[]) => UIConfig;
|
|
995
1065
|
|
|
996
|
-
|
|
1066
|
+
declare const styled: ThemedStyledInterface<CommonThemeConfig>;
|
|
1067
|
+
|
|
1068
|
+
declare const getGlobalTheme: () => Record<string, any>;
|
|
1069
|
+
|
|
1070
|
+
export { type A11yConfig, type AnimationConfig, Button, type ButtonProps, Checkbox, type CheckboxProps, type I18nConfig, Icon, type IconComponent, type IconProps, IconProvider, type IconProviderProps, type IconRegistry, Input, type InputProps, NumberInput, type NumberInputProps, Radio, type RadioProps, SearchInput, type SearchInputProps, Slider, type SliderProps, SpinButton, type SpinButtonProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Toast, type ToastConfig, ToastContainer, type ToastContainerProps, type ToastPosition, type ToastProps, ToolbarButton, type ToolbarButtonProps, Tooltip, type TooltipProps, type UIConfig, UIConfigProvider, type UIConfigProviderProps, type ZIndexConfig, createUIConfig, getGlobalTheme, mergeUIConfig, styled, useIconRegistry, useToast, useUIConfig };
|