@fanvue/ui 3.53.0 → 3.54.0

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 (93) hide show
  1. package/dist/cjs/components/AudioPlayer/AudioPlayer.cjs +4 -2
  2. package/dist/cjs/components/AudioPlayer/AudioPlayer.cjs.map +1 -1
  3. package/dist/cjs/components/Badge/Badge.cjs +7 -6
  4. package/dist/cjs/components/Badge/Badge.cjs.map +1 -1
  5. package/dist/cjs/components/Button/Button.cjs +2 -1
  6. package/dist/cjs/components/Button/Button.cjs.map +1 -1
  7. package/dist/cjs/components/Card/Card.cjs +1 -1
  8. package/dist/cjs/components/Card/Card.cjs.map +1 -1
  9. package/dist/cjs/components/ChatMessage/ChatMessage.cjs +3 -1
  10. package/dist/cjs/components/ChatMessage/ChatMessage.cjs.map +1 -1
  11. package/dist/cjs/components/Chip/Chip.cjs +10 -9
  12. package/dist/cjs/components/Chip/Chip.cjs.map +1 -1
  13. package/dist/cjs/components/DatePicker/DatePicker.cjs +1 -1
  14. package/dist/cjs/components/DatePicker/DatePicker.cjs.map +1 -1
  15. package/dist/cjs/components/DatePicker/DateRangePanel.cjs +143 -0
  16. package/dist/cjs/components/DatePicker/DateRangePanel.cjs.map +1 -0
  17. package/dist/cjs/components/DatePicker/DateRangePicker.cjs +33 -0
  18. package/dist/cjs/components/DatePicker/DateRangePicker.cjs.map +1 -0
  19. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs +1 -1
  20. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs.map +1 -1
  21. package/dist/cjs/components/DropdownMenu/DropdownMenuRoot.cjs +3 -3
  22. package/dist/cjs/components/DropdownMenu/DropdownMenuRoot.cjs.map +1 -1
  23. package/dist/cjs/components/DropdownMenu/DropdownMenuSelectionItems.cjs +1 -1
  24. package/dist/cjs/components/DropdownMenu/DropdownMenuSelectionItems.cjs.map +1 -1
  25. package/dist/cjs/components/FilterMenu/FilterMenu.cjs +45 -0
  26. package/dist/cjs/components/FilterMenu/FilterMenu.cjs.map +1 -0
  27. package/dist/cjs/components/IconButton/IconButton.cjs +2 -1
  28. package/dist/cjs/components/IconButton/IconButton.cjs.map +1 -1
  29. package/dist/cjs/components/Icons/ReorganiseIcon.cjs +65 -0
  30. package/dist/cjs/components/Icons/ReorganiseIcon.cjs.map +1 -0
  31. package/dist/cjs/components/Pagination/Pagination.cjs +3 -2
  32. package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
  33. package/dist/cjs/components/Select/Select.cjs +20 -11
  34. package/dist/cjs/components/Select/Select.cjs.map +1 -1
  35. package/dist/cjs/components/Table/Table.cjs +59 -34
  36. package/dist/cjs/components/Table/Table.cjs.map +1 -1
  37. package/dist/cjs/components/Table/TableToolbarSearchFilters.cjs +152 -0
  38. package/dist/cjs/components/Table/TableToolbarSearchFilters.cjs.map +1 -0
  39. package/dist/cjs/components/Table/useFittingCount.cjs +51 -0
  40. package/dist/cjs/components/Table/useFittingCount.cjs.map +1 -0
  41. package/dist/cjs/date-picker.cjs +4 -0
  42. package/dist/cjs/date-picker.cjs.map +1 -1
  43. package/dist/cjs/index.cjs +4 -0
  44. package/dist/cjs/index.cjs.map +1 -1
  45. package/dist/components/AudioPlayer/AudioPlayer.mjs +4 -2
  46. package/dist/components/AudioPlayer/AudioPlayer.mjs.map +1 -1
  47. package/dist/components/Badge/Badge.mjs +7 -6
  48. package/dist/components/Badge/Badge.mjs.map +1 -1
  49. package/dist/components/Button/Button.mjs +2 -1
  50. package/dist/components/Button/Button.mjs.map +1 -1
  51. package/dist/components/Card/Card.mjs +1 -1
  52. package/dist/components/Card/Card.mjs.map +1 -1
  53. package/dist/components/ChatMessage/ChatMessage.mjs +3 -1
  54. package/dist/components/ChatMessage/ChatMessage.mjs.map +1 -1
  55. package/dist/components/Chip/Chip.mjs +10 -9
  56. package/dist/components/Chip/Chip.mjs.map +1 -1
  57. package/dist/components/DatePicker/DatePicker.mjs +1 -1
  58. package/dist/components/DatePicker/DatePicker.mjs.map +1 -1
  59. package/dist/components/DatePicker/DateRangePanel.mjs +126 -0
  60. package/dist/components/DatePicker/DateRangePanel.mjs.map +1 -0
  61. package/dist/components/DatePicker/DateRangePicker.mjs +33 -0
  62. package/dist/components/DatePicker/DateRangePicker.mjs.map +1 -0
  63. package/dist/components/DropdownMenu/DropdownMenuItem.mjs +1 -1
  64. package/dist/components/DropdownMenu/DropdownMenuItem.mjs.map +1 -1
  65. package/dist/components/DropdownMenu/DropdownMenuRoot.mjs +3 -3
  66. package/dist/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
  67. package/dist/components/DropdownMenu/DropdownMenuSelectionItems.mjs +1 -1
  68. package/dist/components/DropdownMenu/DropdownMenuSelectionItems.mjs.map +1 -1
  69. package/dist/components/FilterMenu/FilterMenu.mjs +28 -0
  70. package/dist/components/FilterMenu/FilterMenu.mjs.map +1 -0
  71. package/dist/components/IconButton/IconButton.mjs +2 -1
  72. package/dist/components/IconButton/IconButton.mjs.map +1 -1
  73. package/dist/components/Icons/ReorganiseIcon.mjs +48 -0
  74. package/dist/components/Icons/ReorganiseIcon.mjs.map +1 -0
  75. package/dist/components/Pagination/Pagination.mjs +3 -2
  76. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  77. package/dist/components/Select/Select.mjs +20 -11
  78. package/dist/components/Select/Select.mjs.map +1 -1
  79. package/dist/components/Table/Table.mjs +59 -34
  80. package/dist/components/Table/Table.mjs.map +1 -1
  81. package/dist/components/Table/TableToolbarSearchFilters.mjs +135 -0
  82. package/dist/components/Table/TableToolbarSearchFilters.mjs.map +1 -0
  83. package/dist/components/Table/useFittingCount.mjs +34 -0
  84. package/dist/components/Table/useFittingCount.mjs.map +1 -0
  85. package/dist/date-picker.d.ts +100 -0
  86. package/dist/date-picker.mjs +5 -1
  87. package/dist/date-picker.mjs.map +1 -1
  88. package/dist/index.d.ts +104 -9
  89. package/dist/index.mjs +4 -0
  90. package/dist/index.mjs.map +1 -1
  91. package/dist/styles/base.css +43 -0
  92. package/dist/styles/theme.css +25 -25
  93. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.mjs","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { IconButton } from \"../IconButton/IconButton\";\nimport { ChevronLeftIcon } from \"../Icons/ChevronLeftIcon\";\nimport { ChevronRightIcon } from \"../Icons/ChevronRightIcon\";\n\n/** Pagination display style — numbered buttons or minimal dots. */\nexport type PaginationVariant = \"default\" | \"dots\";\n\nexport interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, \"onChange\"> {\n /** Display style — numbered page buttons or minimal dots. @default \"default\" */\n variant?: PaginationVariant;\n /** Total number of pages. */\n totalPages: number;\n /** Current active page (1-indexed). */\n currentPage: number;\n /** Callback fired when the active page changes. Receives the new 1-indexed page number. */\n onPageChange?: (page: number) => void;\n /** Accessible label for the `<nav>` landmark. @default \"Pagination\" */\n ariaLabel?: string;\n /** Accessible label for the previous-page button. @default \"Previous page\" */\n previousLabel?: string;\n /** Accessible label for the next-page button. @default \"Next page\" */\n nextLabel?: string;\n /** Function that returns an accessible label for each page button. @default (page) => \\`Page ${page}\\` */\n getPageLabel?: (page: number) => string;\n}\n\ntype PageItem = number | \"ellipsis-start\" | \"ellipsis-end\";\n\nfunction getVisiblePages(currentPage: number, totalPages: number): PageItem[] {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: PageItem[] = [1];\n\n if (currentPage <= 4) {\n pages.push(2, 3, 4, 5, \"ellipsis-end\");\n } else if (currentPage >= totalPages - 3) {\n pages.push(\"ellipsis-start\", totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1);\n } else {\n pages.push(\"ellipsis-start\", currentPage - 1, currentPage, currentPage + 1, \"ellipsis-end\");\n }\n\n pages.push(totalPages);\n return pages;\n}\n\n/**\n * Page navigation control with previous/next buttons and numbered page\n * indicators. Supports a numbered-buttons layout (`\"default\"`) and a compact\n * dots layout (`\"dots\"`).\n *\n * @example\n * ```tsx\n * <Pagination totalPages={10} currentPage={page} onPageChange={setPage} />\n * ```\n */\nexport const Pagination = React.forwardRef<HTMLElement, PaginationProps>(\n (\n {\n variant = \"default\",\n totalPages,\n currentPage,\n onPageChange,\n ariaLabel = \"Pagination\",\n previousLabel = \"Previous page\",\n nextLabel = \"Next page\",\n getPageLabel = (page: number) => `Page ${page}`,\n className,\n ...props\n },\n ref,\n ) => {\n const isFirstPage = currentPage <= 1;\n const isLastPage = currentPage >= totalPages;\n\n const handlePrevious = () => {\n if (!isFirstPage) onPageChange?.(currentPage - 1);\n };\n\n const handleNext = () => {\n if (!isLastPage) onPageChange?.(currentPage + 1);\n };\n\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(\n \"inline-flex items-center pb-4\",\n variant === \"default\" && \"gap-3\",\n variant === \"dots\" && \"gap-3\",\n className,\n )}\n {...props}\n >\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronLeftIcon />}\n aria-label={previousLabel}\n disabled={isFirstPage}\n onClick={handlePrevious}\n />\n\n {variant === \"default\" && (\n <div className=\"flex items-center gap-3\">\n {getVisiblePages(currentPage, totalPages).map((page) =>\n typeof page === \"string\" ? (\n <span\n key={page}\n className=\"typography-description-12px-regular flex min-w-6 items-center justify-center p-1 text-content-primary\"\n aria-hidden=\"true\"\n >\n &hellip;\n </span>\n ) : (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className={cn(\n \"typography-description-12px-regular flex min-w-6 cursor-pointer items-center justify-center rounded-2xs p-1 focus-visible:shadow-focus-ring focus-visible:outline-none motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage\n ? \"bg-surface-primary-inverted text-content-primary-inverted\"\n : \"text-content-primary hover:bg-buttons-secondary-default active:bg-buttons-secondary-hover\",\n )}\n >\n {page}\n </button>\n ),\n )}\n </div>\n )}\n\n {variant === \"dots\" && (\n <div className=\"flex items-center\">\n {Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className=\"group flex size-6 cursor-pointer items-center justify-center rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none\"\n >\n <span\n className={cn(\n \"block size-2 rounded-2xs motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage\n ? \"bg-surface-primary-inverted\"\n : \"bg-buttons-secondary-default group-hover:bg-buttons-secondary-hover group-active:bg-buttons-secondary-hover\",\n )}\n />\n </button>\n ))}\n </div>\n )}\n\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronRightIcon />}\n aria-label={nextLabel}\n disabled={isLastPage}\n onClick={handleNext}\n />\n </nav>\n );\n },\n);\n\nPagination.displayName = \"Pagination\";\n"],"names":[],"mappings":";;;;;;;AA8BA,SAAS,gBAAgB,aAAqB,YAAgC;AAC5E,MAAI,cAAc,GAAG;AACnB,WAAO,MAAM,KAAK,EAAE,QAAQ,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC;AAAA,EAC3D;AAEA,QAAM,QAAoB,CAAC,CAAC;AAE5B,MAAI,eAAe,GAAG;AACpB,UAAM,KAAK,GAAG,GAAG,GAAG,GAAG,cAAc;AAAA,EACvC,WAAW,eAAe,aAAa,GAAG;AACxC,UAAM,KAAK,kBAAkB,aAAa,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CAAC;AAAA,EAC7F,OAAO;AACL,UAAM,KAAK,kBAAkB,cAAc,GAAG,aAAa,cAAc,GAAG,cAAc;AAAA,EAC5F;AAEA,QAAM,KAAK,UAAU;AACrB,SAAO;AACT;AAYO,MAAM,aAAa,MAAM;AAAA,EAC9B,CACE;AAAA,IACE,UAAU;AAAA,IACV;AAAA,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;AAAA,gBAGL,UAAA;AAAA,cAAA;AAAA,cAZI;AAAA,YAAA;AAAA,UAaP,GAGN;AAAA,UAGD,YAAY,UACX,oBAAC,OAAA,EAAI,WAAU,qBACZ,UAAA,MAAM,KAAK,EAAE,QAAQ,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,SACxD;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,MAAK;AAAA,cACL,cAAY,aAAa,IAAI;AAAA,cAC7B,gBAAc,SAAS,cAAc,SAAS;AAAA,cAC9C,SAAS,MAAM,eAAe,IAAI;AAAA,cAClC,WAAU;AAAA,cAEV,UAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAW;AAAA,oBACT;AAAA,oBACA,SAAS,cACL,gCACA;AAAA,kBAAA;AAAA,gBACN;AAAA,cAAA;AAAA,YACF;AAAA,YAdK;AAAA,UAAA,CAgBR,GACH;AAAA,UAGF;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,0BAAO,kBAAA,EAAiB;AAAA,cACxB,cAAY;AAAA,cACZ,UAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QACX;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,WAAW,cAAc;"}
