@theguild/components 9.4.1-alpha-20250218181958-5db0b75500f4c639c018b9326e9eed035c6d5708 → 9.4.1-alpha-20250218190401-79df8fd3d45c02241c0a5929c9a967383af76efc
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.
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
scheme?: 'green' | 'neutral';
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* It's exported under the name `ComparisonTable`
|
|
10
|
-
* because we also reexport `Table` from nextra.
|
|
11
|
-
*/
|
|
12
|
-
declare const ComparisonTable: (({ className, scheme, ...props }: ComparisonTableProps) => react_jsx_runtime.JSX.Element) & {
|
|
4
|
+
declare const ComparisonTable: FC<react.DetailedHTMLProps<react.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>> & {
|
|
13
5
|
Row: FC<react.ClassAttributes<HTMLTableRowElement> & react.HTMLAttributes<HTMLTableRowElement> & {
|
|
14
6
|
highlight?: boolean;
|
|
15
7
|
}>;
|
|
@@ -17,4 +9,4 @@ declare const ComparisonTable: (({ className, scheme, ...props }: ComparisonTabl
|
|
|
17
9
|
Cell: FC<react.DetailedHTMLProps<react.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>>;
|
|
18
10
|
};
|
|
19
11
|
|
|
20
|
-
export { ComparisonTable
|
|
12
|
+
export { ComparisonTable };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@theguild/components";
|
|
3
|
-
const Table = ({ className,
|
|
3
|
+
const Table = ({ className, ...props }) => {
|
|
4
4
|
return /* @__PURE__ */ jsx(
|
|
5
5
|
"table",
|
|
6
6
|
{
|
|
7
7
|
className: cn(
|
|
8
|
-
"x:block x:overflow-x-auto nextra-scrollbar overflow-x-auto rounded-2xl border border-
|
|
9
|
-
scheme === "green" && "[--border:theme(colors.green.200)] [--highlight-bg:theme(colors.green.100)]",
|
|
10
|
-
scheme === "neutral" && "[--border:theme(colors.beige.400)] [--highlight-bg:theme(colors.beige.100)] dark:[--border:theme(colors.neutral.800)]",
|
|
8
|
+
"x:block x:overflow-x-auto nextra-scrollbar overflow-x-auto rounded-2xl border border-green-200",
|
|
11
9
|
className
|
|
12
10
|
),
|
|
13
11
|
...props
|
|
@@ -19,20 +17,15 @@ const TableRow = ({
|
|
|
19
17
|
className,
|
|
20
18
|
...props
|
|
21
19
|
}) => {
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
23
|
-
"tr",
|
|
24
|
-
{
|
|
25
|
-
className: cn(
|
|
26
|
-
"bg-[--highlight,var(--highlight-bg)] [--highlight:0]",
|
|
27
|
-
highlight && "[--highlight:initial]",
|
|
28
|
-
className
|
|
29
|
-
),
|
|
30
|
-
...props
|
|
31
|
-
}
|
|
32
|
-
);
|
|
20
|
+
return /* @__PURE__ */ jsx("tr", { className: cn(highlight && "bg-green-100", className), ...props });
|
|
33
21
|
};
|
|
34
22
|
const cellStyle = cn(
|
|
35
|
-
"border border-
|
|
23
|
+
"border border-green-200 p-4 first:border-l-0 last:border-r-0",
|
|
24
|
+
"[tbody_&]:border-b-0 [thead_&]:border-t-0",
|
|
25
|
+
"first:sticky",
|
|
26
|
+
"first:left-0",
|
|
27
|
+
"max-sm:first:drop-shadow-2xl",
|
|
28
|
+
"first:bg-[rgb(var(--nextra-bg))]"
|
|
36
29
|
);
|
|
37
30
|
const TableHeader = ({ className, ...props }) => {
|
|
38
31
|
return /* @__PURE__ */ jsx("th", { className: cn(cellStyle, "font-medium", className), ...props });
|
package/dist/index.d.mts
CHANGED
|
@@ -59,11 +59,6 @@ import 'react-player';
|
|
|
59
59
|
import 'clsx';
|
|
60
60
|
import './types/utility.mjs';
|
|
61
61
|
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated Consider using `ComparisonTable` instead.
|
|
64
|
-
* This name was kept for back-compat, because the public
|
|
65
|
-
* API differs,
|
|
66
|
-
*/
|
|
67
62
|
declare module 'react' {
|
|
68
63
|
interface CSSProperties {
|
|
69
64
|
[key: `--${string}`]: string | number | undefined;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theguild/components",
|
|
3
|
-
"version": "9.4.1-alpha-
|
|
3
|
+
"version": "9.4.1-alpha-20250218190401-79df8fd3d45c02241c0a5929c9a967383af76efc",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/the-guild-org/docs",
|
|
6
6
|
"directory": "packages/components"
|