@inntechcorp/it-design 3.1.5 → 3.1.7
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/cropper/index.d.ts +6 -0
- package/dist/index.cjs.js +254 -254
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +44 -15
- package/dist/index.esm.js +258 -258
- package/dist/locales/calendar.json +22 -22
- package/dist/locales/itd.json +234 -235
- package/dist/stories/Upload.stories.d.ts +2 -0
- package/dist/types/UploadProps.d.ts +37 -14
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -76,6 +76,10 @@ export declare const resources: {
|
|
|
76
76
|
cropImage: string;
|
|
77
77
|
crop: string;
|
|
78
78
|
cancel: string;
|
|
79
|
+
width: string;
|
|
80
|
+
height: string;
|
|
81
|
+
imageTooSmall: string;
|
|
82
|
+
imageTooSmallMessage: string;
|
|
79
83
|
};
|
|
80
84
|
results: {
|
|
81
85
|
authentication: {
|
|
@@ -378,6 +382,10 @@ export declare const resources: {
|
|
|
378
382
|
cropImage: string;
|
|
379
383
|
crop: string;
|
|
380
384
|
cancel: string;
|
|
385
|
+
width: string;
|
|
386
|
+
height: string;
|
|
387
|
+
imageTooSmall: string;
|
|
388
|
+
imageTooSmallMessage: string;
|
|
381
389
|
};
|
|
382
390
|
results: {
|
|
383
391
|
authentication: {
|
|
@@ -695,7 +703,7 @@ export type { NotificationsProps } from './types/NotificationsProps';
|
|
|
695
703
|
export type { AlertProps, AlertType, AlertSize } from './types/AlertProps';
|
|
696
704
|
export type { SwitchProps } from './types/SwitchProps';
|
|
697
705
|
export type { ModalProps, ModalContentProps, ModalRefProps } from './types/ModalProps';
|
|
698
|
-
export type { UploadProps, UploadProgressProps, UploadResultMessageProps } from './types/UploadProps';
|
|
706
|
+
export type { UploadProps, UploadProgressProps, UploadResultMessageProps, CropSettings } from './types/UploadProps';
|
|
699
707
|
export type { ResultProps } from './types/ResultProps';
|
|
700
708
|
export type { TabsItemProps, TabsProps } from './types/TabsProps';
|
|
701
709
|
export type { TableColumnType, TableProps, TableTRProps, TableRow, TableRefProps } from './types/TableProps';
|
package/dist/index.d.ts
CHANGED
|
@@ -589,6 +589,10 @@ interface ImageCropperProps {
|
|
|
589
589
|
minWidth?: number;
|
|
590
590
|
/** Minimum crop height in pixels */
|
|
591
591
|
minHeight?: number;
|
|
592
|
+
/** Output width - cropped image will be resized to this width */
|
|
593
|
+
outputWidth?: number;
|
|
594
|
+
/** Output height - cropped image will be resized to this height */
|
|
595
|
+
outputHeight?: number;
|
|
592
596
|
/** Output image quality (0-1) */
|
|
593
597
|
quality?: number;
|
|
594
598
|
/** Output image format */
|
|
@@ -599,6 +603,8 @@ interface ImageCropperProps {
|
|
|
599
603
|
width?: string | number;
|
|
600
604
|
/** Container height */
|
|
601
605
|
height?: string | number;
|
|
606
|
+
/** Show grid lines on crop area (default: true) */
|
|
607
|
+
showGrid?: boolean;
|
|
602
608
|
}
|
|
603
609
|
interface ImageCropperRef {
|
|
604
610
|
/** Get cropped image as Blob */
|
|
@@ -1424,6 +1430,27 @@ type ModalRefProps = {
|
|
|
1424
1430
|
onClickCancel?: () => void;
|
|
1425
1431
|
};
|
|
1426
1432
|
|
|
1433
|
+
/**
|
|
1434
|
+
* Crop settings for the Upload component
|
|
1435
|
+
*/
|
|
1436
|
+
type CropSettings = {
|
|
1437
|
+
/** Aspect ratio (e.g., 1 for square, 16/9 for widescreen). */
|
|
1438
|
+
aspectRatio?: number;
|
|
1439
|
+
/** Minimum crop area width in pixels. User cannot select smaller than this. */
|
|
1440
|
+
minWidth?: number;
|
|
1441
|
+
/** Minimum crop area height in pixels. User cannot select smaller than this. */
|
|
1442
|
+
minHeight?: number;
|
|
1443
|
+
/** Output width in pixels. Cropped image will be resized to this width. */
|
|
1444
|
+
outputWidth?: number;
|
|
1445
|
+
/** Output height in pixels. Cropped image will be resized to this height. */
|
|
1446
|
+
outputHeight?: number;
|
|
1447
|
+
/** Output image quality (0-1), default 0.9 */
|
|
1448
|
+
quality?: number;
|
|
1449
|
+
/** Crop modal title */
|
|
1450
|
+
modalTitle?: string;
|
|
1451
|
+
/** Show grid lines on crop area (default: true) */
|
|
1452
|
+
showGrid?: boolean;
|
|
1453
|
+
};
|
|
1427
1454
|
type UploadProps = {
|
|
1428
1455
|
id?: string;
|
|
1429
1456
|
action?: string;
|
|
@@ -1455,22 +1482,24 @@ type UploadProps = {
|
|
|
1455
1482
|
extraQueryString?: {};
|
|
1456
1483
|
extraHeader?: {};
|
|
1457
1484
|
disabled?: boolean;
|
|
1458
|
-
/** Minimum image width required for upload (in pixels). Smaller images will be rejected. */
|
|
1485
|
+
/** Minimum image width required for upload (in pixels). Smaller images will be rejected. Works with or without crop. */
|
|
1459
1486
|
minImageWidth?: number;
|
|
1460
|
-
/** Minimum image height required for upload (in pixels). Smaller images will be rejected. */
|
|
1487
|
+
/** Minimum image height required for upload (in pixels). Smaller images will be rejected. Works with or without crop. */
|
|
1461
1488
|
minImageHeight?: number;
|
|
1462
|
-
/**
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1489
|
+
/**
|
|
1490
|
+
* Crop settings. If provided, cropping is enabled.
|
|
1491
|
+
* @example
|
|
1492
|
+
* crop={{
|
|
1493
|
+
* aspectRatio: 16/9,
|
|
1494
|
+
* minWidth: 960, // Minimum crop area size
|
|
1495
|
+
* minHeight: 540,
|
|
1496
|
+
* outputWidth: 1920, // Final output size
|
|
1497
|
+
* outputHeight: 1080,
|
|
1498
|
+
* quality: 0.9,
|
|
1499
|
+
* modalTitle: "Crop Image"
|
|
1500
|
+
* }}
|
|
1501
|
+
*/
|
|
1502
|
+
crop?: CropSettings;
|
|
1474
1503
|
onChange?: ((value: any) => void) | null;
|
|
1475
1504
|
onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
|
|
1476
1505
|
onUploadSuccess?: (path: string) => void;
|
|
@@ -2294,4 +2323,4 @@ declare const resources: {
|
|
|
2294
2323
|
};
|
|
2295
2324
|
|
|
2296
2325
|
export { _default as ALink, Accordion, AddDefaultThemeStyle, AddDefaultUnit, AddZero, Alert, Arrow as ArrowIcon, BackToTop, BackTop, Base64Decode, Base64Encode, Button, Calendar, Card, CheckFileURL, Checkbox, Checkmark, ChunkArray, Collapse, ComponentPositions, ComponentSizes, ComponentSizesSlug, ConnectionStatus, ConsoleLog, ConvertCurrency, DatePicker, DetermineNewHeight, DetermineNewWidth, FileChecker, FileExtensions, FileTypes, FindSelector, Flex, Form, FormValidationTypes, FormatBytes, FormatDate, FormatDateTime, FormatSimpleDate, FormatSimpleDateTime, FormatTime, GetByCurrency, GetCountryCodeByCurrencyCode, GetCountryCodeByLanguage, GetCurrencyFormat, GetCurrencySymbol, GetDecimalByCurrency, GetTypeByFileType, H1, H2, H3, H4, ITDContext, ITDProvider, _default$1 as Image, ImageCropper, _default$5 as InlineSVGCached, InlineSelect, InlineSelectArrow, Input, IsValidJSON, Lock as LockIcon, ModalManager, ModalState, NoData, Notification, Picture, Progress, Radio, RemoveUnits, Result, SVGLoader, Select, Spin, Status, Switch, Table, Tabs, TextArea, TinyScrollbar, Trash, UniUpperCase, UpdateThemeStyle, Upload, Upload$1 as UploadIcon, Wait, ZoomIn, ZoomOut, resources, toKebabCase, useAddExternalCSS, useAvoidCollision, useComponentSize, useConnectionStatus, useConstructor, useContextBridge, useCoreFetch, useKeyboardShortcut, useMultiQuery, useOnClickOutside, useOnESCKeyDown, useOnResize, useOrientation, useReCaptcha, useSingleQuery };
|
|
2297
|
-
export type { AccordionItemProps, AccordionProps, AccordionSubMenuProps, AlertProps, AlertSize, AlertType, ButtonProps, ButtonState, ButtonType, ButtonVariant, CalendarDayProps, CalendarProps, CalendarValueProps, CardProps, CheckboxEvent, CheckboxGroupProps, CheckboxProps, CropArea, DatePickerProps, Direction, FieldUpdateProps, FlexAlignProps, FlexGapProps, FlexJustifyProps, FlexProps, FormContextType, FormItemProps, FormProps, FormRuleProps, FormSubComponentProps, FormValueProps, GroupCheckboxOptionType, ITDContextType, ITDImperativeFuncProps, ITDProviderProps, ITDSize, ITDSizeSlug, ImageCropperProps, ImageCropperRef, InputProps, InputVariant, ModalContentProps, ModalProps, ModalRefProps, NotificationContextType, NotificationsProps, ProgressProps, ProgressStatus, QueryValueProps, RadioButtonProps, RadioGroupProps, RadioType, ResultProps, SelectDirection, SelectOptionProps, SelectPosition, SelectProps, SelectToggleProps, SelectValue, SelectVariant, SingleQueryProps, StatusProps, StatusVariant, SwitchProps, TableColumnType, TableProps, TableRefProps, TableRow, TableTRProps, TabsItemProps, TabsProps, TextAreaEvent, TextAreaProps, TextAreaVariant, UploadProgressProps, UploadProps, UploadResultMessageProps };
|
|
2326
|
+
export type { AccordionItemProps, AccordionProps, AccordionSubMenuProps, AlertProps, AlertSize, AlertType, ButtonProps, ButtonState, ButtonType, ButtonVariant, CalendarDayProps, CalendarProps, CalendarValueProps, CardProps, CheckboxEvent, CheckboxGroupProps, CheckboxProps, CropArea, CropSettings, DatePickerProps, Direction, FieldUpdateProps, FlexAlignProps, FlexGapProps, FlexJustifyProps, FlexProps, FormContextType, FormItemProps, FormProps, FormRuleProps, FormSubComponentProps, FormValueProps, GroupCheckboxOptionType, ITDContextType, ITDImperativeFuncProps, ITDProviderProps, ITDSize, ITDSizeSlug, ImageCropperProps, ImageCropperRef, InputProps, InputVariant, ModalContentProps, ModalProps, ModalRefProps, NotificationContextType, NotificationsProps, ProgressProps, ProgressStatus, QueryValueProps, RadioButtonProps, RadioGroupProps, RadioType, ResultProps, SelectDirection, SelectOptionProps, SelectPosition, SelectProps, SelectToggleProps, SelectValue, SelectVariant, SingleQueryProps, StatusProps, StatusVariant, SwitchProps, TableColumnType, TableProps, TableRefProps, TableRow, TableTRProps, TabsItemProps, TabsProps, TextAreaEvent, TextAreaProps, TextAreaVariant, UploadProgressProps, UploadProps, UploadResultMessageProps };
|