impact-ui 3.7.25 → 4.0.0-alpha.10
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/MIGRATION_GUIDE.md +328 -0
- package/README.md +154 -15
- package/bin/migrate-image-paths.cjs +127 -0
- package/bin/migrate.js +293 -0
- package/codemods/component-map.js +153 -0
- package/codemods/image-paths-transform.js +69 -0
- package/codemods/transform.js +136 -0
- package/dist/components/Accordion/index.js +2 -1
- package/dist/components/AccordionModern/index.js +2 -1
- package/dist/components/Alert/index.js +2 -1
- package/dist/components/Avatar/index.js +2 -1
- package/dist/components/Badge/filled/filledIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/filled/filledOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/filled/filledOnlyLabelBadges/index.js +2 -1
- package/dist/components/Badge/index.js +3 -2
- package/dist/components/Badge/stroke/strokeIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/stroke/strokeOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/stroke/strokeOnlyLabelBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleIOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleOnlyLabelBadges/index.js +2 -1
- package/dist/components/BottomSheet/index.js +2 -1
- package/dist/components/Breadcrumbs/index.js +2 -1
- package/dist/components/Button/index.js +2 -1
- package/dist/components/ButtonGroup/index.js +2 -1
- package/dist/components/Card/index.js +2 -1
- package/dist/components/Chart/index.js +2 -1
- package/dist/components/Chatbot/index.js +2 -1
- package/dist/components/Checkbox/index.js +2 -1
- package/dist/components/Chips/index.js +2 -1
- package/dist/components/CreateItemFlow/index.js +2 -1
- package/dist/components/DatePicker/datePickerDropdown.js +2 -1
- package/dist/components/DatePicker/index.js +3 -2
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +2 -1
- package/dist/components/DateRangePicker/index.js +3 -2
- package/dist/components/DynamicLayout/index.js +2 -1
- package/dist/components/EmptyState/EmptyStateImage.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyStateImage.js +3 -2
- package/dist/components/EmptyState/index.js +2 -1
- package/dist/components/FileUpload/index.js +2 -1
- package/dist/components/FilterPanel/index.js +2 -1
- package/dist/components/FiltersStrip/index.js +2 -1
- package/dist/components/Header/index.js +2 -1
- package/dist/components/HomePage/index.js +2 -1
- package/dist/components/Input/index.js +2 -1
- package/dist/components/Loader/index.js +2 -1
- package/dist/components/Menu/IconMenuItem.js +2 -1
- package/dist/components/Menu/MenuHeaderInfo.js +2 -1
- package/dist/components/Menu/NestedMenuItem.js +2 -1
- package/dist/components/Menu/index.js +2 -1
- package/dist/components/Menu/nestedMenuItemsFromObject.js +2 -1
- package/dist/components/Modal/index.js +2 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +2 -1
- package/dist/components/Notification/index.js +2 -1
- package/dist/components/Panel/index.js +2 -1
- package/dist/components/Popover/index.js +2 -1
- package/dist/components/ProgressBar/index.js +2 -1
- package/dist/components/Prompt/index.js +2 -1
- package/dist/components/RadioButtonGroup/index.js +2 -1
- package/dist/components/Select/index.js +2 -1
- package/dist/components/Sidebar/index.js +2 -1
- package/dist/components/Slider/index.js +2 -1
- package/dist/components/Stepper/index.js +2 -1
- package/dist/components/Switch/index.js +2 -1
- package/dist/components/Table/TableImpl.js +4 -3
- package/dist/components/TableChat/EmptyContainer.js +2 -1
- package/dist/components/TableChat/TableChatSidePanel.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.js +2 -1
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +2 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +2 -1
- package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +2 -1
- package/dist/components/TableChat/components/TextEditor/Mention.js +2 -1
- package/dist/components/TableChat/components/TextEditor/MentionList.js +2 -1
- package/dist/components/Tabs/index.js +2 -1
- package/dist/components/Tag/index.js +2 -1
- package/dist/components/TagGroup/index.js +2 -1
- package/dist/components/TextArea/index.js +2 -1
- package/dist/components/Toast/index.js +2 -1
- package/dist/components/Tooltip/index.js +2 -1
- package/dist/components/common/HelperText/index.js +2 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/mcp-component-registry.json +1 -1
- package/dist/styles/entry.d.ts +2 -0
- package/dist/styles/entry.d.ts.map +1 -0
- package/dist/styles/entry.js +1 -0
- package/dist/styles/style.css +1 -1
- package/eslint-plugin/index.js +91 -0
- package/eslint-plugin/rules/no-barrel-import.js +224 -0
- package/package.json +153 -89
- package/dist/0db32db10ae1525f.svg +0 -9
- package/dist/2bc76319b1fa572e.svg +0 -9
- package/dist/39d49e4daed1a992.svg +0 -9
- package/dist/44beedf64dc29d19.svg +0 -9
- package/dist/49a4f914058314f1.svg +0 -9
- package/dist/6fc8a59d621a04a1.svg +0 -13
- package/dist/78f845dcfc981491.svg +0 -9
- package/dist/b31c0c2a19c1c19a.svg +0 -9
- package/dist/index.js +0 -308
- package/dist/index.js.map +0 -1
- package/src/components/Accordion/Accordion.styles.scss +0 -118
- package/src/components/Accordion/index.js +0 -104
- package/src/components/AccordionModern/AccordionModern.styles.scss +0 -121
- package/src/components/AccordionModern/SortableAccordionComp.js +0 -156
- package/src/components/AccordionModern/index.js +0 -103
- package/src/components/Alert/Alert.styles.scss +0 -131
- package/src/components/Alert/index.js +0 -71
- package/src/components/Avatar/Avatar.styles.scss +0 -25
- package/src/components/Avatar/index.js +0 -58
- package/src/components/Badge/Badges.style.scss +0 -55
- package/src/components/Badge/filled/filledIconLabelBadges/filledIconLabelBadges.styles.scss +0 -32
- package/src/components/Badge/filled/filledIconLabelBadges/index.js +0 -38
- package/src/components/Badge/filled/filledOnlyIconBadges/filledOnlyIconBadges.styles.scss +0 -26
- package/src/components/Badge/filled/filledOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/filled/filledOnlyLabelBadges/filledOnlyLabelBadges.styles.scss +0 -66
- package/src/components/Badge/filled/filledOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/filled/index.js +0 -30
- package/src/components/Badge/index.js +0 -53
- package/src/components/Badge/stroke/index.js +0 -43
- package/src/components/Badge/stroke/strokeIconLabelBadges/index.js +0 -38
- package/src/components/Badge/stroke/strokeIconLabelBadges/strokeIconLabelBadges.styles.scss +0 -33
- package/src/components/Badge/stroke/strokeOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/stroke/strokeOnlyIconBadges/strokeOnlyIconBadges.styles.scss +0 -27
- package/src/components/Badge/stroke/strokeOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/stroke/strokeOnlyLabelBadges/strokeOnlyLabelBadges.styles.scss +0 -89
- package/src/components/Badge/styles.css +0 -52
- package/src/components/Badge/subtle/index.js +0 -41
- package/src/components/Badge/subtle/subtleIOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/subtle/subtleIOnlyIconBadges/subtleIOnlyIconBadges.scss +0 -26
- package/src/components/Badge/subtle/subtleIconLabelBadges/index.js +0 -38
- package/src/components/Badge/subtle/subtleIconLabelBadges/subtleIconLabelBadges.scss +0 -56
- package/src/components/Badge/subtle/subtleOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/subtle/subtleOnlyLabelBadges/subtleOnlyLabelBadges.scss +0 -70
- package/src/components/BottomSheet/BottomSheet.styles.scss +0 -46
- package/src/components/BottomSheet/index.js +0 -60
- package/src/components/Breadcrumbs/Breadcrumbs.styles.scss +0 -65
- package/src/components/Breadcrumbs/index.js +0 -121
- package/src/components/Button/Button.styles.scss +0 -345
- package/src/components/Button/index.js +0 -171
- package/src/components/ButtonGroup/ButtonGroup.styles.scss +0 -125
- package/src/components/ButtonGroup/index.js +0 -84
- package/src/components/Card/Card.styles.scss +0 -33
- package/src/components/Card/index.js +0 -21
- package/src/components/Chart/Chart.style.scss +0 -142
- package/src/components/Chart/index.js +0 -752
- package/src/components/ChatBot/bookMarkPanel.js +0 -74
- package/src/components/ChatBot/chatBot.style.scss +0 -1295
- package/src/components/ChatBot/chatBotFooter.js +0 -14
- package/src/components/ChatBot/chatBotLandingScreen.js +0 -26
- package/src/components/ChatBot/chatInput.js +0 -206
- package/src/components/ChatBot/chatbotModuleMenu.js +0 -278
- package/src/components/ChatBot/constant.js +0 -32
- package/src/components/ChatBot/conversationScreen.js +0 -281
- package/src/components/ChatBot/customScreen.js +0 -69
- package/src/components/ChatBot/historyPanel.js +0 -579
- package/src/components/ChatBot/index.js +0 -473
- package/src/components/ChatBot/newChatComponent.js +0 -105
- package/src/components/ChatBot/utils.js +0 -27
- package/src/components/Checkbox/Checkbox.styles.scss +0 -232
- package/src/components/Checkbox/dashed/index.js +0 -34
- package/src/components/Checkbox/default/index.js +0 -70
- package/src/components/Checkbox/index.js +0 -50
- package/src/components/Checkbox/withDropDown/index.js +0 -96
- package/src/components/Checkbox/withoutFormLabel/index.js +0 -46
- package/src/components/Chips/Chip.style.scss +0 -134
- package/src/components/Chips/index.js +0 -34
- package/src/components/CreateItemFlow/CreateItemFlow.styles.scss +0 -37
- package/src/components/CreateItemFlow/index.js +0 -145
- package/src/components/DatePicker/DatePicker.styles.scss +0 -519
- package/src/components/DatePicker/datePickerDropdown.js +0 -282
- package/src/components/DatePicker/datePickerFooter.js +0 -76
- package/src/components/DatePicker/datePickerInput.js +0 -333
- package/src/components/DatePicker/index.js +0 -288
- package/src/components/DatePicker/showMonthYearSelect.js +0 -119
- package/src/components/DateRangePicker/DateRangePicker.styles.scss +0 -635
- package/src/components/DateRangePicker/dateRangePickerCustom.js +0 -22
- package/src/components/DateRangePicker/dateRangePickerDropdown.js +0 -320
- package/src/components/DateRangePicker/dateRangePickerFooter.js +0 -50
- package/src/components/DateRangePicker/dateRangePickerInput.js +0 -544
- package/src/components/DateRangePicker/index.js +0 -393
- package/src/components/DateRangePicker/showMonthYearSelect.js +0 -103
- package/src/components/DateRangePicker/utils.js +0 -71
- package/src/components/DynamicLayout/DynamicLayout.styles.scss +0 -153
- package/src/components/DynamicLayout/index.js +0 -73
- package/src/components/EmptyState/EmptyState.styles.scss +0 -88
- package/src/components/EmptyState/EmptyStateImageComponent.jsx +0 -36
- package/src/components/EmptyState/index.js +0 -54
- package/src/components/FileUpload/FileUpload.styles.scss +0 -449
- package/src/components/FileUpload/index.js +0 -641
- package/src/components/FilterPanel/FilterPanel.styles.scss +0 -241
- package/src/components/FilterPanel/FilterPanelHeader.js +0 -15
- package/src/components/FilterPanel/PanelFooter.js +0 -65
- package/src/components/FilterPanel/PanelSidebar.js +0 -85
- package/src/components/FilterPanel/index.js +0 -147
- package/src/components/FiltersStrip/FiltersStrip.styles.scss +0 -343
- package/src/components/FiltersStrip/Slider/FilterSlider.styles.scss +0 -85
- package/src/components/FiltersStrip/Slider/Portal.js +0 -59
- package/src/components/FiltersStrip/Slider/index.js +0 -233
- package/src/components/FiltersStrip/appliedFilter.js +0 -180
- package/src/components/FiltersStrip/filterDropDown.js +0 -96
- package/src/components/FiltersStrip/index.js +0 -127
- package/src/components/FiltersStrip/mockData.js +0 -227
- package/src/components/Header/Header.styles.scss +0 -223
- package/src/components/Header/index.js +0 -156
- package/src/components/HomePage/HomePage.styles.scss +0 -1638
- package/src/components/HomePage/constant.js +0 -331
- package/src/components/HomePage/index.js +0 -675
- package/src/components/Input/Input.styles.scss +0 -318
- package/src/components/Input/helperText.js +0 -19
- package/src/components/Input/index.js +0 -60
- package/src/components/Input/inputWithIcon.js +0 -134
- package/src/components/Input/vanilaInput.js +0 -68
- package/src/components/Loader/Loader.styles.scss +0 -90
- package/src/components/Loader/index.js +0 -69
- package/src/components/Menu/IconMenuItem.js +0 -100
- package/src/components/Menu/Menu.styles.scss +0 -190
- package/src/components/Menu/MenuHeader.jsx +0 -84
- package/src/components/Menu/MenuHeaderInfo.jsx +0 -319
- package/src/components/Menu/MenuHeaderInfo.styles.scss +0 -123
- package/src/components/Menu/NestedMenuItem.js +0 -189
- package/src/components/Menu/index.js +0 -254
- package/src/components/Menu/nestedMenuItemsFromObject.js +0 -100
- package/src/components/Modal/Modal.styles.scss +0 -129
- package/src/components/Modal/index.js +0 -141
- package/src/components/MonthPicker/MonthPicker.styles.scss +0 -255
- package/src/components/MonthPicker/constant.js +0 -1
- package/src/components/MonthPicker/index.js +0 -373
- package/src/components/MonthRangePicker/MonthRangePicker.styles.scss +0 -383
- package/src/components/MonthRangePicker/constant.js +0 -1
- package/src/components/MonthRangePicker/index.js +0 -574
- package/src/components/Notification/Notification.styles.scss +0 -594
- package/src/components/Notification/NotificationBody/NotificationInfoList/chipsLists.js +0 -144
- package/src/components/Notification/NotificationBody/NotificationInfoList/index.js +0 -128
- package/src/components/Notification/NotificationBody/NotificationInfoList/notificationList.js +0 -165
- package/src/components/Notification/NotificationBody/NotificationPanels/chipsLists.js +0 -85
- package/src/components/Notification/NotificationBody/NotificationPanels/index.js +0 -259
- package/src/components/Notification/NotificationBody/NotificationPanels/notificationList.js +0 -637
- package/src/components/Notification/NotificationBody/index.js +0 -117
- package/src/components/Notification/index.js +0 -128
- package/src/components/Notification/mockData.js +0 -389
- package/src/components/Notification/notificationFooter.js +0 -31
- package/src/components/Notification/notificationHeader.js +0 -28
- package/src/components/Panel/Panel.styles.scss +0 -71
- package/src/components/Panel/index.js +0 -144
- package/src/components/Popover/Popover.styles.scss +0 -52
- package/src/components/Popover/index.js +0 -71
- package/src/components/Portal/index.js +0 -31
- package/src/components/ProgressBar/ProgressBar.styles.scss +0 -62
- package/src/components/ProgressBar/index.js +0 -40
- package/src/components/Prompt/Prompt.styles.scss +0 -107
- package/src/components/Prompt/index.js +0 -107
- package/src/components/RadioButtonGroup/RadioButtonGroup.styles.scss +0 -136
- package/src/components/RadioButtonGroup/index.js +0 -107
- package/src/components/Select/SearchFilter.js +0 -72
- package/src/components/Select/Select.styles.scss +0 -748
- package/src/components/Select/customGroupHeading.js +0 -24
- package/src/components/Select/dropdown.js +0 -65
- package/src/components/Select/hooks/index.js +0 -2
- package/src/components/Select/hooks/useClickOutside.js +0 -61
- package/src/components/Select/hooks/useMenuPosition.js +0 -288
- package/src/components/Select/index.js +0 -1307
- package/src/components/Select/menuList.js +0 -119
- package/src/components/Select/optionList.js +0 -215
- package/src/components/Select/selected-option-tags.js +0 -99
- package/src/components/Select/utils.js +0 -232
- package/src/components/Sidebar/Menus/childMenu.js +0 -88
- package/src/components/Sidebar/Menus/index.js +0 -130
- package/src/components/Sidebar/Menus/parentMenu.js +0 -173
- package/src/components/Sidebar/Sidebar.styles.scss +0 -411
- package/src/components/Sidebar/actions.js +0 -31
- package/src/components/Sidebar/index.js +0 -84
- package/src/components/Sidebar/mock.js +0 -202
- package/src/components/Slider/Sliders.styles.scss +0 -260
- package/src/components/Slider/index.js +0 -314
- package/src/components/Stepper/Stepper.styles.scss +0 -355
- package/src/components/Stepper/index.js +0 -101
- package/src/components/Switch/Switch.styles.scss +0 -96
- package/src/components/Switch/index.js +0 -59
- package/src/components/Table/AdvanceSearchModalItem.js +0 -392
- package/src/components/Table/AdvanceSortModal.js +0 -332
- package/src/components/Table/AgGridHeader.js +0 -1009
- package/src/components/Table/CommentsPortal.js +0 -428
- package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +0 -323
- package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +0 -476
- package/src/components/Table/NoComments.js +0 -295
- package/src/components/Table/Table.styles.scss +0 -3859
- package/src/components/Table/actionBar.js +0 -43
- package/src/components/Table/advanceSearchModal.js +0 -797
- package/src/components/Table/commentPanel.js +0 -421
- package/src/components/Table/filterUtils.js +0 -850
- package/src/components/Table/index.js +0 -2175
- package/src/components/Table/mockData.js +0 -1344
- package/src/components/Table/tableFunctions.js +0 -1676
- package/src/components/Table/tableHeader.js +0 -476
- package/src/components/Table/tableIcons.js +0 -61
- package/src/components/Table/tableMoreOptions.js +0 -293
- package/src/components/Table/tablePagination.js +0 -63
- package/src/components/Table/tableSettings.js +0 -287
- package/src/components/Table/withCommentIcon.js +0 -107
- package/src/components/TableChat/EmptyContainer.jsx +0 -13
- package/src/components/TableChat/README.md +0 -588
- package/src/components/TableChat/TableChatSidePanel.jsx +0 -832
- package/src/components/TableChat/TableChatSidePanel.styles.scss +0 -57
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.jsx +0 -43
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.jsx +0 -55
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.jsx +0 -94
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.jsx +0 -22
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.scss +0 -179
- package/src/components/TableChat/components/SkeletonList.jsx +0 -12
- package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.jsx +0 -171
- package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.styles.scss +0 -37
- package/src/components/TableChat/components/TableChatLeftSection/ChannelCheckbox/ChannelCheckbox.jsx +0 -28
- package/src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.jsx +0 -116
- package/src/components/TableChat/components/TableChatLeftSection/ChatChannelList.jsx +0 -89
- package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.jsx +0 -27
- package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.jsx +0 -191
- package/src/components/TableChat/components/TableChatLeftSection/ChatIconButton/ChatIconButton.jsx +0 -23
- package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.jsx +0 -117
- package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.styles.scss +0 -469
- package/src/components/TableChat/components/TableChatLeftSection/UnreadBadge/UnreadBadge.jsx +0 -16
- package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.jsx +0 -119
- package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.styles.scss +0 -87
- package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.jsx +0 -216
- package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.styles.scss +0 -291
- package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.jsx +0 -19
- package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/DeletedMessage.styles.scss +0 -55
- package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.jsx +0 -61
- package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.styles.scss +0 -13
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.jsx +0 -432
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.jsx +0 -365
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.jsx +0 -42
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/chatHeader.styles.scss +0 -323
- package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.jsx +0 -793
- package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.styles.scss +0 -394
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.jsx +0 -61
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.styles.scss +0 -28
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.jsx +0 -11
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.styles.scss +0 -3
- package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.jsx +0 -220
- package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.styles.scss +0 -128
- package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.jsx +0 -246
- package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.styles.scss +0 -210
- package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.jsx +0 -52
- package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.styles.scss +0 -34
- package/src/components/TableChat/components/TableChatRightSection/EmojiPicker/EmojiPicker.jsx +0 -31
- package/src/components/TableChat/components/TableChatRightSection/FileUploader/FileUploader.jsx +0 -170
- package/src/components/TableChat/components/TableChatRightSection/ImageUploader/ImageUploader.jsx +0 -165
- package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChat.styles.scss +0 -587
- package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.jsx +0 -244
- package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.jsx +0 -29
- package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.styles.scss +0 -47
- package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.jsx +0 -1340
- package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.styles.scss +0 -147
- package/src/components/TableChat/components/TextEditor/EditorToolbar.jsx +0 -209
- package/src/components/TableChat/components/TextEditor/EditorToolbar.styles.scss +0 -61
- package/src/components/TableChat/components/TextEditor/Mention.jsx +0 -234
- package/src/components/TableChat/components/TextEditor/MentionList.jsx +0 -118
- package/src/components/TableChat/components/TextEditor/MentionList.scss +0 -146
- package/src/components/TableChat/components/TextEditor/styles.scss +0 -278
- package/src/components/TableChat/components/TextEditor/suggestion.js +0 -124
- package/src/components/TableChat/components/chatConfig.js +0 -64
- package/src/components/TableChat/hooks/useInfiniteScroll.js +0 -256
- package/src/components/TableOld/AgGridHeader.js +0 -545
- package/src/components/TableOld/Table.styles.scss +0 -2192
- package/src/components/TableOld/actionBar.js +0 -43
- package/src/components/TableOld/index.js +0 -598
- package/src/components/TableOld/mockData.js +0 -1344
- package/src/components/TableOld/tableFunctions.js +0 -1734
- package/src/components/TableOld/tableHeader.js +0 -251
- package/src/components/TableOld/tableIcons.js +0 -61
- package/src/components/TableOld/tablePagination.js +0 -64
- package/src/components/TableOld/tableSettings.js +0 -166
- package/src/components/Tabs/Tabs.styles.scss +0 -120
- package/src/components/Tabs/index.js +0 -91
- package/src/components/Tabs/tabPanel.js +0 -38
- package/src/components/Tag/Tags.styles.scss +0 -71
- package/src/components/Tag/filled.js +0 -48
- package/src/components/Tag/index.js +0 -54
- package/src/components/Tag/solid.js +0 -47
- package/src/components/Tag/stroke.js +0 -47
- package/src/components/Tag/utils.js +0 -12
- package/src/components/TagGroup/TagGroup.styles.scss +0 -7
- package/src/components/TagGroup/index.js +0 -6
- package/src/components/TextArea/TextArea.styles.scss +0 -158
- package/src/components/TextArea/index.js +0 -121
- package/src/components/Toast/Toast.styles.scss +0 -66
- package/src/components/Toast/index.js +0 -35
- package/src/components/Tooltip/Tooltips.styles.scss +0 -111
- package/src/components/Tooltip/index.js +0 -68
- package/src/components/common/HelperText/HelperText.styles.scss +0 -18
- package/src/components/common/HelperText/index.js +0 -44
- package/src/components/common/MentionEditor/MentionEditor.styles.scss +0 -301
- package/src/components/common/MentionEditor/MentionList/MentionList.styles.scss +0 -146
- package/src/components/common/MentionEditor/MentionList/index.js +0 -130
- package/src/components/common/MentionEditor/index.js +0 -246
- package/src/components/common/MentionEditor/suggestion.js +0 -124
- package/src/components/index.js +0 -53
- package/src/stories/Accordion.stories.js +0 -151
- package/src/stories/AccordionModern.stories.js +0 -263
- package/src/stories/Alert.stories.js +0 -103
- package/src/stories/Avatar.stories.js +0 -79
- package/src/stories/Badge.stories.js +0 -112
- package/src/stories/BottomSheet.stories.js +0 -224
- package/src/stories/Breadcrumbs.stories.js +0 -143
- package/src/stories/Button.stories.js +0 -190
- package/src/stories/ButtonGroup.stories.js +0 -123
- package/src/stories/Card.stories.js +0 -73
- package/src/stories/Changelog.mdx +0 -1006
- package/src/stories/Chart.stories.js +0 -2017
- package/src/stories/ChatBot.stories.js +0 -668
- package/src/stories/Checkbox.stories.js +0 -209
- package/src/stories/Chips.stories.js +0 -106
- package/src/stories/CreateItemFlow.stories.js +0 -255
- package/src/stories/DatePicker.stories.js +0 -311
- package/src/stories/DateRangePicker.stories.js +0 -364
- package/src/stories/EmptyState.stories.js +0 -110
- package/src/stories/FileUpload.stories.js +0 -169
- package/src/stories/FilterPanel.stories.js +0 -309
- package/src/stories/FiltersStrip.stories.js +0 -244
- package/src/stories/GettingStarted.mdx +0 -153
- package/src/stories/Header.stories.js +0 -185
- package/src/stories/HomePage.stories.js +0 -201
- package/src/stories/Input.stories.js +0 -165
- package/src/stories/Loader.stories.js +0 -33
- package/src/stories/Menu.stories.js +0 -309
- package/src/stories/Modal.stories.js +0 -185
- package/src/stories/MonthPicker.stories.js +0 -313
- package/src/stories/MonthRangePicker.stories.js +0 -255
- package/src/stories/Notification.stories.js +0 -500
- package/src/stories/Panel.stories.js +0 -179
- package/src/stories/Popover.stories.js +0 -125
- package/src/stories/ProgressBar.stories.js +0 -93
- package/src/stories/Prompt.stories.js +0 -120
- package/src/stories/RadioButtonGroup.stories.js +0 -83
- package/src/stories/Select.stories.js +0 -753
- package/src/stories/Sidebar.stories.js +0 -177
- package/src/stories/Slider.stories.js +0 -226
- package/src/stories/Stepper.stories.js +0 -158
- package/src/stories/Switch.stories.js +0 -72
- package/src/stories/Table.stories.js +0 -4323
- package/src/stories/TableChat.mdx +0 -992
- package/src/stories/TableChat.stories.js +0 -1712
- package/src/stories/TableOld.stories.js +0 -954
- package/src/stories/Tabs.stories.js +0 -253
- package/src/stories/Tag.stories.js +0 -92
- package/src/stories/TagGroup.stories.js +0 -39
- package/src/stories/TextArea.stories.js +0 -148
- package/src/stories/Toast.stories.js +0 -113
- package/src/stories/Tooltip.stories.js +0 -86
- package/src/stories/storybookLinks.mdx +0 -20
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Migrating to impact-ui v4.0
|
|
2
|
+
|
|
3
|
+
## Private npm packages `@impactsmartsuite/*` (v5.0+)
|
|
4
|
+
|
|
5
|
+
The UI library and MCP server are published to [npm](https://www.npmjs.com/) under the **impactsmartsuite** organization as **private** scoped packages:
|
|
6
|
+
|
|
7
|
+
- `@impactsmartsuite/impact-ui`
|
|
8
|
+
- `@impactsmartsuite/impact-ui-mcp-server`
|
|
9
|
+
|
|
10
|
+
Your npm user (or CI token) must have permission to install and publish these packages on that org. Authenticate against the default registry (`https://registry.npmjs.org/`):
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm login
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
For automation, use a granular access token with **read/publish** as appropriate and configure `~/.npmrc` or environment-based auth (for example `//registry.npmjs.org/:_authToken=${NPM_TOKEN}`). Do not commit tokens.
|
|
17
|
+
|
|
18
|
+
**Install:**
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @impactsmartsuite/impact-ui
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Imports** (same subpath style as before, with the scoped package name):
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { Button, Badge } from '@impactsmartsuite/impact-ui';
|
|
28
|
+
import { Button } from '@impactsmartsuite/impact-ui/Button';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start: Tree Shaking Migration (2 minutes)
|
|
34
|
+
|
|
35
|
+
Version 4.0 introduces **tree shaking support** for significantly smaller bundle sizes. Follow these steps to migrate:
|
|
36
|
+
|
|
37
|
+
### Step 1: Update the Package
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install @impactsmartsuite/impact-ui@latest
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Step 2: Run Automatic Migration
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx impact-ui-migrate ./src
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This will automatically transform all your barrel imports to direct imports:
|
|
50
|
+
|
|
51
|
+
**Before:**
|
|
52
|
+
```tsx
|
|
53
|
+
import { Button, Input, Card, Alert } from '@impactsmartsuite/impact-ui';
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**After:**
|
|
57
|
+
```tsx
|
|
58
|
+
import { Button } from '@impactsmartsuite/impact-ui/Button';
|
|
59
|
+
import { Input } from '@impactsmartsuite/impact-ui/Input';
|
|
60
|
+
import { Card } from '@impactsmartsuite/impact-ui/Card';
|
|
61
|
+
import { Alert } from '@impactsmartsuite/impact-ui/Alert';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 3: Verify Changes
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git diff # Review the changes
|
|
68
|
+
npm test # Run your tests
|
|
69
|
+
npm run build # Verify the build works
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Step 4: (Recommended) Add ESLint Rule
|
|
73
|
+
|
|
74
|
+
Prevent future barrel imports by adding the ESLint rule:
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
// .eslintrc.js
|
|
78
|
+
module.exports = {
|
|
79
|
+
plugins: ['impact-ui'],
|
|
80
|
+
rules: {
|
|
81
|
+
'impact-ui/no-barrel-import': 'error'
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Or use the recommended config
|
|
86
|
+
module.exports = {
|
|
87
|
+
extends: ['plugin:impact-ui/recommended']
|
|
88
|
+
};
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Then run auto-fix for any violations:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npx eslint --fix ./src
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Migration CLI Options
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Basic usage
|
|
103
|
+
npx impact-ui-migrate ./src
|
|
104
|
+
|
|
105
|
+
# Preview changes without applying (dry run)
|
|
106
|
+
npx impact-ui-migrate ./src --dry
|
|
107
|
+
|
|
108
|
+
# Migrate only TypeScript files
|
|
109
|
+
npx impact-ui-migrate ./src --extensions tsx,ts
|
|
110
|
+
|
|
111
|
+
# Migrate a specific file
|
|
112
|
+
npx impact-ui-migrate ./src/components/MyComponent.tsx
|
|
113
|
+
|
|
114
|
+
# Show detailed output
|
|
115
|
+
npx impact-ui-migrate ./src --verbose
|
|
116
|
+
|
|
117
|
+
# Show help
|
|
118
|
+
npx impact-ui-migrate --help
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## ESLint Plugin Configuration
|
|
124
|
+
|
|
125
|
+
### Basic Setup
|
|
126
|
+
|
|
127
|
+
```javascript
|
|
128
|
+
// .eslintrc.js
|
|
129
|
+
module.exports = {
|
|
130
|
+
plugins: ['impact-ui'],
|
|
131
|
+
rules: {
|
|
132
|
+
'impact-ui/no-barrel-import': 'error'
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Using Recommended Config
|
|
138
|
+
|
|
139
|
+
```javascript
|
|
140
|
+
// .eslintrc.js
|
|
141
|
+
module.exports = {
|
|
142
|
+
extends: ['plugin:impact-ui/recommended']
|
|
143
|
+
};
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Available Configs
|
|
147
|
+
|
|
148
|
+
| Config | Description |
|
|
149
|
+
|--------|-------------|
|
|
150
|
+
| `plugin:impact-ui/recommended` | Enforces direct imports as errors |
|
|
151
|
+
| `plugin:impact-ui/warning` | Shows warnings (for gradual migration) |
|
|
152
|
+
| `plugin:impact-ui/strict` | Strict mode with no exceptions |
|
|
153
|
+
|
|
154
|
+
### ESLint Flat Config (eslint.config.js)
|
|
155
|
+
|
|
156
|
+
```javascript
|
|
157
|
+
// eslint.config.js
|
|
158
|
+
import impactUI from 'impact-ui/eslint-plugin';
|
|
159
|
+
|
|
160
|
+
export default [
|
|
161
|
+
impactUI.configs['flat/recommended'],
|
|
162
|
+
// ... your other configs
|
|
163
|
+
];
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Rule Options
|
|
167
|
+
|
|
168
|
+
```javascript
|
|
169
|
+
// .eslintrc.js
|
|
170
|
+
module.exports = {
|
|
171
|
+
rules: {
|
|
172
|
+
'impact-ui/no-barrel-import': ['error', {
|
|
173
|
+
// Ignore specific imports (keep them as barrel imports)
|
|
174
|
+
ignoreImports: ['someUtilFunction'],
|
|
175
|
+
|
|
176
|
+
// Add custom component mappings
|
|
177
|
+
additionalComponents: {
|
|
178
|
+
'CustomComponent': 'impact-ui/CustomComponent'
|
|
179
|
+
}
|
|
180
|
+
}]
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Bundle Size Impact
|
|
188
|
+
|
|
189
|
+
| Import Style | Bundle Size | Tree Shaking |
|
|
190
|
+
|--------------|-------------|--------------|
|
|
191
|
+
| Barrel import (`from 'impact-ui'`) | ~450KB | No |
|
|
192
|
+
| Direct import (`from 'impact-ui/Button'`) | ~15-50KB* | Yes |
|
|
193
|
+
|
|
194
|
+
*Actual size depends on components used
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## TypeScript Support
|
|
199
|
+
|
|
200
|
+
impact-ui now ships with TypeScript definitions. No changes required for JS users.
|
|
201
|
+
|
|
202
|
+
### For TypeScript Users:
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
import { Button, ButtonProps } from 'impact-ui/Button';
|
|
206
|
+
|
|
207
|
+
const MyButton: React.FC = () => {
|
|
208
|
+
const handleClick: ButtonProps['onClick'] = (e) => {
|
|
209
|
+
// Fully typed event
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
return <Button onClick={handleClick}>Click</Button>;
|
|
213
|
+
};
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### TypeScript Configuration
|
|
217
|
+
|
|
218
|
+
Ensure your `tsconfig.json` has the correct module resolution:
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"compilerOptions": {
|
|
223
|
+
"moduleResolution": "bundler" // or "node16" / "nodenext"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Breaking Changes
|
|
231
|
+
|
|
232
|
+
### Removed
|
|
233
|
+
- PropTypes (replaced with TypeScript interfaces)
|
|
234
|
+
|
|
235
|
+
### Changed
|
|
236
|
+
- Build output now uses Vite (bundle size reduced ~20%)
|
|
237
|
+
- CSS import path remains the same: `import 'impact-ui/styles'`
|
|
238
|
+
- Package now exports ESM by default with CJS fallback
|
|
239
|
+
- Module type is now "module" (ESM)
|
|
240
|
+
- **Recommended**: Use direct imports for tree shaking
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Accessibility Improvements
|
|
245
|
+
|
|
246
|
+
All components now meet WCAG 2.1 Level AA standards. Components include:
|
|
247
|
+
- Proper ARIA attributes
|
|
248
|
+
- Keyboard navigation support
|
|
249
|
+
- Focus management
|
|
250
|
+
- Screen reader compatibility
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Available Components
|
|
255
|
+
|
|
256
|
+
All components support direct imports:
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
import { Accordion } from 'impact-ui/Accordion';
|
|
260
|
+
import { Alert } from 'impact-ui/Alert';
|
|
261
|
+
import { Avatar } from 'impact-ui/Avatar';
|
|
262
|
+
import { Badge } from 'impact-ui/Badge';
|
|
263
|
+
import { Button } from 'impact-ui/Button';
|
|
264
|
+
import { Card } from 'impact-ui/Card';
|
|
265
|
+
import { Checkbox } from 'impact-ui/Checkbox';
|
|
266
|
+
import { Chips } from 'impact-ui/Chips';
|
|
267
|
+
import { Input } from 'impact-ui/Input';
|
|
268
|
+
import { Switch } from 'impact-ui/Switch';
|
|
269
|
+
import { Tag } from 'impact-ui/Tag';
|
|
270
|
+
import { Tooltip } from 'impact-ui/Tooltip';
|
|
271
|
+
|
|
272
|
+
// Utils and types
|
|
273
|
+
import { /* utils */ } from 'impact-ui/utils';
|
|
274
|
+
import type { /* types */ } from 'impact-ui/types';
|
|
275
|
+
|
|
276
|
+
// Styles (import once in your app entry)
|
|
277
|
+
import 'impact-ui/styles';
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Troubleshooting
|
|
283
|
+
|
|
284
|
+
### Unknown export warning during migration
|
|
285
|
+
|
|
286
|
+
If you see warnings about unknown exports:
|
|
287
|
+
1. Check the export exists in your version of impact-ui
|
|
288
|
+
2. Verify the spelling is correct
|
|
289
|
+
3. The unknown exports will remain as barrel imports
|
|
290
|
+
|
|
291
|
+
### ESLint rule not working
|
|
292
|
+
|
|
293
|
+
1. Ensure the plugin is installed: `npm install @impactsmartsuite/impact-ui`
|
|
294
|
+
2. Restart your IDE/editor
|
|
295
|
+
3. Check ESLint is configured correctly
|
|
296
|
+
|
|
297
|
+
### TypeScript errors after migration
|
|
298
|
+
|
|
299
|
+
Ensure your `tsconfig.json` has:
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"compilerOptions": {
|
|
303
|
+
"moduleResolution": "bundler"
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Build errors
|
|
309
|
+
|
|
310
|
+
If you encounter build errors after migration:
|
|
311
|
+
1. Clear your build cache: `rm -rf node_modules/.cache`
|
|
312
|
+
2. Reinstall dependencies: `npm install`
|
|
313
|
+
3. Try rebuilding: `npm run build`
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Compatibility
|
|
318
|
+
|
|
319
|
+
- React 17.0.0 - 19.x
|
|
320
|
+
- Node.js 16+
|
|
321
|
+
- TypeScript 5.0+ (for TypeScript users)
|
|
322
|
+
- ESLint 8.x or 9.x (for ESLint plugin)
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Support
|
|
327
|
+
|
|
328
|
+
For issues or questions, please file an issue on the project repository.
|
package/README.md
CHANGED
|
@@ -1,34 +1,173 @@
|
|
|
1
|
-
# impact-ui
|
|
1
|
+
# @impactsmartsuite/impact-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Impact Analytics UI Component Library - A modern, accessible React component library built with TypeScript and Vite (private npm package).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- 🎨 **48+ Production-Ready Components** - Comprehensive UI component library
|
|
8
|
+
- 🔒 **TypeScript First** - Full type safety with TypeScript definitions
|
|
9
|
+
- ♿ **Accessibility** - WCAG 2.1 Level AA compliant
|
|
10
|
+
- ⚡ **Fast** - Built with Vite for optimal performance
|
|
11
|
+
- 🎭 **Storybook** - Interactive component documentation
|
|
12
|
+
- 🧪 **Well Tested** - Unit tests with accessibility checks
|
|
13
|
+
- 📦 **Tree Shakeable** - Import only what you need
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
8
16
|
|
|
9
17
|
```bash
|
|
10
|
-
npm install impact-ui
|
|
18
|
+
npm install @impactsmartsuite/impact-ui
|
|
11
19
|
```
|
|
12
20
|
|
|
13
21
|
## Usage
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
### Basic Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { Button } from '@impactsmartsuite/impact-ui';
|
|
27
|
+
import '@impactsmartsuite/impact-ui/styles';
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
return
|
|
29
|
+
function App() {
|
|
30
|
+
return (
|
|
31
|
+
<Button variant="primary" size="large">
|
|
32
|
+
Click Me
|
|
33
|
+
</Button>
|
|
34
|
+
);
|
|
21
35
|
}
|
|
22
36
|
```
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
### TypeScript Support
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { Button, type ButtonProps } from '@impactsmartsuite/impact-ui';
|
|
42
|
+
|
|
43
|
+
const props: ButtonProps = {
|
|
44
|
+
variant: 'primary',
|
|
45
|
+
size: 'large',
|
|
46
|
+
onClick: (e) => console.log('Clicked!'),
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Development
|
|
51
|
+
|
|
52
|
+
### Prerequisites
|
|
53
|
+
|
|
54
|
+
- Node.js 16+
|
|
55
|
+
- npm or yarn
|
|
56
|
+
|
|
57
|
+
### Setup
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Install dependencies
|
|
61
|
+
npm install
|
|
62
|
+
|
|
63
|
+
# Start development server
|
|
64
|
+
npm run dev
|
|
65
|
+
|
|
66
|
+
# Run Storybook
|
|
67
|
+
npm run storybook
|
|
68
|
+
|
|
69
|
+
# Run tests
|
|
70
|
+
npm run test
|
|
71
|
+
|
|
72
|
+
# Run tests with UI
|
|
73
|
+
npm run test:ui
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Scripts
|
|
77
|
+
|
|
78
|
+
- `npm run dev` - Start Vite dev server
|
|
79
|
+
- `npm run build` - Build library for production
|
|
80
|
+
- `npm run build:lib` - Build library (alias)
|
|
81
|
+
- `npm run preview` - Preview production build
|
|
82
|
+
- `npm run storybook` - Start Storybook dev server
|
|
83
|
+
- `npm run build:storybook` - Build Storybook static site
|
|
84
|
+
- `npm run test` - Run tests with Vitest
|
|
85
|
+
- `npm run test:ui` - Run tests with UI
|
|
86
|
+
- `npm run test:storybook` - Run Storybook play tests (Vitest + Playwright)
|
|
87
|
+
- `npm run playwright:install` - Install Chromium only (required for `test:storybook`)
|
|
88
|
+
- `npm run lint` - Lint TypeScript files
|
|
89
|
+
- `npm run lint:fix` - Fix linting errors
|
|
90
|
+
- `npm run lint:a11y` - Check accessibility compliance
|
|
91
|
+
- `npm run format` - Format code with Prettier
|
|
92
|
+
- `npm run format:check` - Check code formatting
|
|
93
|
+
- `npm run type-check` - Type check without emitting files
|
|
94
|
+
|
|
95
|
+
### Storybook tests and Playwright
|
|
96
|
+
|
|
97
|
+
To run Storybook play tests (`npm run test:storybook`), install Chromium first:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm run playwright:install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
If you see **"unable to get local issuer certificate"** (common on corporate networks with a custom CA):
|
|
104
|
+
|
|
105
|
+
1. **Recommended:** Point Node at your CA bundle:
|
|
106
|
+
`NODE_EXTRA_CA_CERTS=/path/to/your/ca-bundle.pem npm run playwright:install`
|
|
107
|
+
2. **Last resort (insecure):** Disable TLS verification only for the install:
|
|
108
|
+
`NODE_TLS_REJECT_UNAUTHORIZED=0 npm run playwright:install`
|
|
109
|
+
|
|
110
|
+
## Project Structure
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
frontend/
|
|
114
|
+
├── .storybook/ # Storybook configuration
|
|
115
|
+
├── src/
|
|
116
|
+
│ ├── components/ # UI components
|
|
117
|
+
│ ├── styles/ # Global styles
|
|
118
|
+
│ ├── test/ # Test utilities
|
|
119
|
+
│ └── types/ # TypeScript type definitions
|
|
120
|
+
├── dist/ # Build output
|
|
121
|
+
├── tsconfig.json # TypeScript configuration
|
|
122
|
+
├── vite.config.ts # Vite configuration
|
|
123
|
+
└── vitest.config.ts # Vitest configuration
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Contributing
|
|
25
127
|
|
|
26
|
-
|
|
128
|
+
1. Create a feature branch
|
|
129
|
+
2. Make your changes
|
|
130
|
+
3. Run tests: `npm run test`
|
|
131
|
+
4. Run linting: `npm run lint`
|
|
132
|
+
5. Format code: `npm run format`
|
|
133
|
+
6. Type check: `npm run type-check`
|
|
134
|
+
7. Submit a pull request
|
|
135
|
+
|
|
136
|
+
### Code Quality
|
|
137
|
+
|
|
138
|
+
All code must pass:
|
|
139
|
+
- TypeScript compilation without errors
|
|
140
|
+
- ESLint checks (including accessibility)
|
|
141
|
+
- Prettier formatting
|
|
142
|
+
- Unit tests with accessibility checks
|
|
143
|
+
|
|
144
|
+
## Accessibility
|
|
145
|
+
|
|
146
|
+
This library follows WCAG 2.1 Level AA standards. All components include:
|
|
147
|
+
- Proper semantic HTML
|
|
148
|
+
- ARIA attributes where needed
|
|
149
|
+
- Keyboard navigation support
|
|
150
|
+
- Screen reader compatibility
|
|
151
|
+
- Focus management
|
|
152
|
+
|
|
153
|
+
Run accessibility checks:
|
|
154
|
+
```bash
|
|
155
|
+
npm run lint:a11y
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Browser Support
|
|
159
|
+
|
|
160
|
+
- Chrome (latest)
|
|
161
|
+
- Firefox (latest)
|
|
162
|
+
- Safari (latest)
|
|
163
|
+
- Edge (latest)
|
|
27
164
|
|
|
28
165
|
## License
|
|
29
166
|
|
|
30
|
-
MIT
|
|
167
|
+
MIT
|
|
168
|
+
|
|
169
|
+
## Version
|
|
31
170
|
|
|
32
|
-
|
|
171
|
+
Current version: 4.0.0-alpha.1
|
|
33
172
|
|
|
34
|
-
|
|
173
|
+
See [MIGRATION_GUIDE.md](./MIGRATION_GUIDE.md) for upgrading from v3.x.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const os = require('os');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const { spawnSync } = require('child_process');
|
|
7
|
+
|
|
8
|
+
function parseArgs(argv) {
|
|
9
|
+
const options = {
|
|
10
|
+
targetPath: './src',
|
|
11
|
+
reportPath: './IMAGE_MIGRATION_REPORT.md',
|
|
12
|
+
extensions: 'tsx,ts,jsx,js,mjs,cjs',
|
|
13
|
+
dry: false,
|
|
14
|
+
verbose: false,
|
|
15
|
+
help: false,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
19
|
+
const arg = argv[i];
|
|
20
|
+
if (arg === '--help' || arg === '-h') options.help = true;
|
|
21
|
+
else if (arg === '--dry') options.dry = true;
|
|
22
|
+
else if (arg === '--verbose' || arg === '-v') options.verbose = true;
|
|
23
|
+
else if (arg === '--target' && argv[i + 1]) options.targetPath = argv[++i];
|
|
24
|
+
else if (arg.startsWith('--target=')) options.targetPath = arg.split('=')[1];
|
|
25
|
+
else if (arg === '--report' && argv[i + 1]) options.reportPath = argv[++i];
|
|
26
|
+
else if (arg.startsWith('--report=')) options.reportPath = arg.split('=')[1];
|
|
27
|
+
else if (arg === '--extensions' && argv[i + 1]) options.extensions = argv[++i];
|
|
28
|
+
else if (arg.startsWith('--extensions=')) options.extensions = arg.split('=')[1];
|
|
29
|
+
else if (!arg.startsWith('-')) options.targetPath = arg;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function printHelp() {
|
|
36
|
+
console.log(`
|
|
37
|
+
Usage:
|
|
38
|
+
node ./bin/migrate-image-paths.cjs [target] [options]
|
|
39
|
+
|
|
40
|
+
Options:
|
|
41
|
+
--report <path> Migration report path (default: ./IMAGE_MIGRATION_REPORT.md)
|
|
42
|
+
--extensions <list> Comma-separated file extensions (default: tsx,ts,jsx,js,mjs,cjs)
|
|
43
|
+
--dry Dry-run mode (no file writes)
|
|
44
|
+
--verbose Verbose jscodeshift output
|
|
45
|
+
--help, -h Show help
|
|
46
|
+
`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function parseReport(reportContent) {
|
|
50
|
+
const mappings = [];
|
|
51
|
+
const regex = /`(src\/assets\/[^`]+)`\s*->\s*`(src\/assets\/webp\/[^`]+)`/g;
|
|
52
|
+
let match = regex.exec(reportContent);
|
|
53
|
+
while (match) {
|
|
54
|
+
const from = match[1].replace(/^src\//, '');
|
|
55
|
+
const to = match[2].replace(/^src\//, '');
|
|
56
|
+
mappings.push({ oldPath: from, newPath: to });
|
|
57
|
+
match = regex.exec(reportContent);
|
|
58
|
+
}
|
|
59
|
+
return mappings;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function main() {
|
|
63
|
+
const options = parseArgs(process.argv.slice(2));
|
|
64
|
+
if (options.help) {
|
|
65
|
+
printHelp();
|
|
66
|
+
process.exit(0);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const projectRoot = path.resolve(__dirname, '..');
|
|
70
|
+
const reportPath = path.resolve(projectRoot, options.reportPath);
|
|
71
|
+
const targetPath = path.resolve(projectRoot, options.targetPath);
|
|
72
|
+
const transformPath = path.resolve(projectRoot, 'codemods/image-paths-transform.js');
|
|
73
|
+
|
|
74
|
+
if (!fs.existsSync(reportPath)) {
|
|
75
|
+
console.error(`Report not found: ${reportPath}`);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
if (!fs.existsSync(targetPath)) {
|
|
79
|
+
console.error(`Target path not found: ${targetPath}`);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
if (!fs.existsSync(transformPath)) {
|
|
83
|
+
console.error(`Transform not found: ${transformPath}`);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const reportContent = fs.readFileSync(reportPath, 'utf8');
|
|
88
|
+
const mappings = parseReport(reportContent);
|
|
89
|
+
if (mappings.length === 0) {
|
|
90
|
+
console.error('No mappings found in IMAGE_MIGRATION_REPORT.md');
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const tempMapFile = path.join(os.tmpdir(), `image-path-map-${Date.now()}.json`);
|
|
95
|
+
fs.writeFileSync(tempMapFile, JSON.stringify(mappings), 'utf8');
|
|
96
|
+
|
|
97
|
+
const args = [
|
|
98
|
+
'jscodeshift',
|
|
99
|
+
'-t',
|
|
100
|
+
transformPath,
|
|
101
|
+
targetPath,
|
|
102
|
+
`--extensions=${options.extensions}`,
|
|
103
|
+
'--parser=tsx',
|
|
104
|
+
'--ignore-pattern=**/node_modules/**',
|
|
105
|
+
'--ignore-pattern=**/*.test.*',
|
|
106
|
+
'--ignore-pattern=**/*.spec.*',
|
|
107
|
+
'--ignore-pattern=**/*.stories.*',
|
|
108
|
+
`--mapFile=${tempMapFile}`,
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
if (options.dry) args.push('--dry');
|
|
112
|
+
if (options.verbose) args.push('--verbose=2');
|
|
113
|
+
|
|
114
|
+
console.log(`Applying ${mappings.length} image-path mappings...`);
|
|
115
|
+
const result = spawnSync('npx', args, { stdio: 'inherit', shell: true });
|
|
116
|
+
|
|
117
|
+
try {
|
|
118
|
+
fs.unlinkSync(tempMapFile);
|
|
119
|
+
} catch {
|
|
120
|
+
// ignore
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
process.exit(result.status || 0);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
main();
|
|
127
|
+
|