@nearform/quantum 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1169,17 +1169,34 @@ declare const StepsIndicator: React.ForwardRefExoticComponent<StepsIndicatorProp
1169
1169
  declare const tableBodyVariants: (props?: ({
1170
1170
  variant?: "zebra" | null | undefined;
1171
1171
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1172
+ type TableAlign = 'left' | 'center' | 'right';
1173
+ type TableSortDirection = 'asc' | 'desc' | false;
1172
1174
  interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
1173
1175
  containerClassName?: string;
1174
1176
  }
1175
1177
  declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
1176
1178
  declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
1177
- declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
1179
+ interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'> {
1180
+ align?: TableAlign;
1181
+ sortDirection?: TableSortDirection;
1182
+ onSort?: React.MouseEventHandler<HTMLButtonElement>;
1183
+ }
1184
+ declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
1178
1185
  interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement>, VariantProps<typeof tableBodyVariants> {
1179
1186
  }
1180
1187
  declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
1181
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
1182
- declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
1188
+ interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
1189
+ selected?: boolean;
1190
+ }
1191
+ declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
1192
+ interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {
1193
+ align?: TableAlign;
1194
+ }
1195
+ declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
1196
+ interface TableEmptyProps extends TableCellProps {
1197
+ colSpan: number;
1198
+ }
1199
+ declare const TableEmpty: React.ForwardRefExoticComponent<TableEmptyProps & React.RefAttributes<HTMLTableCellElement>>;
1183
1200
  declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
1184
1201
  declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
1185
1202
 
@@ -1275,4 +1292,4 @@ interface LinkColumnProps extends React__default.ComponentPropsWithoutRef<'div'>
1275
1292
  }
1276
1293
  declare const LinkColumn: React__default.ForwardRefExoticComponent<LinkColumnProps & React__default.RefAttributes<HTMLDivElement>>;
1277
1294
 
