myoperator-ui 0.0.163 → 0.0.164

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.
Files changed (2) hide show
  1. package/dist/index.js +189 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5887,6 +5887,195 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
5887
5887
  PageHeader.displayName = "PageHeader";
5888
5888
 
5889
5889
  export { PageHeader, pageHeaderVariants };
5890
+ `, prefix)
5891
+ }
5892
+ ]
5893
+ },
5894
+ "pagination": {
5895
+ name: "pagination",
5896
+ description: "A composable pagination component with page navigation, next/previous links, and ellipsis",
5897
+ category: "layout",
5898
+ dependencies: [
5899
+ "clsx",
5900
+ "tailwind-merge",
5901
+ "lucide-react"
5902
+ ],
5903
+ internalDependencies: [
5904
+ "button"
5905
+ ],
5906
+ files: [
5907
+ {
5908
+ name: "pagination.tsx",
5909
+ content: prefixTailwindClasses(`import * as React from "react";
5910
+ import {
5911
+ ChevronLeftIcon,
5912
+ ChevronRightIcon,
5913
+ MoreHorizontalIcon,
5914
+ } from "lucide-react";
5915
+
5916
+ import { cn } from "../../lib/utils";
5917
+ import { buttonVariants, type ButtonProps } from "./button";
5918
+
5919
+ export interface PaginationProps extends React.ComponentProps<"nav"> {
5920
+ /** Additional CSS classes for the nav wrapper */
5921
+ className?: string;
5922
+ }
5923
+
5924
+ function Pagination({ className, ...props }: PaginationProps) {
5925
+ return (
5926
+ <nav
5927
+ role="navigation"
5928
+ aria-label="pagination"
5929
+ data-slot="pagination"
5930
+ className={cn("mx-auto flex w-full justify-center", className)}
5931
+ {...props}
5932
+ />
5933
+ );
5934
+ }
5935
+ Pagination.displayName = "Pagination";
5936
+
5937
+ export interface PaginationContentProps extends React.ComponentProps<"ul"> {
5938
+ /** Additional CSS classes for the list container */
5939
+ className?: string;
5940
+ }
5941
+
5942
+ function PaginationContent({
5943
+ className,
5944
+ ...props
5945
+ }: PaginationContentProps) {
5946
+ return (
5947
+ <ul
5948
+ data-slot="pagination-content"
5949
+ className={cn("flex flex-row items-center gap-1", className)}
5950
+ {...props}
5951
+ />
5952
+ );
5953
+ }
5954
+ PaginationContent.displayName = "PaginationContent";
5955
+
5956
+ export interface PaginationItemProps extends React.ComponentProps<"li"> {
5957
+ /** Additional CSS classes for the list item */
5958
+ className?: string;
5959
+ }
5960
+
5961
+ function PaginationItem({ ...props }: PaginationItemProps) {
5962
+ return <li data-slot="pagination-item" {...props} />;
5963
+ }
5964
+ PaginationItem.displayName = "PaginationItem";
5965
+
5966
+ export interface PaginationLinkProps
5967
+ extends Pick<ButtonProps, "size">,
5968
+ React.ComponentProps<"a"> {
5969
+ /** Highlights the link as the current page */
5970
+ isActive?: boolean;
5971
+ /** Size of the link (uses Button size variants) */
5972
+ size?: ButtonProps["size"];
5973
+ /** Additional CSS classes */
5974
+ className?: string;
5975
+ }
5976
+
5977
+ function PaginationLink({
5978
+ className,
5979
+ isActive,
5980
+ size = "icon",
5981
+ ...props
5982
+ }: PaginationLinkProps) {
5983
+ return (
5984
+ <a
5985
+ aria-current={isActive ? "page" : undefined}
5986
+ data-slot="pagination-link"
5987
+ data-active={isActive}
5988
+ className={cn(
5989
+ buttonVariants({
5990
+ variant: isActive ? "outline" : "ghost",
5991
+ size,
5992
+ }),
5993
+ className
5994
+ )}
5995
+ {...props}
5996
+ />
5997
+ );
5998
+ }
5999
+ PaginationLink.displayName = "PaginationLink";
6000
+
6001
+ export interface PaginationPreviousProps extends PaginationLinkProps {
6002
+ /** Additional CSS classes */
6003
+ className?: string;
6004
+ }
6005
+
6006
+ function PaginationPrevious({
6007
+ className,
6008
+ ...props
6009
+ }: PaginationPreviousProps) {
6010
+ return (
6011
+ <PaginationLink
6012
+ aria-label="Go to previous page"
6013
+ size="default"
6014
+ className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
6015
+ {...props}
6016
+ >
6017
+ <ChevronLeftIcon />
6018
+ <span className="hidden sm:block">Previous</span>
6019
+ </PaginationLink>
6020
+ );
6021
+ }
6022
+ PaginationPrevious.displayName = "PaginationPrevious";
6023
+
6024
+ export interface PaginationNextProps extends PaginationLinkProps {
6025
+ /** Additional CSS classes */
6026
+ className?: string;
6027
+ }
6028
+
6029
+ function PaginationNext({
6030
+ className,
6031
+ ...props
6032
+ }: PaginationNextProps) {
6033
+ return (
6034
+ <PaginationLink
6035
+ aria-label="Go to next page"
6036
+ size="default"
6037
+ className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
6038
+ {...props}
6039
+ >
6040
+ <span className="hidden sm:block">Next</span>
6041
+ <ChevronRightIcon />
6042
+ </PaginationLink>
6043
+ );
6044
+ }
6045
+ PaginationNext.displayName = "PaginationNext";
6046
+
6047
+ export interface PaginationEllipsisProps extends React.ComponentProps<"span"> {
6048
+ /** Additional CSS classes */
6049
+ className?: string;
6050
+ }
6051
+
6052
+ function PaginationEllipsis({
6053
+ className,
6054
+ ...props
6055
+ }: PaginationEllipsisProps) {
6056
+ return (
6057
+ <span
6058
+ aria-hidden
6059
+ data-slot="pagination-ellipsis"
6060
+ className={cn("flex size-9 items-center justify-center", className)}
6061
+ {...props}
6062
+ >
6063
+ <MoreHorizontalIcon className="size-4" />
6064
+ <span className="sr-only">More pages</span>
6065
+ </span>
6066
+ );
6067
+ }
6068
+ PaginationEllipsis.displayName = "PaginationEllipsis";
6069
+
6070
+ export {
6071
+ Pagination,
6072
+ PaginationContent,
6073
+ PaginationLink,
6074
+ PaginationItem,
6075
+ PaginationPrevious,
6076
+ PaginationNext,
6077
+ PaginationEllipsis,
6078
+ };
5890
6079
  `, prefix)
5891
6080
  }
5892
6081
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.163",
3
+ "version": "0.0.164",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",