@officesdk/design 0.1.29 → 0.2.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/components/cjs/index.d.ts +88 -4
- package/dist/components/cjs/index.js +558 -498
- package/dist/components/cjs/index.js.map +1 -1
- package/dist/components/esm/index.d.ts +88 -4
- package/dist/components/esm/index.js +558 -499
- package/dist/components/esm/index.js.map +1 -1
- package/dist/theme/cjs/index.d.ts +70 -4
- package/dist/theme/cjs/index.js +182 -32
- package/dist/theme/cjs/index.js.map +1 -1
- package/dist/theme/esm/index.d.ts +70 -4
- package/dist/theme/esm/index.js +182 -32
- package/dist/theme/esm/index.js.map +1 -1
- package/package.json +5 -3
- package/dist/components/cjs/loading-ASMP54FR.gif +0 -0
- package/dist/components/esm/loading-ASMP54FR.gif +0 -0
|
@@ -580,6 +580,10 @@ interface NumberInputProps {
|
|
|
580
580
|
*/
|
|
581
581
|
declare const NumberInput: React$1.FC<NumberInputProps>;
|
|
582
582
|
|
|
583
|
+
interface IconSize {
|
|
584
|
+
width: string;
|
|
585
|
+
height: string;
|
|
586
|
+
}
|
|
583
587
|
interface IconProps {
|
|
584
588
|
/**
|
|
585
589
|
* Icon name from registry (requires IconProvider)
|
|
@@ -594,9 +598,9 @@ interface IconProps {
|
|
|
594
598
|
*/
|
|
595
599
|
children?: React$1.ReactNode;
|
|
596
600
|
/**
|
|
597
|
-
* Size of the icon (px)
|
|
601
|
+
* Size of the icon (px or custom width/height)
|
|
598
602
|
*/
|
|
599
|
-
size?: number | string;
|
|
603
|
+
size?: number | string | IconSize;
|
|
600
604
|
/**
|
|
601
605
|
* Color of the icon (only works with SVG icons, not image src)
|
|
602
606
|
*/
|
|
@@ -674,11 +678,12 @@ declare const IconProvider: React$1.FC<IconProviderProps>;
|
|
|
674
678
|
*/
|
|
675
679
|
declare const useIconRegistry: () => IconRegistry | null;
|
|
676
680
|
|
|
681
|
+
type ToastVariant = 'success' | 'info' | 'error' | 'warn' | 'loading' | 'critical';
|
|
677
682
|
interface ToastProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children' | 'onClick'> {
|
|
678
683
|
/**
|
|
679
684
|
* Toast variant type
|
|
680
685
|
*/
|
|
681
|
-
variant?:
|
|
686
|
+
variant?: ToastVariant;
|
|
682
687
|
/**
|
|
683
688
|
* Toast message content (main text)
|
|
684
689
|
*/
|
|
@@ -1470,6 +1475,85 @@ declare const Modal: React$1.FC<ModalProps>;
|
|
|
1470
1475
|
|
|
1471
1476
|
declare const ModalGlobalStyles: any;
|
|
1472
1477
|
|
|
1478
|
+
interface LoadingProps {
|
|
1479
|
+
/**
|
|
1480
|
+
* Size of the loading spinner
|
|
1481
|
+
* - 'small': 16x16 (for dropdown menus, search refresh)
|
|
1482
|
+
* - 'medium': 24x24 (for list/table refresh)
|
|
1483
|
+
* - 'large': 32x32 (for full page refresh)
|
|
1484
|
+
*/
|
|
1485
|
+
size?: 'small' | 'medium' | 'large';
|
|
1486
|
+
/**
|
|
1487
|
+
* Whether the spinner is visible
|
|
1488
|
+
*/
|
|
1489
|
+
spinning?: boolean;
|
|
1490
|
+
/**
|
|
1491
|
+
* Delay in milliseconds before showing the spinner (prevents flash)
|
|
1492
|
+
*/
|
|
1493
|
+
delay?: number;
|
|
1494
|
+
/**
|
|
1495
|
+
* Tip text displayed below the spinner
|
|
1496
|
+
*/
|
|
1497
|
+
tip?: React$1.ReactNode;
|
|
1498
|
+
/**
|
|
1499
|
+
* Whether to use fullscreen overlay mode
|
|
1500
|
+
*/
|
|
1501
|
+
fullscreen?: boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* Custom className
|
|
1504
|
+
*/
|
|
1505
|
+
className?: string;
|
|
1506
|
+
/**
|
|
1507
|
+
* Child content to wrap with loading overlay
|
|
1508
|
+
*/
|
|
1509
|
+
children?: React$1.ReactNode;
|
|
1510
|
+
/**
|
|
1511
|
+
* Custom loading indicator (React element or image URL)
|
|
1512
|
+
* When provided as a string, it will be used as the image src
|
|
1513
|
+
* When provided as a React element, it will be rendered directly
|
|
1514
|
+
*/
|
|
1515
|
+
indicator?: React$1.ReactNode | string;
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* Loading Component
|
|
1519
|
+
*
|
|
1520
|
+
* A loading component that displays an animated indicator.
|
|
1521
|
+
* Supports GIF/CSS defaults via theme configuration or custom indicators via props.
|
|
1522
|
+
*
|
|
1523
|
+
* @example
|
|
1524
|
+
* // Basic usage (uses theme default indicator type)
|
|
1525
|
+
* <Loading />
|
|
1526
|
+
*
|
|
1527
|
+
* @example
|
|
1528
|
+
* // Different sizes
|
|
1529
|
+
* <Loading size="small" />
|
|
1530
|
+
* <Loading size="medium" />
|
|
1531
|
+
* <Loading size="large" />
|
|
1532
|
+
*
|
|
1533
|
+
* @example
|
|
1534
|
+
* // With tip
|
|
1535
|
+
* <Loading tip="Loading..." />
|
|
1536
|
+
*
|
|
1537
|
+
* @example
|
|
1538
|
+
* // Custom indicator (image URL)
|
|
1539
|
+
* <Loading indicator="/path/to/custom-loading.gif" />
|
|
1540
|
+
*
|
|
1541
|
+
* @example
|
|
1542
|
+
* // Custom indicator (React element)
|
|
1543
|
+
* <Loading indicator={<MyCustomSpinner />} />
|
|
1544
|
+
*
|
|
1545
|
+
* @example
|
|
1546
|
+
* // Wrap content
|
|
1547
|
+
* <Loading spinning={isLoading}>
|
|
1548
|
+
* <div>Content to load</div>
|
|
1549
|
+
* </Loading>
|
|
1550
|
+
*
|
|
1551
|
+
* @example
|
|
1552
|
+
* // Fullscreen loading
|
|
1553
|
+
* <Loading fullscreen spinning={isLoading} />
|
|
1554
|
+
*/
|
|
1555
|
+
declare const Loading: React$1.FC<LoadingProps>;
|
|
1556
|
+
|
|
1473
1557
|
type DeepPartial<T extends object> = {
|
|
1474
1558
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
1475
1559
|
};
|
|
@@ -1756,4 +1840,4 @@ declare const styled: ThemedStyledInterface<Theme>;
|
|
|
1756
1840
|
|
|
1757
1841
|
declare const getGlobalTheme: () => Theme;
|
|
1758
1842
|
|
|
1759
|
-
export { type A11yConfig, type AnimationConfig, Button, type ButtonProps, Checkbox, type CheckboxProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownGlobalStyles, type DropdownProps, type I18nConfig, Icon, type IconComponent, type IconProps, IconProvider, type IconProviderProps, type IconRegistry, Input, type InputProps, Menu, type MenuDivider, MenuGlobalStyles, type MenuGroup, type MenuItem, type MenuItemType, type MenuProps, Modal, ModalGlobalStyles, type ModalProps, 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 ToastContainerConfig, type ToastContainerProps, type ToastPosition, type ToastProps, ToolbarButton, type ToolbarButtonProps, Tooltip, type TooltipProps, type UIConfig, UIConfigProvider, type UIConfigProviderProps, UnderlinedInput, type InputProps as UnderlinedInputProps, type ZIndexConfig, createUIConfig, getGlobalIconRegistry, getGlobalTheme, getGlobalToastConfig, getUIConfig, initUIConfig, mergeUIConfig, styled, toast, useIconRegistry, useToast, useUIConfig };
|
|
1843
|
+
export { type A11yConfig, type AnimationConfig, Button, type ButtonProps, Checkbox, type CheckboxProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownGlobalStyles, type DropdownProps, type I18nConfig, Icon, type IconComponent, type IconProps, IconProvider, type IconProviderProps, type IconRegistry, Input, type InputProps, Loading, type LoadingProps, Menu, type MenuDivider, MenuGlobalStyles, type MenuGroup, type MenuItem, type MenuItemType, type MenuProps, Modal, ModalGlobalStyles, type ModalProps, 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 ToastContainerConfig, type ToastContainerProps, type ToastPosition, type ToastProps, ToolbarButton, type ToolbarButtonProps, Tooltip, type TooltipProps, type UIConfig, UIConfigProvider, type UIConfigProviderProps, UnderlinedInput, type InputProps as UnderlinedInputProps, type ZIndexConfig, createUIConfig, getGlobalIconRegistry, getGlobalTheme, getGlobalToastConfig, getUIConfig, initUIConfig, mergeUIConfig, styled, toast, useIconRegistry, useToast, useUIConfig };
|