@blakesteve/roster 4.2.0 → 4.3.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.
@@ -38,7 +38,13 @@ export interface AvatarStripProps {
38
38
  /**
39
39
  * Tailwind class that sets the ring color around each avatar and the overflow chip.
40
40
  * Should match the background the strip is rendered on to produce the cutout stack effect.
41
- * Default: `"ring-white dark:ring-gray-900"`.
41
+ *
42
+ * Pass your own classes unprefixed, exactly as you write them in your app —
43
+ * they land in your `utilities` layer and win, which is the point of the prop.
44
+ * Only Roster's default carries the `rst:` prefix, so a host that happens to
45
+ * use `ring-white` itself cannot silently repaint the strip.
46
+ *
47
+ * Default: `"rst:ring-white rst:dark:ring-gray-900"`.
42
48
  */
43
49
  ringClass?: string;
44
50
  /** Extra classes applied to the outermost `<div>`. */
@@ -1,4 +1,4 @@
1
1
  export declare const actionBarVariants: (props?: ({
2
2
  variant?: "primary" | "default" | "soft" | "transparent" | null | undefined;
3
- position?: "static" | "top" | "bottom" | null | undefined;
3
+ position?: "bottom" | "top" | "static" | null | undefined;
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -27,7 +27,7 @@ export interface NavbarProps extends React.HTMLAttributes<HTMLElement>, VariantP
27
27
  logoSize?: string | number;
28
28
  /**
29
29
  * Classes applied to the logo image. Replaces the default rounding, so a
30
- * circular mark can pass `"rounded-full"` and a square one `""`.
30
+ * circular mark can pass `"rst:rounded-full"` and a square one `""`.
31
31
  */
32
32
  logoClassName?: string;
33
33
  brandName: string;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-Cqm_mtRS.cjs"),p=require("react"),n=require("@tanstack/react-table"),a=require("./utils-D2U2F80P.cjs"),R=n.tableFeatures({rowSortingFeature:n.rowSortingFeature,rowPaginationFeature:n.rowPaginationFeature,sortedRowModel:n.createSortedRowModel(),paginatedRowModel:n.createPaginatedRowModel(),sortFns:n.sortFns});function f({columns:r,data:i,className:l,tableClassName:x,paginationClassName:c,variant:u="default",size:g="md",hoverable:m=!1}){const[d,j]=p.useState([]),t=n.useTable({features:R,data:i,columns:r,onSortingChange:j,state:{sorting:d},initialState:{pagination:{pageIndex:0,pageSize:10}}});return e.jsxRuntimeExports.jsxs("div",{className:a.cn("flex flex-col 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(o=>e.jsxRuntimeExports.jsx(e.TableRow,{children:o.headers.map(s=>e.jsxRuntimeExports.jsx(e.TableHead,{children:s.isPlaceholder?null:e.jsxRuntimeExports.jsxs("div",{className:a.cn("flex items-center gap-2 transition-opacity",s.column.getCanSort()&&"cursor-pointer select-none opacity-80 hover:opacity-100"),onClick:s.column.getToggleSortingHandler(),children:[n.flexRender(s.column.columnDef.header,s.getContext()),s.column.getCanSort()&&e.jsxRuntimeExports.jsx("span",{className:"w-4 flex justify-center 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))},o.id))}),e.jsxRuntimeExports.jsx(e.TableBody,{children:t.getRowModel().rows?.length?t.getRowModel().rows.map(o=>e.jsxRuntimeExports.jsx(e.TableRow,{children:o.getAllCells().map(s=>e.jsxRuntimeExports.jsx(e.TableCell,{children:n.flexRender(s.column.columnDef.cell,s.getContext())},s.id))},o.id)):e.jsxRuntimeExports.jsx(e.TableRow,{children:e.jsxRuntimeExports.jsx(e.TableCell,{colSpan:r.length,className:"h-24 text-center text-gray-500 dark:text-gray-400 italic",children:"No results found."})})})]}),e.jsxRuntimeExports.jsxs("div",{className:a.cn("flex flex-col sm:flex-row items-center justify-between gap-4 px-2",c),children:[e.jsxRuntimeExports.jsxs("div",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:["Page"," ",e.jsxRuntimeExports.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:t.state.pagination.pageIndex+1})," ","of"," ",e.jsxRuntimeExports.jsx("strong",{className:"text-gray-900 dark:text-gray-100",children:t.getPageCount()})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center 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;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-B3KkU-Bc.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: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;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { j as e, T as C, a as S, b as o, c as P, F as s, f as w, d as y, e as v, g as c, B as l, h as N, i as R, k as T, l as k } from "./Table-BaJ8qfrV.js";
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-CJZFk__H.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
- import { c as i } from "./utils-DtaLkIY8.js";
5
+ import { c as o } from "./utils-hNxf9HpA.js";
6
6
  const B = I({
7
7
  rowSortingFeature: z,
8
8
  rowPaginationFeature: M,
@@ -13,7 +13,7 @@ const B = I({
13
13
  sortFns: A
14
14
  });
15
15
  function J({
16
- columns: r,
16
+ columns: i,
17
17
  data: d,
18
18
  className: x,
19
19
  tableClassName: m,
@@ -22,10 +22,10 @@ function J({
22
22
  size: f = "md",
23
23
  hoverable: j = !1
24
24
  }) {
25
- const [h, b] = F([]), a = H({
25
+ const [h, b] = F([]), t = H({
26
26
  features: B,
27
27
  data: d,
28
- columns: r,
28
+ columns: i,
29
29
  onSortingChange: b,
30
30
  state: {
31
31
  sorting: h
@@ -37,7 +37,7 @@ function J({
37
37
  }
38
38
  }
39
39
  });
40
- return /* @__PURE__ */ e.jsxs("div", { className: i("flex flex-col gap-4", x), children: [
40
+ return /* @__PURE__ */ e.jsxs("div", { className: o("rst:flex rst:flex-col rst:gap-4", x), children: [
41
41
  /* @__PURE__ */ e.jsxs(
42
42
  C,
43
43
  {
@@ -46,33 +46,33 @@ function J({
46
46
  hoverable: j,
47
47
  className: m,
48
48
  children: [
49
- /* @__PURE__ */ e.jsx(S, { children: a.getHeaderGroups().map((n) => /* @__PURE__ */ e.jsx(o, { children: n.headers.map((t) => /* @__PURE__ */ e.jsx(P, { children: t.isPlaceholder ? null : /* @__PURE__ */ e.jsxs(
49
+ /* @__PURE__ */ e.jsx(S, { children: t.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(l, { children: r.headers.map((s) => /* @__PURE__ */ e.jsx(P, { children: s.isPlaceholder ? null : /* @__PURE__ */ e.jsxs(
50
50
  "div",
51
51
  {
52
- className: i(
53
- "flex items-center gap-2 transition-opacity",
54
- t.column.getCanSort() && "cursor-pointer select-none opacity-80 hover:opacity-100"
52
+ className: o(
53
+ "rst:flex rst:items-center rst:gap-2 rst:transition-opacity",
54
+ s.column.getCanSort() && "rst:cursor-pointer rst:select-none rst:opacity-80 rst:hover:opacity-100"
55
55
  ),
56
- onClick: t.column.getToggleSortingHandler(),
56
+ onClick: s.column.getToggleSortingHandler(),
57
57
  children: [
58
58
  g(
59
- t.column.columnDef.header,
60
- t.getContext()
59
+ s.column.columnDef.header,
60
+ s.getContext()
61
61
  ),
62
- t.column.getCanSort() && /* @__PURE__ */ e.jsx("span", { className: "w-4 flex justify-center text-primary-500", children: t.column.getIsSorted() === "asc" ? /* @__PURE__ */ e.jsx(s, { icon: w }) : t.column.getIsSorted() === "desc" ? /* @__PURE__ */ e.jsx(s, { icon: y }) : null })
62
+ s.column.getCanSort() && /* @__PURE__ */ e.jsx("span", { className: "rst:w-4 rst:flex rst:justify-center rst:text-primary-500", children: s.column.getIsSorted() === "asc" ? /* @__PURE__ */ e.jsx(a, { icon: w }) : s.column.getIsSorted() === "desc" ? /* @__PURE__ */ e.jsx(a, { icon: y }) : null })
63
63
  ]
64
64
  }
65
- ) }, t.id)) }, n.id)) }),
66
- /* @__PURE__ */ e.jsx(v, { children: a.getRowModel().rows?.length ? (
65
+ ) }, s.id)) }, r.id)) }),
66
+ /* @__PURE__ */ e.jsx(v, { children: t.getRowModel().rows?.length ? (
67
67
  // No data-state on the row: row selection is not one of the
68
68
  // registered features, and v8's getIsSelected() was always false
69
69
  // here, so React omitted the attribute anyway.
70
- a.getRowModel().rows.map((n) => /* @__PURE__ */ e.jsx(o, { children: n.getAllCells().map((t) => /* @__PURE__ */ e.jsx(c, { children: g(t.column.columnDef.cell, t.getContext()) }, t.id)) }, n.id))
71
- ) : /* @__PURE__ */ e.jsx(o, { children: /* @__PURE__ */ e.jsx(
70
+ t.getRowModel().rows.map((r) => /* @__PURE__ */ e.jsx(l, { children: r.getAllCells().map((s) => /* @__PURE__ */ e.jsx(c, { children: g(s.column.columnDef.cell, s.getContext()) }, s.id)) }, r.id))
71
+ ) : /* @__PURE__ */ e.jsx(l, { children: /* @__PURE__ */ e.jsx(
72
72
  c,
73
73
  {
74
- colSpan: r.length,
75
- className: "h-24 text-center text-gray-500 dark:text-gray-400 italic",
74
+ colSpan: i.length,
75
+ className: "rst:h-24 rst:text-center rst:text-gray-500 rst:dark:text-gray-400 rst:italic",
76
76
  children: "No results found."
77
77
  }
78
78
  ) }) })
@@ -82,67 +82,67 @@ function J({
82
82
  /* @__PURE__ */ e.jsxs(
83
83
  "div",
84
84
  {
85
- className: i(
86
- "flex flex-col sm:flex-row items-center justify-between gap-4 px-2",
85
+ className: o(
86
+ "rst:flex rst:flex-col rst:sm:flex-row rst:items-center rst:justify-between rst:gap-4 rst:px-2",
87
87
  u
88
88
  ),
89
89
  children: [
90
- /* @__PURE__ */ e.jsxs("div", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: [
90
+ /* @__PURE__ */ e.jsxs("div", { className: "rst:text-sm rst:font-medium rst:text-gray-500 rst:dark:text-gray-400", children: [
91
91
  "Page",
92
92
  " ",
93
- /* @__PURE__ */ e.jsx("strong", { className: "text-gray-900 dark:text-gray-100", children: a.state.pagination.pageIndex + 1 }),
93
+ /* @__PURE__ */ e.jsx("strong", { className: "rst:text-gray-900 rst:dark:text-gray-100", children: t.state.pagination.pageIndex + 1 }),
94
94
  " ",
95
95
  "of",
96
96
  " ",
97
- /* @__PURE__ */ e.jsx("strong", { className: "text-gray-900 dark:text-gray-100", children: a.getPageCount() })
97
+ /* @__PURE__ */ e.jsx("strong", { className: "rst:text-gray-900 rst:dark:text-gray-100", children: t.getPageCount() })
98
98
  ] }),
99
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
99
+ /* @__PURE__ */ e.jsxs("div", { className: "rst:flex rst:items-center rst:space-x-2", children: [
100
100
  /* @__PURE__ */ e.jsx(
101
- l,
101
+ n,
102
102
  {
103
103
  variant: "outline",
104
104
  colorScheme: "neutral",
105
105
  size: "sm",
106
- onClick: () => a.setPageIndex(0),
107
- disabled: !a.getCanPreviousPage(),
106
+ onClick: () => t.setPageIndex(0),
107
+ disabled: !t.getCanPreviousPage(),
108
108
  "aria-label": "Go to first page",
109
- children: /* @__PURE__ */ e.jsx(s, { icon: N })
109
+ children: /* @__PURE__ */ e.jsx(a, { icon: N })
110
110
  }
111
111
  ),
112
112
  /* @__PURE__ */ e.jsx(
113
- l,
113
+ n,
114
114
  {
115
115
  variant: "outline",
116
116
  colorScheme: "neutral",
117
117
  size: "sm",
118
- onClick: () => a.previousPage(),
119
- disabled: !a.getCanPreviousPage(),
118
+ onClick: () => t.previousPage(),
119
+ disabled: !t.getCanPreviousPage(),
120
120
  "aria-label": "Go to previous page",
121
- children: /* @__PURE__ */ e.jsx(s, { icon: R })
121
+ children: /* @__PURE__ */ e.jsx(a, { icon: R })
122
122
  }
123
123
  ),
124
124
  /* @__PURE__ */ e.jsx(
125
- l,
125
+ n,
126
126
  {
127
127
  variant: "outline",
128
128
  colorScheme: "neutral",
129
129
  size: "sm",
130
- onClick: () => a.nextPage(),
131
- disabled: !a.getCanNextPage(),
130
+ onClick: () => t.nextPage(),
131
+ disabled: !t.getCanNextPage(),
132
132
  "aria-label": "Go to next page",
133
- children: /* @__PURE__ */ e.jsx(s, { icon: T })
133
+ children: /* @__PURE__ */ e.jsx(a, { icon: T })
134
134
  }
135
135
  ),
136
136
  /* @__PURE__ */ e.jsx(
137
- l,
137
+ n,
138
138
  {
139
139
  variant: "outline",
140
140
  colorScheme: "neutral",
141
141
  size: "sm",
142
- onClick: () => a.setPageIndex(a.getPageCount() - 1),
143
- disabled: !a.getCanNextPage(),
142
+ onClick: () => t.setPageIndex(t.getPageCount() - 1),
143
+ disabled: !t.getCanNextPage(),
144
144
  "aria-label": "Go to last page",
145
- children: /* @__PURE__ */ e.jsx(s, { icon: k })
145
+ children: /* @__PURE__ */ e.jsx(a, { icon: k })
146
146
  }
147
147
  )
148
148
  ] })