1278
- export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Avatar, type AvatarProps, BackLink, type BackLinkProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, CardDescription, type CardProps, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CodeBlock, type CodeBlockProps, ControlLabel, DateInput, type DateInputInvalidReason, type DateInputProps, type DateInputValueDetails, FieldDescription, FieldError, type FieldMessageProps, FooterStatement, type FooterStatementProps, FormGroup, type FormGroupProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, Link, LinkColumn, type LinkColumnProps, LinkRow, type LinkRowProps, Modal, ModalClose, ModalCloseFooter, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, OpenSourceIcon, PageHeader, PageHeaderActions, type PageHeaderProps, PageHeaderTitle, type PageHeaderTitleProps, Pagination, Password, type PasswordProps, Popover, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, type PopoverProps, PopoverScrollArea, PopoverSeparator, PopoverTrigger, RadioGroupItem as Radio, RadioGroup, type RadioGroupItemProps, type RadioGroupProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SortAndShow, SortAndShowControl, type SortAndShowControlProps, type SortAndShowOption, SplitButton, SplitButtonItem, type SplitButtonProps, SplitButtonSeparator, Stat, type StatProps, Stats, Step, type StepProps, type StepStatus, Stepper, StepperItem, type StepperItemProps, StepperNav, type StepperNavProps, type StepperProps, StepsIndicator, type StepsIndicatorProp, Subnav, SubnavHeading, type SubnavHeadingProps, SubnavItem, SubnavLink, type SubnavLinkProps, SubnavList, Switch, SwitchCard, type SwitchCardProps, Table, TableBody, type TableBodyProps, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, type ToastCloseProps, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, ToggleList, ToggleListItem, type ToggleListItemProps, Tooltip, type TooltipProps, type TriggerProps, WebsiteFooter, type WebsiteFooterProps, backLinkVariants, buttonVariants, cardVariants, _default as colors, formVariants, iconButtonVariants, pageHeaderVariants, splitButtonSegmentVariants, splitButtonVariants, tabsListVariants, tabsTriggerVariants, tabsVariants, textareaVariants, useCheckboxGroup, useFormGroup };
1295
+ export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Avatar, type AvatarProps, BackLink, type BackLinkProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, CardDescription, type CardProps, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CodeBlock, type CodeBlockProps, ControlLabel, DateInput, type DateInputInvalidReason, type DateInputProps, type DateInputValueDetails, FieldDescription, FieldError, type FieldMessageProps, FooterStatement, type FooterStatementProps, FormGroup, type FormGroupProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, Link, LinkColumn, type LinkColumnProps, LinkRow, type LinkRowProps, Modal, ModalClose, ModalCloseFooter, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, OpenSourceIcon, PageHeader, PageHeaderActions, type PageHeaderProps, PageHeaderTitle, type PageHeaderTitleProps, Pagination, Password, type PasswordProps, Popover, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, type PopoverProps, PopoverScrollArea, PopoverSeparator, PopoverTrigger, RadioGroupItem as Radio, RadioGroup, type RadioGroupItemProps, type RadioGroupProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SortAndShow, SortAndShowControl, type SortAndShowControlProps, type SortAndShowOption, SplitButton, SplitButtonItem, type SplitButtonProps, SplitButtonSeparator, Stat, type StatProps, Stats, Step, type StepProps, type StepStatus, Stepper, StepperItem, type StepperItemProps, StepperNav, type StepperNavProps, type StepperProps, StepsIndicator, type StepsIndicatorProp, Subnav, SubnavHeading, type SubnavHeadingProps, SubnavItem, SubnavLink, type SubnavLinkProps, SubnavList, Switch, SwitchCard, type SwitchCardProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, TableCell, type TableCellProps, TableEmpty, type TableEmptyProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, type TableSortDirection, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, type ToastCloseProps, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, ToggleList, ToggleListItem, type ToggleListItemProps, Tooltip, type TooltipProps, type TriggerProps, WebsiteFooter, type WebsiteFooterProps, backLinkVariants, buttonVariants, cardVariants, _default as colors, formVariants, iconButtonVariants, pageHeaderVariants, splitButtonSegmentVariants, splitButtonVariants, tabsListVariants, tabsTriggerVariants, tabsVariants, textareaVariants, useCheckboxGroup, useFormGroup };
package/dist/index.d.ts CHANGED
@@ -1169,17 +1169,34 @@ declare const StepsIndicator: React.ForwardRefExoticComponent<StepsIndicatorProp
1169
1169
  declare const tableBodyVariants: (props?: ({
1170
1170
  variant?: "zebra" | null | undefined;
1171
1171
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
1172
+ type TableAlign = 'left' | 'center' | 'right';
1173
+ type TableSortDirection = 'asc' | 'desc' | false;
1172
1174
  interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
1173
1175
  containerClassName?: string;
1174
1176
  }
1175
1177
  declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
1176
1178
  declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
1177
- declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
1179
+ interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'> {
1180
+ align?: TableAlign;
1181
+ sortDirection?: TableSortDirection;
1182
+ onSort?: React.MouseEventHandler<HTMLButtonElement>;
1183
+ }
1184
+ declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
1178
1185
  interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement>, VariantProps<typeof tableBodyVariants> {
1179
1186
  }
1180
1187
  declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
1181
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
1182
- declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
1188
+ interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
1189
+ selected?: boolean;
1190
+ }
1191
+ declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
1192
+ interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {
1193
+ align?: TableAlign;
1194
+ }
1195
+ declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
1196
+ interface TableEmptyProps extends TableCellProps {
1197
+ colSpan: number;
1198
+ }
1199
+ declare const TableEmpty: React.ForwardRefExoticComponent<TableEmptyProps & React.RefAttributes<HTMLTableCellElement>>;
1183
1200
  declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
1184
1201
  declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
1185
1202
 
@@ -1275,4 +1292,4 @@ interface LinkColumnProps extends React__default.ComponentPropsWithoutRef<'div'>
1275
1292
  }