1
+ {"version":3,"file":"Pagination.mjs","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { IconButton } from \"../IconButton/IconButton\";\nimport { ChevronLeftIcon } from \"../Icons/ChevronLeftIcon\";\nimport { ChevronRightIcon } from \"../Icons/ChevronRightIcon\";\n\n/** Pagination display style — numbered buttons or minimal dots. */\nexport type PaginationVariant = \"default\" | \"dots\";\n\nexport interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, \"onChange\"> {\n /** Display style — numbered page buttons or minimal dots. @default \"default\" */\n variant?: PaginationVariant;\n /** Total number of pages. */\n totalPages: number;\n /** Current active page (1-indexed). */\n currentPage: number;\n /** Callback fired when the active page changes. Receives the new 1-indexed page number. */\n onPageChange?: (page: number) => void;\n /** Accessible label for the `<nav>` landmark. @default \"Pagination\" */\n ariaLabel?: string;\n /** Accessible label for the previous-page button. @default \"Previous page\" */\n previousLabel?: string;\n /** Accessible label for the next-page button. @default \"Next page\" */\n nextLabel?: string;\n /** Function that returns an accessible label for each page button. @default (page) => \\`Page ${page}\\` */\n getPageLabel?: (page: number) => string;\n}\n\ntype PageItem = number | \"ellipsis-start\" | \"ellipsis-end\";\n\n/**\n * A dot for a page other than the current one. Under the v2 palette the button resting\n * fill is a 5% wash, too faint to show that more pages exist, so the dots take their own\n * 20% step, with 30% on hover.\n */\nconst PAGE_DOT =\n \"bg-buttons-secondary-default group-hover:bg-buttons-secondary-hover group-active:bg-buttons-secondary-hover theme-v2:bg-neutral-alphas-200 theme-v2:group-hover:bg-neutral-alphas-300 theme-v2:group-active:bg-neutral-alphas-300\";\n\nfunction getVisiblePages(currentPage: number, totalPages: number): PageItem[] {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: PageItem[] = [1];\n\n if (currentPage <= 4) {\n pages.push(2, 3, 4, 5, \"ellipsis-end\");\n } else if (currentPage >= totalPages - 3) {\n pages.push(\"ellipsis-start\", totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1);\n } else {\n pages.push(\"ellipsis-start\", currentPage - 1, currentPage, currentPage + 1, \"ellipsis-end\");\n }\n\n pages.push(totalPages);\n return pages;\n}\n\n/**\n * Page navigation control with previous/next buttons and numbered page\n * indicators. Supports a numbered-buttons layout (`\"default\"`) and a compact\n * dots layout (`\"dots\"`).\n *\n * @example\n * ```tsx\n * <Pagination totalPages={10} currentPage={page} onPageChange={setPage} />\n * ```\n */\nexport const Pagination = React.forwardRef<HTMLElement, PaginationProps>(\n (\n {\n variant = \"default\",\n totalPages,\n currentPage,\n onPageChange,\n ariaLabel = \"Pagination\",\n previousLabel = \"Previous page\",\n nextLabel = \"Next page\",\n getPageLabel = (page: number) => `Page ${page}`,\n className,\n ...props\n },\n ref,\n ) => {\n const isFirstPage = currentPage <= 1;\n const isLastPage = currentPage >= totalPages;\n\n const handlePrevious = () => {\n if (!isFirstPage) onPageChange?.(currentPage - 1);\n };\n\n const handleNext = () => {\n if (!isLastPage) onPageChange?.(currentPage + 1);\n };\n\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(\n \"inline-flex items-center pb-4\",\n variant === \"default\" && \"gap-3\",\n variant === \"dots\" && \"gap-3\",\n className,\n )}\n {...props}\n >\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronLeftIcon />}\n aria-label={previousLabel}\n disabled={isFirstPage}\n onClick={handlePrevious}\n />\n\n {variant === \"default\" && (\n <div className=\"flex items-center gap-3\">\n {getVisiblePages(currentPage, totalPages).map((page) =>\n typeof page === \"string\" ? (\n <span\n key={page}\n className=\"typography-description-12px-regular flex min-w-6 items-center justify-center p-1 text-content-primary\"\n aria-hidden=\"true\"\n >\n &hellip;\n </span>\n ) : (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className={cn(\n \"typography-description-12px-regular flex min-w-6 cursor-pointer items-center justify-center rounded-2xs p-1 focus-visible:shadow-focus-ring focus-visible:outline-none motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage\n ? \"bg-surface-primary-inverted text-content-primary-inverted\"\n : \"text-content-primary hover:bg-buttons-secondary-default active:bg-buttons-secondary-hover theme-v2:hover:bg-buttons-secondary-hover\",\n )}\n >\n {page}\n </button>\n ),\n )}\n </div>\n )}\n\n {variant === \"dots\" && (\n <div className=\"flex items-center\">\n {Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className=\"group flex size-6 cursor-pointer items-center justify-center rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none\"\n >\n <span\n className={cn(\n \"block size-2 rounded-2xs motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage ? \"bg-surface-primary-inverted\" : PAGE_DOT,\n )}\n />\n </button>\n ))}\n </div>\n )}\n\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronRightIcon />}\n aria-label={nextLabel}\n disabled={isLastPage}\n onClick={handleNext}\n />\n </nav>\n );\n },\n);\n\nPagination.displayName = \"Pagination\";\n"],"names":[],"mappings":";;;;;;;AAmCA,MAAM,WACJ;AAEF,SAAS,gBAAgB,aAAqB,YAAgC;AAC5E,MAAI,cAAc,GAAG;AACnB,WAAO,MAAM,KAAK,EAAE,QAAQ,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC;AAAA,EAC3D;AAEA,QAAM,QAAoB,CAAC,CAAC;AAE5B,MAAI,eAAe,GAAG;AACpB,UAAM,KAAK,GAAG,GAAG,GAAG,GAAG,cAAc;AAAA,EACvC,WAAW,eAAe,aAAa,GAAG;AACxC,UAAM,KAAK,kBAAkB,aAAa,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CAAC;AAAA,EAC7F,OAAO;AACL,UAAM,KAAK,kBAAkB,cAAc,GAAG,aAAa,cAAc,GAAG,cAAc;AAAA,EAC5F;AAEA,QAAM,KAAK,UAAU;AACrB,SAAO;AACT;AAYO,MAAM,aAAa,MAAM;AAAA,EAC9B,CACE;AAAA,IACE,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,eAAe,CAAC,SAAiB,QAAQ,IAAI;AAAA,IAC7C;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,cAAc,eAAe;AACnC,UAAM,aAAa,eAAe;AAElC,UAAM,i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AAC;AAAA,YAAA;AAAA,cAEC,MAAK;AAAA,cACL,cAAY,aAAa,IAAI;AAAA,cAC7B,gBAAc,SAAS,cAAc,SAAS;AAAA,cAC9C,SAAS,MAAM,eAAe,IAAI;AAAA,cAClC,WAAU;AAAA,cAEV,UAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAW;AAAA,oBACT;AAAA,oBACA,SAAS,cAAc,gCAAgC;AAAA,kBAAA;AAAA,gBACzD;AAAA,cAAA;AAAA,YACF;AAAA,YAZK;AAAA,UAAA,CAcR,GACH;AAAA,UAGF;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,0BAAO,kBAAA,EAAiB;AAAA,cACxB,cAAY;AAAA,cACZ,UAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QACX;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,WAAW,cAAc;"}
@@ -140,6 +140,22 @@ const Select = React.forwardRef(
140
140
  }
141
141
  );
142
142
  Select.displayName = "Select";
143
+ function SelectViewport({ children }) {
144
+ const [interacted, setInteracted] = React.useState(false);
145
+ const markInteracted = () => {
146
+ if (!interacted) setInteracted(true);
147
+ };
148
+ return /* @__PURE__ */ jsx(
149
+ SelectPrimitive.Viewport,
150
+ {
151
+ "data-interacted": interacted ? "" : void 0,
152
+ onPointerMove: markInteracted,
153
+ onKeyDown: markInteracted,
154
+ className: "group/select flex max-h-[var(--radix-select-content-available-height)] flex-col gap-0.5 overflow-y-auto p-2",
155
+ children
156
+ }
157
+ );
158
+ }
143
159
  const SelectContent = React.forwardRef(
144
160
  ({
145
161
  className,
@@ -167,7 +183,7 @@ const SelectContent = React.forwardRef(
167
183
  className
168
184
  ),
169
185
  ...props,
170
- children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "flex max-h-[var(--radix-select-content-available-height)] flex-col gap-[3px] overflow-y-auto p-2", children: /* @__PURE__ */ jsx(IconDefaultsContext.Provider, { value: NO_ICON_DEFAULTS, children }) })
186
+ children: /* @__PURE__ */ jsx(SelectViewport, { children: /* @__PURE__ */ jsx(IconDefaultsContext.Provider, { value: NO_ICON_DEFAULTS, children }) })
171
187
  }
172
188
  ) })
173
189
  );
@@ -183,8 +199,8 @@ const ITEM_DESCRIPTION_TYPOGRAPHY = {
183
199
  function isRenderableNode(node) {
184
200
  return node !== null && node !== void 0 && typeof node !== "boolean";
185
201
  }
186
- const CHECKED_V2_CLASSES = "theme-v2:data-[state=checked]:text-content-primary-inverted theme-v2:data-[state=checked]:data-highlighted:bg-menu-item-selected-hover theme-v2:data-[state=checked]:focus:bg-menu-item-selected-hover";
187
- const CHECKED_DESCRIPTION_V2_CLASSES = "theme-v2:group-data-[state=checked]:text-content-secondary-inverted theme-v2:group-data-[state=checked]:group-data-highlighted:text-menu-item-selected-hover-secondary theme-v2:group-data-[state=checked]:group-focus:text-menu-item-selected-hover-secondary";
202
+ const CHECKED_V2_CLASSES = "theme-v2:data-[state=checked]:text-content-primary-inverted theme-v2:data-[state=checked]:focus:bg-menu-item-selected theme-v2:data-[state=checked]:data-highlighted:bg-menu-item-selected theme-v2:group-data-[interacted]/select:data-[state=checked]:data-highlighted:bg-menu-item-selected-hover";
203
+ const CHECKED_DESCRIPTION_V2_CLASSES = "theme-v2:group-data-[state=checked]:text-content-secondary-inverted theme-v2:group-data-[interacted]/select:group-data-[state=checked]:group-data-highlighted:text-menu-item-selected-hover-secondary";
188
204
  const CHECKED_DISABLED_V2_CLASSES = "theme-v2:data-[state=checked]:bg-transparent";
189
205
  const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, avatar, description, disabled, ...props }, ref) => {
190
206
  const { size: triggerSize } = React.useContext(SelectContext);
@@ -250,14 +266,7 @@ const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, a
250
266
  );
251
267
  });
252
268
  SelectItem.displayName = "SelectItem";
253
- const SelectGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
254
- SelectPrimitive.Group,
255
- {
256
- ref,
257
- className: cn("flex flex-col gap-[3px]", className),
258
- ...props
259
- }
260
- ));
269
+ const SelectGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Group, { ref, className: cn("flex flex-col gap-0.5", className), ...props }));
261
270
  SelectGroup.displayName = "SelectGroup";
262
271
  const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
263
272
  SelectPrimitive.Label,
