@blakesteve/roster 4.5.0 → 4.6.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.
- package/README.md +228 -69
- package/dist/{Table-CyNwj97k.cjs → Table-C8f0KOSf.cjs} +1 -1
- package/dist/{Table-DdLQnzNl.js → Table-DuLc2mEo.js} +5 -5
- package/dist/data-table.cjs.js +1 -1
- package/dist/data-table.es.js +1 -1
- package/dist/roster.cjs.js +2 -2
- package/dist/roster.css +1 -1
- package/dist/roster.es.js +35 -35
- package/package.json +4 -3
|
@@ -1127,11 +1127,11 @@ const dr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, mr = Pn, e
|
|
|
1127
1127
|
compoundVariants: [
|
|
1128
1128
|
// --- SOLID VARIANTS (Bold Backgrounds) ---
|
|
1129
1129
|
{ variant: "solid", colorScheme: "primary", className: "rst:bg-primary-600 rst:text-white rst:hover:bg-primary-700 rst:dark:bg-primary-600 rst:dark:hover:bg-primary-500" },
|
|
1130
|
-
{ variant: "solid", colorScheme: "orange", className: "rst:bg-orange-600 rst:text-white rst:hover:bg-orange-700 rst:dark:bg-orange-600 rst:dark:hover:bg-orange-
|
|
1131
|
-
{ variant: "solid", colorScheme: "teal", className: "rst:bg-teal-600 rst:text-
|
|
1132
|
-
{ variant: "solid", colorScheme: "purple", className: "rst:bg-purple-600 rst:text-white rst:hover:bg-purple-700 rst:dark:bg-purple-600 rst:dark:hover:bg-purple-
|
|
1133
|
-
{ variant: "solid", colorScheme: "amber", className: "rst:bg-amber-400 rst:text-
|
|
1134
|
-
{ variant: "solid", colorScheme: "success", className: "rst:bg-success-600 rst:text-white rst:hover:bg-success-700 rst:dark:bg-success-600 rst:dark:hover:bg-success-
|
|
1130
|
+
{ variant: "solid", colorScheme: "orange", className: "rst:bg-orange-600 rst:text-white rst:hover:bg-orange-700 rst:dark:bg-orange-600 rst:dark:hover:bg-orange-700" },
|
|
1131
|
+
{ variant: "solid", colorScheme: "teal", className: "rst:bg-teal-600 rst:text-gray-950 rst:hover:bg-teal-500 rst:dark:bg-teal-600 rst:dark:hover:bg-teal-500" },
|
|
1132
|
+
{ variant: "solid", colorScheme: "purple", className: "rst:bg-purple-600 rst:text-white rst:hover:bg-purple-700 rst:dark:bg-purple-600 rst:dark:hover:bg-purple-700" },
|
|
1133
|
+
{ variant: "solid", colorScheme: "amber", className: "rst:bg-amber-400 rst:text-gray-950 rst:hover:bg-amber-500 rst:dark:bg-amber-500 rst:dark:hover:bg-amber-400" },
|
|
1134
|
+
{ variant: "solid", colorScheme: "success", className: "rst:bg-success-600 rst:text-white rst:hover:bg-success-700 rst:dark:bg-success-600 rst:dark:hover:bg-success-700" },
|
|
1135
1135
|
{ variant: "solid", colorScheme: "error", className: "rst:bg-error-600 rst:text-white rst:hover:bg-error-700 rst:dark:bg-error-600 rst:dark:hover:bg-error-500" },
|
|
1136
1136
|
{ variant: "solid", colorScheme: "neutral", className: "rst:bg-gray-600 rst:text-white rst:hover:bg-gray-700 rst:dark:bg-gray-600 rst:dark:hover:bg-gray-500" },
|
|
1137
1137
|
// --- SOFT VARIANTS (Crisp Light Mode, Translucent Dark Mode) ---
|
package/dist/data-table.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-C8f0KOSf.cjs"),p=require("react"),r=require("@tanstack/react-table"),o=require("./utils-C7BfXGiM.cjs"),R=r.tableFeatures({rowSortingFeature:r.rowSortingFeature,rowPaginationFeature:r.rowPaginationFeature,sortedRowModel:r.createSortedRowModel(),paginatedRowModel:r.createPaginatedRowModel(),sortFns:r.sortFns});function f({columns:a,data:i,className:l,tableClassName:x,paginationClassName:c,variant:u="default",size:g="md",hoverable:m=!1}){const[d,j]=p.useState([]),t=r.useTable({features:R,data:i,columns:a,onSortingChange:j,state:{sorting:d},initialState:{pagination:{pageIndex:0,pageSize:10}}});return e.jsxRuntimeExports.jsxs("div",{className:o.cn("rst:font-ui rst:flex rst:flex-col rst:gap-4",l),children:[e.jsxRuntimeExports.jsxs(e.Table,{variant:u,size:g,hoverable:m,className:x,children:[e.jsxRuntimeExports.jsx(e.TableHeader,{children:t.getHeaderGroups().map(n=>e.jsxRuntimeExports.jsx(e.TableRow,{children:n.headers.map(s=>e.jsxRuntimeExports.jsx(e.TableHead,{children:s.isPlaceholder?null:e.jsxRuntimeExports.jsxs("div",{className:o.cn("rst:flex rst:items-center rst:gap-2 rst:transition-opacity",s.column.getCanSort()&&"rst:cursor-pointer rst:select-none rst:opacity-80 rst:hover:opacity-100"),onClick:s.column.getToggleSortingHandler(),children:[r.flexRender(s.column.columnDef.header,s.getContext()),s.column.getCanSort()&&e.jsxRuntimeExports.jsx("span",{className:"rst:w-4 rst:flex rst:justify-center rst:text-primary-500",children:s.column.getIsSorted()==="asc"?e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faCaretUp}):s.column.getIsSorted()==="desc"?e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faCaretDown}):null})]})},s.id))},n.id))}),e.jsxRuntimeExports.jsx(e.TableBody,{children:t.getRowModel().rows?.length?t.getRowModel().rows.map(n=>e.jsxRuntimeExports.jsx(e.TableRow,{children:n.getAllCells().map(s=>e.jsxRuntimeExports.jsx(e.TableCell,{children:r.flexRender(s.column.columnDef.cell,s.getContext())},s.id))},n.id)):e.jsxRuntimeExports.jsx(e.TableRow,{children:e.jsxRuntimeExports.jsx(e.TableCell,{colSpan:a.length,className:"rst:h-24 rst:text-center rst:text-gray-500 rst:dark:text-gray-400 rst:italic",children:"No results found."})})})]}),e.jsxRuntimeExports.jsxs("div",{className:o.cn("rst:flex rst:flex-col rst:sm:flex-row rst:items-center rst:justify-between rst:gap-4 rst:px-2",c),children:[e.jsxRuntimeExports.jsxs("div",{className:"rst:text-sm rst:font-medium rst:text-gray-500 rst:dark:text-gray-400",children:["Page"," ",e.jsxRuntimeExports.jsx("strong",{className:"rst:text-gray-900 rst:dark:text-gray-100",children:t.state.pagination.pageIndex+1})," ","of"," ",e.jsxRuntimeExports.jsx("strong",{className:"rst:text-gray-900 rst:dark:text-gray-100",children:t.getPageCount()})]}),e.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:space-x-2",children:[e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.setPageIndex(0),disabled:!t.getCanPreviousPage(),"aria-label":"Go to first page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAnglesLeft})}),e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.previousPage(),disabled:!t.getCanPreviousPage(),"aria-label":"Go to previous page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAngleLeft})}),e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.nextPage(),disabled:!t.getCanNextPage(),"aria-label":"Go to next page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAngleRight})}),e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.setPageIndex(t.getPageCount()-1),disabled:!t.getCanNextPage(),"aria-label":"Go to last page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAnglesRight})})]})]})]})}exports.DataTable=f;
|
package/dist/data-table.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as e, T as C, a as S, b as l, c as P, F as a, f as w, d as y, e as v, g as c, B as n, h as N, i as R, k as T, l as k } from "./Table-
|
|
2
|
+
import { j as e, T as C, a as S, b as l, c as P, F as a, f as w, d as y, e as v, g as c, B as n, h as N, i as R, k as T, l as k } from "./Table-DuLc2mEo.js";
|
|
3
3
|
import { useState as F } from "react";
|
|
4
4
|
import { tableFeatures as I, sortFns as A, rowPaginationFeature as M, rowSortingFeature as z, createPaginatedRowModel as D, createSortedRowModel as G, useTable as H, flexRender as g } from "@tanstack/react-table";
|
|
5
5
|
import { c as o } from "./utils-hNxf9HpA.js";
|