1276
1293
  declare const LinkColumn: React__default.ForwardRefExoticComponent<LinkColumnProps & React__default.RefAttributes<HTMLDivElement>>;
1277
1294
 
1278
- export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Avatar, type AvatarProps, BackLink, type BackLinkProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, CardDescription, type CardProps, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CodeBlock, type CodeBlockProps, ControlLabel, DateInput, type DateInputInvalidReason, type DateInputProps, type DateInputValueDetails, FieldDescription, FieldError, type FieldMessageProps, FooterStatement, type FooterStatementProps, FormGroup, type FormGroupProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, Link, LinkColumn, type LinkColumnProps, LinkRow, type LinkRowProps, Modal, ModalClose, ModalCloseFooter, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, OpenSourceIcon, PageHeader, PageHeaderActions, type PageHeaderProps, PageHeaderTitle, type PageHeaderTitleProps, Pagination, Password, type PasswordProps, Popover, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, type PopoverProps, PopoverScrollArea, PopoverSeparator, PopoverTrigger, RadioGroupItem as Radio, RadioGroup, type RadioGroupItemProps, type RadioGroupProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SortAndShow, SortAndShowControl, type SortAndShowControlProps, type SortAndShowOption, SplitButton, SplitButtonItem, type SplitButtonProps, SplitButtonSeparator, Stat, type StatProps, Stats, Step, type StepProps, type StepStatus, Stepper, StepperItem, type StepperItemProps, StepperNav, type StepperNavProps, type StepperProps, StepsIndicator, type StepsIndicatorProp, Subnav, SubnavHeading, type SubnavHeadingProps, SubnavItem, SubnavLink, type SubnavLinkProps, SubnavList, Switch, SwitchCard, type SwitchCardProps, Table, TableBody, type TableBodyProps, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, type ToastCloseProps, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, ToggleList, ToggleListItem, type ToggleListItemProps, Tooltip, type TooltipProps, type TriggerProps, WebsiteFooter, type WebsiteFooterProps, backLinkVariants, buttonVariants, cardVariants, _default as colors, formVariants, iconButtonVariants, pageHeaderVariants, splitButtonSegmentVariants, splitButtonVariants, tabsListVariants, tabsTriggerVariants, tabsVariants, textareaVariants, useCheckboxGroup, useFormGroup };
1295
+ export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Avatar, type AvatarProps, BackLink, type BackLinkProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarProps, Card, CardDescription, type CardProps, CardTitle, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, CodeBlock, type CodeBlockProps, ControlLabel, DateInput, type DateInputInvalidReason, type DateInputProps, type DateInputValueDetails, FieldDescription, FieldError, type FieldMessageProps, FooterStatement, type FooterStatementProps, FormGroup, type FormGroupProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, Link, LinkColumn, type LinkColumnProps, LinkRow, type LinkRowProps, Modal, ModalClose, ModalCloseFooter, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, OpenSourceIcon, PageHeader, PageHeaderActions, type PageHeaderProps, PageHeaderTitle, type PageHeaderTitleProps, Pagination, Password, type PasswordProps, Popover, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, type PopoverProps, PopoverScrollArea, PopoverSeparator, PopoverTrigger, RadioGroupItem as Radio, RadioGroup, type RadioGroupItemProps, type RadioGroupProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, type SelectableCardProps, SortAndShow, SortAndShowControl, type SortAndShowControlProps, type SortAndShowOption, SplitButton, SplitButtonItem, type SplitButtonProps, SplitButtonSeparator, Stat, type StatProps, Stats, Step, type StepProps, type StepStatus, Stepper, StepperItem, type StepperItemProps, StepperNav, type StepperNavProps, type StepperProps, StepsIndicator, type StepsIndicatorProp, Subnav, SubnavHeading, type SubnavHeadingProps, SubnavItem, SubnavLink, type SubnavLinkProps, SubnavList, Switch, SwitchCard, type SwitchCardProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, TableCell, type TableCellProps, TableEmpty, type TableEmptyProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, type TableSortDirection, Tabs, TabsContent, TabsList, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, type ToastCloseProps, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, ToggleList, ToggleListItem, type ToggleListItemProps, Tooltip, type TooltipProps, type TriggerProps, WebsiteFooter, type WebsiteFooterProps, backLinkVariants, buttonVariants, cardVariants, _default as colors, formVariants, iconButtonVariants, pageHeaderVariants, splitButtonSegmentVariants, splitButtonVariants, tabsListVariants, tabsTriggerVariants, tabsVariants, textareaVariants, useCheckboxGroup, useFormGroup };
package/dist/index.js CHANGED
@@ -157,6 +157,7 @@ __export(index_exports, {
157
157
  TableBody: () => TableBody,
158
158
  TableCaption: () => TableCaption,
159
159
  TableCell: () => TableCell,
160
+ TableEmpty: () => TableEmpty,
160
161
  TableFooter: () => TableFooter,
161
162
  TableHead: () => TableHead,
162
163
  TableHeader: () => TableHeader,
@@ -5213,12 +5214,31 @@ var tableBodyVariants = (0, import_class_variance_authority30.cva)("bg-backgroun
5213
5214
  variants: {
5214
5215
  variant: {
5215
5216
  zebra: [
5216
- "[&>*:nth-child(even)]:bg-background-subtle",
5217
- "dark:[&>*:nth-child(even)]:bg-background-subtle-dark"
5217
+ "[:where(&>*:nth-child(even))]:bg-background-subtle",
5218
+ "dark:[:where(&>*:nth-child(even))]:bg-background-subtle-dark"
5218
5219
  ]
5219
5220
  }
5220
5221
  }
5221
5222
  });
5223
+ var alignVariants2 = (0, import_class_variance_authority30.cva)("", {
5224
+ variants: {
5225
+ align: {
5226
+ left: "text-left",
5227
+ center: "text-center",
5228
+ right: "text-right"
5229
+ }
5230
+ }
5231
+ });
5232
+ var ariaSortFor = (direction) => {
5233
+ if (direction === "asc") return "ascending";
5234
+ if (direction === "desc") return "descending";
5235
+ return void 0;
5236
+ };
5237
+ var SortIcon = ({ direction }) => {
5238
+ if (direction === "asc") return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(assets_exports.BsArrowUp, { "aria-hidden": "true" });
5239
+ if (direction === "desc") return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(assets_exports.BsArrowDown, { "aria-hidden": "true" });
5240
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(assets_exports.BsArrowDownUp, { "aria-hidden": "true" });
5241
+ };
5222
5242
  var Table = React37.forwardRef(
5223
5243
  (_a, ref) => {
5224
5244
  var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
@@ -5257,16 +5277,41 @@ var TableHeader = React37.forwardRef((_a, ref) => {
5257
5277
  );
5258
5278
  });
5259
5279
  TableHeader.displayName = "TableHeader";
5260
- var TableHead = React37.forwardRef((_a, ref) => {
5261
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5262
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5263
- "th",
5264
- __spreadValues({
5265
- ref,
5266
- className: cn("px-4 py-5 leading-[21px] font-bold", className)
5267
- }, props)
5268
- );
5269
- });
5280
+ var TableHead = React37.forwardRef(
5281
+ (_a, ref) => {
5282
+ var _b = _a, { className, align, sortDirection, onSort, children } = _b, props = __objRest(_b, ["className", "align", "sortDirection", "onSort", "children"]);
5283
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5284
+ "th",
5285
+ __spreadProps(__spreadValues({
5286
+ ref,
5287
+ "aria-sort": onSort ? ariaSortFor(sortDirection) : void 0,
5288
+ className: cn(
5289
+ "px-4 py-5 leading-[21px] font-bold",
5290
+ alignVariants2({ align }),
5291
+ className
5292
+ )
5293
+ }, props), {
5294
+ children: onSort ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5295
+ "button",
5296
+ {
5297
+ type: "button",
5298
+ onClick: onSort,
5299
+ className: cn(
5300
+ "inline-flex min-h-6 items-center gap-2 rounded-xs font-bold",
5301
+ "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current",
5302
+ "[&>svg]:h-3.5 [&>svg]:w-3.5 [&>svg]:shrink-0",
5303
+ align === "right" && "flex-row-reverse"
5304
+ ),
5305
+ children: [
5306
+ children,
5307
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SortIcon, { direction: sortDirection })
5308
+ ]
5309
+ }
5310
+ ) : children
5311
+ })
5312
+ );
5313
+ }
5314
+ );
5270
5315
  TableHead.displayName = "TableHead";