@@ -1 +1 @@
1
- {"version":3,"file":"Select.mjs","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"@/utils/floatingContentCollisionPadding\";\nimport {\n FLOATING_CONTENT_SURFACE_CLASS,\n FLOATING_CONTENT_Z_INDEX,\n} from \"@/utils/floatingContentSurface\";\nimport { CheckIcon } from \"../Icons/CheckIcon\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\nimport { IconDefaultsContext, NO_ICON_DEFAULTS } from \"../Icons/IconDefaults\";\nimport { MenuRowIcon } from \"../Icons/MenuRowIcon\";\n\n/** Select field height in pixels. */\nexport type SelectSize = \"48\" | \"40\" | \"32\";\n\n/**\n * Trigger surface. `\"default\"` is the bordered input field; `\"filled\"` is the\n * V2 Table Tab Actions pill: a `background-secondary` fill with no border and a\n * centred `content-tertiary` label, for filters that sit beside a table or chart.\n */\nexport type SelectVariant = \"default\" | \"filled\";\n\ntype SelectContextValue = {\n size: SelectSize;\n error: boolean;\n disabled?: boolean;\n};\n\nconst SelectContext = React.createContext<SelectContextValue>({\n size: \"48\",\n error: false,\n});\n\nconst TRIGGER_HEIGHT: Record<SelectSize, string> = {\n \"48\": \"h-12\",\n \"40\": \"h-10\",\n \"32\": \"h-8\",\n};\n\nconst TRIGGER_PADDING_X: Record<SelectSize, string> = {\n \"48\": \"px-4\",\n \"40\": \"px-4\",\n \"32\": \"px-3\",\n};\n\nconst TRIGGER_GAP: Record<SelectSize, string> = {\n \"48\": \"gap-3\",\n \"40\": \"gap-3\",\n \"32\": \"gap-2\",\n};\n\nconst TRIGGER_TYPOGRAPHY: Record<SelectSize, string> = {\n \"48\": \"typography-body-default-16px-regular\",\n \"40\": \"typography-body-default-16px-regular\",\n \"32\": \"typography-body-small-14px-regular\",\n};\n\nexport interface SelectProps extends Omit<SelectPrimitive.SelectProps, \"dir\"> {\n /** Label text displayed above the trigger. Also used as the accessible name. */\n label?: string;\n /** Accessible name applied directly to the trigger button when no visible `label` is provided. */\n \"aria-label\"?: string;\n /** ID of an external element that labels the trigger button. */\n \"aria-labelledby\"?: string;\n /** Helper text displayed below the trigger. Replaced by `errorMessage` when `error` is `true`. */\n helperText?: string;\n /** Height of the select field in pixels. @default \"48\" */\n size?: SelectSize;\n /** Trigger surface. See {@link SelectVariant}. @default \"default\" */\n variant?: SelectVariant;\n /** Whether the field is in an error state. @default false */\n error?: boolean;\n /** Error message displayed below the trigger. Shown instead of `helperText` when `error` is `true`. */\n errorMessage?: string;\n /** Placeholder shown when no value is selected. */\n placeholder?: string;\n /** Icon element displayed at the left side of the trigger. */\n leftIcon?: React.ReactNode;\n /** Whether the field stretches to fill its container width. @default false */\n fullWidth?: boolean;\n /** Wraps the `className` of the outermost container div. */\n className?: string;\n /** HTML `id` applied to the trigger button. Auto-generated if omitted. */\n id?: string;\n}\n\n/**\n * A select field with optional label, helper/error text, and an icon slot,\n * built on Radix UI Select for full accessibility and keyboard navigation.\n *\n * Pair with {@link SelectContent} and {@link SelectItem} to provide options.\n *\n * @example\n * ```tsx\n * <Select label=\"Country\" placeholder=\"Select a country\">\n * <SelectContent>\n * <SelectItem value=\"us\">United States</SelectItem>\n * <SelectItem value=\"uk\">United Kingdom</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nexport const Select = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectProps\n>(\n (\n {\n label,\n helperText,\n size = \"48\",\n variant = \"default\",\n error = false,\n errorMessage,\n placeholder,\n leftIcon,\n fullWidth = false,\n className,\n id,\n disabled,\n children,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const triggerId = id ?? generatedId;\n const helperTextId = `${triggerId}-helper`;\n const bottomText = error && errorMessage ? errorMessage : helperText;\n const isFilled = variant === \"filled\";\n\n return (\n <SelectContext.Provider value={{ size, error, disabled }}>\n <div\n className={cn(\"flex flex-col\", fullWidth && \"w-full\", className)}\n data-disabled={disabled ? \"\" : undefined}\n data-error={error ? \"\" : undefined}\n >\n {label && (\n <label\n htmlFor={triggerId}\n className=\"typography-description-12px-semibold pb-2 text-content-primary\"\n >\n {label}\n </label>\n )}\n\n <SelectPrimitive.Root disabled={disabled} {...props}>\n <SelectPrimitive.Trigger\n ref={ref}\n id={triggerId}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={bottomText ? helperTextId : undefined}\n aria-invalid={error || undefined}\n className={cn(\n \"flex w-full cursor-pointer items-center rounded-sm border outline-none focus-visible:shadow-focus-ring motion-safe:transition-colors\",\n TRIGGER_HEIGHT[size],\n isFilled ? \"px-2\" : TRIGGER_PADDING_X[size],\n TRIGGER_GAP[size],\n TRIGGER_TYPOGRAPHY[size],\n isFilled\n ? \"justify-center bg-background-secondary text-content-tertiary\"\n : \"justify-between bg-inputs-inputs-primary\",\n error\n ? \"border-error-content\"\n : isFilled\n ? \"border-transparent\"\n : \"border-border-input\",\n !disabled &&\n !error &&\n (isFilled\n ? \"hover:bg-neutral-alphas-100 data-[state=open]:bg-neutral-alphas-100\"\n : [\n \"hover:border-border-input-hover data-[state=open]:border-border-input-hover\",\n \"theme-v2:focus-visible:border-border-selected theme-v2:focus-visible:shadow-none theme-v2:data-[state=open]:border-border-selected\",\n ]),\n disabled && \"cursor-not-allowed opacity-50\",\n )}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n {leftIcon && (\n <span\n className=\"flex size-5 shrink-0 items-center justify-center text-content-secondary\"\n data-testid=\"left-icon\"\n >\n {leftIcon}\n </span>\n )}\n <span\n className={cn(\n \"min-w-0 flex-1 truncate [&>[data-placeholder]]:text-content-tertiary\",\n isFilled\n ? \"text-center text-content-tertiary\"\n : \"text-left text-content-primary\",\n )}\n >\n <SelectPrimitive.Value placeholder={placeholder} />\n </span>\n </div>\n\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={isFilled ? 16 : 24} className=\"shrink-0\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n\n {children}\n </SelectPrimitive.Root>\n\n {bottomText && (\n <p\n id={helperTextId}\n className={cn(\n \"typography-description-12px-regular px-2 pt-1 pb-0.5\",\n error ? \"text-error-content\" : \"text-content-secondary\",\n )}\n >\n {bottomText}\n </p>\n )}\n </div>\n </SelectContext.Provider>\n );\n },\n);\n\nSelect.displayName = \"Select\";\n\nexport interface SelectContentProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {}\n\n/**\n * The dropdown panel rendered inside a portal. Place {@link SelectItem} elements\n * (and optionally {@link SelectGroup} / {@link SelectLabel}) as children.\n */\nexport const SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n sideOffset = 4,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n style,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n style={{ zIndex: FLOATING_CONTENT_Z_INDEX, ...style }}\n className={cn(\n FLOATING_CONTENT_SURFACE_CLASS,\n \"relative w-max min-w-(--radix-select-trigger-width) max-w-(--radix-select-content-available-width) overflow-hidden\",\n \"data-[state=closed]:animate-out data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.Viewport className=\"flex max-h-[var(--radix-select-content-available-height)] flex-col gap-[3px] overflow-y-auto p-2\">\n {/* A select opened from inside a menu row must not inherit that row's icon defaults. */}\n <IconDefaultsContext.Provider value={NO_ICON_DEFAULTS}>\n {children}\n </IconDefaultsContext.Provider>\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = \"SelectContent\";\n\n/** Dropdown row height in pixels, matching the V2 Menu Item spec. */\nexport type SelectItemSize = \"40\" | \"32\";\n\nconst ITEM_SIZE_CLASSES: Record<SelectItemSize, string> = {\n \"40\": \"min-h-10 py-2 typography-body-small-14px-regular\",\n \"32\": \"min-h-8 py-[7px] typography-body-small-14px-regular\",\n};\n\nconst ITEM_DESCRIPTION_TYPOGRAPHY: Record<SelectItemSize, string> = {\n \"40\": \"typography-body-small-14px-regular\",\n \"32\": \"typography-description-12px-regular\",\n};\n\nexport interface SelectItemProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {\n /** Row height. Defaults to the parent {@link Select} size (`48`/`40` → `40`, `32` → `32`). */\n size?: SelectItemSize;\n /**\n * Icon (or other node) rendered before the label. Ignored when {@link SelectItemProps.avatar} is set.\n * Treated like `DropdownMenuItem`'s icons: a 16px box in `Icons/Secondary`, prop-based icons filled at 16px\n * unless they set `filled` or `size` themselves.\n */\n leadingIcon?: React.ReactNode;\n /**\n * Leading avatar rendered in place of {@link SelectItemProps.leadingIcon}, for rows\n * representing a person or account. Pass an `Avatar` sized to `24`. Takes precedence over `leadingIcon`.\n */\n avatar?: React.ReactNode;\n /** Optional secondary text rendered on a second line below the label. */\n description?: React.ReactNode;\n}\n\n/**\n * Whether a `ReactNode` will actually render. Excludes `null`/`undefined` and\n * booleans so short-circuit props (e.g. `description={cond && \"…\"}`) don't flip\n * the item into a two-line/avatar layout when they resolve to `false`.\n */\nfunction isRenderableNode(node: React.ReactNode): boolean {\n return node !== null && node !== undefined && typeof node !== \"boolean\";\n}\n\n/**\n * Under the v2 palette a selected option's `Menu Item Selected` fill is inverted, so its\n * content inverts too, and a highlighted or focused one moves to `Menu Item Selected Hover`.\n */\nconst CHECKED_V2_CLASSES =\n \"theme-v2:data-[state=checked]:text-content-primary-inverted theme-v2:data-[state=checked]:data-highlighted:bg-menu-item-selected-hover theme-v2:data-[state=checked]:focus:bg-menu-item-selected-hover\";\n\n/**\n * A selected option's description under the v2 palette: inverted, and\n * `Menu Item Selected Hover Secondary` while the option is highlighted or focused.\n */\nconst CHECKED_DESCRIPTION_V2_CLASSES =\n \"theme-v2:group-data-[state=checked]:text-content-secondary-inverted theme-v2:group-data-[state=checked]:group-data-highlighted:text-menu-item-selected-hover-secondary theme-v2:group-data-[state=checked]:group-focus:text-menu-item-selected-hover-secondary\";\n\n/** A disabled selected option takes the library's Disabled state under the v2 palette, which has no fill. */\nconst CHECKED_DISABLED_V2_CLASSES = \"theme-v2:data-[state=checked]:bg-transparent\";\n\n/**\n * An individual option inside {@link SelectContent}, following the V2 Menu Item spec.\n *\n * Supports a leading icon or avatar, an optional two-line layout via `description`,\n * and the standard hover / selected / disabled states. The selected row rests on\n * `Buttons/Navigation/Hover` with a semibold label and a trailing check; hovering\n * it shows `Interaction/Hover` like any other row. Under the v2 palette the fill is\n * inverted, with inverted content, and a highlighted or focused selected row moves to\n * `Menu Item Selected Hover` so keyboard focus stays visible. Rows do not shrink, so a\n * two-line row stays whole when the list scrolls.\n *\n * @example\n * ```tsx\n * <SelectItem value=\"jane\" avatar={<Avatar size={24} fallback=\"JD\" />} description=\"Product designer\">\n * Jane Doe\n * </SelectItem>\n * ```\n */\nexport const SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n SelectItemProps\n>(({ className, children, size, leadingIcon, avatar, description, disabled, ...props }, ref) => {\n const { size: triggerSize } = React.useContext(SelectContext);\n const itemSize: SelectItemSize = size ?? (triggerSize === \"32\" ? \"32\" : \"40\");\n const hasDescription = isRenderableNode(description);\n const hasAvatar = isRenderableNode(avatar);\n const hasLeadingIcon = isRenderableNode(leadingIcon);\n\n return (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"group relative flex w-full shrink-0 cursor-pointer select-none gap-2 rounded-sm px-3 text-content-primary outline-none\",\n hasDescription ? \"items-start\" : \"items-center\",\n ITEM_SIZE_CLASSES[itemSize],\n hasAvatar && !hasDescription && itemSize === \"32\" && \"py-1\",\n \"data-[state=checked]:bg-menu-item-selected\",\n \"focus:bg-interaction-hover data-highlighted:bg-interaction-hover\",\n \"data-[state=checked]:focus:bg-interaction-hover data-[state=checked]:data-highlighted:bg-interaction-hover\",\n disabled ? CHECKED_DISABLED_V2_CLASSES : CHECKED_V2_CLASSES,\n \"data-disabled:pointer-events-none data-disabled:text-content-disabled\",\n className,\n )}\n disabled={disabled}\n {...props}\n >\n {hasAvatar ? (\n <span className={cn(\"shrink-0\", disabled && \"theme-v2:opacity-60\")}>{avatar}</span>\n ) : (\n hasLeadingIcon && (\n // In the two-line row the icon centres on the 18px title line, as in DropdownMenuItem.\n <MenuRowIcon alignToTitle={hasDescription} invertWhenSelected={!disabled}>\n {leadingIcon}\n </MenuRowIcon>\n )\n )}\n\n {hasDescription ? (\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {/* A 14px semibold title over the regular description, matching DropdownMenuItem's two-line row. */}\n <span className=\"typography-body-small-14px-semibold truncate\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n <span\n className={cn(\n \"truncate text-content-secondary group-data-[disabled]:text-content-disabled\",\n !disabled && CHECKED_DESCRIPTION_V2_CLASSES,\n ITEM_DESCRIPTION_TYPOGRAPHY[itemSize],\n )}\n >\n {description}\n </span>\n </span>\n ) : (\n <span className=\"min-w-0 flex-1 truncate group-data-[state=checked]:font-semibold\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n )}\n\n <SelectPrimitive.ItemIndicator\n className={cn(\n \"ml-auto flex w-4 shrink-0 items-center justify-center\",\n hasDescription ? \"h-4.5 self-start\" : \"h-4\",\n )}\n >\n <CheckIcon\n className={cn(\n \"size-4 text-content-primary group-data-[disabled]:text-content-disabled\",\n !disabled && \"theme-v2:text-icons-primary-inverted\",\n )}\n />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n});\n\nSelectItem.displayName = \"SelectItem\";\n\n/** Props for {@link SelectGroup}. */\nexport type SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\n\n/**\n * Groups related {@link SelectItem} elements under a {@link SelectLabel}.\n */\nexport const SelectGroup = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Group>,\n SelectGroupProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Group\n ref={ref}\n className={cn(\"flex flex-col gap-[3px]\", className)}\n {...props}\n />\n));\nSelectGroup.displayName = \"SelectGroup\";\n\nexport interface SelectLabelProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label> {}\n\n/**\n * A non-interactive label shown above a {@link SelectGroup}.\n */\nexport const SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n SelectLabelProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\n \"typography-description-12px-semibold px-3 py-1.5 text-content-secondary\",\n className,\n )}\n {...props}\n />\n));\n\nSelectLabel.displayName = \"SelectLabel\";\n\nexport interface SelectSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator> {}\n\n/** A horizontal rule that visually separates groups in {@link SelectContent}. */\nexport const SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n SelectSeparatorProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-alphas-200\", className)}\n {...props}\n />\n));\n\nSelectSeparator.displayName = \"SelectSeparator\";\n"],"names":[],"mappings":";;;;;;;;;;;AA6BA,MAAM,gBAAgB,MAAM,cAAkC;AAAA,EAC5D,MAAM;AAAA,EACN,OAAO;AACT,CAAC;AAED,MAAM,iBAA6C;AAAA,EACjD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,oBAAgD;AAAA,EACpD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,cAA0C;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,qBAAiD;AAAA,EACrD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AA+CO,MAAM,SAAS,MAAM;AAAA,EAI1B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,cAAc,MAAM,MAAA;AAC1B,UAAM,YAAY,MAAM;AACxB,UAAM,eAAe,GAAG,SAAS;AACjC,UAAM,aAAa,SAAS,eAAe,eAAe;AAC1D,UAAM,WAAW,YAAY;AAE7B,WACE,oBAAC,cAAc,UAAd,EAAuB,OAAO,EAAE,MAAM,OAAO,YAC5C,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG,iBAAiB,aAAa,UAAU,SAAS;AAAA,QAC/D,iBAAe,WAAW,KAAK;AAAA,QAC/B,cAAY,QAAQ,KAAK;AAAA,QAEx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ACtC;AAAA,QAGF;AAAA,UAAC,gBAAgB;AAAA,UAAhB;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,iBAAiB,qBAAqB;AAAA,YAAA;AAAA,YAGxC,UAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT;AAAA,kBACA,CAAC,YAAY;AAAA,gBAAA;AAAA,cACf;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAED,WAAW,cAAc;AAQlB,MAAM,cAAc,MAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,2BAA2B,SAAS;AAAA,IACjD,GAAG;AAAA,EAAA;AACN,CACD;AACD,YAAY,cAAc;AAQnB,MAAM,cAAc,MAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN,CACD;AAED,YAAY,cAAc;AAMnB,MAAM,kBAAkB,MAAM,WAGnC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,mCAAmC,SAAS;AAAA,IACzD,GAAG;AAAA,EAAA;AACN,CACD;AAED,gBAAgB,cAAc;"}
1
+ {"version":3,"file":"Select.mjs","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"@/utils/floatingContentCollisionPadding\";\nimport {\n FLOATING_CONTENT_SURFACE_CLASS,\n FLOATING_CONTENT_Z_INDEX,\n} from \"@/utils/floatingContentSurface\";\nimport { CheckIcon } from \"../Icons/CheckIcon\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\nimport { IconDefaultsContext, NO_ICON_DEFAULTS } from \"../Icons/IconDefaults\";\nimport { MenuRowIcon } from \"../Icons/MenuRowIcon\";\n\n/** Select field height in pixels. */\nexport type SelectSize = \"48\" | \"40\" | \"32\";\n\n/**\n * Trigger surface. `\"default\"` is the bordered input field; `\"filled\"` is the\n * V2 Table Tab Actions pill: a `background-secondary` fill with no border and a\n * centred `content-tertiary` label, for filters that sit beside a table or chart.\n */\nexport type SelectVariant = \"default\" | \"filled\";\n\ntype SelectContextValue = {\n size: SelectSize;\n error: boolean;\n disabled?: boolean;\n};\n\nconst SelectContext = React.createContext<SelectContextValue>({\n size: \"48\",\n error: false,\n});\n\nconst TRIGGER_HEIGHT: Record<SelectSize, string> = {\n \"48\": \"h-12\",\n \"40\": \"h-10\",\n \"32\": \"h-8\",\n};\n\nconst TRIGGER_PADDING_X: Record<SelectSize, string> = {\n \"48\": \"px-4\",\n \"40\": \"px-4\",\n \"32\": \"px-3\",\n};\n\nconst TRIGGER_GAP: Record<SelectSize, string> = {\n \"48\": \"gap-3\",\n \"40\": \"gap-3\",\n \"32\": \"gap-2\",\n};\n\nconst TRIGGER_TYPOGRAPHY: Record<SelectSize, string> = {\n \"48\": \"typography-body-default-16px-regular\",\n \"40\": \"typography-body-default-16px-regular\",\n \"32\": \"typography-body-small-14px-regular\",\n};\n\nexport interface SelectProps extends Omit<SelectPrimitive.SelectProps, \"dir\"> {\n /** Label text displayed above the trigger. Also used as the accessible name. */\n label?: string;\n /** Accessible name applied directly to the trigger button when no visible `label` is provided. */\n \"aria-label\"?: string;\n /** ID of an external element that labels the trigger button. */\n \"aria-labelledby\"?: string;\n /** Helper text displayed below the trigger. Replaced by `errorMessage` when `error` is `true`. */\n helperText?: string;\n /** Height of the select field in pixels. @default \"48\" */\n size?: SelectSize;\n /** Trigger surface. See {@link SelectVariant}. @default \"default\" */\n variant?: SelectVariant;\n /** Whether the field is in an error state. @default false */\n error?: boolean;\n /** Error message displayed below the trigger. Shown instead of `helperText` when `error` is `true`. */\n errorMessage?: string;\n /** Placeholder shown when no value is selected. */\n placeholder?: string;\n /** Icon element displayed at the left side of the trigger. */\n leftIcon?: React.ReactNode;\n /** Whether the field stretches to fill its container width. @default false */\n fullWidth?: boolean;\n /** Wraps the `className` of the outermost container div. */\n className?: string;\n /** HTML `id` applied to the trigger button. Auto-generated if omitted. */\n id?: string;\n}\n\n/**\n * A select field with optional label, helper/error text, and an icon slot,\n * built on Radix UI Select for full accessibility and keyboard navigation.\n *\n * Pair with {@link SelectContent} and {@link SelectItem} to provide options.\n *\n * @example\n * ```tsx\n * <Select label=\"Country\" placeholder=\"Select a country\">\n * <SelectContent>\n * <SelectItem value=\"us\">United States</SelectItem>\n * <SelectItem value=\"uk\">United Kingdom</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nexport const Select = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectProps\n>(\n (\n {\n label,\n helperText,\n size = \"48\",\n variant = \"default\",\n error = false,\n errorMessage,\n placeholder,\n leftIcon,\n fullWidth = false,\n className,\n id,\n disabled,\n children,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const triggerId = id ?? generatedId;\n const helperTextId = `${triggerId}-helper`;\n const bottomText = error && errorMessage ? errorMessage : helperText;\n const isFilled = variant === \"filled\";\n\n return (\n <SelectContext.Provider value={{ size, error, disabled }}>\n <div\n className={cn(\"flex flex-col\", fullWidth && \"w-full\", className)}\n data-disabled={disabled ? \"\" : undefined}\n data-error={error ? \"\" : undefined}\n >\n {label && (\n <label\n htmlFor={triggerId}\n className=\"typography-description-12px-semibold pb-2 text-content-primary\"\n >\n {label}\n </label>\n )}\n\n <SelectPrimitive.Root disabled={disabled} {...props}>\n <SelectPrimitive.Trigger\n ref={ref}\n id={triggerId}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={bottomText ? helperTextId : undefined}\n aria-invalid={error || undefined}\n className={cn(\n \"flex w-full cursor-pointer items-center rounded-sm border outline-none focus-visible:shadow-focus-ring motion-safe:transition-colors\",\n TRIGGER_HEIGHT[size],\n isFilled ? \"px-2\" : TRIGGER_PADDING_X[size],\n TRIGGER_GAP[size],\n TRIGGER_TYPOGRAPHY[size],\n isFilled\n ? \"justify-center bg-background-secondary text-content-tertiary\"\n : \"justify-between bg-inputs-inputs-primary\",\n error\n ? \"border-error-content\"\n : isFilled\n ? \"border-transparent\"\n : \"border-border-input\",\n !disabled &&\n !error &&\n (isFilled\n ? \"hover:bg-neutral-alphas-100 data-[state=open]:bg-neutral-alphas-100\"\n : [\n \"hover:border-border-input-hover data-[state=open]:border-border-input-hover\",\n \"theme-v2:focus-visible:border-border-selected theme-v2:focus-visible:shadow-none theme-v2:data-[state=open]:border-border-selected\",\n ]),\n disabled && \"cursor-not-allowed opacity-50\",\n )}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n {leftIcon && (\n <span\n className=\"flex size-5 shrink-0 items-center justify-center text-content-secondary\"\n data-testid=\"left-icon\"\n >\n {leftIcon}\n </span>\n )}\n <span\n className={cn(\n \"min-w-0 flex-1 truncate [&>[data-placeholder]]:text-content-tertiary\",\n isFilled\n ? \"text-center text-content-tertiary\"\n : \"text-left text-content-primary\",\n )}\n >\n <SelectPrimitive.Value placeholder={placeholder} />\n </span>\n </div>\n\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={isFilled ? 16 : 24} className=\"shrink-0\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n\n {children}\n </SelectPrimitive.Root>\n\n {bottomText && (\n <p\n id={helperTextId}\n className={cn(\n \"typography-description-12px-regular px-2 pt-1 pb-0.5\",\n error ? \"text-error-content\" : \"text-content-secondary\",\n )}\n >\n {bottomText}\n </p>\n )}\n </div>\n </SelectContext.Provider>\n );\n },\n);\n\nSelect.displayName = \"Select\";\n\nexport interface SelectContentProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {}\n\n/**\n * The list's scroll area. It marks itself `data-interacted` once the person moves the\n * pointer or presses a key in it, which lets the selected row's v2 hover fill wait for\n * real input (see {@link CHECKED_V2_CLASSES}). Radix mounts it afresh on every open, so\n * each open starts unmarked.\n */\nfunction SelectViewport({ children }: { children: React.ReactNode }) {\n const [interacted, setInteracted] = React.useState(false);\n const markInteracted = () => {\n if (!interacted) setInteracted(true);\n };\n return (\n <SelectPrimitive.Viewport\n data-interacted={interacted ? \"\" : undefined}\n onPointerMove={markInteracted}\n onKeyDown={markInteracted}\n className=\"group/select flex max-h-[var(--radix-select-content-available-height)] flex-col gap-0.5 overflow-y-auto p-2\"\n >\n {children}\n </SelectPrimitive.Viewport>\n );\n}\n\n/**\n * The dropdown panel rendered inside a portal. Place {@link SelectItem} elements\n * (and optionally {@link SelectGroup} / {@link SelectLabel}) as children.\n */\nexport const SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n sideOffset = 4,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n style,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n style={{ zIndex: FLOATING_CONTENT_Z_INDEX, ...style }}\n className={cn(\n FLOATING_CONTENT_SURFACE_CLASS,\n \"relative w-max min-w-(--radix-select-trigger-width) max-w-(--radix-select-content-available-width) overflow-hidden\",\n \"data-[state=closed]:animate-out data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n >\n <SelectViewport>\n {/* A select opened from inside a menu row must not inherit that row's icon defaults. */}\n <IconDefaultsContext.Provider value={NO_ICON_DEFAULTS}>\n {children}\n </IconDefaultsContext.Provider>\n </SelectViewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = \"SelectContent\";\n\n/** Dropdown row height in pixels, matching the V2 Menu Item spec. */\nexport type SelectItemSize = \"40\" | \"32\";\n\nconst ITEM_SIZE_CLASSES: Record<SelectItemSize, string> = {\n \"40\": \"min-h-10 py-2 typography-body-small-14px-regular\",\n \"32\": \"min-h-8 py-[7px] typography-body-small-14px-regular\",\n};\n\nconst ITEM_DESCRIPTION_TYPOGRAPHY: Record<SelectItemSize, string> = {\n \"40\": \"typography-body-small-14px-regular\",\n \"32\": \"typography-description-12px-regular\",\n};\n\nexport interface SelectItemProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {\n /** Row height. Defaults to the parent {@link Select} size (`48`/`40` → `40`, `32` → `32`). */\n size?: SelectItemSize;\n /**\n * Icon (or other node) rendered before the label. Ignored when {@link SelectItemProps.avatar} is set.\n * Treated like `DropdownMenuItem`'s icons: a 16px box in `Icons/Secondary`, prop-based icons filled at 16px\n * unless they set `filled` or `size` themselves.\n */\n leadingIcon?: React.ReactNode;\n /**\n * Leading avatar rendered in place of {@link SelectItemProps.leadingIcon}, for rows\n * representing a person or account. Pass an `Avatar` sized to `24`. Takes precedence over `leadingIcon`.\n */\n avatar?: React.ReactNode;\n /** Optional secondary text rendered on a second line below the label. */\n description?: React.ReactNode;\n}\n\n/**\n * Whether a `ReactNode` will actually render. Excludes `null`/`undefined` and\n * booleans so short-circuit props (e.g. `description={cond && \"…\"}`) don't flip\n * the item into a two-line/avatar layout when they resolve to `false`.\n */\nfunction isRenderableNode(node: React.ReactNode): boolean {\n return node !== null && node !== undefined && typeof node !== \"boolean\";\n}\n\n/**\n * Under the v2 palette a selected option's `Menu Item Selected` fill is inverted, so its\n * content inverts too. Radix focuses and highlights the selected option as the list opens,\n * so keyboard users start from it. Until the person moves the pointer or presses a key in\n * the list, the selected row keeps its own fill; after that a highlighted one moves to\n * `Menu Item Selected Hover` (see {@link SelectViewport}).\n */\nconst CHECKED_V2_CLASSES =\n \"theme-v2:data-[state=checked]:text-content-primary-inverted theme-v2:data-[state=checked]:focus:bg-menu-item-selected theme-v2:data-[state=checked]:data-highlighted:bg-menu-item-selected theme-v2:group-data-[interacted]/select:data-[state=checked]:data-highlighted:bg-menu-item-selected-hover\";\n\n/**\n * A selected option's description under the v2 palette: inverted, and\n * `Menu Item Selected Hover Secondary` while the row shows its hover fill.\n */\nconst CHECKED_DESCRIPTION_V2_CLASSES =\n \"theme-v2:group-data-[state=checked]:text-content-secondary-inverted theme-v2:group-data-[interacted]/select:group-data-[state=checked]:group-data-highlighted:text-menu-item-selected-hover-secondary\";\n\n/** A disabled selected option takes the library's Disabled state under the v2 palette, which has no fill. */\nconst CHECKED_DISABLED_V2_CLASSES = \"theme-v2:data-[state=checked]:bg-transparent\";\n\n/**\n * An individual option inside {@link SelectContent}, following the V2 Menu Item spec.\n *\n * Supports a leading icon or avatar, an optional two-line layout via `description`,\n * and the standard hover / selected / disabled states. The selected row rests on\n * `Buttons/Navigation/Hover` with a semibold label and a trailing check; hovering\n * it shows `Interaction/Hover` like any other row. Under the v2 palette the fill is\n * inverted, with inverted content, and a highlighted selected row moves to `Menu Item\n * Selected Hover`. Under the v2 palette the list opens with the selected row on its own\n * fill: the hover fill waits until the person moves the pointer or presses a key. Rows do not shrink, so a\n * two-line row stays whole when the list scrolls.\n *\n * @example\n * ```tsx\n * <SelectItem value=\"jane\" avatar={<Avatar size={24} fallback=\"JD\" />} description=\"Product designer\">\n * Jane Doe\n * </SelectItem>\n * ```\n */\nexport const SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n SelectItemProps\n>(({ className, children, size, leadingIcon, avatar, description, disabled, ...props }, ref) => {\n const { size: triggerSize } = React.useContext(SelectContext);\n const itemSize: SelectItemSize = size ?? (triggerSize === \"32\" ? \"32\" : \"40\");\n const hasDescription = isRenderableNode(description);\n const hasAvatar = isRenderableNode(avatar);\n const hasLeadingIcon = isRenderableNode(leadingIcon);\n\n return (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"group relative flex w-full shrink-0 cursor-pointer select-none gap-2 rounded-sm px-3 text-content-primary outline-none\",\n hasDescription ? \"items-start\" : \"items-center\",\n ITEM_SIZE_CLASSES[itemSize],\n hasAvatar && !hasDescription && itemSize === \"32\" && \"py-1\",\n \"data-[state=checked]:bg-menu-item-selected\",\n \"focus:bg-interaction-hover data-highlighted:bg-interaction-hover\",\n \"data-[state=checked]:focus:bg-interaction-hover data-[state=checked]:data-highlighted:bg-interaction-hover\",\n disabled ? CHECKED_DISABLED_V2_CLASSES : CHECKED_V2_CLASSES,\n \"data-disabled:pointer-events-none data-disabled:text-content-disabled\",\n className,\n )}\n disabled={disabled}\n {...props}\n >\n {hasAvatar ? (\n <span className={cn(\"shrink-0\", disabled && \"theme-v2:opacity-60\")}>{avatar}</span>\n ) : (\n hasLeadingIcon && (\n // In the two-line row the icon centres on the 18px title line, as in DropdownMenuItem.\n <MenuRowIcon alignToTitle={hasDescription} invertWhenSelected={!disabled}>\n {leadingIcon}\n </MenuRowIcon>\n )\n )}\n\n {hasDescription ? (\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {/* A 14px semibold title over the regular description, matching DropdownMenuItem's two-line row. */}\n <span className=\"typography-body-small-14px-semibold truncate\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n <span\n className={cn(\n \"truncate text-content-secondary group-data-[disabled]:text-content-disabled\",\n !disabled && CHECKED_DESCRIPTION_V2_CLASSES,\n ITEM_DESCRIPTION_TYPOGRAPHY[itemSize],\n )}\n >\n {description}\n </span>\n </span>\n ) : (\n <span className=\"min-w-0 flex-1 truncate group-data-[state=checked]:font-semibold\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n )}\n\n <SelectPrimitive.ItemIndicator\n className={cn(\n \"ml-auto flex w-4 shrink-0 items-center justify-center\",\n hasDescription ? \"h-4.5 self-start\" : \"h-4\",\n )}\n >\n <CheckIcon\n className={cn(\n \"size-4 text-content-primary group-data-[disabled]:text-content-disabled\",\n !disabled && \"theme-v2:text-icons-primary-inverted\",\n )}\n />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n});\n\nSelectItem.displayName = \"SelectItem\";\n\n/** Props for {@link SelectGroup}. */\nexport type SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\n\n/**\n * Groups related {@link SelectItem} elements under a {@link SelectLabel}.\n */\nexport const SelectGroup = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Group>,\n SelectGroupProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Group ref={ref} className={cn(\"flex flex-col gap-0.5\", className)} {...props} />\n));\nSelectGroup.displayName = \"SelectGroup\";\n\nexport interface SelectLabelProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label> {}\n\n/**\n * A non-interactive label shown above a {@link SelectGroup}.\n */\nexport const SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n SelectLabelProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\n \"typography-description-12px-semibold px-3 py-1.5 text-content-secondary\",\n className,\n )}\n {...props}\n />\n));\n\nSelectLabel.displayName = \"SelectLabel\";\n\nexport interface SelectSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator> {}\n\n/** A horizontal rule that visually separates groups in {@link SelectContent}. */\nexport const SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n SelectSeparatorProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-alphas-200\", className)}\n {...props}\n />\n));\n\nSelectSeparator.displayName = \"SelectSeparator\";\n"],"names":[],"mappings":";;;;;;;;;;;AA6BA,MAAM,gBAAgB,MAAM,cAAkC;AAAA,EAC5D,MAAM;AAAA,EACN,OAAO;AACT,CAAC;AAED,MAAM,iBAA6C;AAAA,EACjD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,oBAAgD;AAAA,EACpD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,cAA0C;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,qBAAiD;AAAA,EACrD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AA+CO,MAAM,SAAS,MAAM;AAAA,EAI1B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,cAAc,MAAM,MAAA;AAC1B,UAAM,YAAY,MAAM;AACxB,UAAM,eAAe,GAAG,SAAS;AACjC,UAAM,aAAa,SAAS,eAAe,eAAe;AAC1D,UAAM,WAAW,YAAY;AAE7B,WACE,oBAAC,cAAc,UAAd,EAAuB,OAAO,EAAE,MAAM,OAAO,YAC5C,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG,iBAAiB,aAAa,UAAU,SAAS;AAAA,QAC/D,iBAAe,WAAW,KAAK;AAAA,QAC/B,cAAY,QAAQ,KAAK;AAAA,QAExB,UAAA;AAAA,UAAA,SACC;AAAA,YAAC;AAAA,YAAA;AAAA,c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@@ import { SearchIcon } from "../Icons/SearchIcon.mjs";
8
8
  import { TranscationArrowIcon } from "../Icons/TranscationArrowIcon.mjs";
