@officesdk/design 0.1.26 → 0.1.28

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.
@@ -3,6 +3,7 @@ import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
3
3
  import { DropdownProps as DropdownProps$1 } from 'rc-dropdown';
4
4
  import * as styled_components from 'styled-components';
5
5
  import { ThemedStyledInterface } from 'styled-components';
6
+ import { DialogProps } from 'rc-dialog';
6
7
  import { Theme } from '@officesdk/design/theme';
7
8
 
8
9
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -860,7 +861,7 @@ interface TabItem {
860
861
  /**
861
862
  * Tab label
862
863
  */
863
- label: string;
864
+ label: string | React$1.ReactNode;
864
865
  /**
865
866
  * Whether the tab is disabled
866
867
  */
@@ -903,6 +904,14 @@ interface TabsProps {
903
904
  * Custom style
904
905
  */
905
906
  style?: React$1.CSSProperties;
907
+ /**
908
+ * Custom className for tab item
909
+ */
910
+ tabItemClassName?: string;
911
+ /**
912
+ * Custom style for tab item
913
+ */
914
+ tabItemStyle?: React$1.CSSProperties;
906
915
  }
907
916
  /**
908
917
  * Tab Component
@@ -1321,6 +1330,146 @@ declare const Dropdown: React$1.FC<DropdownProps>;
1321
1330
  declare const DropdownGlobalStyles: styled_components.GlobalStyleComponent<{}, styled_components.DefaultTheme>;
1322
1331
  declare const MenuGlobalStyles: styled_components.GlobalStyleComponent<{}, styled_components.DefaultTheme>;
1323
1332
 
1333
+ interface ModalProps extends DialogProps {
1334
+ /**
1335
+ * Whether the modal is visible
1336
+ */
1337
+ visible?: boolean;
1338
+ /**
1339
+ * Modal variant type
1340
+ * - 'message': Message dialog (max 400px, min 360px)
1341
+ * - 'functional': Functional dialog (default 640px, max 800px, min 400px)
1342
+ */
1343
+ variant?: 'message' | 'functional';
1344
+ /**
1345
+ * Mask layer type
1346
+ * - 'light': Light mask (rgba(65,70,75,0.5))
1347
+ * - 'dark': Dark mask (rgba(44,48,51,0.8))
1348
+ */
1349
+ maskType?: 'light' | 'dark';
1350
+ /**
1351
+ * Modal title
1352
+ */
1353
+ title?: React$1.ReactNode;
1354
+ /**
1355
+ * Modal width
1356
+ */
1357
+ width?: string | number;
1358
+ /**
1359
+ * Modal height
1360
+ */
1361
+ height?: string | number;
1362
+ /**
1363
+ * Whether to show mask
1364
+ */
1365
+ mask?: boolean;
1366
+ /**
1367
+ * Whether to close modal when clicking mask
1368
+ */
1369
+ maskClosable?: boolean;
1370
+ /**
1371
+ * Whether to show close button
1372
+ */
1373
+ closable?: boolean;
1374
+ /**
1375
+ * OK button text, set to null to hide
1376
+ */
1377
+ okText?: string | null;
1378
+ /**
1379
+ * Cancel button text, set to null to hide
1380
+ */
1381
+ cancelText?: string | null;
1382
+ /**
1383
+ * Whether OK button is disabled
1384
+ */
1385
+ disabledOkButton?: boolean;
1386
+ /**
1387
+ * Custom footer, set to null to hide footer
1388
+ */
1389
+ footer?: React$1.ReactNode;
1390
+ /**
1391
+ * Callback when OK button is clicked
1392
+ */
1393
+ onOk?: (e: React$1.MouseEvent) => void;
1394
+ /**
1395
+ * Callback when Cancel button is clicked or modal is closed
1396
+ */
1397
+ onCancel?: (e: React$1.MouseEvent | React$1.KeyboardEvent) => void;
1398
+ /**
1399
+ * Modal content
1400
+ */
1401
+ children?: React$1.ReactNode;
1402
+ /**
1403
+ * CSS class prefix
1404
+ */
1405
+ prefixCls?: string;
1406
+ /**
1407
+ * Custom className
1408
+ */
1409
+ className?: string;
1410
+ /**
1411
+ * Custom style
1412
+ */
1413
+ style?: React$1.CSSProperties;
1414
+ /**
1415
+ * z-index of the modal
1416
+ */
1417
+ zIndex?: number;
1418
+ /**
1419
+ * Whether to destroy modal on close
1420
+ */
1421
+ destroyOnClose?: boolean;
1422
+ /**
1423
+ * Whether to focus on modal when opened
1424
+ */
1425
+ focusTriggerAfterClose?: boolean;
1426
+ /**
1427
+ * Return the mount node for Modal
1428
+ */
1429
+ getContainer?: () => HTMLElement;
1430
+ }
1431
+ /**
1432
+ * Modal Component
1433
+ *
1434
+ * A dialog component for displaying content in a layer above the page.
1435
+ *
1436
+ * @example
1437
+ * // Basic usage
1438
+ * <Modal
1439
+ * visible={visible}
1440
+ * title="Modal Title"
1441
+ * onOk={handleOk}
1442
+ * onCancel={handleCancel}
1443
+ * >
1444
+ * Modal content
1445
+ * </Modal>
1446
+ *
1447
+ * @example
1448
+ * // Custom footer
1449
+ * <Modal
1450
+ * visible={visible}
1451
+ * title="Custom Footer"
1452
+ * footer={<Button onClick={handleClose}>Close</Button>}
1453
+ * onCancel={handleCancel}
1454
+ * >
1455
+ * Modal content
1456
+ * </Modal>
1457
+ *
1458
+ * @example
1459
+ * // No footer
1460
+ * <Modal
1461
+ * visible={visible}
1462
+ * title="No Footer"
1463
+ * footer={null}
1464
+ * onCancel={handleCancel}
1465
+ * >
1466
+ * Modal content
1467
+ * </Modal>
1468
+ */
1469
+ declare const Modal: React$1.FC<ModalProps>;
1470
+
1471
+ declare const ModalGlobalStyles: any;
1472
+
1324
1473
  type DeepPartial<T extends object> = {
1325
1474
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
1326
1475
  };
@@ -1607,4 +1756,4 @@ declare const styled: ThemedStyledInterface<Theme>;
1607
1756
 
1608
1757
  declare const getGlobalTheme: () => Theme;
1609
1758
 
1610
- 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, 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 };
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 };