5271
5316
  var TableBody = React37.forwardRef(
5272
5317
  (_a, ref) => {
@@ -5281,25 +5326,57 @@ var TableBody = React37.forwardRef(
5281
5326
  }
5282
5327
  );
5283
5328
  TableBody.displayName = "TableBody";
5284
- var TableRow = React37.forwardRef((_a, ref) => {
5285
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5286
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5287
- "tr",
5288
- __spreadValues({
5289
- ref,
5290
- className: cn(
5291
- "h-[50px] self-stretch items-center gap-2 font-normal text-left",
5292
- className
5293
- )
5294
- }, props)
5295
- );
5296
- });
5329
+ var TableRow = React37.forwardRef(
5330
+ (_a, ref) => {
5331
+ var _b = _a, { className, selected } = _b, props = __objRest(_b, ["className", "selected"]);
5332
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5333
+ "tr",
5334
+ __spreadValues({
5335
+ ref,
5336
+ "data-state": selected ? "selected" : void 0,
5337
+ className: cn(
5338
+ "h-[50px] self-stretch items-center gap-2 font-normal text-left",
5339
+ "data-[state=selected]:bg-background-alt",
5340
+ "dark:data-[state=selected]:bg-background-alt-dark",
5341
+ className
5342
+ )
5343
+ }, props)
5344
+ );
5345
+ }
5346
+ );
5297
5347
  TableRow.displayName = "TableRow";
