From e331ab6680e551bed154681868345fa1a02f9f6b Mon Sep 17 00:00:00 2001 From: Rushi Vishavadia Date: Thu, 19 Oct 2023 17:06:48 +0530 Subject: [PATCH] Fix to include component names in the built package for very basic auto-complete (#276) * Update types and copy it over to build folder so it actually works * Add missing components, remove useless ones --- index.d.ts | 106 +++++++++++++++++++++++++++++++++++++++++++++++---- package.json | 3 +- 2 files changed, 100 insertions(+), 9 deletions(-) diff --git a/index.d.ts b/index.d.ts index 452eb6b47..28c8df6f9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,21 +1,27 @@ // This is just to make the auto-import work. // Next step is to add types for the props. export { + AccountIcon, + AddNoteIcon, AddSquareIcon, Alert, almostZero, AnnounceIcon, + AppIcon, ArchiveIcon, ArrowCcwIcon, + ArrowCwIcon, + ArrowDownIcon, ArrowRightIcon, ArrowTopRightIcon, + ArrowUpIcon, AtIcon, Avatar, Badge, BalloonIcon, BankCheckIcon, BarGraphIcon, - BaseChartOptions, + BaseInput, BellIcon, BookmarkIcon, BoxIcon, @@ -23,6 +29,7 @@ export { Breakdown, BriefcaseIcon, Button, + ButtonCodeIcon, ButtonGroup, CakeIcon, CalendarDayIcon, @@ -35,6 +42,7 @@ export { CartIcon, CashIcon, Checkbox, + CheckboxIcon, CheckIcon, ChecklistIcon, ChevronDownIcon, @@ -42,18 +50,38 @@ export { ChevronRightIcon, ChevronUpIcon, ChipIcon, + CircleCheckIcon, + CircleCrossIcon, + CircleCrownIcon, + CircleDollarIcon, + CircleDotIcon, + CircleInfinityIcon, + CircleInfoIcon, + CircleKeyIcon, + CircleNotch, + CirclePauseIcon, + CirclePlusIcon, + CircleSubtractIcon, ClipboardIcon, ClockAltIcon, ClockIcon, + ClockManualIcon, CloseCircleIcon, CloseIcon, + CollapseIcon, + ComboBox, + CommentAltIcon, CommentIcon, + compactNumber, CompassIcon, CopyIcon, Counter, + CouponIcon, CrmIcon, + CrownIcon, Currency, DashboardIcon, + dateFromObjectId, DatePicker, DatePickerPopover, DecreaseIcon, @@ -62,75 +90,115 @@ export { DisputeIcon, Dot, DotCircleIcon, + DoubleCheckIcon, DownArrowIcon, DownloadIcon, Drawer, + DropdownIcon, + DumbbellIcon, + DuplicateIcon, + DurationIcon, EditIcon, + EditNoteIcon, + EditNotesIcon, EllipsisIcon, + EmailCheckedIcon, EmailIcon, + EmailResendIcon, + EmailSendIcon, EmptyChecklistIcon, EquipmentIcon, ExportIcon, + EyeClosedIcon, EyeIcon, FaceNeutralIcon, FaceSadIcon, FaceSmileIcon, + FadeIn, + FilterIcon, + FilterIconOld, FlagIcon, flash, + FlexFee2Icon, + FlexFeeIcon, + FoodIcon, ForkIcon, + formatDate, + formatTime, FormGroup, FunnelIcon, + getChildByType, + getChildrenByType, + getInitials, getSymbol, GiftIcon, + GlobeIcon, HandIcon, + HandshakeIcon, HeaderToolbar, + HelpCenterIcon, HiddenIcon, - HiddenIcon, - HistogramOptions, - StoreCreditIcon, + HouseIcon, ImageIcon, + ImageUpload, InfinityIcon, - CircleInfoIcon, + InlineValuePopover, Input, InvoiceIcon, isOSX, isZeroDecimal, Key, KeyIcon, + KioskIcon, Label, + LabelIcon, LandscapeIcon, + LightIcon, LinkIcon, LockIcon, Login, Logo, + LogoutIcon, MagicIcon, + MedicalIcon, MegaphoneIcon, MenuIcon, + MinusIcon, MixedChecklistIcon, + MobileIcon, Modal, MoneyAddIcon, MoneyBackIcon, MoneyIcon, + MountainIcon, + MouseIcon, Number, numberFormat, + PassIcon, PauseIcon, PenIcon, Phone, PhoneIcon, - PieOptions, + PhotosIcon, PiggyBankIcon, PinIcon, PipeIcon, PlusIcon, + PolicyIcon, Popover, PopoverList, PrintIcon, ProductsIcon, + Provider, + QuestionIcon, QuestionnaireIcon, RangeSlider, ReceiptIcon, - RelativeDateRange, + ReceptionBellIcon, + ReceptionBellMoneyIcon, RefreshIcon, + RefundIcon, + RelativeDateRange, RosterIcon, RoundedSquareIcon, roundNumber, @@ -140,36 +208,58 @@ export { SearchIcon, Select, SendIcon, + SeniorIcon, + SeniorV2Icon, + SeniorV3Icon, ServiceIcon, SettingsIcon, ShapesIcon, ShareIcon, ShirtIcon, + ShoppingBagIcon, Sidebar, Skeleton, + SlideDown, Spinner, SplitPaymentIcon, SquareIcon, StackIcon, + StarFilledIcon, StarIcon, + StoreCreditIcon, + SubmitButton, Switch, Table, Tabs, Tag, + TaxIcon, Textarea, theme, + ThumbsDownIcon, + ThumbsUpIcon, TicketIcon, + ToggleButton, Tooltip, + TransferArrowIcon, TrashIcon, UnlinkIcon, + useId, + useIsClient, UserAddIcon, + UserChangedIcon, UserIcon, + UserSubtractIcon, + ValuePopoverText, VeteranIcon, + ViewNotesIcon, VoucherIcon, WaitlistIcon, + WarningDiamondIcon, WarningIcon, + WarningTriangleIcon, + WeightIcon, WifiIcon, WriteIcon, + XolaBotIcon, XrayIcon, - ImageUpload, } from "./build/ui-kit.umd"; diff --git a/package.json b/package.json index 24643987b..26ab2977f 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "files": [ "build", "index.css", + "index.d.ts", "tailwind.config.js", "postcss.config.js" ], @@ -17,7 +18,7 @@ "start": "node scripts/prepare && start-storybook -p 6006 -s public", "dev": "node scripts/prepare && start-storybook -p 6006 -s public --no-manager-cache", "storybook": "node scripts/prepare && start-storybook -p 6006 -s public", - "build": "node scripts/prepare && vite build", + "build": "node scripts/prepare && vite build && cp index.d.ts build", "watch": "npm run build -- --watch", "clean": "rm -rf node_modules/.vite", "build:storybook": "node scripts/prepare && build-storybook -s public",