-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add pagination component #4522
Conversation
|
Warning Rate limit exceeded@anncwb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 33 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis pull request primarily involves the removal of the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Outside diff range and nitpick comments (19)
packages/@core/ui-kit/shadcn-ui/src/components/pagination/index.ts (1)
1-2
: LGTM! Consider using consistent import syntax.The implementation looks good and aligns with the PR objective of adding a pagination component. The exports provide a clear interface for the pagination functionality, including both the props type and the component itself.
For consistency, consider using the same import syntax for both exports. For example:
import { PaginationProps } from './pagination'; import VbenPagination from './pagination.vue'; export type { PaginationProps as VbenPaginationProps }; export { VbenPagination };This approach makes the imports more explicit and consistent, which can improve readability and maintainability.
packages/@core/ui-kit/shadcn-ui/src/components/ui/pin-input/PinInputSeparator.vue (1)
12-12
: LGTM! Consider updating documentation.The icon component change from
<DashIcon />
to<Dot />
is consistent with the import change and maintains the component's structure.If there's any component documentation or usage examples that reference the separator icon, consider updating them to reflect this change from
DashIcon
toDot
.packages/@core/ui-kit/shadcn-ui/src/components/ui/breadcrumb/BreadcrumbSeparator.vue (1)
Line range hint
1-22
: Consider a broader design review for icon consistency.While the changes to this component are minimal and don't affect its API, it's important to ensure that the new icon from
lucide-vue-next
maintains visual consistency with other icons used throughout the application.Consider conducting a broader design review to:
- Verify that the new icon's style matches the application's design system.
- Ensure consistency in icon usage across all components that have been migrated from
@radix-icons/vue
tolucide-vue-next
.- Update any relevant design documentation or style guides to reflect the change in icon libraries.
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/index.ts (2)
6-10
: Good integration with 'radix-vue' and consistent naming.The exports from 'radix-vue' are well-integrated and maintain consistency with the custom components:
- The naming convention aligns with the custom components.
- Aliasing PaginationRoot as Pagination provides a clear entry point for the component.
For even better consistency, consider exporting these components individually, similar to the custom components:
export { PaginationList, PaginationListItem } from 'radix-vue'; export { PaginationRoot as Pagination } from 'radix-vue';This change would make the file structure more uniform throughout.
1-10
: Excellent implementation of pagination components.This file successfully implements a comprehensive set of pagination components, fulfilling the PR objective. Key strengths include:
- Modular structure allowing flexible use of sub-components.
- Consistent naming conventions.
- Good integration of custom components with 'radix-vue' library.
Consider adding a brief comment at the top of the file explaining the purpose of these exports and how they relate to the pagination feature. This would enhance maintainability and help other developers quickly understand the file's role in the project.
packages/@core/ui-kit/shadcn-ui/src/components/pagination/pagination.ts (2)
1-35
: Consider translating comments to English for better accessibility.The
PaginationProps
interface is well-structured and covers essential pagination features. However, the comments are currently in Chinese, which may limit understanding for non-Chinese speaking developers.Additionally, the comment for the
showEdges
property (lines 11-12) seems to have a typo or incomplete translation. Consider clarifying this description.Here's a suggested improvement for the
showEdges
property comment:/** * When true, always show the first page, last page, and ellipsis */ showEdges?: boolean;
37-41
: LGTM! Consider adding type safety toSIZE_CLASS_MAP
.The
SIZE_CLASS_MAP
constant provides a clear mapping between size options and CSS classes, which is good for maintaining consistency across the component.For improved type safety and to ensure alignment with the
size
property inPaginationProps
, consider using a type assertion or satisfies operator:export const SIZE_CLASS_MAP = { default: 'size-8', large: 'size-9', small: 'size-7', } as const satisfies Record<PaginationProps['size'], string>;This change ensures that the keys in
SIZE_CLASS_MAP
always match the allowed values for thesize
property inPaginationProps
.packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationEllipsis.vue (2)
1-16
: LGTM! Consider enhancing type safety for theclass
prop.The script section is well-structured and follows Vue 3 and TypeScript best practices. The use of the Composition API with
<script setup>
and the computed property for prop delegation are excellent choices.For improved type safety, consider explicitly typing the
class
prop:-const props = defineProps<{ class?: any } & PaginationEllipsisProps>(); +const props = defineProps<{ class?: string | object | Array<string | object> } & PaginationEllipsisProps>();This change will provide better type checking and autocompletion for the
class
prop.
18-27
: LGTM! Consider adding an aria-label for accessibility.The template section is well-structured and makes good use of Vue features. The class binding and slot implementation are particularly well done.
To improve accessibility, consider adding an
aria-label
to thePaginationEllipsis
component:<PaginationEllipsis v-bind="delegatedProps" :class="cn('flex size-8 items-center justify-center', props.class)" + aria-label="More pages" >
This will provide better context for screen readers.
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationPrev.vue (2)
1-23
: LGTM! Consider enhancing type safety for theclass
prop.The script section is well-structured and implements the component logic correctly. The imports, props definition, and computed property are all appropriately set up.
For improved type safety, consider specifying the type of the
class
prop more precisely:-defineProps<{ class?: any } & PaginationPrevProps>(), +defineProps<{ class?: string | string[] | Record<string, boolean> } & PaginationPrevProps>(),This change will provide better type checking for the
class
prop while still allowing flexibility in its usage.
25-33
: LGTM! Consider adding an aria-label for better accessibility.The template section is well-structured and provides good flexibility with the use of a slot. The dynamic class binding and default icon are implemented correctly.
To improve accessibility, consider adding an
aria-label
to the button:- <Button :class="cn('size-8 p-0', props.class)" variant="outline"> + <Button :class="cn('size-8 p-0', props.class)" variant="outline" aria-label="Previous page">This will provide better context for screen readers and improve the overall accessibility of the component.
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationNext.vue (1)
25-33
: LGTM! Consider adding an aria-label for accessibility.The template structure looks good, and the use of components and utilities is appropriate. The default slot with the icon is a nice touch, allowing for easy customization if needed.
For improved accessibility, consider adding an
aria-label
to theButton
component. This will provide context for screen readers. For example:<Button :class="cn('size-8 p-0', props.class)" variant="outline" aria-label="Next page" > <!-- ... --> </Button>This small addition will enhance the user experience for those using assistive technologies.
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationLast.vue (1)
25-33
: Approve template structure with a suggestion for accessibility.The template structure looks good. It correctly uses the
PaginationLast
component and provides a flexible slot for custom content.To improve accessibility, consider adding an
aria-label
to the button. This will provide more context for screen readers. You can add it like this:- <Button :class="cn('size-8 p-0', props.class)" variant="outline"> + <Button :class="cn('size-8 p-0', props.class)" variant="outline" aria-label="Go to last page">This change will make the purpose of the button clearer for users relying on assistive technologies.
packages/@core/ui-kit/shadcn-ui/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue (1)
Line range hint
1-46
: Summary: Minimal changes with potential visual impact.The changes to this component are focused and align well with the PR objectives:
- The icon library has been successfully updated from
@radix-icons/vue
tolucide-vue-next
.- The icon size has been reduced, which may affect the component's visual appearance.
These changes maintain the component's core functionality while updating its visual elements. The consistency of these changes across the project is crucial for maintaining a cohesive user interface.
To ensure a smooth transition and maintain UI consistency:
- Document this icon library change in the project's UI guidelines or component library documentation.
- Consider creating a central icon configuration file to manage icon sizes and styles across the project. This would make future updates easier and ensure consistency.
- If not already done, update any relevant UI tests or snapshots to reflect these changes.
packages/@core/ui-kit/shadcn-ui/src/components/index.ts (1)
17-17
: Overall impact: Enhance functionality, but clarification needed.The addition of these two pagination exports aligns with the PR objective of adding a pagination component, which enhances the functionality of the package. However, the potential naming conflict between './pagination' and './ui/pagination' needs to be addressed.
To improve the clarity and maintainability of the package, consider the following steps:
- Clearly document the difference between these two pagination components in the package documentation.
- Add comments in this index file explaining the purpose and use case for each pagination component.
- If the components serve significantly different purposes, consider renaming one of them to better reflect its specific functionality (e.g., 'simplePagination' and 'advancedPagination').
- If one component is intended to replace the other in the future, add a deprecation notice to the older component and provide migration instructions.
These steps will help prevent confusion for developers using this package and ensure that the new pagination functionality is used correctly and effectively.
Also applies to: 42-42
packages/@core/ui-kit/shadcn-ui/src/components/ui/dialog/DialogContent.vue (1)
Line range hint
1-85
: Summary of changes and potential impactThe changes in this file are part of the larger effort to replace the
@radix-icons/vue
library withlucide-vue-next
. The modifications are minimal and focused on updating the close icon for the dialog component.While these changes should not affect the core functionality of the
DialogContent
component, it's important to:
- Ensure consistent styling and behavior of the new icon across different themes and viewport sizes.
- Verify that the change doesn't introduce any regressions in the dialog's usability or accessibility.
- Update any relevant documentation or design systems to reflect the new icon usage.
Consider creating a centralized icon component that can abstract away the specific icon library being used. This would make future icon library migrations easier and provide a consistent interface for icon usage throughout the application.
packages/@core/ui-kit/shadcn-ui/src/components/pagination/pagination.vue (3)
71-71
: Consider internationalization for total items textThe text
共 {{ total }} 条
is hardcoded in Chinese. To support a multilingual user base, consider implementing internationalization (i18n) so that the text can be translated based on the user's locale.
48-49
: Implement i18n for page size labelsThe labels in the page size options (e.g.,
${item} 条/页
) are in Chinese. For better localization, consider using i18n practices to allow these labels to be translated.
40-40
: Rename 'itemPerPage' to 'itemsPerPage' for consistencyConsider renaming
itemPerPage
toitemsPerPage
to accurately represent that it refers to multiple items per page, enhancing code semantics.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (31)
- packages/@core/ui-kit/shadcn-ui/package.json (0 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/index.ts (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/pagination/index.ts (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/pagination/pagination.ts (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/pagination/pagination.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/accordion/AccordionTrigger.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/breadcrumb/BreadcrumbSeparator.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/button/Button.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/checkbox/Checkbox.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/context-menu/ContextMenuCheckboxItem.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/context-menu/ContextMenuRadioItem.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/context-menu/ContextMenuSubTrigger.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/dialog/DialogContent.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationEllipsis.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationFirst.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationLast.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationNext.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationPrev.vue (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/index.ts (1 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/pin-input/PinInputSeparator.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/radio-group/RadioGroupItem.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectItem.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectScrollDownButton.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectScrollUpButton.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectTrigger.vue (2 hunks)
- packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/ToastClose.vue (2 hunks)
- pnpm-workspace.yaml (0 hunks)
💤 Files not reviewed due to no reviewable changes (2)
- packages/@core/ui-kit/shadcn-ui/package.json
- pnpm-workspace.yaml
🔇 Additional comments (58)
packages/@core/ui-kit/shadcn-ui/src/components/ui/pin-input/PinInputSeparator.vue (2)
2-2
: LGTM! Verify visual consistency.The import change from
@radix-icons/vue
tolucide-vue-next
is in line with the PR objectives. The icon has been updated fromDashIcon
toDot
.Please ensure that the new
Dot
icon maintains visual consistency with the previousDashIcon
. If there's a noticeable difference, consider adjusting the styling to match the previous design if necessary.
2-2
: Overall changes look good. Verify project-wide impact.The changes in this file are minimal and focused, aligning well with the PR objectives. The core functionality of the
PinInputSeparator
component remains intact, with only the icon being updated.As this change is likely part of a broader effort to standardize icon usage:
- Ensure similar changes have been applied consistently across all components using icons.
- Verify that the new icons from
lucide-vue-next
are visually consistent with the previous icons from@radix-icons/vue
throughout the project.- Update any project-wide documentation or style guides that reference icon usage.
Run the following script to check for any remaining usages of
@radix-icons/vue
:Also applies to: 12-12
✅ Verification successful
The previous search command failed because
rg
does not recognize thevue
file type. To properly search through.vue
,.ts
, and.js
files for any remaining imports from@radix-icons/vue
, please run the following script:
No remaining imports from
@radix-icons/vue
found.The codebase has been successfully updated to use
lucide-vue-next
across all relevant files.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining imports from @radix-icons/vue # Test: Search for imports from @radix-icons/vue. Expect: No results. rg --type vue --type typescript --type javascript "from ['\"@]radix-icons/vue['\"]"Length of output: 117
Script:
#!/bin/bash # Description: Check for any remaining imports from @radix-icons/vue # Test: Search for imports from @radix-icons/vue in .vue, .ts, and .js files. Expect: No results. rg "from ['\"]@radix-icons/vue['\"]" -g "*.vue" -g "*.ts" -g "*.js"Length of output: 73
packages/@core/ui-kit/shadcn-ui/src/components/ui/breadcrumb/BreadcrumbSeparator.vue (2)
18-18
: LGTM! Verify visual appearance of the new icon.The component usage has been correctly updated to match the new import from
lucide-vue-next
. This change is approved.To ensure the visual appearance of the new icon meets expectations, please run the following script to find all usages of the
BreadcrumbSeparator
component:#!/bin/bash # Description: Find usages of BreadcrumbSeparator component # Test: Search for BreadcrumbSeparator usage echo "Checking for BreadcrumbSeparator usage:" rg --type vue "<BreadcrumbSeparator" packages/@core/ui-kit/shadcn-ui/srcAfter running the script, please visually inspect the breadcrumb separators in the affected components to confirm that the new icon appears correctly and consistently with the design.
4-4
: LGTM! Verify icon library change project-wide.The import statement has been successfully updated to use the
lucide-vue-next
library instead of@radix-icons/vue
, which aligns with the PR objectives. This change is approved.To ensure consistency across the project, please run the following script to verify that all
@radix-icons/vue
imports have been replaced:✅ Verification successful
Icon library replacement verified project-wide.
All instances of
@radix-icons/vue
have been successfully removed and replaced withlucide-vue-next
across thepackages/@core/ui-kit/shadcn-ui/src
directory.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining @radix-icons/vue imports # Test: Search for @radix-icons/vue imports echo "Checking for remaining @radix-icons/vue imports:" rg --type vue "from '@radix-icons/vue'" packages/@core/ui-kit/shadcn-ui/src # Test: Verify lucide-vue-next imports echo "Verifying lucide-vue-next imports:" rg --type vue "from 'lucide-vue-next'" packages/@core/ui-kit/shadcn-ui/srcLength of output: 488
Script:
#!/bin/bash # Description: Check for any remaining @radix-icons/vue imports and verify lucide-vue-next imports in .vue files # Test: Search for @radix-icons/vue imports in .vue files echo "Checking for remaining @radix-icons/vue imports in .vue files:" rg -g "*.vue" "from '@radix-icons/vue'" packages/@core/ui-kit/shadcn-ui/src # Test: Verify lucide-vue-next imports in .vue files echo "Verifying lucide-vue-next imports in .vue files:" rg -g "*.vue" "from 'lucide-vue-next'" packages/@core/ui-kit/shadcn-ui/srcLength of output: 3699
packages/@core/ui-kit/shadcn-ui/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue (3)
18-18
: LGTM! Icon component updated correctlyThe icon component in the template has been successfully updated from
DotsHorizontalIcon
toMoreHorizontal
, consistent with the import statement change. The class attributes remain the same, which should maintain the icon's size and styling.
Line range hint
1-24
: Summary: Successful migration to lucide-vue-nextThe changes in this file successfully migrate the breadcrumb ellipsis component from using
@radix-icons/vue
tolucide-vue-next
. The implementation is clean and focused, maintaining the existing functionality while updating the icon library. These changes align well with the PR objectives and should not introduce any regression in the component's behavior.
4-4
: LGTM! Verify complete migration from @radix-icons/vueThe import statement has been successfully updated to use
lucide-vue-next
instead of@radix-icons/vue
, which aligns with the PR objectives. The icon name change fromDotsHorizontalIcon
toMoreHorizontal
appears to maintain the same functionality.To ensure a complete migration, please run the following script to check for any remaining usage of
@radix-icons/vue
:If the script returns no results, the migration is complete. Otherwise, consider updating the remaining occurrences.
✅ Verification successful
Migration Complete!
The migration from
@radix-icons/vue
tolucide-vue-next
has been successfully verified. No remaining usage of@radix-icons/vue
was found in.vue
,.ts
, or.js
files.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of @radix-icons/vue in the codebase # Test: Search for @radix-icons/vue usage rg --type vue --type ts --type js '@radix-icons/vue'Length of output: 80
Script:
#!/bin/bash # Description: Check for any remaining usage of @radix-icons/vue in the codebase # Find all .vue, .ts, and .js files and search for @radix-icons/vue fd --extensions vue,ts,js --type f . | xargs rg '@radix-icons/vue'Length of output: 272
Script:
#!/bin/bash # Description: Check for any remaining usage of @radix-icons/vue in the codebase # Find all .vue, .ts, and .js files and search for @radix-icons/vue fd --extension vue --extension ts --extension js --type f . | xargs rg '@radix-icons/vue'Length of output: 89
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/index.ts (1)
1-5
: Well-structured and consistent component exports.The custom pagination component exports are well-organized and follow good practices:
- Consistent naming convention with the "Pagination" prefix.
- Clear, descriptive names that indicate the purpose of each component.
- Modular structure with separate .vue files for each component.
This approach enhances maintainability and aligns well with the PR objective of adding a pagination component.
packages/@core/ui-kit/shadcn-ui/src/components/ui/button/Button.vue (1)
13-13
: Approve the simplified variant type, but verify impact.The change from
variant?: 'heavy' & ButtonVariants;
tovariant?: ButtonVariants;
simplifies the type definition and potentially allows for more flexibility in button variants. This is a good improvement in terms of type clarity and extensibility.However, please consider the following:
- Ensure that this change doesn't break any existing usage of the 'heavy' variant.
- Update any documentation or examples that might reference the old type definition.
- Verify that this change aligns with the overall design system and component usage across the project.
To ensure this change doesn't introduce any regressions, please run the following script:
This script will help identify any potential areas that might need updating due to this type change.
✅ Verification successful
Verified: The change from
variant?: 'heavy' & ButtonVariants;
tovariant?: ButtonVariants;
is safe and does not affect any existing usage of the'heavy'
variant. This simplification enhances type clarity and maintains the component's functionality.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of 'heavy' variant and ButtonVariants type usage # Search for 'heavy' usage in button contexts echo "Searching for 'heavy' variant usage:" rg --type vue --type typescript "variant.*heavy" ./packages/@core/ui-kit # Check ButtonVariants type usage echo "Checking ButtonVariants type usage:" ast-grep --lang typescript --pattern 'type $varName = $$$' ./packages/@core/ui-kit | grep ButtonVariantsLength of output: 379
Script:
#!/bin/bash # Description: Verify usage of 'heavy' variant and ButtonVariants type in .vue and .ts/.tsx files # Search for 'heavy' usage in button contexts within .vue and .ts/.tsx files echo "Searching for 'heavy' variant usage in .vue and .ts/.tsx files:" rg "variant\s*:\s*['\"]heavy['\"]" -g "*.vue" -g "*.ts" -g "*.tsx" ./packages/@core/ui-kit # Check ButtonVariants type usage within .ts/.tsx files echo "Checking ButtonVariants type usage in .ts/.tsx files:" rg "ButtonVariants" -g "*.ts" -g "*.tsx" ./packages/@core/ui-kitLength of output: 749
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationEllipsis.vue (1)
1-27
: Great implementation of the PaginationEllipsis component!This new component aligns perfectly with the PR objectives of adding pagination functionality. It's well-structured, uses modern Vue 3 and TypeScript features, and provides good flexibility with its slot system.
The component integrates smoothly with the
radix-vue
library while adding custom styling and behavior. This approach ensures consistency with the design system while allowing for project-specific customizations.Great job on this addition to the UI kit!
packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectScrollUpButton.vue (2)
6-6
: LGTM: Import statement updated correctlyThe import statement has been successfully updated to use
ChevronUp
fromlucide-vue-next
, which aligns with the PR objective of replacing@radix-icons/vue
withlucide-vue-next
.
32-32
: LGTM: Icon component updated correctlyThe
ChevronUp
component fromlucide-vue-next
is now correctly used in the template, which is consistent with the updated import statement.Please verify that the size classes
h-4 w-4
are consistent with the project's design system for icons in this context. If these classes are used consistently across the project for similar icons, you can disregard this verification request.To help with this verification, you can run the following script to check for similar icon usage patterns:
✅ Verification successful
Follow-up: Corrected Shell Script for Icon Size Class Verification
The previous script failed because
rg
does not recognize thevue
file type. Please use the updated script below to check for consistent icon size classes:
Verification Successful: Icon Size Classes Are Consistent
All icon components within
packages/@core/ui-kit/shadcn-ui/src/components
consistently useclass="h-4 w-4"
, aligning with the project's design system.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for consistent icon size classes across the project # Search for icon components with size classes rg --type vue 'class="h-\d+ w-\d+"' packages/@core/ui-kit/shadcn-ui/src/componentsLength of output: 112
Script:
#!/bin/bash # Description: Check for consistent icon size classes across the project # Search for icon components with size classes in .vue files rg 'class="h-\d+ w-\d+"' --glob "*.vue" packages/@core/ui-kit/shadcn-ui/src/componentsLength of output: 1383
packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectScrollDownButton.vue (2)
32-32
: LGTM! Verify styling consistency.The icon usage has been correctly updated to match the new import. The addition of
class="h-4 w-4"
provides explicit sizing for the icon.To ensure styling consistency across the project, please run the following script:
#!/bin/bash # Description: Verify styling consistency for Lucide icons # Test: Check for consistent class usage on Lucide icons echo "Checking for consistent class usage on Lucide icons:" rg --type vue "<(ChevronDown|ChevronUp|ChevronLeft|ChevronRight).*class=" packages/@core/ui-kit/shadcn-ui/srcAdditionally, please confirm that the
h-4 w-4
classes are consistent with the project's design system for icon sizing.
6-6
: LGTM! Verify consistency across the project.The import statement has been successfully updated to use the
ChevronDown
icon fromlucide-vue-next
, which aligns with the PR objectives.To ensure consistency across the project, please run the following script:
✅ Verification successful
Import Replacement Verified
All
@radix-icons/vue
imports have been successfully replaced withlucide-vue-next
across the project.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all @radix-icons/vue imports have been replaced with lucide-vue-next # Test 1: Check for any remaining @radix-icons/vue imports echo "Checking for remaining @radix-icons/vue imports:" rg --type vue "from '@radix-icons/vue'" packages/@core/ui-kit/shadcn-ui/src # Test 2: Verify lucide-vue-next imports echo "Verifying lucide-vue-next imports:" rg --type vue "from 'lucide-vue-next'" packages/@core/ui-kit/shadcn-ui/srcLength of output: 444
Script:
#!/bin/bash # Description: Verify that all @radix-icons/vue imports have been replaced with lucide-vue-next # Test 1: Check for any remaining @radix-icons/vue imports echo "Checking for remaining @radix-icons/vue imports:" rg -g "*.vue" "from '@radix-icons/vue'" packages/@core/ui-kit/shadcn-ui/src # Test 2: Verify lucide-vue-next imports echo "Verifying lucide-vue-next imports:" rg -g "*.vue" "from 'lucide-vue-next'" packages/@core/ui-kit/shadcn-ui/srcLength of output: 3643
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationPrev.vue (1)
1-33
: Great implementation of the PaginationPrev component!This component is well-structured, type-safe, and provides good flexibility for customization. It aligns well with the PR objectives of adding a pagination component and uses the
lucide-vue-next
library for icons as mentioned in the summary.A few minor suggestions were made to further improve type safety and accessibility, but overall, this is a solid implementation that follows Vue 3 and TypeScript best practices.
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationNext.vue (1)
1-33
: Great implementation of the PaginationNext component!This component is well-structured, follows Vue 3 and TypeScript best practices, and aligns perfectly with the PR objective of adding a pagination component. It integrates seamlessly with the radix-vue library while allowing for customization through props and slots.
The use of the Composition API, TypeScript, and utility functions demonstrates a modern and maintainable approach to component development. The component's design also ensures consistency with the project's UI kit by utilizing the
Button
component and shared utilities.Great job on contributing this valuable addition to the project's UI components!
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationLast.vue (1)
1-33
: Well-implemented pagination component with minor suggestions for improvement.This
PaginationLast
component is well-structured and aligns with Vue 3 and TypeScript best practices. It provides a reusable and customizable "last" button for pagination, which fulfills the PR objective of adding pagination components.The component effectively uses the Composition API, props with default values, and computed properties. The template structure is clean and allows for easy customization through slots.
I've suggested minor improvements for type safety and accessibility, but overall, this is a solid implementation that enhances the project's UI capabilities.
packages/@core/ui-kit/shadcn-ui/src/components/ui/pagination/PaginationFirst.vue (3)
1-23
: LGTM: Well-structured script sectionThe script section is well-organized and follows Vue 3 and TypeScript best practices. Good job on:
- Using
<script setup>
with TypeScript- Properly importing necessary utilities and components
- Defining props with TypeScript types and default values
- Creating a computed property to filter props
The code is clean, readable, and maintainable.
1-33
: Great job on implementing the PaginationFirst componentThis new
PaginationFirst
component is well-implemented and aligns perfectly with the PR objectives. It successfully integrates theradix-vue
library for pagination functionality and useslucide-vue-next
for icons, as mentioned in the PR summary.Key strengths of this implementation:
- Proper use of Vue 3 Composition API with TypeScript
- Efficient prop handling and computed properties
- Flexible design with slot support
- Consistent use of imported components and utilities
The component looks ready for integration into the larger pagination system. Great work on contributing to the project's enhanced functionality!
25-33
: LGTM: Well-structured template with a minor suggestionThe template section is well-organized and follows Vue best practices. Good job on:
- Properly using the
PaginationFirst
component with computed props- Implementing a flexible slot system with a default icon
- Using dynamic class binding with the
cn
utilityOne suggestion:
Please verify that the button size and padding classes (
size-8 p-0
) align with your design system guidelines. If these are custom classes, ensure they are consistently applied across similar components.This will help ensure consistency across your UI components.
✅ Verification successful
The
size-8 p-0
classes are consistently applied across all pagination button components (PaginationPrev.vue
,PaginationNext.vue
,PaginationLast.vue
, andPaginationFirst.vue
). This alignment adheres to the design system guidelines, ensuring uniformity across the UI components.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for consistent usage of size and padding classes in button components # Search for Button components with size-8 and p-0 classes echo "Buttons with size-8 and p-0 classes:" rg --type vue 'Button.*class="[^"]*size-8[^"]*p-0' -g '!PaginationFirst.vue' # Search for other size classes used with Button components echo "\nOther size classes used with Button components:" rg --type vue 'Button.*class="[^"]*size-\d' -g '!PaginationFirst.vue' # Search for other padding classes used with Button components echo "\nOther padding classes used with Button components:" rg --type vue 'Button.*class="[^"]*p-\d' -g '!PaginationFirst.vue'Length of output: 610
Script:
#!/bin/bash # Description: Check for consistent usage of size and padding classes in Button components within .vue files # Search for Button components with size-8 and p-0 classes echo "Buttons with size-8 and p-0 classes:" rg 'Button.*class="[^"]*size-8[^"]*p-0' -g '*.vue' -g '!PaginationFirst.vue' # Search for other size classes used with Button components echo "\nOther size classes used with Button components:" rg 'Button.*class="[^"]*size-\d' -g '*.vue' -g '!PaginationFirst.vue' # Search for other padding classes used with Button components echo "\nOther padding classes used with Button components:" rg 'Button.*class="[^"]*p-\d' -g '*.vue' -g '!PaginationFirst.vue'Length of output: 1876
packages/@core/ui-kit/shadcn-ui/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue (2)
35-35
: LGTM! Icon component updated correctly.The
ChevronRight
component is now correctly used, matching the updated import statement. The class attributes are preserved, ensuring consistent styling.
6-6
: LGTM! Verify icon library migration impact.The change from
@radix-icons/vue
tolucide-vue-next
is consistent with the reported modifications. This appears to be part of a larger effort to replace the icon library across the project.To ensure this change is consistent across the codebase, please run the following script:
This will help verify that the icon library migration is complete and consistent.
✅ Verification successful
Verified! No remaining usages of
ChevronDownIcon
from@radix-icons/vue
were found across the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for remaining usages of ChevronDownIcon from @radix-icons/vue # Search for import statements echo "Checking for import statements:" rg --type vue --type ts --type js "import.*ChevronDownIcon.*from.*@radix-icons/vue" # Search for component usage echo "Checking for component usage:" rg --type vue "<ChevronDownIcon"Length of output: 318
Script:
#!/bin/bash # Description: Check for remaining usages of ChevronDownIcon from @radix-icons/vue # Search for import statements in .vue, .ts, and .js files echo "Checking for import statements:" rg "import.*ChevronDownIcon.*from.*@radix-icons/vue" -g "*.vue" -g "*.ts" -g "*.js" # Search for component usage in .vue files echo "Checking for component usage:" rg "<ChevronDownIcon" -g "*.vue"Length of output: 262
packages/@core/ui-kit/shadcn-ui/src/components/ui/context-menu/ContextMenuSubTrigger.vue (3)
41-41
: LGTM! Icon component updated correctly.The change from
ChevronRightIcon
toChevronRight
is consistent with the updated import statement. The class attributes are maintained, ensuring that the styling remains unchanged.
Line range hint
1-44
: Overall assessment: Changes look good and align with project objectives.The modifications in this file successfully replace the
@radix-icons/vue
dependency withlucide-vue-next
. The changes are minimal and maintain the existing functionality of theContextMenuSubTrigger
component. These updates contribute to the standardization of icon usage across the project as outlined in the PR objectives.
6-6
: LGTM! Verify consistent icon library usage across the project.The change from
@radix-icons/vue
tolucide-vue-next
is correct and aligns with the PR objectives. This update contributes to standardizing icon usage across the project.To ensure consistency, let's verify the icon library usage across the project:
✅ Verification successful
Icon library usage has been standardized successfully.
All instances of
@radix-icons/vue
have been removed, andlucide-vue-next
is consistently used across the project. This change effectively standardizes icon usage throughout the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of @radix-icons/vue and confirm lucide-vue-next usage # Test 1: Search for any remaining @radix-icons/vue imports echo "Checking for any remaining @radix-icons/vue imports:" rg --type vue --type typescript --type javascript "from '@radix-icons/vue'" || echo "No remaining @radix-icons/vue imports found." # Test 2: Confirm lucide-vue-next usage echo "Confirming lucide-vue-next usage:" rg --type vue --type typescript --type javascript "from 'lucide-vue-next'" || echo "No lucide-vue-next imports found. Please verify if this is expected."Length of output: 660
Script:
#!/bin/bash # Description: Check for any remaining usage of @radix-icons/vue and confirm lucide-vue-next usage # Test 1: Search for any remaining @radix-icons/vue imports in .vue files echo "Checking for any remaining @radix-icons/vue imports in .vue files:" rg "from '@radix-icons/vue'" --glob "*.vue" || echo "No remaining @radix-icons/vue imports found in .vue files." # Test 2: Confirm lucide-vue-next usage in .vue files echo "Confirming lucide-vue-next usage in .vue files:" rg "from 'lucide-vue-next'" --glob "*.vue" || echo "No lucide-vue-next imports found in .vue files. Please verify if this is expected."Length of output: 3768
packages/@core/ui-kit/shadcn-ui/src/components/ui/radio-group/RadioGroupItem.vue (2)
36-36
: LGTM! Consider accessibility implications.The replacement of the icon and the adjustment of its size align with the PR objectives. The addition of 'fill-current text-current' classes improves color adaptability.
However, the reduction in size from 3.5 to 2.5 might affect visibility. Please verify that this change doesn't negatively impact accessibility, especially for users with visual impairments. Consider running accessibility tests or consulting with the design team to ensure the new size meets accessibility standards.
To help with the verification, you can run the following script to check if there are any accessibility guidelines or tests in the project:
#!/bin/bash # Description: Search for accessibility-related files or comments in the project echo "Searching for accessibility-related files:" fd -t f '(access|a11y)' packages/@core/ui-kit/shadcn-ui echo "Searching for accessibility-related comments in Vue files:" rg --type vue -i '(accessibility|a11y)' packages/@core/ui-kit/shadcn-ui
6-6
: LGTM! Verify removal of unused imports.The import of
Circle
from 'lucide-vue-next' aligns with the PR objective of replacing '@radix-icons/vue' with 'lucide-vue-next'.Please ensure that the old import for
CheckIcon
has been removed. Run the following script to verify:packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectTrigger.vue (2)
37-37
: LGTM! Verify icon rendering.The change from
CaretSortIcon
toChevronDown
is consistent with the import statement modification.Please verify that:
- The
ChevronDown
icon renders correctly within the select trigger.- The icon's size and alignment are consistent with the previous design.
- The opacity of 50% is applied correctly to the new icon.
If any adjustments are needed, consider fine-tuning the CSS classes or adding inline style properties to ensure visual consistency.
6-6
: LGTM! Verify visual consistency.The change from
CaretSortIcon
toChevronDown
is appropriate for a select trigger and aligns with the PR objective of replacing@radix-icons/vue
withlucide-vue-next
.Please verify that the new
ChevronDown
icon maintains visual consistency with the previous design. Consider running the following command to check for other instances ofCaretSortIcon
that might need updating:✅ Verification successful
Verified! No remaining instances of
CaretSortIcon
found in.vue
files, confirming the replacement withChevronDown
is complete.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for any remaining instances of CaretSortIcon rg --type vue "CaretSortIcon"Length of output: 57
Script:
#!/bin/bash # Description: Search for any remaining instances of CaretSortIcon in .vue files rg "CaretSortIcon" --glob "*.vue"Length of output: 33
packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectItem.vue (2)
38-38
: LGTM! Icon component updated correctly.The icon component has been correctly updated from
CheckIcon
toCheck
, consistent with the import statement change. The class attributes remain the same, maintaining the icon's styling.
6-6
: LGTM! Verify icon usage consistency.The import change from
@radix-icons/vue
tolucide-vue-next
is correct and aligns with the PR objectives. The icon component name has changed fromCheckIcon
toCheck
.To ensure consistency across the codebase, run the following script:
✅ Verification successful
Icon usage is consistent across the codebase.
All imports from@radix-icons/vue
have been removed, andCheck
fromlucide-vue-next
is used consistently without any remainingCheckIcon
instances.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of 'Check' icon from 'lucide-vue-next' across the codebase. # Test 1: Check for any remaining imports from '@radix-icons/vue' echo "Checking for remaining '@radix-icons/vue' imports:" rg --type vue "@radix-icons/vue" # Test 2: Verify the usage of 'Check' from 'lucide-vue-next' echo "Verifying 'Check' usage from 'lucide-vue-next':" rg --type vue "import.*Check.*from 'lucide-vue-next'" # Test 3: Look for any remaining usage of 'CheckIcon' echo "Checking for any remaining 'CheckIcon' usage:" rg --type vue "CheckIcon"Length of output: 545
Script:
#!/bin/bash # Description: Re-verify the usage of 'Check' icon from 'lucide-vue-next' across the codebase using explicit .vue file matching. # Test 1: Check for any remaining imports from '@radix-icons/vue' echo "Checking for remaining '@radix-icons/vue' imports in .vue files:" rg "@radix-icons/vue" --glob "*.vue" # Test 2: Verify the usage of 'Check' from 'lucide-vue-next' echo "Verifying 'Check' usage from 'lucide-vue-next' in .vue files:" rg "import.*Check.*from 'lucide-vue-next'" --glob "*.vue" # Test 3: Look for any remaining usage of 'CheckIcon' echo "Checking for any remaining 'CheckIcon' usage in .vue files:" rg "CheckIcon" --glob "*.vue"Length of output: 1049
packages/@core/ui-kit/shadcn-ui/src/components/ui/checkbox/Checkbox.vue (2)
41-41
: LGTM! Verify new component behavior.The change from
<CheckIcon>
to<Check>
is consistent with the updated import. The class attributes are maintained, which should preserve the existing styling.To ensure the new
Check
component behaves similarly to the oldCheckIcon
:
- Visually inspect the checkbox in various states (unchecked, checked, disabled) to confirm the icon appears correctly.
- Verify that the
Check
component fromlucide-vue-next
accepts the same props and emits the same events as the previousCheckIcon
component.If you notice any discrepancies, please update the component usage accordingly.
8-8
: LGTM! Verify consistency across the codebase.The change from
@radix-icons/vue
tolucide-vue-next
is in line with the PR objectives. The syntax is correct, and the imported component name has been updated appropriately.To ensure consistency across the codebase, please run the following script:
packages/@core/ui-kit/shadcn-ui/src/components/ui/context-menu/ContextMenuRadioItem.vue (2)
6-6
: LGTM: Import statement updated correctlyThe import statement has been successfully updated to use the
Circle
icon fromlucide-vue-next
, which aligns with the PR objective of replacing@radix-icons/vue
withlucide-vue-next
.
39-39
: Verify the intentionality of the icon size reductionThe icon size has been significantly reduced from
h-4 w-4
toh-2 w-2
. While this change aligns with the summary, it's a substantial reduction that could impact the visual appearance and user experience of the context menu.Please confirm if this size reduction is intentional and part of a broader design update. If it's unintentional, consider reverting to the original size or choosing an intermediate size that maintains visibility while achieving the desired design goals.
To help verify the impact, you can run the following script to check for any other similar size changes in the codebase:
This script will help identify if similar changes have been made elsewhere, which could indicate a consistent design update across the project.
packages/@core/ui-kit/shadcn-ui/src/components/ui/context-menu/ContextMenuCheckboxItem.vue (3)
39-39
: LGTM! Verify visual consistency.The change from
CheckIcon
toCheck
is consistent with the updated import. The class attributes remain the same, which should preserve the icon's styling.To ensure the new icon renders correctly and maintains visual consistency:
- Build and run the project locally.
- Navigate to a page or component that uses this context menu.
- Visually inspect the checkbox item to confirm that the check icon appears correctly and matches the previous design.
If possible, consider adding or updating visual regression tests to catch any unintended changes in the future.
Line range hint
1-44
: Verify build process compatibility and performance impact.The changes to this file are straightforward and align with the PR objectives. However, it's important to verify the following:
- Ensure that the new
lucide-vue-next
library is compatible with the project's build process.- Check for any potential performance impact, as changing icon libraries might affect bundle size or rendering performance.
To assess the performance impact, run the following script:
#!/bin/bash # Description: Compare bundle sizes before and after the icon library change # Note: Adjust the build command and output directory as needed for your project echo "Building project with @radix-icons/vue (ensure you're on the base branch):" pnpm build echo "Measuring bundle size with @radix-icons/vue:" du -sh dist/ echo "Switch to the PR branch and rebuild:" # Note: Replace with actual commands to switch branches and rebuild # git checkout feature-branch # pnpm build echo "Measuring bundle size with lucide-vue-next:" du -sh dist/ echo "Compare the output to see if there's a significant difference in bundle size."After running this script, compare the bundle sizes to determine if there's any significant change. If there is, consider optimizing the icon imports or discussing the trade-offs with the team.
6-6
: LGTM! Verify consistency across the project.The change from
@radix-icons/vue
tolucide-vue-next
is in line with the PR objectives. This update should improve consistency and potentially reduce the project's dependencies.To ensure this change is consistent across the project, run the following script:
packages/@core/ui-kit/shadcn-ui/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue (2)
40-40
: Verify visual impact of icon size reduction.The icon has been correctly updated to use
Circle
from the newlucide-vue-next
library, which is good. However, the size reduction fromh-4 w-4
toh-2 w-2
is significant and may affect the visual appearance and usability of the component.Please verify the visual impact of this change:
- Compare the appearance of the dropdown menu radio items before and after this change.
- Ensure that the smaller icon size doesn't negatively impact usability or accessibility.
- Consider whether this size change should be applied consistently across similar components.
If the size reduction causes any issues, consider reverting to the original size or finding a compromise between the old and new sizes.
6-6
: LGTM: Icon library change is consistent with PR objectives.The replacement of
@radix-icons/vue
withlucide-vue-next
aligns with the project's goal of updating the icon library. This change is well-implemented and consistent with the overall PR objectives.Let's verify the consistency of this change across the project:
✅ Verification successful
All instances of
@radix-icons/vue
imports and<CheckIcon>
usage have been successfully removed.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usages of @radix-icons/vue # Test: Search for @radix-icons/vue imports echo "Checking for @radix-icons/vue imports:" rg --type vue "from '@radix-icons/vue'" packages/@core/ui-kit/shadcn-ui/src # Test: Search for CheckIcon component usage echo "Checking for CheckIcon component usage:" rg --type vue "<CheckIcon" packages/@core/ui-kit/shadcn-ui/srcLength of output: 569
Script:
#!/bin/bash # Description: Check for any remaining usages of @radix-icons/vue in .vue files echo "Checking for @radix-icons/vue imports in .vue files:" fd --extension vue --type file --search-path packages/@core/ui-kit/shadcn-ui/src | xargs rg "from '@radix-icons/vue'" echo "Checking for <CheckIcon> component usage in .vue files:" fd --extension vue --type file --search-path packages/@core/ui-kit/shadcn-ui/src | xargs rg "<CheckIcon"Length of output: 468
Script:
#!/bin/bash # Description: Verify removal of @radix-icons/vue imports and <CheckIcon> usage in .vue files echo "Verifying removal of @radix-icons/vue imports:" find packages/@core/ui-kit/shadcn-ui/src -type f -name "*.vue" -exec grep -H "from '@radix-icons/vue'" {} \; echo "Verifying removal of <CheckIcon> component usage:" find packages/@core/ui-kit/shadcn-ui/src -type f -name "*.vue" -exec grep -H "<CheckIcon" {} \;Length of output: 432
packages/@core/ui-kit/shadcn-ui/src/components/index.ts (2)
17-17
: Approved, but consider potential naming conflict.The new export for 'pagination' from './pagination' has been correctly added and follows the established pattern in this file. However, there's another 'pagination' export from './ui/pagination' (line 42). This could potentially lead to naming conflicts or confusion for users of this package.
To ensure there are no unintended side effects, please run the following script:
Consider adding comments to clarify the difference between these two pagination components, or consider renaming one of them for clarity if they serve different purposes.
42-42
: Approved, but reiterate concern about naming conflict.The new export for 'pagination' from './ui/pagination' has been correctly added and follows the established pattern for 'ui' subdirectory exports in this file. However, as mentioned in the previous comment, there's another 'pagination' export from './pagination' (line 17).
To further investigate the differences between these pagination components, please run the following script:
Based on the results, consider adding comments in this index file to explain the difference between these two pagination components, or consider renaming one of them for clarity if they serve different purposes. This will help prevent confusion for developers using this package.
packages/@core/ui-kit/shadcn-ui/src/components/ui/dialog/DialogContent.vue (1)
80-80
: LGTM! Ensure dialog close functionality.The icon component change from
<Cross2Icon>
to<X>
is consistent with the updated import. The class attributes remain unchanged, which should maintain the styling.As this change affects the dialog's close button, please thoroughly test the following:
- The close button's visibility and positioning in the dialog.
- The close button's interaction states (hover, focus, active).
- The dialog closing functionality when the button is clicked.
- Accessibility of the close button, including keyboard navigation and screen reader compatibility.
packages/@core/ui-kit/shadcn-ui/src/components/pagination/pagination.vue (9)
1-27
: Well-organized imports and component setupThe import statements and initial setup are well-structured, ensuring all necessary dependencies are correctly imported and the component is properly initialized.
28-37
: Destructured props with default values enhance readabilityDestructuring props with default values improves code clarity and maintainability.
39-40
: Verify compatibility of 'defineModel' with Vue versionThe use of
defineModel
requires Vue 3.3 or higher. Please ensure that the project is using a compatible version of Vue to support this macro.
42-45
: Computed property 'itemSize' is correctly implementedThe
itemSize
computed property appropriately maps thesize
prop to the corresponding class inSIZE_CLASS_MAP
.
46-51
: Options for page size selection are properly generatedThe
options
computed property effectively creates the label and value pairs for the page size selector.
53-55
: Model value update handler functions as intendedThe
handleUpdateModelValue
function correctly updatesitemPerPage
by converting the selected string value to a number.
78-78
: Verify the utility class 'w-30'The class
w-30
used in<SelectTrigger>
may not be a standard utility class in common CSS frameworks like Tailwind CSS. Please ensure thatw-30
is defined in your project's CSS or replace it with a standard width class.
88-89
: Confirm the use of 'size-8' utility classThe class
size-8
is used in several components. Verify thatsize-8
is defined in your CSS configuration or consider using standard utility classes likew-8 h-8
if applicable.Also applies to: 98-98, 107-108
59-111
: Template structure is well-designed and intuitiveThe template effectively utilizes components and directives to render the pagination interface, with conditional rendering based on props and responsive design considerations.
Description
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
Release Notes
New Features
PaginationEllipsis
,PaginationFirst
,PaginationLast
,PaginationNext
, andPaginationPrev
.pagination
component to enhance UI functionality.Improvements
@radix-icons/vue
withlucide-vue-next
for better visual consistency.Bug Fixes