9
9
  import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from "../Tooltip/Tooltip.mjs";
10
10
  import { openTableRowLink } from "./TableRowLink.mjs";
11
+ import { SearchFilters, ClearSearchFilters } from "./TableToolbarSearchFilters.mjs";
11
12
  const TableSizeContext = React.createContext("md");
12
13
  function useTableSize() {
13
14
  return React.useContext(TableSizeContext);
@@ -41,7 +42,7 @@ const TableToolbar = React.forwardRef(
41
42
  ...props,
42
43
  children: [
43
44
  /* @__PURE__ */ jsx("div", { className: "flex min-w-24 flex-1 items-center", children: search }),
44
- children != null && /* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-6 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children })
45
+ children != null && /* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children })
45
46
  ]
46
47
  }
47
48
  );
@@ -49,33 +50,58 @@ const TableToolbar = React.forwardRef(
49
50
  );
50
51
  TableToolbar.displayName = "TableToolbar";
51
52
  const TableToolbarSearch = React.forwardRef(
52
- ({ className, value, onValueChange, clearLabel, placeholder, ...props }, ref) => {
53
- return /* @__PURE__ */ jsxs("label", { className: cn("flex h-6 w-full min-w-0 cursor-text items-center gap-2", className), children: [
54
- /* @__PURE__ */ jsx(SearchIcon, { size: 16, className: "shrink-0 text-icons-secondary", "aria-hidden": true }),
55
- /* @__PURE__ */ jsx(
56
- "input",
57
- {
58
- ref,
59
- type: "search",
60
- value,
61
- onChange: (event) => onValueChange(event.target.value),
62
- placeholder,
63
- "aria-label": props["aria-label"] ?? placeholder,
64
- className: "typography-description-12px-regular min-w-0 flex-1 border-none bg-transparent p-0 text-content-primary outline-none placeholder:text-content-secondary [&::-webkit-search-cancel-button]:hidden",
65
- ...props
66
- }
67
- ),
68
- value !== "" && /* @__PURE__ */ jsx(
69
- "button",
70
- {
71
- type: "button",
72
- "aria-label": clearLabel,
73
- onClick: () => onValueChange(""),
74
- className: "inline-flex size-4 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-icons-secondary hover:text-icons-primary",
75
- children: /* @__PURE__ */ jsx(CloseIcon, { size: 16 })
76
- }
77
- )
78
- ] });
53
+ ({
54
+ className,
55
+ value,
56
+ onValueChange,
57
+ clearLabel,
58
+ placeholder,
59
+ filters,
60
+ formatHiddenFilters,
61
+ clearFiltersLabel,
62
+ onClearFilters,
63
+ ...props
64
+ }, ref) => {
65
+ const generatedId = React.useId();
66
+ const inputId = filters ? props.id ?? generatedId : props.id;
67
+ return /* @__PURE__ */ jsxs(
68
+ "label",
69
+ {
70
+ htmlFor: filters ? inputId : void 0,
71
+ className: cn("flex h-6 w-full min-w-0 cursor-text items-center gap-2", className),
72
+ children: [
73
+ /* @__PURE__ */ jsx(SearchIcon, { size: 16, className: "shrink-0 text-icons-secondary", "aria-hidden": true }),
74
+ /* @__PURE__ */ jsx(SearchFilters, { filters, formatHiddenFilters, children: /* @__PURE__ */ jsx(
75
+ "input",
76
+ {
77
+ ref,
78
+ id: inputId,
79
+ type: "search",
80
+ value,
81
+ onChange: (event) => onValueChange(event.target.value),
82
+ placeholder,
83
+ "aria-label": props["aria-label"] ?? placeholder,
84
+ className: cn(
85
+ "typography-description-12px-regular min-w-0 flex-1 border-none bg-transparent p-0 text-content-primary outline-none placeholder:text-content-secondary [&::-webkit-search-cancel-button]:hidden",
86
+ filters && "min-w-24"
87
+ ),
88
+ ...props
89
+ }
90
+ ) }),
91
+ value !== "" && /* @__PURE__ */ jsx(
92
+ "button",
93
+ {
94
+ type: "button",
95
+ "aria-label": clearLabel,
96
+ onClick: () => onValueChange(""),
97
+ className: "inline-flex size-4 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-icons-secondary hover:text-icons-primary",
98
+ children: /* @__PURE__ */ jsx(CloseIcon, { size: 16 })
99
+ }
100
+ ),
101
+ clearFiltersLabel && onClearFilters && filters && filters.length > 0 && /* @__PURE__ */ jsx(ClearSearchFilters, { label: clearFiltersLabel, onClick: onClearFilters })
102
+ ]
103
+ }
104
+ );
79
105
  }
80
106
  );
81
107
  TableToolbarSearch.displayName = "TableToolbarSearch";
@@ -87,10 +113,12 @@ const TableToolbarAction = React.forwardRef(
87
113
  ref,
88
114
  type,
89
115
  className: cn(
90
- "typography-description-12px-regular inline-flex h-6 shrink-0 cursor-pointer items-center gap-2 whitespace-nowrap rounded-xs border-none bg-transparent p-0 text-content-secondary outline-none",
91
- "hover:text-content-primary focus-visible:shadow-focus-ring disabled:cursor-default disabled:opacity-40 data-[state=open]:text-content-primary",
116
+ "typography-description-12px-regular inline-flex h-6 shrink-0 cursor-pointer items-center gap-2 whitespace-nowrap rounded-xs border-none bg-transparent px-2 py-0 text-content-secondary outline-none",
117
+ "focus-visible:shadow-focus-ring enabled:hover:bg-interaction-hover enabled:hover:text-content-primary disabled:cursor-default disabled:opacity-40",
118
+ "data-[active]:bg-interaction-hover data-[state=open]:bg-neutral-alphas-100 data-[active]:text-content-primary data-[state=open]:text-content-primary data-[state=open]:enabled:hover:bg-neutral-alphas-100",
92
119
  className
93
120
  ),
121
+ "data-active": active ? "" : void 0,
94
122
  ...props,
95
123
  children: [
96
124
  /* @__PURE__ */ jsx("span", { className: "max-md:sr-only", children }),
@@ -98,10 +126,7 @@ const TableToolbarAction = React.forwardRef(
98
126
  "span",
99
127
  {
100
128
  "aria-hidden": true,
101
- className: cn(
102
- "inline-flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
103
- active ? "text-brand-primary-default" : "text-icons-secondary"
104
- ),
129
+ className: "inline-flex size-4 shrink-0 items-center justify-center text-icons-secondary [&>svg]:size-4",
105
130
  children: icon ?? /* @__PURE__ */ jsx(TranscationArrowIcon, { size: 16 })
106
131
  }
107
132
  )
@@ -1 +1 @@
1
- {"version":3,"file":"Table.mjs","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { Button, type ButtonProps } from \"../Button/Button\";\nimport { CloseIcon } from \"../Icons/CloseIcon\";\nimport { SearchIcon } from \"../Icons/SearchIcon\";\nimport { TranscationArrowIcon } from \"../Icons/TranscationArrowIcon\";\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"../Tooltip/Tooltip\";\nimport { openTableRowLink } from \"./TableRowLink\";\n\n/**\n * Row density for body cells.\n *\n * - `\"md\"` (default) → 40px rows, Figma `V2 Table Cell` Default.\n * - `\"condensed\"` → 40px rows, Figma `V2 Table Cell` Condensed.\n * - `\"comfortable\"` → 48px rows, for a 32px avatar with 8px above and below.\n * - `\"lg\"` → 56px rows; no longer in Figma, kept for back-compat.\n *\n * A row holding a {@link TableMediaThumbnail} (above 32px) or {@link TableMediaTile} is 56px at\n * any size.\n *\n * `\"default\"` is the v2 numeric-token equivalent of `\"md\"` and is preferred\n * for new code.\n */\nexport type TableSize = \"md\" | \"lg\" | \"condensed\" | \"comfortable\" | \"default\";\n\nexport interface TableCardProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Row density applied to {@link TableCell} descendants: 40px rows for `md`,\n * `default` and `condensed`, 48px for `comfortable`, 56px for `lg`.\n * @default \"md\"\n */\n size?: TableSize;\n}\n\nconst TableSizeContext = React.createContext<TableSize>(\"md\");\n\nfunction useTableSize(): TableSize {\n return React.useContext(TableSizeContext);\n}\n\n/**\n * Surface wrapper for data tables: 12px-radius container with a 0.5px\n * hairline border and no inner padding, so the header, rows and\n * {@link TableCardPagination} footer run edge to edge. Provides the size\n * context for {@link TableCell} descendants. Compose with {@link TableScrollArea}, {@link Table},\n * {@link TableHeader}, {@link TableBody}, {@link TableRow},\n * {@link TableHead}, and {@link TableCell}.\n *\n * @example\n * ```tsx\n * <TableCard>\n * <TableScrollArea>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableHead>Name</TableHead>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * <TableRow>\n * <TableCell>Jane Doe</TableCell>\n * </TableRow>\n * </TableBody>\n * </Table>\n * </TableScrollArea>\n * </TableCard>\n * ```\n */\nexport const TableCard = React.forwardRef<HTMLDivElement, TableCardProps>(\n ({ className, size = \"md\", ...props }, ref) => {\n return (\n <TableSizeContext.Provider value={size}>\n <div\n ref={ref}\n className={cn(\n \"isolate flex flex-col overflow-hidden rounded-sm border-[0.5px] border-border-primary\",\n className,\n )}\n {...props}\n />\n </TableSizeContext.Provider>\n );\n },\n);\nTableCard.displayName = \"TableCard\";\n\nexport interface TableToolbarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Left slot, usually a {@link TableToolbarSearch}. */\n search?: React.ReactNode;\n}\n\n/**\n * 40px action bar above a {@link TableCard}: search on the left, every other\n * control (menus, toggles, buttons) on the right, 24px apart. On phones\n * {@link TableToolbarAction} controls go icon-only so the bar fits.\n *\n * @example\n * ```tsx\n * <TableToolbar search={<TableToolbarSearch value={q} onValueChange={setQ} placeholder=\"Search\" clearLabel=\"Clear search\" />}>\n * <TableToolbarAction icon={<SettingsIcon />}>Filters</TableToolbarAction>\n * <TableToolbarButton>Create</TableToolbarButton>\n * </TableToolbar>\n * ```\n */\nexport const TableToolbar = React.forwardRef<HTMLDivElement, TableToolbarProps>(\n ({ className, search, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex h-10 w-full min-w-0 items-center gap-4 rounded-sm border-[0.5px] border-border-strong bg-surface-table-row pr-2 pl-4\",\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-24 flex-1 items-center\">{search}</div>\n {children != null && (\n <div className=\"flex min-w-0 items-center gap-6 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n {children}\n </div>\n )}\n </div>\n );\n },\n);\nTableToolbar.displayName = \"TableToolbar\";\n\nexport interface TableToolbarSearchProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"value\" | \"onChange\" | \"type\"> {\n /** Current query. */\n value: string;\n /** Called with the new query, and with `\"\"` when cleared. */\n onValueChange: (value: string) => void;\n /** Accessible name of the clear button. */\n clearLabel: string;\n}\n\n/**\n * Borderless search field for the left slot of {@link TableToolbar}:\n * 16px search icon, 12px text and a clear button once there is a query.\n */\nexport const TableToolbarSearch = React.forwardRef<HTMLInputElement, TableToolbarSearchProps>(\n ({ className, value, onValueChange, clearLabel, placeholder, ...props }, ref) => {\n return (\n <label className={cn(\"flex h-6 w-full min-w-0 cursor-text items-center gap-2\", className)}>\n <SearchIcon size={16} className=\"shrink-0 text-icons-secondary\" aria-hidden />\n <input\n ref={ref}\n type=\"search\"\n value={value}\n onChange={(event) => onValueChange(event.target.value)}\n placeholder={placeholder}\n aria-label={props[\"aria-label\"] ?? placeholder}\n className=\"typography-description-12px-regular min-w-0 flex-1 border-none bg-transparent p-0 text-content-primary outline-none placeholder:text-content-secondary [&::-webkit-search-cancel-button]:hidden\"\n {...props}\n />\n {value !== \"\" && (\n <button\n type=\"button\"\n aria-label={clearLabel}\n onClick={() => onValueChange(\"\")}\n className=\"inline-flex size-4 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-icons-secondary hover:text-icons-primary\"\n >\n <CloseIcon size={16} />\n </button>\n )}\n </label>\n );\n },\n);\nTableToolbarSearch.displayName = \"TableToolbarSearch\";\n\nexport interface TableToolbarActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** 16px icon after the label. @default up/down arrows, for a menu trigger showing its current value */\n icon?: React.ReactNode;\n /** Tints the icon with the brand colour while a toggle or filter is on. @default false */\n active?: boolean;\n}\n\n/**\n * Labelled control for {@link TableToolbar}: 12px label followed by a 16px\n * icon. Below the `md` breakpoint only the icon shows, and the label stays as\n * the accessible name, so a full bar still fits a phone. Works as a plain\n * button or as a `DropdownMenuTrigger` or `PopoverTrigger` child, and keeps its\n * hover colour while that menu or popover is open.\n */\nexport const TableToolbarAction = React.forwardRef<HTMLButtonElement, TableToolbarActionProps>(\n ({ className, children, icon, active = false, type = \"button\", ...props }, ref) => {\n return (\n <button\n ref={ref}\n type={type}\n className={cn(\n \"typography-description-12px-regular inline-flex h-6 shrink-0 cursor-pointer items-center gap-2 whitespace-nowrap rounded-xs border-none bg-transparent p-0 text-content-secondary outline-none\",\n \"hover:text-content-primary focus-visible:shadow-focus-ring disabled:cursor-default disabled:opacity-40 data-[state=open]:text-content-primary\",\n className,\n )}\n {...props}\n >\n <span className=\"max-md:sr-only\">{children}</span>\n <span\n aria-hidden\n className={cn(\n \"inline-flex size-4 shrink-0 items-center justify-center [&>svg]:size-4\",\n active ? \"text-brand-primary-default\" : \"text-icons-secondary\",\n )}\n >\n {icon ?? <TranscationArrowIcon size={16} />}\n </span>\n </button>\n );\n },\n);\nTableToolbarAction.displayName = \"TableToolbarAction\";\n\nexport interface TableToolbarButtonProps extends Omit<ButtonProps, \"size\"> {}\n\n/**\n * Call to action for {@link TableToolbar} (e.g. \"Create New\"): a 24px\n * {@link Button} squared to the toolbar's 8px radius with 12px semibold type,\n * so it sits 8px from the bar's edges. Elsewhere use {@link Button}.\n */\nexport const TableToolbarButton = React.forwardRef<HTMLButtonElement, TableToolbarButtonProps>(\n ({ className, ...props }, ref) => {\n return (\n <Button\n ref={ref}\n size=\"24\"\n className={cn(\"typography-description-12px-semibold rounded-xs\", className)}\n {...props}\n />\n );\n },\n);\nTableToolbarButton.displayName = \"TableToolbarButton\";\n\nexport interface TableRowButtonProps extends Omit<ButtonProps, \"size\"> {}\n\n/**\n * Action inside a table row (e.g. \"Copy\", \"View\"): a 24px squared secondary\n * {@link Button} with 12px semibold type, so it fits a 40px row. Pass 16px\n * filled icons; they take the secondary icon colour.\n */\nexport const TableRowButton = React.forwardRef<HTMLButtonElement, TableRowButtonProps>(\n ({ className, variant = \"secondary\", ...props }, ref) => {\n return (\n <Button\n ref={ref}\n size=\"24\"\n variant={variant}\n className={cn(\n \"typography-description-12px-semibold rounded-xs [&_svg]:size-4! [&_svg]:text-icons-secondary\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableRowButton.displayName = \"TableRowButton\";\n\nexport interface TableTruncatedTextProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n /** Full text; shown whole in a tooltip whenever it does not fit. */\n children: string;\n /** Widest the text may grow, in characters, before it ends in an ellipsis. @default 25 */\n maxChars?: number;\n}\n\n/**\n * One-line text for a {@link TableCell} that ends in an ellipsis once it no\n * longer fits, either past `maxChars` or in a narrower column. The tooltip and\n * the tab stop appear only when the text is actually cut, measured on mount and\n * on every resize, so short text stays plain and out of the tab order. It\n * mounts its own {@link TooltipProvider} so it works in apps without one.\n */\nexport const TableTruncatedText = React.forwardRef<HTMLSpanElement, TableTruncatedTextProps>(\n ({ className, children, maxChars = 25, style, ...props }, ref) => {\n const innerRef = React.useRef<HTMLSpanElement>(null);\n const [isTruncated, setIsTruncated] = React.useState(false);\n React.useImperativeHandle(ref, () => innerRef.current as HTMLSpanElement);\n\n const measure = React.useCallback(() => {\n const element = innerRef.current;\n if (element) {\n setIsTruncated(element.scrollWidth > element.clientWidth);\n }\n }, []);\n\n React.useLayoutEffect(measure);\n\n React.useLayoutEffect(() => {\n const element = innerRef.current;\n if (!element || typeof ResizeObserver === \"undefined\") {\n return;\n }\n const observer = new ResizeObserver(measure);\n observer.observe(element);\n return () => observer.disconnect();\n }, [measure]);\n\n const text = (\n <span\n ref={innerRef}\n className={cn(\"block truncate\", className)}\n style={{ maxWidth: `${maxChars}ch`, ...style }}\n tabIndex={isTruncated ? 0 : undefined}\n {...props}\n >\n {children}\n </span>\n );\n if (!isTruncated) {\n return text;\n }\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>{text}</TooltipTrigger>\n <TooltipContent className=\"max-w-xs whitespace-pre-line\">{children}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n },\n);\nTableTruncatedText.displayName = \"TableTruncatedText\";\n\nexport interface TableScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * No longer needed in v2 — {@link TableCard} handles corner rounding via\n * its own `overflow-hidden rounded-3xl`. Accepted for back-compat.\n *\n * @deprecated v2 ignores this prop; safe to remove.\n */\n roundTop?: boolean;\n /**\n * Shows a slim horizontal scrollbar beneath the table when the content\n * overflows (Figma `V2 Scroll Bar`), with room reserved for it only while\n * the table is wider than its card. @default false\n */\n showScrollbar?: boolean;\n}\n\n/**\n * Scroll container for the table. Wide tables scroll sideways. When its\n * {@link TableCard} has a bounded height (a flex child of a full-height page,\n * or a set height), the rows scroll inside the card under a pinned header\n * and the card's footer stays in view. The area fills the card's height, so\n * in a card taller than its rows the footer sits at the bottom of the card.\n */\nexport const TableScrollArea = React.forwardRef<HTMLDivElement, TableScrollAreaProps>(\n ({ className, children, roundTop: _roundTop, showScrollbar = false, ...props }, ref) => {\n const scrollportRef = React.useRef<HTMLDivElement>(null);\n const [overflowsX, setOverflowsX] = React.useState(false);\n\n React.useLayoutEffect(() => {\n const scrollport = scrollportRef.current;\n if (!showScrollbar || !scrollport || typeof ResizeObserver === \"undefined\") {\n return;\n }\n const measure = () => setOverflowsX(scrollport.scrollWidth > scrollport.clientWidth);\n const resizeObserver = new ResizeObserver(measure);\n // Content can be swapped after mount (a skeleton replaced by the table),\n // so the observed elements are refreshed whenever the content changes.\n const observeContent = () => {\n resizeObserver.disconnect();\n resizeObserver.observe(scrollport);\n for (const element of [\n ...Array.from(scrollport.children),\n ...Array.from(scrollport.querySelectorAll(\"table\")),\n ]) {\n resizeObserver.observe(element);\n }\n measure();\n };\n observeContent();\n const mutationObserver = new MutationObserver(observeContent);\n mutationObserver.observe(scrollport, { childList: true, subtree: true });\n return () => {\n mutationObserver.disconnect();\n resizeObserver.disconnect();\n };\n }, [showScrollbar]);\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative flex min-h-0 w-full min-w-0 flex-auto flex-col overflow-hidden\",\n className,\n )}\n {...props}\n >\n <div\n ref={scrollportRef}\n data-table-scrollport=\"\"\n className={cn(\n \"min-h-0 flex-auto overflow-auto\",\n showScrollbar &&\n \"[scrollbar-color:var(--color-border-strong)_transparent] [scrollbar-width:thin]\",\n showScrollbar && overflowsX && \"pb-3\",\n )}\n >\n {children}\n </div>\n </div>\n );\n },\n);\nTableScrollArea.displayName = \"TableScrollArea\";\n\nexport interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {}\n\n/**\n * Semantic `<table>` element. Place inside {@link TableScrollArea}.\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n ({ className, ...props }, ref) => {\n return (\n <table\n ref={ref}\n className={cn(\n \"w-full caption-bottom border-separate border-spacing-0 text-left\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTable.displayName = \"Table\";\n\nexport interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\n/**\n * `<thead>` wrapper. Its header cells stay pinned to the top while rows\n * scroll beneath them. Row header cells in {@link TableBody} scroll with\n * their rows.\n */\nexport const TableHeader = React.forwardRef<HTMLTableSectionElement, TableHeaderProps>(\n ({ className, ...props }, ref) => {\n return (\n <thead\n ref={ref}\n className={cn(\"[&_th]:sticky [&_th]:top-0 [&_th]:z-10\", className)}\n {...props}\n />\n );\n },\n);\nTableHeader.displayName = \"TableHeader\";\n\nexport interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\n/**\n * `<tbody>` wrapper. Removes the bottom border on cells in the final row to\n * match the Figma `V2 Table Final Row` treatment.\n */\nexport const TableBody = React.forwardRef<HTMLTableSectionElement, TableBodyProps>(\n ({ className, ...props }, ref) => {\n return (\n <tbody ref={ref} className={cn(\"[&_tr:last-child_td]:border-b-0\", className)} {...props} />\n );\n },\n);\nTableBody.displayName = \"TableBody\";\n\nexport interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nexport const TableFooter = React.forwardRef<HTMLTableSectionElement, TableFooterProps>(\n ({ className, ...props }, ref) => {\n return <tfoot ref={ref} className={cn(className)} {...props} />;\n },\n);\nTableFooter.displayName = \"TableFooter\";\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n /**\n * Marks a body row that opens or expands into more content. The row shows a\n * pointer cursor and eases to `background-secondary` while hovered, or while\n * a control inside it has keyboard focus. The row itself is not focusable, so\n * its action must also be on a button or link inside it. With a\n * {@link TableRowLink} inside, a click anywhere on the row that is not on\n * another control opens that link.\n * @default false\n */\n interactive?: boolean;\n}\n\n/**\n * Table row. A body row holding a {@link TableMediaThumbnail} or\n * {@link TableMediaTile} grows from 40px to 56px to keep 8px around it.\n * Set `interactive` on rows that open or expand so they respond to hover.\n */\nexport const TableRow = React.forwardRef<HTMLTableRowElement, TableRowProps>(\n ({ className, interactive = false, onClick, ...props }, ref) => {\n const openingRowLink = React.useRef(false);\n return (\n <tr\n ref={ref}\n className={cn(\n \"[&:has([data-table-media])>td]:h-14\",\n interactive &&\n \"cursor-pointer transition-colors duration-200 ease-in-out hover:bg-background-secondary has-[:focus-visible]:bg-background-secondary motion-reduce:transition-none\",\n className,\n )}\n onClick={(event) => {\n if (openingRowLink.current) {\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n if (interactive && !event.defaultPrevented) {\n openingRowLink.current = true;\n try {\n openTableRowLink(event);\n } finally {\n openingRowLink.current = false;\n }\n }\n }}\n {...props}\n />\n );\n },\n);\nTableRow.displayName = \"TableRow\";\n\n/** Column layout preset for {@link TableHead}. */\nexport type TableHeadIntent = \"default\" | \"checkbox\" | \"sort\" | \"leading\";\n\nconst HEAD_INTENT_CLASSES: Record<TableHeadIntent, string> = {\n default: \"text-left\",\n checkbox: \"w-px pr-0 text-left\",\n sort: \"text-right\",\n leading: \"min-w-0 w-2/5 text-left\",\n};\n\nconst CELL_GUTTERS = \"px-5 first:pl-4 last:pr-4\";\n\nexport interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {\n /** Layout preset for common column types. @default \"default\" */\n intent?: TableHeadIntent;\n}\n\n/**\n * Header cell: 32px tall on `surface-table-row`, 12px secondary text and a\n * 0.5px bottom rule. Columns sit at least 40px apart, with 16px against the\n * card edges.\n */\nexport const TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\n ({ className, intent = \"default\", scope = \"col\", ...props }, ref) => {\n return (\n <th\n ref={ref}\n scope={scope}\n className={cn(\n \"typography-description-12px-regular box-border h-8 whitespace-nowrap border-border-primary border-b-[0.5px] bg-surface-table-row py-0 align-middle font-normal text-content-secondary\",\n CELL_GUTTERS,\n HEAD_INTENT_CLASSES[intent],\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableHead.displayName = \"TableHead\";\n\nconst CELL_MIN_HEIGHT: Record<TableSize, string> = {\n md: \"h-10\",\n default: \"h-10\",\n condensed: \"h-10\",\n comfortable: \"h-12\",\n lg: \"h-14\",\n};\n\n/** Bottom border and padding preset for body cells (Figma table cell component). */\nexport type TableCellVariant = \"default\" | \"chip\" | \"pillProgress\";\n\nconst CELL_VARIANT_CLASSES: Record<TableCellVariant, string> = {\n default: \"border-b-[0.5px] border-border-primary py-0\",\n chip: \"border-b-[0.5px] border-border-primary py-0\",\n pillProgress: \"border-b-[0.5px] border-border-primary py-1\",\n};\n\n/** Layout / typography preset for {@link TableCell} (orthogonal to {@link TableCellVariant}). */\nexport type TableCellIntent = \"default\" | \"checkbox\" | \"stacked\" | \"multiline\" | \"sideLabel\";\n\nconst CELL_INTENT_CLASSES: Record<TableCellIntent, string> = {\n default: \"\",\n checkbox: \"w-px pr-0 text-left\",\n stacked: \"align-top py-2\",\n multiline: \"max-w-[240px]\",\n sideLabel: \"\",\n};\n\nexport interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {\n /** Padding preset for the cell. v2 uses identical padding across variants; values are kept for back-compat. @default \"default\" */\n cellVariant?: TableCellVariant;\n /** Alignment and typography preset for common cell types. @default \"default\" */\n intent?: TableCellIntent;\n /** Keeps the content on one line, for short values (dates, amounts, statuses). @default false */\n nowrap?: boolean;\n}\n\n/**\n * Body cell: 40px rows (56px when the parent {@link TableCard} uses\n * `size=\"lg\"` or the row holds media), 12px type, transparent background and\n * a 0.5px rule that {@link TableBody} drops on the final row. Long text wraps\n * and the row grows; set `nowrap` on short columns to keep them on one line.\n */\nexport const TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, cellVariant = \"default\", intent = \"default\", nowrap = false, ...props }, ref) => {\n const size = useTableSize();\n const typo =\n intent === \"sideLabel\"\n ? \"typography-description-12px-semibold\"\n : \"typography-description-12px-regular\";\n return (\n <td\n ref={ref}\n className={cn(\n typo,\n \"align-middle text-content-primary\",\n nowrap && \"whitespace-nowrap\",\n CELL_GUTTERS,\n CELL_VARIANT_CLASSES[cellVariant],\n CELL_MIN_HEIGHT[size],\n CELL_INTENT_CLASSES[intent],\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableCell.displayName = \"TableCell\";\n\nexport interface TableCellGroupProps extends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Horizontal group for icons, chips, and metadata inside a {@link TableCell}\n * (Figma `gap-[4px]`).\n */\nexport const TableCellGroup = React.forwardRef<HTMLDivElement, TableCellGroupProps>(\n ({ className, ...props }, ref) => {\n return <div ref={ref} className={cn(\"flex items-center gap-1\", className)} {...props} />;\n },\n);\nTableCellGroup.displayName = \"TableCellGroup\";\n\nexport interface TableCellContentProps {\n /** Primary line (semibold body-sm). */\n primary: React.ReactNode;\n /** Optional secondary line (regular body-sm, secondary color). */\n secondary?: React.ReactNode;\n /** Inline node rendered next to the primary line (icon, chip). */\n primaryAdornment?: React.ReactNode;\n /** Inline node rendered next to the secondary line. */\n secondaryAdornment?: React.ReactNode;\n /** Class for the outer wrapper. */\n className?: string;\n}\n\n/**\n * Two-line content slot matching Figma `V2 Table Content` — 12px primary line\n * (semibold) over an optional 12px secondary line (regular, muted), so both\n * fit a 40px row. Use inside {@link TableCell} for the common stacked-text pattern.\n */\nexport function TableCellContent({\n primary,\n secondary,\n primaryAdornment,\n secondaryAdornment,\n className,\n}: TableCellContentProps) {\n return (\n <div className={cn(\"flex flex-col\", className)}>\n <div className=\"flex items-center gap-1\">\n <span className=\"typography-description-12px-semibold text-content-primary\">{primary}</span>\n {primaryAdornment}\n </div>\n {(secondary != null || secondaryAdornment != null) && (\n <div className=\"flex items-center gap-1\">\n {secondary != null && (\n <span className=\"typography-description-12px-regular text-content-secondary\">\n {secondary}\n </span>\n )}\n {secondaryAdornment}\n </div>\n )}\n </div>\n );\n}\nTableCellContent.displayName = \"TableCellContent\";\n\n/** Pixel size of the square {@link TableMediaThumbnail}. */\nexport type TableMediaThumbnailSize = \"48\" | \"40\" | \"32\";\n\nexport interface TableMediaThumbnailProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** Image URL. */\n src: string;\n /** Alt text for the image. @default \"\" */\n alt?: string;\n /** Applies the table's blurred-media treatment. @default false */\n blurred?: boolean;\n /** `center` uses the fixed media column width from the lg spec. @default \"start\" */\n align?: \"start\" | \"center\";\n /** Pixel size of the square thumbnail. At 40 or 48 its row grows to 56px; 32 fits a 40px row. @default \"40\" */\n size?: TableMediaThumbnailSize;\n}\n\n/**\n * Square photo that fills its frame, used inside {@link TableCell} for media\n * columns. At the 40px and 48px sizes its row grows to 56px; the 32px size\n * fits a regular 40px row.\n */\nexport const TableMediaThumbnail = React.forwardRef<HTMLDivElement, TableMediaThumbnailProps>(\n ({ className, src, alt = \"\", blurred, align = \"start\", size = \"40\", ...props }, ref) => {\n const frame = cn(\n \"overflow-hidden bg-neutral-alphas-200\",\n size === \"48\" && \"size-12 rounded-sm\",\n size === \"40\" && \"size-10 rounded-xs\",\n size === \"32\" && \"size-8 rounded-xs\",\n );\n return (\n <div\n ref={ref}\n data-table-media={size === \"32\" ? undefined : \"\"}\n className={cn(\n align === \"center\" && \"flex w-16 shrink-0 justify-center\",\n align === \"start\" && \"inline-flex shrink-0\",\n )}\n >\n <div className={cn(frame, blurred && \"blur-[2px]\", className)} {...props}>\n <img alt={alt} className=\"size-full object-cover\" src={src} />\n </div>\n </div>\n );\n },\n);\nTableMediaThumbnail.displayName = \"TableMediaThumbnail\";\n\nexport interface TableMediaTileProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Logo or icon centred on the tile, or edge-to-edge media when `fill` is set. */\n children: React.ReactNode;\n /** Lets the child fill the tile edge to edge (e.g. a video preview) with no border or fill. @default false */\n fill?: boolean;\n}\n\n/**\n * 40px tile for a {@link TableCell}: a logo or icon (e.g. a social platform)\n * centred on `surface-table-row` with a 0.5px border, or, with `fill`, custom\n * media that fills it. Its row grows to 56px. For a plain image URL use\n * {@link TableMediaThumbnail}.\n */\nexport const TableMediaTile = React.forwardRef<HTMLSpanElement, TableMediaTileProps>(\n ({ className, fill = false, ...props }, ref) => {\n return (\n <span\n ref={ref}\n data-table-media=\"\"\n className={cn(\n \"inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-xs\",\n fill\n ? \"[&>*]:size-full\"\n : \"border-[0.5px] border-border-primary bg-surface-table-row text-icons-secondary\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableMediaTile.displayName = \"TableMediaTile\";\n\nexport interface TableStatusDotProps extends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Small status indicator dot for table cells (Figma status column).\n */\nexport const TableStatusDot = React.forwardRef<HTMLDivElement, TableStatusDotProps>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"size-2 shrink-0 rounded-full bg-info-content\", className)}\n {...props}\n />\n );\n },\n);\nTableStatusDot.displayName = \"TableStatusDot\";\n\nexport interface TableProgressTrackProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Fill width from 0–100. @default 0 */\n value?: number;\n}\n\n/**\n * Thin progress track used with badges in table cells (Figma pill + progress).\n * Renders with `role=\"progressbar\"` and a default `aria-label` of `\"Progress\"`.\n */\nexport const TableProgressTrack = React.forwardRef<HTMLDivElement, TableProgressTrackProps>(\n ({ className, value = 0, \"aria-label\": ariaLabel = \"Progress\", ...props }, ref) => {\n const width = Math.min(100, Math.max(0, value));\n const rounded = Math.round(width);\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuenow={rounded}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={ariaLabel}\n className={cn(\n \"relative h-1 w-full overflow-hidden rounded-full bg-neutral-alphas-200\",\n className,\n )}\n {...props}\n >\n <div\n className=\"absolute top-0 left-0 h-1 rounded-full bg-buttons-primary-default\"\n style={{ width: `${width}%` }}\n aria-hidden\n />\n </div>\n );\n },\n);\nTableProgressTrack.displayName = \"TableProgressTrack\";\n\nexport interface TablePillProgressLayoutProps extends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Vertical layout for pill label + {@link TableProgressTrack} in a cell.\n */\nexport const TablePillProgressLayout = React.forwardRef<\n HTMLDivElement,\n TablePillProgressLayoutProps\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"flex min-w-[120px] flex-col items-start gap-2\", className)}\n {...props}\n />\n );\n});\nTablePillProgressLayout.displayName = \"TablePillProgressLayout\";\n\n/** Current sort direction of a {@link TableSortLabel}. `null` means unsorted. */\nexport type TableSortDirection = \"asc\" | \"desc\" | null;\n\nexport interface TableSortLabelProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode;\n /**\n * Visual indicator of the column's sort state. When set to `\"asc\"` or\n * `\"desc\"`, the label turns primary and the Arrow Sort Up / Down chevrons\n * appear next to it, the active direction highlighted. @default null\n */\n direction?: TableSortDirection;\n}\n\nfunction SortArrows({ direction }: { direction: \"asc\" | \"desc\" }) {\n return (\n <svg\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden=\"true\"\n className=\"shrink-0\"\n >\n <path\n d=\"M5 6L8 3L11 6\"\n strokeWidth={1.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={direction === \"asc\" ? \"stroke-current\" : \"stroke-icons-tertiary\"}\n />\n <path\n d=\"M11 10L8 13L5 10\"\n strokeWidth={1.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={direction === \"desc\" ? \"stroke-current\" : \"stroke-icons-tertiary\"}\n />\n </svg>\n );\n}\n\n/**\n * Sortable column label. A sorted column reads primary with the Arrow Sort\n * Up / Down chevrons; an unsorted one keeps the header colour.\n */\nexport const TableSortLabel = React.forwardRef<HTMLSpanElement, TableSortLabelProps>(\n ({ className, children, direction = null, ...props }, ref) => {\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-flex items-center gap-1\",\n direction != null && \"text-content-primary\",\n className,\n )}\n {...props}\n >\n {children}\n {direction != null && <SortArrows direction={direction} />}\n </span>\n );\n },\n);\nTableSortLabel.displayName = \"TableSortLabel\";\n\nexport interface TableStackedTextProps {\n /** Primary line (semibold body). */\n title: React.ReactNode;\n /** Secondary line (caption, muted). */\n subtitle: React.ReactNode;\n}\n\n/**\n * Two-line primary + secondary text block for \"cell + info\" patterns.\n *\n * @deprecated Prefer {@link TableCellContent} which supports adornments and\n * matches the Figma `V2 Table Content` slot.\n */\nexport function TableStackedText({ title, subtitle }: TableStackedTextProps) {\n return <TableCellContent primary={title} secondary={subtitle} />;\n}\n\nTableStackedText.displayName = \"TableStackedText\";\n\nexport interface TableLineClampProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Number of lines before ellipsis. @default 2 */\n lines?: 1 | 2 | 3;\n}\n\n/**\n * Clamps child text to a fixed number of lines inside a {@link TableCell}.\n */\nexport const TableLineClamp = React.forwardRef<HTMLDivElement, TableLineClampProps>(\n ({ className, lines = 2, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n lines === 1 && \"line-clamp-1\",\n lines === 2 && \"line-clamp-2\",\n lines === 3 && \"line-clamp-3\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableLineClamp.displayName = \"TableLineClamp\";\n"],"names":[],"mappings":";;;;;;;;;;AAkCA,MAAM,mBAAmB,MAAM,cAAyB,IAAI;AAE5D,SAAS,eAA0B;AACjC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WAAW,cAAc,SAAS,mBAAmB;AAAA,UAAA;AAAA,QAAA;AAAA,MACvD;AAAA,IAAA;AAAA,EAAA;AAGN;AAMO,MAAM,iBAAiB,MAAM;AAAA,EAClC,CAAC,EAAE,WAAW,UAAU,YAAY,MAAM,GAAG,MAAA,GAAS,QAAQ;AAC5D,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,aAAa,QAAQ;AAAA,UACrB;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA;AAAA,UACA,aAAa,QAAQ,oBAAC,YAAA,EAAW,UAAA,CAAsB;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG9D;AACF;AACA,eAAe,cAAc;AAetB,SAAS,iBAAiB,EAAE,OAAO,YAAmC;AAC3E,SAAO,oBAAC,kBAAA,EAAiB,SAAS,OAAO,WAAW,UAAU;AAChE;AAEA,iBAAiB,cAAc;AAUxB,MAAM,iBAAiB,MAAM;AAAA,EAClC,CAAC,EAAE,WAAW,QAAQ,GAAG,GAAG,MAAA,GAAS,QAAQ;AAC3C,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT,UAAU,KAAK;AAAA,UACf,UAAU,KAAK;AAAA,UACf,UAAU,KAAK;AAAA,UACf;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACA,eAAe,cAAc;"}
1
+ {"version":3,"file":"Table.mjs","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { Button, type ButtonProps } from \"../Button/Button\";\nimport { CloseIcon } from \"../Icons/CloseIcon\";\nimport { SearchIcon } from \"../Icons/SearchIcon\";\nimport { TranscationArrowIcon } from \"../Icons/TranscationArrowIcon\";\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"../Tooltip/Tooltip\";\nimport { openTableRowLink } from \"./TableRowLink\";\nimport {\n ClearSearchFilters,\n SearchFilters,\n type TableToolbarSearchFilter,\n} from \"./TableToolbarSearchFilters\";\n\n/**\n * Row density for body cells.\n *\n * - `\"md\"` (default) → 40px rows, Figma `V2 Table Cell` Default.\n * - `\"condensed\"` → 40px rows, Figma `V2 Table Cell` Condensed.\n * - `\"comfortable\"` → 48px rows, for a 32px avatar with 8px above and below.\n * - `\"lg\"` → 56px rows; no longer in Figma, kept for back-compat.\n *\n * A row holding a {@link TableMediaThumbnail} (above 32px) or {@link TableMediaTile} is 56px at\n * any size.\n *\n * `\"default\"` is the v2 numeric-token equivalent of `\"md\"` and is preferred\n * for new code.\n */\nexport type TableSize = \"md\" | \"lg\" | \"condensed\" | \"comfortable\" | \"default\";\n\nexport interface TableCardProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Row density applied to {@link TableCell} descendants: 40px rows for `md`,\n * `default` and `condensed`, 48px for `comfortable`, 56px for `lg`.\n * @default \"md\"\n */\n size?: TableSize;\n}\n\nconst TableSizeContext = React.createContext<TableSize>(\"md\");\n\nfunction useTableSize(): TableSize {\n return React.useContext(TableSizeContext);\n}\n\n/**\n * Surface wrapper for data tables: 12px-radius container with a 0.5px\n * hairline border and no inner padding, so the header, rows and\n * {@link TableCardPagination} footer run edge to edge. Provides the size\n * context for {@link TableCell} descendants. Compose with {@link TableScrollArea}, {@link Table},\n * {@link TableHeader}, {@link TableBody}, {@link TableRow},\n * {@link TableHead}, and {@link TableCell}.\n *\n * @example\n * ```tsx\n * <TableCard>\n * <TableScrollArea>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableHead>Name</TableHead>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * <TableRow>\n * <TableCell>Jane Doe</TableCell>\n * </TableRow>\n * </TableBody>\n * </Table>\n * </TableScrollArea>\n * </TableCard>\n * ```\n */\nexport const TableCard = React.forwardRef<HTMLDivElement, TableCardProps>(\n ({ className, size = \"md\", ...props }, ref) => {\n return (\n <TableSizeContext.Provider value={size}>\n <div\n ref={ref}\n className={cn(\n \"isolate flex flex-col overflow-hidden rounded-sm border-[0.5px] border-border-primary\",\n className,\n )}\n {...props}\n />\n </TableSizeContext.Provider>\n );\n },\n);\nTableCard.displayName = \"TableCard\";\n\nexport interface TableToolbarProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Left slot, usually a {@link TableToolbarSearch}. */\n search?: React.ReactNode;\n}\n\n/**\n * 40px action bar above a {@link TableCard}: search on the left, every other\n * control (menus, toggles, buttons) on the right, 24px apart. On phones\n * {@link TableToolbarAction} controls go icon-only so the bar fits.\n *\n * @example\n * ```tsx\n * <TableToolbar search={<TableToolbarSearch value={q} onValueChange={setQ} placeholder=\"Search\" clearLabel=\"Clear search\" />}>\n * <TableToolbarAction icon={<SettingsIcon />}>Filters</TableToolbarAction>\n * <TableToolbarButton>Create</TableToolbarButton>\n * </TableToolbar>\n * ```\n */\nexport const TableToolbar = React.forwardRef<HTMLDivElement, TableToolbarProps>(\n ({ className, search, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex h-10 w-full min-w-0 items-center gap-4 rounded-sm border-[0.5px] border-border-strong bg-surface-table-row pr-2 pl-4\",\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-24 flex-1 items-center\">{search}</div>\n {children != null && (\n <div className=\"flex min-w-0 items-center gap-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n {children}\n </div>\n )}\n </div>\n );\n },\n);\nTableToolbar.displayName = \"TableToolbar\";\n\nexport interface TableToolbarSearchProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"value\" | \"onChange\" | \"type\"> {\n /** Current query. */\n value: string;\n /** Called with the new query, and with `\"\"` when cleared. */\n onValueChange: (value: string) => void;\n /** Accessible name of the clear button. */\n clearLabel: string;\n /**\n * Applied filters, shown between the search icon and the input from the `md` breakpoint up. Array\n * order is the priority: the leading filters that fit are shown and the rest collapse into a \"+N\"\n * tag. Keep it defined (an empty array when none apply) so the input is not remounted as filters\n * come and go.\n */\n filters?: readonly TableToolbarSearchFilter[];\n /**\n * Accessible text of the \"+N\" tag, e.g. `(count) => \\`${count} more filters\\``. Pass it whenever\n * `filters` is passed, so the hidden count is announced in words. Without it the tag is read as\n * its visible text.\n */\n formatHiddenFilters?: (count: number) => string;\n /** Label of the \"Clear all\" action. It shows only with `onClearFilters` and an applied filter. */\n clearFiltersLabel?: string;\n /** Called when \"Clear all\" is pressed. It shows only with `clearFiltersLabel` and an applied filter. */\n onClearFilters?: () => void;\n}\n\n/**\n * Borderless search field for the left slot of {@link TableToolbar}:\n * 16px search icon, 12px text and a clear button once there is a query.\n *\n * Pass `filters` to show the applied filters before the input from the `md`\n * breakpoint up, each with a × button, and `onClearFilters` for a \"Clear all\"\n * action after it. The ones that do not fit collapse into a \"+N\" tag, so the\n * toolbar never grows. Keep `filters` defined (an empty array when none apply)\n * so the input is not remounted as filters come and go.\n */\nexport const TableToolbarSearch = React.forwardRef<HTMLInputElement, TableToolbarSearchProps>(\n (\n {\n className,\n value,\n onValueChange,\n clearLabel,\n placeholder,\n filters,\n formatHiddenFilters,\n clearFiltersLabel,\n onClearFilters,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const inputId = filters ? (props.id ?? generatedId) : props.id;\n return (\n <label\n htmlFor={filters ? inputId : undefined}\n className={cn(\"flex h-6 w-full min-w-0 cursor-text items-center gap-2\", className)}\n >\n <SearchIcon size={16} className=\"shrink-0 text-icons-secondary\" aria-hidden />\n <SearchFilters filters={filters} formatHiddenFilters={formatHiddenFilters}>\n <input\n ref={ref}\n id={inputId}\n type=\"search\"\n value={value}\n onChange={(event) => onValueChange(event.target.value)}\n placeholder={placeholder}\n aria-label={props[\"aria-label\"] ?? placeholder}\n className={cn(\n \"typography-description-12px-regular min-w-0 flex-1 border-none bg-transparent p-0 text-content-primary outline-none placeholder:text-content-secondary [&::-webkit-search-cancel-button]:hidden\",\n filters && \"min-w-24\",\n )}\n {...props}\n />\n </SearchFilters>\n {value !== \"\" && (\n <button\n type=\"button\"\n aria-label={clearLabel}\n onClick={() => onValueChange(\"\")}\n className=\"inline-flex size-4 shrink-0 cursor-pointer items-center justify-center border-none bg-transparent p-0 text-icons-secondary hover:text-icons-primary\"\n >\n <CloseIcon size={16} />\n </button>\n )}\n {clearFiltersLabel && onClearFilters && filters && filters.length > 0 && (\n <ClearSearchFilters label={clearFiltersLabel} onClick={onClearFilters} />\n )}\n </label>\n );\n },\n);\nTableToolbarSearch.displayName = \"TableToolbarSearch\";\n\nexport interface TableToolbarActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** 16px icon after the label. @default up/down arrows, for a menu trigger showing its current value */\n icon?: React.ReactNode;\n /** Marks a toggle or filter as on: primary text on the `Interaction/Hover` fill. @default false */\n active?: boolean;\n}\n\n/**\n * Labelled control for {@link TableToolbar}: 12px label followed by a 16px\n * icon, with 8px of padding either side. It rests on secondary text, fills with\n * `Interaction/Hover` on hover and while `active`, and with `Neutral Alphas/100`\n * while the menu or popover it triggers is open (`data-state=\"open\"`). Below\n * the `md` breakpoint only the icon shows, and the label stays as the\n * accessible name, so a full bar still fits a phone. Works as a plain button or\n * as a `DropdownMenuTrigger` or `PopoverTrigger` child.\n */\nexport const TableToolbarAction = React.forwardRef<HTMLButtonElement, TableToolbarActionProps>(\n ({ className, children, icon, active = false, type = \"button\", ...props }, ref) => {\n return (\n <button\n ref={ref}\n type={type}\n className={cn(\n \"typography-description-12px-regular inline-flex h-6 shrink-0 cursor-pointer items-center gap-2 whitespace-nowrap rounded-xs border-none bg-transparent px-2 py-0 text-content-secondary outline-none\",\n \"focus-visible:shadow-focus-ring enabled:hover:bg-interaction-hover enabled:hover:text-content-primary disabled:cursor-default disabled:opacity-40\",\n \"data-[active]:bg-interaction-hover data-[state=open]:bg-neutral-alphas-100 data-[active]:text-content-primary data-[state=open]:text-content-primary data-[state=open]:enabled:hover:bg-neutral-alphas-100\",\n className,\n )}\n data-active={active ? \"\" : undefined}\n {...props}\n >\n <span className=\"max-md:sr-only\">{children}</span>\n <span\n aria-hidden\n className=\"inline-flex size-4 shrink-0 items-center justify-center text-icons-secondary [&>svg]:size-4\"\n >\n {icon ?? <TranscationArrowIcon size={16} />}\n </span>\n </button>\n );\n },\n);\nTableToolbarAction.displayName = \"TableToolbarAction\";\n\nexport interface TableToolbarButtonProps extends Omit<ButtonProps, \"size\"> {}\n\n/**\n * Call to action for {@link TableToolbar} (e.g. \"Create New\"): a 24px\n * {@link Button} squared to the toolbar's 8px radius with 12px semibold type,\n * so it sits 8px from the bar's edges. Elsewhere use {@link Button}.\n */\nexport const TableToolbarButton = React.forwardRef<HTMLButtonElement, TableToolbarButtonProps>(\n ({ className, ...props }, ref) => {\n return (\n <Button\n ref={ref}\n size=\"24\"\n className={cn(\"typography-description-12px-semibold rounded-xs\", className)}\n {...props}\n />\n );\n },\n);\nTableToolbarButton.displayName = \"TableToolbarButton\";\n\nexport interface TableRowButtonProps extends Omit<ButtonProps, \"size\"> {}\n\n/**\n * Action inside a table row (e.g. \"Copy\", \"View\"): a 24px squared secondary\n * {@link Button} with 12px semibold type, so it fits a 40px row. Pass 16px\n * filled icons; they take the secondary icon colour.\n */\nexport const TableRowButton = React.forwardRef<HTMLButtonElement, TableRowButtonProps>(\n ({ className, variant = \"secondary\", ...props }, ref) => {\n return (\n <Button\n ref={ref}\n size=\"24\"\n variant={variant}\n className={cn(\n \"typography-description-12px-semibold rounded-xs [&_svg]:size-4! [&_svg]:text-icons-secondary\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableRowButton.displayName = \"TableRowButton\";\n\nexport interface TableTruncatedTextProps\n extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> {\n /** Full text; shown whole in a tooltip whenever it does not fit. */\n children: string;\n /** Widest the text may grow, in characters, before it ends in an ellipsis. @default 25 */\n maxChars?: number;\n}\n\n/**\n * One-line text for a {@link TableCell} that ends in an ellipsis once it no\n * longer fits, either past `maxChars` or in a narrower column. The tooltip and\n * the tab stop appear only when the text is actually cut, measured on mount and\n * on every resize, so short text stays plain and out of the tab order. It\n * mounts its own {@link TooltipProvider} so it works in apps without one.\n */\nexport const TableTruncatedText = React.forwardRef<HTMLSpanElement, TableTruncatedTextProps>(\n ({ className, children, maxChars = 25, style, ...props }, ref) => {\n const innerRef = React.useRef<HTMLSpanElement>(null);\n const [isTruncated, setIsTruncated] = React.useState(false);\n React.useImperativeHandle(ref, () => innerRef.current as HTMLSpanElement);\n\n const measure = React.useCallback(() => {\n const element = innerRef.current;\n if (element) {\n setIsTruncated(element.scrollWidth > element.clientWidth);\n }\n }, []);\n\n React.useLayoutEffect(measure);\n\n React.useLayoutEffect(() => {\n const element = innerRef.current;\n if (!element || typeof ResizeObserver === \"undefined\") {\n return;\n }\n const observer = new ResizeObserver(measure);\n observer.observe(element);\n return () => observer.disconnect();\n }, [measure]);\n\n const text = (\n <span\n ref={innerRef}\n className={cn(\"block truncate\", className)}\n style={{ maxWidth: `${maxChars}ch`, ...style }}\n tabIndex={isTruncated ? 0 : undefined}\n {...props}\n >\n {children}\n </span>\n );\n if (!isTruncated) {\n return text;\n }\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>{text}</TooltipTrigger>\n <TooltipContent className=\"max-w-xs whitespace-pre-line\">{children}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n },\n);\nTableTruncatedText.displayName = \"TableTruncatedText\";\n\nexport interface TableScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * No longer needed in v2 — {@link TableCard} handles corner rounding via\n * its own `overflow-hidden rounded-3xl`. Accepted for back-compat.\n *\n * @deprecated v2 ignores this prop; safe to remove.\n */\n roundTop?: boolean;\n /**\n * Shows a slim horizontal scrollbar beneath the table when the content\n * overflows (Figma `V2 Scroll Bar`), with room reserved for it only while\n * the table is wider than its card. @default false\n */\n showScrollbar?: boolean;\n}\n\n/**\n * Scroll container for the table. Wide tables scroll sideways. When its\n * {@link TableCard} has a bounded height (a flex child of a full-height page,\n * or a set height), the rows scroll inside the card under a pinned header\n * and the card's footer stays in view. The area fills the card's height, so\n * in a card taller than its rows the footer sits at the bottom of the card.\n */\nexport const TableScrollArea = React.forwardRef<HTMLDivElement, TableScrollAreaProps>(\n ({ className, children, roundTop: _roundTop, showScrollbar = false, ...props }, ref) => {\n const scrollportRef = React.useRef<HTMLDivElement>(null);\n const [overflowsX, setOverflowsX] = React.useState(false);\n\n React.useLayoutEffect(() => {\n const scrollport = scrollportRef.current;\n if (!showScrollbar || !scrollport || typeof ResizeObserver === \"undefined\") {\n return;\n }\n const measure = () => setOverflowsX(scrollport.scrollWidth > scrollport.clientWidth);\n const resizeObserver = new ResizeObserver(measure);\n // Content can be swapped after mount (a skeleton replaced by the table),\n // so the observed elements are refreshed whenever the content changes.\n const observeContent = () => {\n resizeObserver.disconnect();\n resizeObserver.observe(scrollport);\n for (const element of [\n ...Array.from(scrollport.children),\n ...Array.from(scrollport.querySelectorAll(\"table\")),\n ]) {\n resizeObserver.observe(element);\n }\n measure();\n };\n observeContent();\n const mutationObserver = new MutationObserver(observeContent);\n mutationObserver.observe(scrollport, { childList: true, subtree: true });\n return () => {\n mutationObserver.disconnect();\n resizeObserver.disconnect();\n };\n }, [showScrollbar]);\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative flex min-h-0 w-full min-w-0 flex-auto flex-col overflow-hidden\",\n className,\n )}\n {...props}\n >\n <div\n ref={scrollportRef}\n data-table-scrollport=\"\"\n className={cn(\n \"min-h-0 flex-auto overflow-auto\",\n showScrollbar &&\n \"[scrollbar-color:var(--color-border-strong)_transparent] [scrollbar-width:thin]\",\n showScrollbar && overflowsX && \"pb-3\",\n )}\n >\n {children}\n </div>\n </div>\n );\n },\n);\nTableScrollArea.displayName = \"TableScrollArea\";\n\nexport interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {}\n\n/**\n * Semantic `<table>` element. Place inside {@link TableScrollArea}.\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n ({ className, ...props }, ref) => {\n return (\n <table\n ref={ref}\n className={cn(\n \"w-full caption-bottom border-separate border-spacing-0 text-left\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTable.displayName = \"Table\";\n\nexport interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\n/**\n * `<thead>` wrapper. Its header cells stay pinned to the top while rows\n * scroll beneath them. Row header cells in {@link TableBody} scroll with\n * their rows.\n */\nexport const TableHeader = React.forwardRef<HTMLTableSectionElement, TableHeaderProps>(\n ({ className, ...props }, ref) => {\n return (\n <thead\n ref={ref}\n className={cn(\"[&_th]:sticky [&_th]:top-0 [&_th]:z-10\", className)}\n {...props}\n />\n );\n },\n);\nTableHeader.displayName = \"TableHeader\";\n\nexport interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\n/**\n * `<tbody>` wrapper. Removes the bottom border on cells in the final row to\n * match the Figma `V2 Table Final Row` treatment.\n */\nexport const TableBody = React.forwardRef<HTMLTableSectionElement, TableBodyProps>(\n ({ className, ...props }, ref) => {\n return (\n <tbody ref={ref} className={cn(\"[&_tr:last-child_td]:border-b-0\", className)} {...props} />\n );\n },\n);\nTableBody.displayName = \"TableBody\";\n\nexport interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nexport const TableFooter = React.forwardRef<HTMLTableSectionElement, TableFooterProps>(\n ({ className, ...props }, ref) => {\n return <tfoot ref={ref} className={cn(className)} {...props} />;\n },\n);\nTableFooter.displayName = \"TableFooter\";\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n /**\n * Marks a body row that opens or expands into more content. The row shows a\n * pointer cursor and eases to `background-secondary` while hovered, or while\n * a control inside it has keyboard focus. The row itself is not focusable, so\n * its action must also be on a button or link inside it. With a\n * {@link TableRowLink} inside, a click anywhere on the row that is not on\n * another control opens that link.\n * @default false\n */\n interactive?: boolean;\n}\n\n/**\n * Table row. A body row holding a {@link TableMediaThumbnail} or\n * {@link TableMediaTile} grows from 40px to 56px to keep 8px around it.\n * Set `interactive` on rows that open or expand so they respond to hover.\n */\nexport const TableRow = React.forwardRef<HTMLTableRowElement, TableRowProps>(\n ({ className, interactive = false, onClick, ...props }, ref) => {\n const openingRowLink = React.useRef(false);\n return (\n <tr\n ref={ref}\n className={cn(\n \"[&:has([data-table-media])>td]:h-14\",\n interactive &&\n \"cursor-pointer transition-colors duration-200 ease-in-out hover:bg-background-secondary has-[:focus-visible]:bg-background-secondary motion-reduce:transition-none\",\n className,\n )}\n onClick={(event) => {\n if (openingRowLink.current) {\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n if (interactive && !event.defaultPrevented) {\n openingRowLink.current = true;\n try {\n openTableRowLink(event);\n } finally {\n openingRowLink.current = false;\n }\n }\n }}\n {...props}\n />\n );\n },\n);\nTableRow.displayName = \"TableRow\";\n\n/** Column layout preset for {@link TableHead}. */\nexport type TableHeadIntent = \"default\" | \"checkbox\" | \"sort\" | \"leading\";\n\nconst HEAD_INTENT_CLASSES: Record<TableHeadIntent, string> = {\n default: \"text-left\",\n checkbox: \"w-px pr-0 text-left\",\n sort: \"text-right\",\n leading: \"min-w-0 w-2/5 text-left\",\n};\n\nconst CELL_GUTTERS = \"px-5 first:pl-4 last:pr-4\";\n\nexport interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {\n /** Layout preset for common column types. @default \"default\" */\n intent?: TableHeadIntent;\n}\n\n/**\n * Header cell: 32px tall on `surface-table-row`, 12px secondary text and a\n * 0.5px bottom rule. Columns sit at least 40px apart, with 16px against the\n * card edges.\n */\nexport const TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\n ({ className, intent = \"default\", scope = \"col\", ...props }, ref) => {\n return (\n <th\n ref={ref}\n scope={scope}\n className={cn(\n \"typography-description-12px-regular box-border h-8 whitespace-nowrap border-border-primary border-b-[0.5px] bg-surface-table-row py-0 align-middle font-normal text-content-secondary\",\n CELL_GUTTERS,\n HEAD_INTENT_CLASSES[intent],\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableHead.displayName = \"TableHead\";\n\nconst CELL_MIN_HEIGHT: Record<TableSize, string> = {\n md: \"h-10\",\n default: \"h-10\",\n condensed: \"h-10\",\n comfortable: \"h-12\",\n lg: \"h-14\",\n};\n\n/** Bottom border and padding preset for body cells (Figma table cell component). */\nexport type TableCellVariant = \"default\" | \"chip\" | \"pillProgress\";\n\nconst CELL_VARIANT_CLASSES: Record<TableCellVariant, string> = {\n default: \"border-b-[0.5px] border-border-primary py-0\",\n chip: \"border-b-[0.5px] border-border-primary py-0\",\n pillProgress: \"border-b-[0.5px] border-border-primary py-1\",\n};\n\n/** Layout / typography preset for {@link TableCell} (orthogonal to {@link TableCellVariant}). */\nexport type TableCellIntent = \"default\" | \"checkbox\" | \"stacked\" | \"multiline\" | \"sideLabel\";\n\nconst CELL_INTENT_CLASSES: Record<TableCellIntent, string> = {\n default: \"\",\n checkbox: \"w-px pr-0 text-left\",\n stacked: \"align-top py-2\",\n multiline: \"max-w-[240px]\",\n sideLabel: \"\",\n};\n\nexport interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {\n /** Padding preset for the cell. v2 uses identical padding across variants; values are kept for back-compat. @default \"default\" */\n cellVariant?: TableCellVariant;\n /** Alignment and typography preset for common cell types. @default \"default\" */\n intent?: TableCellIntent;\n /** Keeps the content on one line, for short values (dates, amounts, statuses). @default false */\n nowrap?: boolean;\n}\n\n/**\n * Body cell: 40px rows (56px when the parent {@link TableCard} uses\n * `size=\"lg\"` or the row holds media), 12px type, transparent background and\n * a 0.5px rule that {@link TableBody} drops on the final row. Long text wraps\n * and the row grows; set `nowrap` on short columns to keep them on one line.\n */\nexport const TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, cellVariant = \"default\", intent = \"default\", nowrap = false, ...props }, ref) => {\n const size = useTableSize();\n const typo =\n intent === \"sideLabel\"\n ? \"typography-description-12px-semibold\"\n : \"typography-description-12px-regular\";\n return (\n <td\n ref={ref}\n className={cn(\n typo,\n \"align-middle text-content-primary\",\n nowrap && \"whitespace-nowrap\",\n CELL_GUTTERS,\n CELL_VARIANT_CLASSES[cellVariant],\n CELL_MIN_HEIGHT[size],\n CELL_INTENT_CLASSES[intent],\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableCell.displayName = \"TableCell\";\n\nexport interface TableCellGroupProps extends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Horizontal group for icons, chips, and metadata inside a {@link TableCell}\n * (Figma `gap-[4px]`).\n */\nexport const TableCellGroup = React.forwardRef<HTMLDivElement, TableCellGroupProps>(\n ({ className, ...props }, ref) => {\n return <div ref={ref} className={cn(\"flex items-center gap-1\", className)} {...props} />;\n },\n);\nTableCellGroup.displayName = \"TableCellGroup\";\n\nexport interface TableCellContentProps {\n /** Primary line (semibold body-sm). */\n primary: React.ReactNode;\n /** Optional secondary line (regular body-sm, secondary color). */\n secondary?: React.ReactNode;\n /** Inline node rendered next to the primary line (icon, chip). */\n primaryAdornment?: React.ReactNode;\n /** Inline node rendered next to the secondary line. */\n secondaryAdornment?: React.ReactNode;\n /** Class for the outer wrapper. */\n className?: string;\n}\n\n/**\n * Two-line content slot matching Figma `V2 Table Content` — 12px primary line\n * (semibold) over an optional 12px secondary line (regular, muted), so both\n * fit a 40px row. Use inside {@link TableCell} for the common stacked-text pattern.\n */\nexport function TableCellContent({\n primary,\n secondary,\n primaryAdornment,\n secondaryAdornment,\n className,\n}: TableCellContentProps) {\n return (\n <div className={cn(\"flex flex-col\", className)}>\n <div className=\"flex items-center gap-1\">\n <span className=\"typography-description-12px-semibold text-content-primary\">{primary}</span>\n {primaryAdornment}\n </div>\n {(secondary != null || secondaryAdornment != null) && (\n <div className=\"flex items-center gap-1\">\n {secondary != null && (\n <span className=\"typography-description-12px-regular text-content-secondary\">\n {secondary}\n </span>\n )}\n {secondaryAdornment}\n </div>\n )}\n </div>\n );\n}\nTableCellContent.displayName = \"TableCellContent\";\n\n/** Pixel size of the square {@link TableMediaThumbnail}. */\nexport type TableMediaThumbnailSize = \"48\" | \"40\" | \"32\";\n\nexport interface TableMediaThumbnailProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** Image URL. */\n src: string;\n /** Alt text for the image. @default \"\" */\n alt?: string;\n /** Applies the table's blurred-media treatment. @default false */\n blurred?: boolean;\n /** `center` uses the fixed media column width from the lg spec. @default \"start\" */\n align?: \"start\" | \"center\";\n /** Pixel size of the square thumbnail. At 40 or 48 its row grows to 56px; 32 fits a 40px row. @default \"40\" */\n size?: TableMediaThumbnailSize;\n}\n\n/**\n * Square photo that fills its frame, used inside {@link TableCell} for media\n * columns. At the 40px and 48px sizes its row grows to 56px; the 32px size\n * fits a regular 40px row.\n */\nexport const TableMediaThumbnail = React.forwardRef<HTMLDivElement, TableMediaThumbnailProps>(\n ({ className, src, alt = \"\", blurred, align = \"start\", size = \"40\", ...props }, ref) => {\n const frame = cn(\n \"overflow-hidden bg-neutral-alphas-200\",\n size === \"48\" && \"size-12 rounded-sm\",\n size === \"40\" && \"size-10 rounded-xs\",\n size === \"32\" && \"size-8 rounded-xs\",\n );\n return (\n <div\n ref={ref}\n data-table-media={size === \"32\" ? undefined : \"\"}\n className={cn(\n align === \"center\" && \"flex w-16 shrink-0 justify-center\",\n align === \"start\" && \"inline-flex shrink-0\",\n )}\n >\n <div className={cn(frame, blurred && \"blur-[2px]\", className)} {...props}>\n <img alt={alt} className=\"size-full object-cover\" src={src} />\n </div>\n </div>\n );\n },\n);\nTableMediaThumbnail.displayName = \"TableMediaThumbnail\";\n\nexport interface TableMediaTileProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Logo or icon centred on the tile, or edge-to-edge media when `fill` is set. */\n children: React.ReactNode;\n /** Lets the child fill the tile edge to edge (e.g. a video preview) with no border or fill. @default false */\n fill?: boolean;\n}\n\n/**\n * 40px tile for a {@link TableCell}: a logo or icon (e.g. a social platform)\n * centred on `surface-table-row` with a 0.5px border, or, with `fill`, custom\n * media that fills it. Its row grows to 56px. For a plain image URL use\n * {@link TableMediaThumbnail}.\n */\nexport const TableMediaTile = React.forwardRef<HTMLSpanElement, TableMediaTileProps>(\n ({ className, fill = false, ...props }, ref) => {\n return (\n <span\n ref={ref}\n data-table-media=\"\"\n className={cn(\n \"inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-xs\",\n fill\n ? \"[&>*]:size-full\"\n : \"border-[0.5px] border-border-primary bg-surface-table-row text-icons-secondary\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableMediaTile.displayName = \"TableMediaTile\";\n\nexport interface TableStatusDotProps extends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Small status indicator dot for table cells (Figma status column).\n */\nexport const TableStatusDot = React.forwardRef<HTMLDivElement, TableStatusDotProps>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"size-2 shrink-0 rounded-full bg-info-content\", className)}\n {...props}\n />\n );\n },\n);\nTableStatusDot.displayName = \"TableStatusDot\";\n\nexport interface TableProgressTrackProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Fill width from 0–100. @default 0 */\n value?: number;\n}\n\n/**\n * Thin progress track used with badges in table cells (Figma pill + progress).\n * Renders with `role=\"progressbar\"` and a default `aria-label` of `\"Progress\"`.\n */\nexport const TableProgressTrack = React.forwardRef<HTMLDivElement, TableProgressTrackProps>(\n ({ className, value = 0, \"aria-label\": ariaLabel = \"Progress\", ...props }, ref) => {\n const width = Math.min(100, Math.max(0, value));\n const rounded = Math.round(width);\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuenow={rounded}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={ariaLabel}\n className={cn(\n \"relative h-1 w-full overflow-hidden rounded-full bg-neutral-alphas-200\",\n className,\n )}\n {...props}\n >\n <div\n className=\"absolute top-0 left-0 h-1 rounded-full bg-buttons-primary-default\"\n style={{ width: `${width}%` }}\n aria-hidden\n />\n </div>\n );\n },\n);\nTableProgressTrack.displayName = \"TableProgressTrack\";\n\nexport interface TablePillProgressLayoutProps extends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Vertical layout for pill label + {@link TableProgressTrack} in a cell.\n */\nexport const TablePillProgressLayout = React.forwardRef<\n HTMLDivElement,\n TablePillProgressLayoutProps\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\"flex min-w-[120px] flex-col items-start gap-2\", className)}\n {...props}\n />\n );\n});\nTablePillProgressLayout.displayName = \"TablePillProgressLayout\";\n\n/** Current sort direction of a {@link TableSortLabel}. `null` means unsorted. */\nexport type TableSortDirection = \"asc\" | \"desc\" | null;\n\nexport interface TableSortLabelProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode;\n /**\n * Visual indicator of the column's sort state. When set to `\"asc\"` or\n * `\"desc\"`, the label turns primary and the Arrow Sort Up / Down chevrons\n * appear next to it, the active direction highlighted. @default null\n */\n direction?: TableSortDirection;\n}\n\nfunction SortArrows({ direction }: { direction: \"asc\" | \"desc\" }) {\n return (\n <svg\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden=\"true\"\n className=\"shrink-0\"\n >\n <path\n d=\"M5 6L8 3L11 6\"\n strokeWidth={1.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={direction === \"asc\" ? \"stroke-current\" : \"stroke-icons-tertiary\"}\n />\n <path\n d=\"M11 10L8 13L5 10\"\n strokeWidth={1.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={direction === \"desc\" ? \"stroke-current\" : \"stroke-icons-tertiary\"}\n />\n </svg>\n );\n}\n\n/**\n * Sortable column label. A sorted column reads primary with the Arrow Sort\n * Up / Down chevrons; an unsorted one keeps the header colour.\n */\nexport const TableSortLabel = React.forwardRef<HTMLSpanElement, TableSortLabelProps>(\n ({ className, children, direction = null, ...props }, ref) => {\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-flex items-center gap-1\",\n direction != null && \"text-content-primary\",\n className,\n )}\n {...props}\n >\n {children}\n {direction != null && <SortArrows direction={direction} />}\n </span>\n );\n },\n);\nTableSortLabel.displayName = \"TableSortLabel\";\n\nexport interface TableStackedTextProps {\n /** Primary line (semibold body). */\n title: React.ReactNode;\n /** Secondary line (caption, muted). */\n subtitle: React.ReactNode;\n}\n\n/**\n * Two-line primary + secondary text block for \"cell + info\" patterns.\n *\n * @deprecated Prefer {@link TableCellContent} which supports adornments and\n * matches the Figma `V2 Table Content` slot.\n */\nexport function TableStackedText({ title, subtitle }: TableStackedTextProps) {\n return <TableCellContent primary={title} secondary={subtitle} />;\n}\n\nTableStackedText.displayName = \"TableStackedText\";\n\nexport interface TableLineClampProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Number of lines before ellipsis. @default 2 */\n lines?: 1 | 2 | 3;\n}\n\n/**\n * Clamps child text to a fixed number of lines inside a {@link TableCell}.\n */\nexport const TableLineClamp = React.forwardRef<HTMLDivElement, TableLineClampProps>(\n ({ className, lines = 2, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n lines === 1 && \"line-clamp-1\",\n lines === 2 && \"line-clamp-2\",\n lines === 3 && \"line-clamp-3\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nTableLineClamp.displayName = \"TableLineClamp\";\n"],"names":[],"mappings":";;;;;;;;;;;AAuCA,MAAM,mBAAmB,MAAM,cAAyB,IAAI;AAE5D,SAAS,eAA0B;AACjC,SAAO,MAAM,WAAW,gBAAgB;AAC1C;AA8BO,MAAM,YAAY,MAAM;AAAA,EAC7B,CAAC,EAAE,WAAW,OAAO,MAAM,GAAG,MAAA,GAAS,QAAQ;AAC7C,WACE,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAChC,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,Q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