5298
- var TableCell = React37.forwardRef((_a, ref) => {
5299
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5300
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", __spreadValues({ ref, className: cn("p-4", className) }, props));
5301
- });
5348
+ var TableCell = React37.forwardRef(
5349
+ (_a, ref) => {
5350
+ var _b = _a, { className, align } = _b, props = __objRest(_b, ["className", "align"]);
5351
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5352
+ "td",
5353
+ __spreadValues({
5354
+ ref,
5355
+ className: cn("p-4", alignVariants2({ align }), className)
5356
+ }, props)
5357
+ );
5358
+ }
5359
+ );
5302
5360
  TableCell.displayName = "TableCell";
5361
+ var TableEmpty = React37.forwardRef(
5362
+ (_a, ref) => {
5363
+ var _b = _a, { className, children = "No results." } = _b, props = __objRest(_b, ["className", "children"]);
5364
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5365
+ TableCell,
5366
+ __spreadProps(__spreadValues({
5367
+ ref,
5368
+ align: "center",
5369
+ className: cn(
5370
+ "h-24 text-foreground-muted dark:text-foreground-muted-dark",
5371
+ className
5372
+ )
5373
+ }, props), {
5374
+ children
5375
+ })
5376
+ ) });
5377
+ }
5378
+ );
5379
+ TableEmpty.displayName = "TableEmpty";
5303
5380
  var TableCaption = React37.forwardRef((_a, ref) => {
5304
5381
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5305
5382
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("caption", __spreadValues({ ref, className: cn("mt-4", className) }, props));
@@ -6132,6 +6209,7 @@ __reExport(index_exports, assets_exports, module.exports);
6132
6209
  TableBody,
6133
6210
  TableCaption,
6134
6211
  TableCell,
6212
+ TableEmpty,
6135
6213
  TableFooter,
6136
6214
  TableHead,
6137
6215
  TableHeader,