@officesdk/design 0.1.0 → 0.1.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/components/index.d.mts +79 -19
- package/dist/components/index.d.ts +79 -19
- package/dist/components/index.js +449 -284
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +388 -224
- package/dist/components/index.mjs.map +1 -1
- package/package.json +18 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
|
|
3
3
|
|
|
4
|
-
interface ButtonProps {
|
|
4
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Button variant type
|
|
7
7
|
*/
|
|
@@ -39,22 +39,6 @@ interface ButtonProps {
|
|
|
39
39
|
* Whether the icon button should have a border (only for variant='icon')
|
|
40
40
|
*/
|
|
41
41
|
iconBordered?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Click event handler
|
|
44
|
-
*/
|
|
45
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
46
|
-
/**
|
|
47
|
-
* Button content
|
|
48
|
-
*/
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
/**
|
|
51
|
-
* Custom className
|
|
52
|
-
*/
|
|
53
|
-
className?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Custom inline styles
|
|
56
|
-
*/
|
|
57
|
-
style?: React.CSSProperties;
|
|
58
42
|
}
|
|
59
43
|
/**
|
|
60
44
|
* Button Component
|
|
@@ -428,6 +412,78 @@ interface SearchInputProps extends Omit<InputProps, 'size' | 'prefixNode'> {
|
|
|
428
412
|
*/
|
|
429
413
|
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
430
414
|
|
|
415
|
+
interface NumberInputProps {
|
|
416
|
+
/**
|
|
417
|
+
* Current value
|
|
418
|
+
*/
|
|
419
|
+
value?: number;
|
|
420
|
+
/**
|
|
421
|
+
* Default value
|
|
422
|
+
*/
|
|
423
|
+
defaultValue?: number;
|
|
424
|
+
/**
|
|
425
|
+
* Minimum value
|
|
426
|
+
*/
|
|
427
|
+
min?: number;
|
|
428
|
+
/**
|
|
429
|
+
* Maximum value
|
|
430
|
+
*/
|
|
431
|
+
max?: number;
|
|
432
|
+
/**
|
|
433
|
+
* Step increment/decrement
|
|
434
|
+
*/
|
|
435
|
+
step?: number;
|
|
436
|
+
/**
|
|
437
|
+
* Size variant
|
|
438
|
+
*/
|
|
439
|
+
size?: 'small' | 'large';
|
|
440
|
+
/**
|
|
441
|
+
* Whether the input is disabled
|
|
442
|
+
*/
|
|
443
|
+
disabled?: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* Whether to show alert state (red border)
|
|
446
|
+
*/
|
|
447
|
+
alert?: boolean;
|
|
448
|
+
/**
|
|
449
|
+
* Number of decimal places
|
|
450
|
+
*/
|
|
451
|
+
precision?: number;
|
|
452
|
+
/**
|
|
453
|
+
* Format the display value
|
|
454
|
+
*/
|
|
455
|
+
formatter?: (value: number) => string;
|
|
456
|
+
/**
|
|
457
|
+
* Parse the input value
|
|
458
|
+
*/
|
|
459
|
+
parser?: (displayValue: string) => number;
|
|
460
|
+
/**
|
|
461
|
+
* Unit text to display after the input
|
|
462
|
+
*/
|
|
463
|
+
unit?: string;
|
|
464
|
+
/**
|
|
465
|
+
* Callback when value changes
|
|
466
|
+
*/
|
|
467
|
+
onChange?: (value: number | null) => void;
|
|
468
|
+
/**
|
|
469
|
+
* Custom className
|
|
470
|
+
*/
|
|
471
|
+
className?: string;
|
|
472
|
+
/**
|
|
473
|
+
* Custom style
|
|
474
|
+
*/
|
|
475
|
+
style?: React.CSSProperties;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* NumberInput Component
|
|
479
|
+
*
|
|
480
|
+
* A numeric input with increment/decrement buttons
|
|
481
|
+
*
|
|
482
|
+
* @example
|
|
483
|
+
* <NumberInput value={35} onChange={(val) => console.log(val)} />
|
|
484
|
+
*/
|
|
485
|
+
declare const NumberInput: React.FC<NumberInputProps>;
|
|
486
|
+
|
|
431
487
|
interface IconProps {
|
|
432
488
|
/**
|
|
433
489
|
* Icon name from registry (requires IconProvider)
|
|
@@ -698,7 +754,7 @@ interface TabsProps {
|
|
|
698
754
|
*/
|
|
699
755
|
declare const Tabs: React.FC<TabsProps>;
|
|
700
756
|
|
|
701
|
-
interface TooltipProps extends
|
|
757
|
+
interface TooltipProps extends Partial<TooltipProps$1> {
|
|
702
758
|
/**
|
|
703
759
|
* Tooltip content
|
|
704
760
|
*/
|
|
@@ -715,6 +771,10 @@ interface TooltipProps extends Omit<TooltipProps$1, 'overlay'> {
|
|
|
715
771
|
* Children element that triggers the tooltip
|
|
716
772
|
*/
|
|
717
773
|
children: React.ReactElement;
|
|
774
|
+
/**
|
|
775
|
+
* Function to get the container element for the tooltip
|
|
776
|
+
*/
|
|
777
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
718
778
|
}
|
|
719
779
|
/**
|
|
720
780
|
* Tooltip Component
|
|
@@ -933,4 +993,4 @@ declare const createUIConfig: (config: UIConfig) => UIConfig;
|
|
|
933
993
|
*/
|
|
934
994
|
declare const mergeUIConfig: (baseConfig: UIConfig, ...configs: Partial<UIConfig>[]) => UIConfig;
|
|
935
995
|
|
|
936
|
-
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, 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, Tooltip, type TooltipProps, type UIConfig, UIConfigProvider, type UIConfigProviderProps, type ZIndexConfig, createUIConfig, mergeUIConfig, useIconRegistry, useToast, useUIConfig };
|
|
996
|
+
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, Tooltip, type TooltipProps, type UIConfig, UIConfigProvider, type UIConfigProviderProps, type ZIndexConfig, createUIConfig, mergeUIConfig, useIconRegistry, useToast, useUIConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
|
|
3
3
|
|
|
4
|
-
interface ButtonProps {
|
|
4
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Button variant type
|
|
7
7
|
*/
|
|
@@ -39,22 +39,6 @@ interface ButtonProps {
|
|
|
39
39
|
* Whether the icon button should have a border (only for variant='icon')
|
|
40
40
|
*/
|
|
41
41
|
iconBordered?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Click event handler
|
|
44
|
-
*/
|
|
45
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
46
|
-
/**
|
|
47
|
-
* Button content
|
|
48
|
-
*/
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
/**
|
|
51
|
-
* Custom className
|
|
52
|
-
*/
|
|
53
|
-
className?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Custom inline styles
|
|
56
|
-
*/
|
|
57
|
-
style?: React.CSSProperties;
|
|
58
42
|
}
|
|
59
43
|
/**
|
|
60
44
|
* Button Component
|
|
@@ -428,6 +412,78 @@ interface SearchInputProps extends Omit<InputProps, 'size' | 'prefixNode'> {
|
|
|
428
412
|
*/
|
|
429
413
|
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
430
414
|
|
|
415
|
+
interface NumberInputProps {
|
|
416
|
+
/**
|
|
417
|
+
* Current value
|
|
418
|
+
*/
|
|
419
|
+
value?: number;
|
|
420
|
+
/**
|
|
421
|
+
* Default value
|
|
422
|
+
*/
|
|
423
|
+
defaultValue?: number;
|
|
424
|
+
/**
|
|
425
|
+
* Minimum value
|
|
426
|
+
*/
|
|
427
|
+
min?: number;
|
|
428
|
+
/**
|
|
429
|
+
* Maximum value
|
|
430
|
+
*/
|
|
431
|
+
max?: number;
|
|
432
|
+
/**
|
|
433
|
+
* Step increment/decrement
|
|
434
|
+
*/
|
|
435
|
+
step?: number;
|
|
436
|
+
/**
|
|
437
|
+
* Size variant
|
|
438
|
+
*/
|
|
439
|
+
size?: 'small' | 'large';
|
|
440
|
+
/**
|
|
441
|
+
* Whether the input is disabled
|
|
442
|
+
*/
|
|
443
|
+
disabled?: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* Whether to show alert state (red border)
|
|
446
|
+
*/
|
|
447
|
+
alert?: boolean;
|
|
448
|
+
/**
|
|
449
|
+
* Number of decimal places
|
|
450
|
+
*/
|
|
451
|
+
precision?: number;
|
|
452
|
+
/**
|
|
453
|
+
* Format the display value
|
|
454
|
+
*/
|
|
455
|
+
formatter?: (value: number) => string;
|
|
456
|
+
/**
|
|
457
|
+
* Parse the input value
|
|
458
|
+
*/
|
|
459
|
+
parser?: (displayValue: string) => number;
|
|
460
|
+
/**
|
|
461
|
+
* Unit text to display after the input
|
|
462
|
+
*/
|
|
463
|
+
unit?: string;
|
|
464
|
+
/**
|
|
465
|
+
* Callback when value changes
|
|
466
|
+
*/
|
|
467
|
+
onChange?: (value: number | null) => void;
|
|
468
|
+
/**
|
|
469
|
+
* Custom className
|
|
470
|
+
*/
|
|
471
|
+
className?: string;
|
|
472
|
+
/**
|
|
473
|
+
* Custom style
|
|
474
|
+
*/
|
|
475
|
+
style?: React.CSSProperties;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* NumberInput Component
|
|
479
|
+
*
|
|
480
|
+
* A numeric input with increment/decrement buttons
|
|
481
|
+
*
|
|
482
|
+
* @example
|
|
483
|
+
* <NumberInput value={35} onChange={(val) => console.log(val)} />
|
|
484
|
+
*/
|
|
485
|
+
declare const NumberInput: React.FC<NumberInputProps>;
|
|
486
|
+
|
|
431
487
|
interface IconProps {
|
|
432
488
|
/**
|
|
433
489
|
* Icon name from registry (requires IconProvider)
|
|
@@ -698,7 +754,7 @@ interface TabsProps {
|
|
|
698
754
|
*/
|
|
699
755
|
declare const Tabs: React.FC<TabsProps>;
|
|
700
756
|
|
|
701
|
-
interface TooltipProps extends
|
|
757
|
+
interface TooltipProps extends Partial<TooltipProps$1> {
|
|
702
758
|
/**
|
|
703
759
|
* Tooltip content
|
|
704
760
|
*/
|
|
@@ -715,6 +771,10 @@ interface TooltipProps extends Omit<TooltipProps$1, 'overlay'> {
|
|
|
715
771
|
* Children element that triggers the tooltip
|
|
716
772
|
*/
|
|
717
773
|
children: React.ReactElement;
|
|
774
|
+
/**
|
|
775
|
+
* Function to get the container element for the tooltip
|
|
776
|
+
*/
|
|
777
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
718
778
|
}
|
|
719
779
|
/**
|
|
720
780
|
* Tooltip Component
|
|
@@ -933,4 +993,4 @@ declare const createUIConfig: (config: UIConfig) => UIConfig;
|
|
|
933
993
|
*/
|
|
934
994
|
declare const mergeUIConfig: (baseConfig: UIConfig, ...configs: Partial<UIConfig>[]) => UIConfig;
|
|
935
995
|
|
|
936
|
-
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, 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, Tooltip, type TooltipProps, type UIConfig, UIConfigProvider, type UIConfigProviderProps, type ZIndexConfig, createUIConfig, mergeUIConfig, useIconRegistry, useToast, useUIConfig };
|
|
996
|
+
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, Tooltip, type TooltipProps, type UIConfig, UIConfigProvider, type UIConfigProviderProps, type ZIndexConfig, createUIConfig, mergeUIConfig, useIconRegistry, useToast, useUIConfig };
|