{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pagination",
  "type": "registry:ui",
  "title": "Pagination",
  "description": "Pagination helps users move through a long collection of results one page at a time.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/button.json",
    "https://wideset.co/r/icon-button.json",
    "https://wideset.co/r/list-item.json",
    "https://wideset.co/r/motion.json",
    "https://wideset.co/r/select.json",
    "https://wideset.co/r/styles.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/pagination/Pagination.context.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/Pagination.context.tsx",
      "content": "'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport type { PaginationContextValue } from './Pagination.types';\n\nconst PaginationContext = createContext<PaginationContextValue | undefined>(undefined);\n\nconst usePaginationContext = () => {\n  const context = useContext(PaginationContext);\n\n  if (context === undefined) {\n    throw new Error('usePaginationContext must be used within a <Pagination>');\n  }\n\n  return context;\n};\n\nexport { PaginationContext, usePaginationContext };\n"
    },
    {
      "path": "src/components/pagination/Pagination.logic.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/Pagination.logic.ts",
      "content": "export const clampPage = (value: number, pagesCount: number) => {\n  if (pagesCount <= 0) return 1;\n\n  return Math.min(Math.max(1, value), pagesCount);\n};\n\nexport const getPagesToDisplay = (activePage: number, pagesCount: number, maxVisiblePages = 7) => {\n  if (pagesCount <= 0) return;\n\n  const safeMaxVisiblePages = Math.max(1, Math.floor(maxVisiblePages));\n  const clampedActivePage = clampPage(activePage, pagesCount);\n\n  const allPages = Array.from({ length: pagesCount }).map((_, index) => index + 1);\n\n  if (pagesCount <= safeMaxVisiblePages) return allPages;\n\n  if (safeMaxVisiblePages === 1) {\n    return [clampedActivePage];\n  }\n\n  if (safeMaxVisiblePages === 2) {\n    if (clampedActivePage <= 1) return [1, 2];\n    if (clampedActivePage >= pagesCount) return [pagesCount - 1, pagesCount];\n\n    return [clampedActivePage, clampedActivePage + 1];\n  }\n\n  const middleSlots = safeMaxVisiblePages - 2;\n  const edgeThreshold = safeMaxVisiblePages - 2;\n\n  if (clampedActivePage <= edgeThreshold)\n    return [...allPages.slice(0, safeMaxVisiblePages - 1), pagesCount];\n\n  if (clampedActivePage >= pagesCount - (edgeThreshold - 1))\n    return [1, ...allPages.slice(-(safeMaxVisiblePages - 1))];\n\n  let start = clampedActivePage - Math.floor(middleSlots / 2);\n  let end = start + middleSlots - 1;\n\n  if (start < 2) {\n    start = 2;\n    end = start + middleSlots - 1;\n  }\n\n  if (end > pagesCount - 1) {\n    end = pagesCount - 1;\n    start = end - middleSlots + 1;\n  }\n\n  return [1, ...allPages.slice(start - 1, end), pagesCount];\n};\n"
    },
    {
      "path": "src/components/pagination/Pagination.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/Pagination.tsx",
      "content": "'use client';\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { useDefaultMotion } from '@/lib/wideset/motion/MotionProvider';\nimport { PaginationContext } from './Pagination.context';\nimport { clampPage } from './Pagination.logic';\nimport type { PaginationProps, PaginationWithSubComponents } from './Pagination.types';\nimport { PaginationNumbers } from './PaginationNumbers';\nimport { PaginationOverflow } from './PaginationOverflow';\nimport { PaginationRowsPerPage } from './PaginationRowsPerPage';\n\nconst Pagination = ({\n  activePage,\n  defaultActivePage = 1,\n  pagesCount = 1,\n  onChangeActivePage,\n  itemsPerPage,\n  defaultItemsPerPage = 10,\n  onChangeItemsPerPage,\n  rowsPerPageLabel = 'Rows per page',\n  prevLabel = 'Prev',\n  nextLabel = 'Next',\n  ofLabel = 'of',\n  navigationAriaLabel = 'pagination',\n  prevPageAriaLabel = 'Go to previous page',\n  nextPageAriaLabel = 'Go to next page',\n  selectPageAriaLabel = (from, to) => `Select page between ${from} and ${to}`,\n  ellipsisPlaceholder = '...',\n  className,\n  maxVisiblePages = 7,\n  type = 'numbers',\n  rowsPerPageOptions = false,\n  defaultMotion,\n  children,\n  ...props\n}: PaginationProps) => {\n  if (pagesCount < 1) {\n    throw new Error('Pagination: `pagesCount` must be greater than or equal to 1.');\n  }\n\n  const motion = useDefaultMotion(defaultMotion);\n  const [localActivePage, setLocalActivePage] = useState(clampPage(defaultActivePage, pagesCount));\n  const [localItemsPerPage, setLocalItemsPerPage] = useState(itemsPerPage ?? defaultItemsPerPage);\n  const isControlled = activePage !== undefined;\n  const currentPage = isControlled\n    ? clampPage(activePage, pagesCount)\n    : clampPage(localActivePage, pagesCount);\n\n  const onChange = useCallback(\n    (value: number) => {\n      const newActivePage = clampPage(value, pagesCount);\n\n      if (!isControlled) {\n        setLocalActivePage(newActivePage);\n      }\n\n      onChangeActivePage?.(newActivePage);\n    },\n    [isControlled, onChangeActivePage, pagesCount],\n  );\n\n  const onItemsPerPageChange = useCallback(\n    (value: string) => {\n      const newItemsPerPage = Number(value);\n\n      if (Number.isNaN(newItemsPerPage)) return;\n\n      setLocalItemsPerPage(newItemsPerPage);\n      onChangeItemsPerPage?.(newItemsPerPage);\n    },\n    [onChangeItemsPerPage],\n  );\n\n  useEffect(() => {\n    if (itemsPerPage !== undefined) {\n      setLocalItemsPerPage(itemsPerPage);\n    }\n  }, [itemsPerPage]);\n\n  const contextValue = useMemo(\n    () => ({\n      localActivePage: currentPage,\n      pagesCount,\n      localItemsPerPage,\n      rowsPerPageLabel,\n      prevLabel,\n      nextLabel,\n      ofLabel,\n      navigationAriaLabel,\n      prevPageAriaLabel,\n      nextPageAriaLabel,\n      selectPageAriaLabel,\n      ellipsisPlaceholder,\n      maxVisiblePages,\n      rowsPerPageOptions: rowsPerPageOptions || [],\n      onChange,\n      onItemsPerPageChange,\n      motion,\n    }),\n    [\n      currentPage,\n      pagesCount,\n      localItemsPerPage,\n      rowsPerPageLabel,\n      prevLabel,\n      nextLabel,\n      ofLabel,\n      navigationAriaLabel,\n      prevPageAriaLabel,\n      nextPageAriaLabel,\n      selectPageAriaLabel,\n      ellipsisPlaceholder,\n      maxVisiblePages,\n      rowsPerPageOptions,\n      onChange,\n      onItemsPerPageChange,\n      motion,\n    ],\n  );\n\n  return (\n    <PaginationContext.Provider value={contextValue}>\n      <nav\n        role=\"navigation\"\n        aria-label={navigationAriaLabel}\n        data-slot=\"pagination\"\n        className={cn(\n          'flex items-center',\n          rowsPerPageOptions ? 'justify-between' : 'justify-end',\n          className,\n        )}\n        {...props}\n      >\n        {children ?? (\n          <>\n            {rowsPerPageOptions && <PaginationRowsPerPage />}\n            {type === 'numbers' ? <PaginationNumbers /> : <PaginationOverflow />}\n          </>\n        )}\n      </nav>\n    </PaginationContext.Provider>\n  );\n};\n\nconst PaginationComponent = Pagination as PaginationWithSubComponents;\nPaginationComponent.displayName = 'Pagination';\nPaginationComponent.RowsPerPage = PaginationRowsPerPage;\nPaginationComponent.Numbers = PaginationNumbers;\nPaginationComponent.Overflow = PaginationOverflow;\n\nexport { PaginationComponent as Pagination };\n"
    },
    {
      "path": "src/components/pagination/Pagination.types.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/Pagination.types.ts",
      "content": "import type { ComponentProps, ComponentType } from 'react';\n\nimport type { MotionProps } from '@/lib/wideset/motion/Motion.types';\n\nexport type PaginationType = 'numbers' | 'overflow';\n\n/** Props for the `<nav>` root that wraps the page controls. */\nexport type PaginationProps = ComponentProps<'nav'> &\n  MotionProps & {\n    /** Controlled active page value. */\n    activePage?: number;\n    /** Initial active page in uncontrolled mode. */\n    defaultActivePage?: number;\n    /** Total number of pages available. Must be greater than or equal to 1. */\n    pagesCount?: number;\n    /** Called whenever the active page changes. */\n    onChangeActivePage?: (page: number) => void;\n    /** Controlled rows-per-page value. */\n    itemsPerPage?: number;\n    /** Initial rows-per-page value in uncontrolled mode. */\n    defaultItemsPerPage?: number;\n    /** Called whenever the rows-per-page selection changes. */\n    onChangeItemsPerPage?: (itemsPerPage: number) => void;\n    /** Visible label shown before the rows-per-page select. */\n    rowsPerPageLabel?: string;\n    /** Visible previous button label in overflow mode. */\n    prevLabel?: string;\n    /** Visible next button label in overflow mode. */\n    nextLabel?: string;\n    /** Visible label shown before the total page count in overflow mode. */\n    ofLabel?: string;\n    /** Accessible label for the pagination nav element. Defaults to `'pagination'`. */\n    navigationAriaLabel?: string;\n    /** Accessible label for the previous-page button when it has no visible text. Defaults to `'Go to previous page'`. */\n    prevPageAriaLabel?: string;\n    /** Accessible label for the next-page button when it has no visible text. Defaults to `'Go to next page'`. */\n    nextPageAriaLabel?: string;\n    /** Returns the accessible label for the ellipsis page-range select. Receives the first and last hidden page numbers. Defaults to `` `Select page between ${from} and ${to}` ``. */\n    selectPageAriaLabel?: (from: number, to: number) => string;\n    /** Placeholder shown inside the ellipsis page-range select trigger. Defaults to `'...'`. */\n    ellipsisPlaceholder?: string;\n    /** Maximum number of numbered page buttons rendered around the current page. */\n    maxVisiblePages?: number;\n    /** Pagination layout variant. Use `numbers` for direct page buttons or `overflow` for compact navigation. */\n    type?: PaginationType;\n    /** Rows-per-page options. Pass `false` to hide the rows-per-page section entirely. */\n    rowsPerPageOptions?: number[] | false;\n  };\n\n/** The control choosing how many rows appear on a page. */\nexport type PaginationRowsPerPageProps = ComponentProps<'div'> &\n  MotionProps & {\n    /** Optional override for the rows-per-page label. */\n    label?: string;\n    /** Optional override for the selectable rows-per-page options. */\n    options?: number[];\n  };\n\n/** The page number controls. */\nexport type PaginationNumbersProps = ComponentProps<'div'> & MotionProps;\n\n/** The compact previous and next page controls. */\nexport type PaginationOverflowProps = ComponentProps<'div'> &\n  MotionProps & {\n    /** Optional override for the previous button label. */\n    prevLabel?: string;\n    /** Optional override for the next button label. */\n    nextLabel?: string;\n    /** Optional override for the label shown before the total page count. */\n    ofLabel?: string;\n  };\n\nexport type PaginationContextValue = {\n  localActivePage: number;\n  pagesCount: number;\n  localItemsPerPage: number;\n  rowsPerPageLabel: string;\n  prevLabel: string;\n  nextLabel: string;\n  ofLabel: string;\n  navigationAriaLabel: string;\n  prevPageAriaLabel: string;\n  nextPageAriaLabel: string;\n  selectPageAriaLabel: (from: number, to: number) => string;\n  ellipsisPlaceholder: string;\n  maxVisiblePages: number;\n  rowsPerPageOptions: number[];\n  onChange: (value: number) => void;\n  onItemsPerPageChange: (value: string) => void;\n  motion: boolean;\n};\n\nexport type PaginationWithSubComponents = ComponentType<PaginationProps> & {\n  RowsPerPage: ComponentType<PaginationRowsPerPageProps>;\n  Numbers: ComponentType<PaginationNumbersProps>;\n  Overflow: ComponentType<PaginationOverflowProps>;\n};\n"
    },
    {
      "path": "src/components/pagination/PaginationNumbers.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/PaginationNumbers.tsx",
      "content": "'use client';\n\nimport { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';\nimport { useMemo } from 'react';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { useDefaultMotion } from '@/lib/wideset/motion/MotionProvider';\nimport { usePaginationContext } from './Pagination.context';\nimport { getPagesToDisplay } from './Pagination.logic';\nimport type { PaginationNumbersProps } from './Pagination.types';\nimport { PaginationNumbersItem } from './PaginationNumbersItem';\n\nconst PaginationNumbers = ({ className, defaultMotion, ...props }: PaginationNumbersProps) => {\n  const {\n    localActivePage,\n    pagesCount,\n    maxVisiblePages,\n    onChange,\n    prevPageAriaLabel,\n    nextPageAriaLabel,\n    motion: paginationMotion,\n  } = usePaginationContext();\n  const motion = useDefaultMotion(defaultMotion ?? paginationMotion);\n\n  const pagesToDisplay = useMemo(\n    () => getPagesToDisplay(localActivePage, pagesCount, maxVisiblePages),\n    [localActivePage, pagesCount, maxVisiblePages],\n  );\n\n  if (!pagesToDisplay?.length) {\n    return null;\n  }\n\n  const buttonSizeClassName = 'size-ws-14 p-0 flex-shrink-0';\n\n  return (\n    <div\n      data-slot=\"pagination-numbers\"\n      className={cn('gap-ws-7 ml-auto flex items-center', className)}\n      {...props}\n    >\n      <IconButton\n        aria-label={prevPageAriaLabel}\n        preset=\"ghost\"\n        size=\"sm\"\n        variant=\"secondary\"\n        defaultMotion={motion}\n        icon={RiArrowLeftSLine}\n        disabled={localActivePage <= 1}\n        onClick={() => onChange(localActivePage - 1)}\n        className={buttonSizeClassName}\n      />\n      <ul className=\"gap-ws-5 flex\">\n        {pagesToDisplay.map((page, index) => (\n          <PaginationNumbersItem\n            key={page}\n            page={page}\n            previousPage={pagesToDisplay[index - 1]}\n            isActive={localActivePage === page}\n            onChange={onChange}\n            buttonSizeClassName={buttonSizeClassName}\n            defaultMotion={motion}\n          />\n        ))}\n      </ul>\n      <IconButton\n        aria-label={nextPageAriaLabel}\n        preset=\"ghost\"\n        size=\"sm\"\n        variant=\"secondary\"\n        defaultMotion={motion}\n        icon={RiArrowRightSLine}\n        disabled={localActivePage >= pagesCount}\n        onClick={() => onChange(localActivePage + 1)}\n        className={buttonSizeClassName}\n      />\n    </div>\n  );\n};\n\nPaginationNumbers.displayName = 'Pagination.Numbers';\n\nexport { PaginationNumbers };\n"
    },
    {
      "path": "src/components/pagination/PaginationNumbersItem.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/PaginationNumbersItem.tsx",
      "content": "'use client';\n\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\nimport { Select } from '@/components/ui/wideset/select/Select';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { buttonVariants } from '../button/Button.variants';\nimport { usePaginationContext } from './Pagination.context';\n\ntype PaginationNumbersItemProps = {\n  page: number;\n  previousPage?: number;\n  isActive: boolean;\n  onChange: (value: number) => void;\n  buttonSizeClassName: string;\n  defaultMotion: boolean;\n};\n\nconst PaginationNumbersItem = ({\n  page,\n  previousPage,\n  isActive,\n  onChange,\n  buttonSizeClassName,\n  defaultMotion,\n}: PaginationNumbersItemProps) => {\n  const { selectPageAriaLabel, ellipsisPlaceholder } = usePaginationContext();\n  const previousOrCurrentPage = previousPage ?? page;\n  const gap = page - previousOrCurrentPage;\n  const inBetweenPageOptions =\n    gap > 1\n      ? Array.from({ length: gap - 1 }, (_, index) => {\n          const value = previousOrCurrentPage + index + 1;\n\n          return {\n            label: `${value}`,\n            value: `${value}`,\n          };\n        })\n      : [];\n\n  return (\n    <li data-slot=\"pagination-numbers-item\" className=\"gap-ws-5 flex\">\n      {inBetweenPageOptions.length > 0 && (\n        // Composed rather than passed as `options`, so the overflow list can size to its own\n        // content and centre on the trigger. The shorthand form pins the list to the trigger\n        // width, which is 32px here — multi-digit page numbers get truncated.\n        <Select\n          value=\"\"\n          onValueChange={(value) => onChange(Number(value))}\n          defaultMotion={defaultMotion}\n        >\n          <Select.Trigger\n            aria-label={selectPageAriaLabel(previousOrCurrentPage + 1, page - 1)}\n            size=\"sm\"\n            hideArrow\n            className={cn(\n              buttonVariants({ preset: 'ghost', size: 'sm', variant: 'secondary' }),\n              buttonSizeClassName,\n              'flex items-center justify-center border-0 shadow-none',\n              // The trigger looks like a ghost button, so the ellipsis follows the button's\n              // text colours instead of the Select placeholder colour.\n              'data-[placeholder]:text-ws-dynamic-secondary-default',\n              'hover:data-[placeholder]:text-ws-dynamic-secondary-hover',\n              'active:data-[placeholder]:text-ws-dynamic-secondary-pressed',\n              // Figma renders the ellipsis in its pressed state while the list is open.\n              'data-[state=open]:bg-ws-dynamic-secondary-alpha-pressed',\n              'data-[state=open]:data-[placeholder]:text-ws-dynamic-secondary-pressed',\n              // Focus like the sibling page buttons: restore the outline ring that the\n              // Select trigger's `outline-hidden` suppresses, and drop its forms focus shadow.\n              'focus-visible:outline-solid focus-visible:not-active:shadow-none',\n            )}\n          >\n            {ellipsisPlaceholder}\n          </Select.Trigger>\n          {/* Figma pins the page list at 98px — an unbound raw value, so a\n              designer can tokenise it later. */}\n          <Select.Content align=\"center\" className=\"w-[98px]!\">\n            {inBetweenPageOptions.map((option) => (\n              <Select.Option key={option.value} value={option.value} textValue={option.label}>\n                <ListItem.Label>{option.label}</ListItem.Label>\n              </Select.Option>\n            ))}\n          </Select.Content>\n        </Select>\n      )}\n      <Button\n        aria-current={isActive ? 'page' : undefined}\n        preset={isActive ? 'filled' : 'ghost'}\n        size=\"sm\"\n        variant=\"secondary\"\n        defaultMotion={defaultMotion}\n        onClick={() => onChange(page)}\n        className={buttonSizeClassName}\n      >\n        {page}\n      </Button>\n    </li>\n  );\n};\n\nexport { PaginationNumbersItem };\n"
    },
    {
      "path": "src/components/pagination/PaginationOverflow.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/PaginationOverflow.tsx",
      "content": "'use client';\n\nimport { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';\nimport { useMemo } from 'react';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { Select } from '@/components/ui/wideset/select/Select';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { useDefaultMotion } from '@/lib/wideset/motion/MotionProvider';\nimport { usePaginationContext } from './Pagination.context';\nimport type { PaginationOverflowProps } from './Pagination.types';\n\nconst PaginationOverflow = ({\n  className,\n  prevLabel,\n  nextLabel,\n  ofLabel,\n  defaultMotion,\n  ...props\n}: PaginationOverflowProps) => {\n  const {\n    localActivePage,\n    pagesCount,\n    onChange,\n    prevLabel: contextPrevLabel,\n    nextLabel: contextNextLabel,\n    ofLabel: contextOfLabel,\n    prevPageAriaLabel,\n    nextPageAriaLabel,\n    motion: paginationMotion,\n  } = usePaginationContext();\n  const motion = useDefaultMotion(defaultMotion ?? paginationMotion);\n  const visiblePrevLabel = prevLabel ?? contextPrevLabel;\n  const visibleNextLabel = nextLabel ?? contextNextLabel;\n\n  const pageSelectOptions = useMemo(\n    () =>\n      Array.from({ length: pagesCount }).map((_, index) => ({\n        label: `${index + 1}`,\n        value: `${index + 1}`,\n      })),\n    [pagesCount],\n  );\n\n  return (\n    <div\n      data-slot=\"pagination-overflow\"\n      className={cn('gap-ws-9 ml-auto flex items-center', className)}\n      {...props}\n    >\n      <Button\n        aria-label={visiblePrevLabel ? undefined : prevPageAriaLabel}\n        preset=\"ghost\"\n        size=\"sm\"\n        variant=\"secondary\"\n        defaultMotion={motion}\n        disabled={localActivePage <= 1}\n        onClick={() => onChange(localActivePage - 1)}\n      >\n        <Button.Icon icon={RiArrowLeftSLine} />\n        {visiblePrevLabel}\n      </Button>\n\n      <div className=\"gap-ws-7 flex items-center\">\n        <Select\n          className=\"w-ws-21\"\n          options={pageSelectOptions}\n          value={localActivePage.toString()}\n          onValueChange={(value) => {\n            onChange(+value);\n          }}\n          size=\"sm\"\n          defaultMotion={motion}\n        />\n        <span className=\"text-ws-static-base typography-label-sm whitespace-nowrap\">\n          {ofLabel ?? contextOfLabel} {pagesCount}\n        </span>\n      </div>\n\n      <Button\n        aria-label={visibleNextLabel ? undefined : nextPageAriaLabel}\n        preset=\"ghost\"\n        size=\"sm\"\n        variant=\"secondary\"\n        defaultMotion={motion}\n        disabled={localActivePage >= pagesCount}\n        onClick={() => onChange(localActivePage + 1)}\n      >\n        {visibleNextLabel}\n        <Button.Icon icon={RiArrowRightSLine} />\n      </Button>\n    </div>\n  );\n};\n\nPaginationOverflow.displayName = 'Pagination.Overflow';\n\nexport { PaginationOverflow };\n"
    },
    {
      "path": "src/components/pagination/PaginationRowsPerPage.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/pagination/PaginationRowsPerPage.tsx",
      "content": "'use client';\n\nimport { useMemo } from 'react';\nimport { Select } from '@/components/ui/wideset/select/Select';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { useDefaultMotion } from '@/lib/wideset/motion/MotionProvider';\nimport { usePaginationContext } from './Pagination.context';\nimport type { PaginationRowsPerPageProps } from './Pagination.types';\n\nconst PaginationRowsPerPage = ({\n  className,\n  label,\n  options,\n  defaultMotion,\n  ...props\n}: PaginationRowsPerPageProps) => {\n  const {\n    localItemsPerPage,\n    rowsPerPageOptions,\n    rowsPerPageLabel,\n    onItemsPerPageChange,\n    motion: paginationMotion,\n  } = usePaginationContext();\n  const motion = useDefaultMotion(defaultMotion ?? paginationMotion);\n\n  const rowsPerPageSelectOptions = useMemo(\n    () =>\n      (options ?? rowsPerPageOptions).map((option) => ({\n        label: `${option}`,\n        value: `${option}`,\n      })),\n    [options, rowsPerPageOptions],\n  );\n\n  if (!(options ?? rowsPerPageOptions).length) return null;\n\n  return (\n    <div\n      data-slot=\"pagination-rows-per-page\"\n      className={cn('gap-ws-7 flex items-center', className)}\n      {...props}\n    >\n      <div className=\"text-ws-static-base typography-label-sm whitespace-nowrap\">\n        {label ?? rowsPerPageLabel}\n      </div>\n      <Select\n        className=\"w-ws-21\"\n        options={rowsPerPageSelectOptions}\n        value={localItemsPerPage.toString()}\n        onValueChange={onItemsPerPageChange}\n        size=\"sm\"\n        defaultMotion={motion}\n      />\n    </div>\n  );\n};\n\nPaginationRowsPerPage.displayName = 'Pagination.RowsPerPage';\n\nexport { PaginationRowsPerPage };\n"
    }
  ],
  "meta": {
    "version": "1.0.0",
    "commit": "8bb3627"
  }
}
