welcome-ui 10.5.1 → 10.6.1
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/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_1u48q_2{width:100%;overflow:hidden;border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}._content_1u48q_8{width:100%;overflow-x:auto}._content_1u48q_8 table{--borderWidth: var(--table-cell-border-width);--borderColorChecked: var(--table-cell-color-border-checked);width:100%;border-collapse:collapse}._content_1u48q_8 table tr{font-family:var(--font-family-body);font-size:var(--font-size-sm);border-bottom-color:var(--table-cell-color-border-default);border-bottom-width:var(--borderWidth);border-bottom-style:solid}._content_1u48q_8 table tr[data-clickable=true]{cursor:pointer}._content_1u48q_8 table tr[data-clickable=true]:hover{border-top-width:var(--borderWidth);border-top-style:solid;background-color:var(--table-cell-color-background-hover);border-color:var(--borderColorChecked)}._content_1u48q_8 table th,._content_1u48q_8 table td{padding:var(--table-cell-padding);text-align:left}._content_1u48q_8 table th:has(>[aria-checked]:only-child),._content_1u48q_8 table td:has(>[aria-checked]:only-child){max-width:var(--table-cell-size-checkbox)}._content_1u48q_8 table thead{background-color:var(--table-header-color-background-warm)}._content_1u48q_8 table thead th{line-height:var(--font-line-height-xs);font-weight:var(--font-weight-medium)}._content_1u48q_8 table tbody tr{line-height:var(--font-line-height-md);font-weight:var(--font-weight-regular)}._content_1u48q_8 table tbody tr[aria-selected=true]{background-color:var(--table-cell-color-background-checked);border-bottom-width:0}._content_1u48q_8 table tbody tr[aria-selected=true]:not(tr[aria-selected=true]+tr[aria-selected=true]){border-top-width:var(--borderWidth);border-top-color:var(--borderColorChecked)}._content_1u48q_8 table tbody tr[aria-selected=true]:not(:has(+tr[aria-selected=true])){border-bottom-width:var(--borderWidth);border-bottom-color:var(--borderColorChecked)}._content_1u48q_8 table:has(tbody tr[data-clickable=true]:first-child:hover) thead tr,._content_1u48q_8 table:has(tbody tr:first-child[aria-selected=true]) thead tr{border-bottom-width:0}._content_1u48q_8 table tr:has(+tr[data-clickable=true]:hover),._content_1u48q_8 table tr:has(+tr[aria-selected=true]){border-bottom-width:0}._withColumnDivider_1u48q_73 table tbody td{border-right-color:var(--table-cell-color-border-default);border-right-width:var(--table-cell-border-width);border-right-style:solid}._withColumnDivider_1u48q_73 table tbody td:last-child{border-right:none}}
|
package/dist/Table.js
CHANGED
|
@@ -1,47 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Table.css';
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { c as
|
|
6
|
-
const
|
|
7
|
-
root:
|
|
8
|
-
content:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"variant-success": "_variant-success_14phd_62",
|
|
13
|
-
"variant-info": "_variant-info_14phd_66",
|
|
14
|
-
indent: y
|
|
15
|
-
}, r = T(N), o = p(
|
|
16
|
-
({ children: a, className: e, indent: n, ...s }, b) => /* @__PURE__ */ t("div", { className: r("root", e), ref: b, ...s, children: /* @__PURE__ */ t("div", { className: r("content", n && "indent"), children: /* @__PURE__ */ t("table", { children: a }) }) })
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as b } from "react";
|
|
5
|
+
import { c as u } from "./index-B6iGEm-i.js";
|
|
6
|
+
const h = "_root_1u48q_2", p = "_content_1u48q_8", y = "_withColumnDivider_1u48q_73", N = {
|
|
7
|
+
root: h,
|
|
8
|
+
content: p,
|
|
9
|
+
withColumnDivider: y
|
|
10
|
+
}, s = u(N), n = b(
|
|
11
|
+
({ children: t, className: a, withColumnDivider: o = !1, ...m }, T) => /* @__PURE__ */ e("div", { className: s("root", a), ref: T, ...m, children: /* @__PURE__ */ e("div", { className: s("content", o && "withColumnDivider"), children: /* @__PURE__ */ e("table", { children: t }) }) })
|
|
17
12
|
);
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const i = (
|
|
13
|
+
n.displayName = "Table";
|
|
14
|
+
const r = (t) => /* @__PURE__ */ e("tbody", { ...t });
|
|
15
|
+
r.displayName = "Table.Tbody";
|
|
16
|
+
const l = (t) => /* @__PURE__ */ e("th", { ...t });
|
|
17
|
+
l.displayName = "Table.Th";
|
|
18
|
+
const i = (t) => /* @__PURE__ */ e("thead", { ...t });
|
|
24
19
|
i.displayName = "Table.Thead";
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
_.displayName = "Table.Tr";
|
|
36
|
-
const k = Object.assign(o, {
|
|
37
|
-
Tbody: c,
|
|
38
|
-
Td: l,
|
|
39
|
-
Th: d,
|
|
20
|
+
const c = (t) => /* @__PURE__ */ e("td", { ...t });
|
|
21
|
+
c.displayName = "Table.Td";
|
|
22
|
+
const d = ({ className: t, onClick: a, ...o }) => /* @__PURE__ */ e("tr", { className: t, "data-clickable": !!a, onClick: a, ...o });
|
|
23
|
+
d.displayName = "Table.Tr";
|
|
24
|
+
const w = Object.assign(n, {
|
|
25
|
+
Tbody: r,
|
|
26
|
+
Td: c,
|
|
27
|
+
Th: l,
|
|
40
28
|
Thead: i,
|
|
41
|
-
Tr:
|
|
29
|
+
Tr: d
|
|
42
30
|
});
|
|
43
31
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
w as Table,
|
|
33
|
+
n as TableComponent,
|
|
46
34
|
N as tableClasses
|
|
47
35
|
};
|
|
@@ -20,7 +20,7 @@ export declare const Table: import('react').ForwardRefExoticComponent<Omit<Table
|
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
22
|
Tr: {
|
|
23
|
-
({ className, onClick,
|
|
23
|
+
({ className, onClick, ...rest }: TableTrProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
displayName: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -3,18 +3,14 @@ export type TableProps = ComponentPropsWithRef<'div'> & HTMLAttributes<HTMLDivEl
|
|
|
3
3
|
export type TableTrProps = ComponentPropsWithoutRef<'tr'> & HTMLAttributes<HTMLTableRowElement> & TableTrOptions;
|
|
4
4
|
interface TableOptions {
|
|
5
5
|
/**
|
|
6
|
-
* Add
|
|
6
|
+
* Add vertical divider between columns
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
withColumnDivider?: boolean;
|
|
9
9
|
}
|
|
10
10
|
interface TableTrOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Change the cursor to pointer to indicate the row is clickable
|
|
13
13
|
*/
|
|
14
14
|
onClick?: (props?: unknown) => void;
|
|
15
|
-
/**
|
|
16
|
-
* Change the background color of the row to represent a specific state
|
|
17
|
-
*/
|
|
18
|
-
variant?: 'danger' | 'info' | 'success' | 'warning';
|
|
19
15
|
}
|
|
20
16
|
export {};
|