@razorpay/blade 11.6.0 → 11.6.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/build/lib/native/components/FileUpload/FileUpload.native.js +7 -0
- package/build/lib/native/components/FileUpload/FileUpload.native.js.map +1 -0
- package/build/lib/native/components/index.js +1 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +434 -0
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/FileUploadItem.js +149 -0
- package/build/lib/web/development/components/FileUpload/FileUploadItem.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/FileUploadItemIcon.js +122 -0
- package/build/lib/web/development/components/FileUpload/FileUploadItemIcon.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js +47 -0
- package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js +45 -0
- package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +66 -0
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/index.js +2 -0
- package/build/lib/web/development/components/FileUpload/index.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/isFileAccepted.js +28 -0
- package/build/lib/web/development/components/FileUpload/isFileAccepted.js.map +1 -0
- package/build/lib/web/development/components/index.js +2 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js +3 -2
- package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +434 -0
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/FileUploadItem.js +149 -0
- package/build/lib/web/production/components/FileUpload/FileUploadItem.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/FileUploadItemIcon.js +122 -0
- package/build/lib/web/production/components/FileUpload/FileUploadItemIcon.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js +47 -0
- package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js +45 -0
- package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +66 -0
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/index.js +2 -0
- package/build/lib/web/production/components/FileUpload/index.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/isFileAccepted.js +28 -0
- package/build/lib/web/production/components/FileUpload/isFileAccepted.js.map +1 -0
- package/build/lib/web/production/components/index.js +2 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js +3 -2
- package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
- package/build/types/components/index.d.ts +190 -1
- package/build/types/components/index.native.d.ts +140 -1
- package/codemods/brand-refresh/transformers/__tests__/migrate-colors.test.ts +11 -1
- package/codemods/brand-refresh/transformers/__tests__/migrate-typography.test.ts +5 -1
- package/codemods/brand-refresh/transformers/index.ts +3 -1
- package/codemods/brand-refresh/transformers/migrate-typography.ts +22 -0
- package/fonts.css +19 -0
- package/package.json +3 -3
|
@@ -5223,6 +5223,195 @@ declare const DropdownHeader: ({ title, subtitle, leading, titleSuffix, trailing
|
|
|
5223
5223
|
type DropdownFooter = Pick<BaseFooterProps, 'children' | 'testID'>;
|
|
5224
5224
|
declare const DropdownFooter: ({ children, testID }: DropdownFooter) => React__default.ReactElement;
|
|
5225
5225
|
|
|
5226
|
+
interface BladeFile extends File {
|
|
5227
|
+
/**
|
|
5228
|
+
* The unique identifier of the file.
|
|
5229
|
+
*/
|
|
5230
|
+
id?: string;
|
|
5231
|
+
/**
|
|
5232
|
+
* The file's upload status.
|
|
5233
|
+
*/
|
|
5234
|
+
status?: 'uploading' | 'success' | 'error';
|
|
5235
|
+
/**
|
|
5236
|
+
* The percentage of file upload completion.
|
|
5237
|
+
*/
|
|
5238
|
+
uploadPercent?: number;
|
|
5239
|
+
/**
|
|
5240
|
+
* Text indicating an error state
|
|
5241
|
+
*/
|
|
5242
|
+
errorText?: string;
|
|
5243
|
+
}
|
|
5244
|
+
type BladeFileList = BladeFile[];
|
|
5245
|
+
type FileUploadCommonProps = {
|
|
5246
|
+
/**
|
|
5247
|
+
* Position of the label relative to the file upload area. Desktop only prop. Default value on mobile will be 'top'
|
|
5248
|
+
*
|
|
5249
|
+
* @default 'top'
|
|
5250
|
+
*/
|
|
5251
|
+
labelPosition?: 'top' | 'left';
|
|
5252
|
+
/**
|
|
5253
|
+
* Defines the upload behavior of the FileUpload component
|
|
5254
|
+
*/
|
|
5255
|
+
uploadType?: 'single' | 'multiple';
|
|
5256
|
+
/**
|
|
5257
|
+
* File types that can be accepted. See [input's accept attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)
|
|
5258
|
+
*
|
|
5259
|
+
* Usage: accept=".jpg, .png, .pdf", accept="image/*", accept="image/png, image/jpeg, application/pdf"
|
|
5260
|
+
*/
|
|
5261
|
+
accept?: string;
|
|
5262
|
+
/**
|
|
5263
|
+
* Disables or enables the FileUpload component
|
|
5264
|
+
*/
|
|
5265
|
+
isDisabled?: boolean;
|
|
5266
|
+
/**
|
|
5267
|
+
* Sets the required state of the file input
|
|
5268
|
+
*
|
|
5269
|
+
* @default false
|
|
5270
|
+
*/
|
|
5271
|
+
isRequired?: boolean;
|
|
5272
|
+
/**
|
|
5273
|
+
* Renders a necessity indicator after the label. If `isRequired` is `true`, it defaults to `'required'`
|
|
5274
|
+
*/
|
|
5275
|
+
necessityIndicator?: 'required' | 'optional' | 'none';
|
|
5276
|
+
/**
|
|
5277
|
+
* The name of the file upload input, [useful in form submissions](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name)
|
|
5278
|
+
*/
|
|
5279
|
+
name?: string;
|
|
5280
|
+
/**
|
|
5281
|
+
* List of files that have been selected/uploaded, useful when the component is controlled
|
|
5282
|
+
*/
|
|
5283
|
+
fileList?: BladeFileList;
|
|
5284
|
+
/**
|
|
5285
|
+
* Limit the number of files that can be uploaded
|
|
5286
|
+
*/
|
|
5287
|
+
maxCount?: number;
|
|
5288
|
+
/**
|
|
5289
|
+
* Limit the size of the uploaded files (in bytes)
|
|
5290
|
+
*/
|
|
5291
|
+
maxSize?: number;
|
|
5292
|
+
/**
|
|
5293
|
+
* Callback function triggered when files are selected
|
|
5294
|
+
*/
|
|
5295
|
+
onChange?: ({ name, fileList }: {
|
|
5296
|
+
name?: string;
|
|
5297
|
+
fileList: BladeFileList;
|
|
5298
|
+
}) => void;
|
|
5299
|
+
/**
|
|
5300
|
+
* Callback function triggered when the preview icon is clicked
|
|
5301
|
+
*/
|
|
5302
|
+
onPreview?: ({ file }: {
|
|
5303
|
+
file: File;
|
|
5304
|
+
}) => void;
|
|
5305
|
+
/**
|
|
5306
|
+
* Callback function triggered when a file is removed
|
|
5307
|
+
*/
|
|
5308
|
+
onRemove?: ({ file }: {
|
|
5309
|
+
file: File;
|
|
5310
|
+
}) => void;
|
|
5311
|
+
/**
|
|
5312
|
+
* Callback function triggered when a file upload is dismissed
|
|
5313
|
+
*/
|
|
5314
|
+
onDismiss?: ({ file }: {
|
|
5315
|
+
file: File;
|
|
5316
|
+
}) => void;
|
|
5317
|
+
/**
|
|
5318
|
+
* Callback function executed when files are dropped into the upload area
|
|
5319
|
+
*/
|
|
5320
|
+
onDrop?: ({ name, fileList }: {
|
|
5321
|
+
name?: string;
|
|
5322
|
+
fileList: BladeFileList;
|
|
5323
|
+
}) => void;
|
|
5324
|
+
/**
|
|
5325
|
+
* State indicating whether there is an error in the FileUpload component
|
|
5326
|
+
*/
|
|
5327
|
+
validationState?: 'none' | 'error';
|
|
5328
|
+
/**
|
|
5329
|
+
* Additional text providing assistance or guidance
|
|
5330
|
+
*/
|
|
5331
|
+
helpText?: string;
|
|
5332
|
+
/**
|
|
5333
|
+
* Text indicating an error state
|
|
5334
|
+
*/
|
|
5335
|
+
errorText?: string;
|
|
5336
|
+
/**
|
|
5337
|
+
* Test ID for automation
|
|
5338
|
+
*/
|
|
5339
|
+
testID?: string;
|
|
5340
|
+
};
|
|
5341
|
+
type FileUploadPropsWithA11yLabel = {
|
|
5342
|
+
/**
|
|
5343
|
+
* Label to be shown for the input field
|
|
5344
|
+
*/
|
|
5345
|
+
label?: undefined;
|
|
5346
|
+
/**
|
|
5347
|
+
* Accessibility label for the input
|
|
5348
|
+
*/
|
|
5349
|
+
accessibilityLabel: string;
|
|
5350
|
+
};
|
|
5351
|
+
type FileUploadPropsWithLabel = {
|
|
5352
|
+
/**
|
|
5353
|
+
* Label to be shown for the input field
|
|
5354
|
+
*/
|
|
5355
|
+
label: string;
|
|
5356
|
+
/**
|
|
5357
|
+
* Accessibility label for the input
|
|
5358
|
+
*/
|
|
5359
|
+
accessibilityLabel?: string;
|
|
5360
|
+
};
|
|
5361
|
+
type FileUploadProps = (FileUploadPropsWithA11yLabel | FileUploadPropsWithLabel) & FileUploadCommonProps;
|
|
5362
|
+
|
|
5363
|
+
/**
|
|
5364
|
+
* ### FileUpload Component
|
|
5365
|
+
*
|
|
5366
|
+
* The FileUpload component is used to handle file attachments, including the drag-and-drop interaction.
|
|
5367
|
+
* Primarily, it is used to upload files to a server or to display a list of uploaded files.
|
|
5368
|
+
*
|
|
5369
|
+
* ---
|
|
5370
|
+
*
|
|
5371
|
+
* #### Usage
|
|
5372
|
+
*
|
|
5373
|
+
* ```jsx
|
|
5374
|
+
const GSTForm = () => {
|
|
5375
|
+
const [selectedFile, setSelectedFile] = useState<BladeFile>();
|
|
5376
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
5377
|
+
|
|
5378
|
+
return (
|
|
5379
|
+
<Box>
|
|
5380
|
+
<Heading marginBottom="spacing.4">Add GST Details</Heading>
|
|
5381
|
+
<form encType="multipart/form-data" onSubmit={handleSubmit}>
|
|
5382
|
+
<FileUpload
|
|
5383
|
+
uploadType="single"
|
|
5384
|
+
label="Upload GST"
|
|
5385
|
+
helpText="Upload .jpg, .jpeg, or .png file only"
|
|
5386
|
+
accept=".jpg, .jpeg, .png"
|
|
5387
|
+
onChange={({ fileList }) => {
|
|
5388
|
+
setSelectedFile(fileList[0]);
|
|
5389
|
+
}}
|
|
5390
|
+
onDrop={({ fileList }) => {
|
|
5391
|
+
setSelectedFile(fileList[0]);
|
|
5392
|
+
}}
|
|
5393
|
+
isRequired
|
|
5394
|
+
necessityIndicator="required"
|
|
5395
|
+
/>
|
|
5396
|
+
<Button type="submit" variant="primary">
|
|
5397
|
+
Submit
|
|
5398
|
+
</Button>
|
|
5399
|
+
{isLoading && (
|
|
5400
|
+
<ProgressBar isIndeterminate label="Uploading your GST Certificate..." />
|
|
5401
|
+
)}
|
|
5402
|
+
</form>
|
|
5403
|
+
</Box>
|
|
5404
|
+
);
|
|
5405
|
+
}
|
|
5406
|
+
* ```
|
|
5407
|
+
*
|
|
5408
|
+
* ---
|
|
5409
|
+
*
|
|
5410
|
+
* Checkout {@link https://blade.razorpay.com/?path=/docs/components-fileupload FileUpload Documentation}
|
|
5411
|
+
*
|
|
5412
|
+
*/
|
|
5413
|
+
declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps & React$1.RefAttributes<BladeElementRef>>;
|
|
5414
|
+
|
|
5226
5415
|
type IndicatorCommonProps = {
|
|
5227
5416
|
/**
|
|
5228
5417
|
* Sets the color tone
|
|
@@ -8875,4 +9064,4 @@ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => Rea
|
|
|
8875
9064
|
*/
|
|
8876
9065
|
declare const screenReaderStyles: CSSObject;
|
|
8877
9066
|
|
|
8878
|
-
export { Accordion, AccordionItem, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AutoCompleteProps, AwardIcon, Badge, BadgeProps, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeCommonEvents, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BulkPayoutsIcon, Button, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompassIcon, ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, Identifier, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabPanel, TabPanelProps, Table, TableBackgroundColors, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationCommonProps, TablePaginationProps, TablePaginationType, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme, useToast };
|
|
9067
|
+
export { Accordion, AccordionItem, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AutoCompleteProps, AwardIcon, Badge, BadgeProps, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeCommonEvents, BladeFile, BladeFileList, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BulkPayoutsIcon, Button, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompassIcon, ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileUploadProps, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, Identifier, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabPanel, TabPanelProps, Table, TableBackgroundColors, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationCommonProps, TablePaginationProps, TablePaginationType, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme, useToast };
|
|
@@ -4714,6 +4714,145 @@ declare const DropdownHeader: ({ title, subtitle, leading, titleSuffix, trailing
|
|
|
4714
4714
|
type DropdownFooter = Pick<BaseFooterProps, 'children' | 'testID'>;
|
|
4715
4715
|
declare const DropdownFooter: ({ children, testID }: DropdownFooter) => React__default.ReactElement;
|
|
4716
4716
|
|
|
4717
|
+
interface BladeFile extends File {
|
|
4718
|
+
/**
|
|
4719
|
+
* The unique identifier of the file.
|
|
4720
|
+
*/
|
|
4721
|
+
id?: string;
|
|
4722
|
+
/**
|
|
4723
|
+
* The file's upload status.
|
|
4724
|
+
*/
|
|
4725
|
+
status?: 'uploading' | 'success' | 'error';
|
|
4726
|
+
/**
|
|
4727
|
+
* The percentage of file upload completion.
|
|
4728
|
+
*/
|
|
4729
|
+
uploadPercent?: number;
|
|
4730
|
+
/**
|
|
4731
|
+
* Text indicating an error state
|
|
4732
|
+
*/
|
|
4733
|
+
errorText?: string;
|
|
4734
|
+
}
|
|
4735
|
+
type BladeFileList = BladeFile[];
|
|
4736
|
+
type FileUploadCommonProps = {
|
|
4737
|
+
/**
|
|
4738
|
+
* Position of the label relative to the file upload area. Desktop only prop. Default value on mobile will be 'top'
|
|
4739
|
+
*
|
|
4740
|
+
* @default 'top'
|
|
4741
|
+
*/
|
|
4742
|
+
labelPosition?: 'top' | 'left';
|
|
4743
|
+
/**
|
|
4744
|
+
* Defines the upload behavior of the FileUpload component
|
|
4745
|
+
*/
|
|
4746
|
+
uploadType?: 'single' | 'multiple';
|
|
4747
|
+
/**
|
|
4748
|
+
* File types that can be accepted. See [input's accept attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)
|
|
4749
|
+
*
|
|
4750
|
+
* Usage: accept=".jpg, .png, .pdf", accept="image/*", accept="image/png, image/jpeg, application/pdf"
|
|
4751
|
+
*/
|
|
4752
|
+
accept?: string;
|
|
4753
|
+
/**
|
|
4754
|
+
* Disables or enables the FileUpload component
|
|
4755
|
+
*/
|
|
4756
|
+
isDisabled?: boolean;
|
|
4757
|
+
/**
|
|
4758
|
+
* Sets the required state of the file input
|
|
4759
|
+
*
|
|
4760
|
+
* @default false
|
|
4761
|
+
*/
|
|
4762
|
+
isRequired?: boolean;
|
|
4763
|
+
/**
|
|
4764
|
+
* Renders a necessity indicator after the label. If `isRequired` is `true`, it defaults to `'required'`
|
|
4765
|
+
*/
|
|
4766
|
+
necessityIndicator?: 'required' | 'optional' | 'none';
|
|
4767
|
+
/**
|
|
4768
|
+
* The name of the file upload input, [useful in form submissions](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name)
|
|
4769
|
+
*/
|
|
4770
|
+
name?: string;
|
|
4771
|
+
/**
|
|
4772
|
+
* List of files that have been selected/uploaded, useful when the component is controlled
|
|
4773
|
+
*/
|
|
4774
|
+
fileList?: BladeFileList;
|
|
4775
|
+
/**
|
|
4776
|
+
* Limit the number of files that can be uploaded
|
|
4777
|
+
*/
|
|
4778
|
+
maxCount?: number;
|
|
4779
|
+
/**
|
|
4780
|
+
* Limit the size of the uploaded files (in bytes)
|
|
4781
|
+
*/
|
|
4782
|
+
maxSize?: number;
|
|
4783
|
+
/**
|
|
4784
|
+
* Callback function triggered when files are selected
|
|
4785
|
+
*/
|
|
4786
|
+
onChange?: ({ name, fileList }: {
|
|
4787
|
+
name?: string;
|
|
4788
|
+
fileList: BladeFileList;
|
|
4789
|
+
}) => void;
|
|
4790
|
+
/**
|
|
4791
|
+
* Callback function triggered when the preview icon is clicked
|
|
4792
|
+
*/
|
|
4793
|
+
onPreview?: ({ file }: {
|
|
4794
|
+
file: File;
|
|
4795
|
+
}) => void;
|
|
4796
|
+
/**
|
|
4797
|
+
* Callback function triggered when a file is removed
|
|
4798
|
+
*/
|
|
4799
|
+
onRemove?: ({ file }: {
|
|
4800
|
+
file: File;
|
|
4801
|
+
}) => void;
|
|
4802
|
+
/**
|
|
4803
|
+
* Callback function triggered when a file upload is dismissed
|
|
4804
|
+
*/
|
|
4805
|
+
onDismiss?: ({ file }: {
|
|
4806
|
+
file: File;
|
|
4807
|
+
}) => void;
|
|
4808
|
+
/**
|
|
4809
|
+
* Callback function executed when files are dropped into the upload area
|
|
4810
|
+
*/
|
|
4811
|
+
onDrop?: ({ name, fileList }: {
|
|
4812
|
+
name?: string;
|
|
4813
|
+
fileList: BladeFileList;
|
|
4814
|
+
}) => void;
|
|
4815
|
+
/**
|
|
4816
|
+
* State indicating whether there is an error in the FileUpload component
|
|
4817
|
+
*/
|
|
4818
|
+
validationState?: 'none' | 'error';
|
|
4819
|
+
/**
|
|
4820
|
+
* Additional text providing assistance or guidance
|
|
4821
|
+
*/
|
|
4822
|
+
helpText?: string;
|
|
4823
|
+
/**
|
|
4824
|
+
* Text indicating an error state
|
|
4825
|
+
*/
|
|
4826
|
+
errorText?: string;
|
|
4827
|
+
/**
|
|
4828
|
+
* Test ID for automation
|
|
4829
|
+
*/
|
|
4830
|
+
testID?: string;
|
|
4831
|
+
};
|
|
4832
|
+
type FileUploadPropsWithA11yLabel = {
|
|
4833
|
+
/**
|
|
4834
|
+
* Label to be shown for the input field
|
|
4835
|
+
*/
|
|
4836
|
+
label?: undefined;
|
|
4837
|
+
/**
|
|
4838
|
+
* Accessibility label for the input
|
|
4839
|
+
*/
|
|
4840
|
+
accessibilityLabel: string;
|
|
4841
|
+
};
|
|
4842
|
+
type FileUploadPropsWithLabel = {
|
|
4843
|
+
/**
|
|
4844
|
+
* Label to be shown for the input field
|
|
4845
|
+
*/
|
|
4846
|
+
label: string;
|
|
4847
|
+
/**
|
|
4848
|
+
* Accessibility label for the input
|
|
4849
|
+
*/
|
|
4850
|
+
accessibilityLabel?: string;
|
|
4851
|
+
};
|
|
4852
|
+
type FileUploadProps = (FileUploadPropsWithA11yLabel | FileUploadPropsWithLabel) & FileUploadCommonProps;
|
|
4853
|
+
|
|
4854
|
+
declare const FileUpload: (_props: FileUploadProps) => React.ReactElement;
|
|
4855
|
+
|
|
4717
4856
|
type IndicatorCommonProps = {
|
|
4718
4857
|
/**
|
|
4719
4858
|
* Sets the color tone
|
|
@@ -7087,4 +7226,4 @@ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => Rea
|
|
|
7087
7226
|
*/
|
|
7088
7227
|
declare const screenReaderStyles: CSSObject;
|
|
7089
7228
|
|
|
7090
|
-
export { Accordion, AccordionItem, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AutoCompleteProps, AwardIcon, Badge, BadgeProps, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeCommonEvents, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BulkPayoutsIcon, Button, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompassIcon, ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, Identifier, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabPanel, TabPanelProps, Table, TableBackgroundColors, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationCommonProps, TablePaginationProps$1 as TablePaginationProps, TablePaginationType, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, Tour, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme, useToast };
|
|
7229
|
+
export { Accordion, AccordionItem, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AutoCompleteProps, AwardIcon, Badge, BadgeProps, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeCommonEvents, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BulkPayoutsIcon, Button, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompassIcon, ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, Identifier, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabPanel, TabPanelProps, Table, TableBackgroundColors, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationCommonProps, TablePaginationProps$1 as TablePaginationProps, TablePaginationType, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, Tour, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme, useToast };
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { applyTransform } from '@hypermod/utils';
|
|
2
2
|
import * as transformer from '..';
|
|
3
3
|
|
|
4
|
-
it('should update the
|
|
4
|
+
it('should update the color tokens', async () => {
|
|
5
5
|
const result = await applyTransform(
|
|
6
6
|
transformer,
|
|
7
7
|
`
|
|
8
8
|
const CustomBox = styled(Box)\`
|
|
9
9
|
color: \${theme.colors.feedback.notice.action.background.primary.default.lowContrast};
|
|
10
10
|
backgroundColor: \${getIn(theme.colors, 'surface.background.level3.lowContrast')};
|
|
11
|
+
|
|
12
|
+
span {
|
|
13
|
+
color: \${theme.colors.brand.primary[500]};
|
|
14
|
+
backgroundColor: \${theme.colors.brand.gray[200].lowContrast};
|
|
15
|
+
}
|
|
11
16
|
\`
|
|
12
17
|
const App = () => (
|
|
13
18
|
<>
|
|
@@ -24,6 +29,11 @@ it('should update the lineHeight & fontSize tokens', async () => {
|
|
|
24
29
|
"const CustomBox = styled(Box)\`
|
|
25
30
|
color: \${theme.colors.interactive.background.notice.faded};
|
|
26
31
|
backgroundColor: \${getIn(theme.colors, 'surface.background.gray.moderate')};
|
|
32
|
+
|
|
33
|
+
span {
|
|
34
|
+
color: \${theme.colors.surface.background.primary.intense};
|
|
35
|
+
backgroundColor: \${theme.colors.surface.background.gray.moderate};
|
|
36
|
+
}
|
|
27
37
|
\`
|
|
28
38
|
const App = () => (
|
|
29
39
|
<>
|
|
@@ -37,6 +37,8 @@ it('should remove the "variant" prop from Heading', async () => {
|
|
|
37
37
|
const result = await applyTransform(
|
|
38
38
|
transformer,
|
|
39
39
|
`
|
|
40
|
+
import { Heading } from '@razorpay/blade/components';
|
|
41
|
+
|
|
40
42
|
const App = () => (
|
|
41
43
|
<>
|
|
42
44
|
<Heading type="subtle" weight="bold" variant="subheading" marginTop="spacing.2"> Lorem ipsum </Heading>
|
|
@@ -47,7 +49,9 @@ it('should remove the "variant" prop from Heading', async () => {
|
|
|
47
49
|
);
|
|
48
50
|
|
|
49
51
|
expect(result).toMatchInlineSnapshot(`
|
|
50
|
-
"
|
|
52
|
+
"import { Heading, Text } from '@razorpay/blade/components';
|
|
53
|
+
|
|
54
|
+
const App = () => (
|
|
51
55
|
<>
|
|
52
56
|
<Text weight="semibold" marginTop="spacing.2" size="small" color="surface.text.gray.subtle"> Lorem ipsum </Text>
|
|
53
57
|
</>
|
|
@@ -46,7 +46,9 @@ const transformer: Transform = (file, api, options) => {
|
|
|
46
46
|
return 'UPDATE_THIS_VALUE_WITH_A_NEW_COLOR_TOKEN';
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
// Get the token from the original string, e.g. "brand.primary[500]" -> "brand.primary.500"
|
|
50
|
+
const token = originalString.replace('[', '.').replace(/\]|'|"/g, '');
|
|
51
|
+
const replacement = colorTokensMapping[token];
|
|
50
52
|
|
|
51
53
|
if (!replacement) {
|
|
52
54
|
return originalString;
|
|
@@ -89,6 +89,28 @@ function migrateTypographyComponents({ root, j, file }): void {
|
|
|
89
89
|
) {
|
|
90
90
|
node.openingElement.name.name = 'Text';
|
|
91
91
|
node.closingElement.name.name = 'Text';
|
|
92
|
+
|
|
93
|
+
// Add 'Text' import if not present
|
|
94
|
+
// Note that we don't remove the 'Heading' import as it might be used elsewhere
|
|
95
|
+
root
|
|
96
|
+
.find(j.ImportDeclaration, {
|
|
97
|
+
source: {
|
|
98
|
+
value: '@razorpay/blade/components',
|
|
99
|
+
},
|
|
100
|
+
})
|
|
101
|
+
.replaceWith((path) => {
|
|
102
|
+
// Check if Heading import is already present
|
|
103
|
+
const isTextImportPresent = path.node.specifiers.some(
|
|
104
|
+
(node) => node.imported.name === 'Text',
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
// If Heading import is not present, update the "Title" import to use "Heading"
|
|
108
|
+
if (!isTextImportPresent) {
|
|
109
|
+
path.node.specifiers.push(j.importSpecifier(j.identifier('Text')));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return path.node;
|
|
113
|
+
});
|
|
92
114
|
}
|
|
93
115
|
|
|
94
116
|
if (
|
package/fonts.css
CHANGED
|
@@ -80,3 +80,22 @@
|
|
|
80
80
|
U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20A0-20AF, U+20B0-20BF, U+20C0,
|
|
81
81
|
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/* Fallback Fonts */
|
|
85
|
+
@font-face {
|
|
86
|
+
font-family: 'Inter Fallback Arial';
|
|
87
|
+
src: local(Arial);
|
|
88
|
+
size-adjust: 105%;
|
|
89
|
+
ascent-override: normal;
|
|
90
|
+
descent-override: normal;
|
|
91
|
+
line-gap-override: 5%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@font-face {
|
|
95
|
+
font-family: 'TASA Orbiter Fallback Arial';
|
|
96
|
+
src: local(Arial);
|
|
97
|
+
size-adjust: 98%;
|
|
98
|
+
ascent-override: normal;
|
|
99
|
+
descent-override: normal;
|
|
100
|
+
line-gap-override: 7%;
|
|
101
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razorpay/blade",
|
|
3
3
|
"description": "The Design System that powers Razorpay",
|
|
4
|
-
"version": "11.6.
|
|
4
|
+
"version": "11.6.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=18.12.1"
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
"typescript-transform-paths": "3.4.6",
|
|
275
275
|
"@types/body-scroll-lock": "3.1.0",
|
|
276
276
|
"ramda": "0.29.1",
|
|
277
|
-
"@razorpay/i18nify-js": "1.4.
|
|
277
|
+
"@razorpay/i18nify-js": "1.4.4",
|
|
278
278
|
"@razorpay/i18nify-react": "4.0.0"
|
|
279
279
|
},
|
|
280
280
|
"peerDependencies": {
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
"react-hot-toast": "2.4.1",
|
|
292
292
|
"@gorhom/bottom-sheet": "^4.4.6",
|
|
293
293
|
"@gorhom/portal": "^1.0.14",
|
|
294
|
-
"@razorpay/i18nify-js": "^1.4.
|
|
294
|
+
"@razorpay/i18nify-js": "^1.4.4"
|
|
295
295
|
},
|
|
296
296
|
"peerDependenciesMeta": {
|
|
297
297
|
"react-native": {
|