@gears-frontx/ui-kit 0.4.5 → 0.4.7
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/chunks/actions.iasfkjWq.css +1 -0
- package/dist/chunks/create-column-auto-size.js +62 -0
- package/dist/chunks/create-column-auto-size.js.map +1 -0
- package/dist/chunks/data-grid-record-context.js +13 -0
- package/dist/chunks/data-grid-record-context.js.map +1 -0
- package/dist/chunks/data-grid.DSkYrsay.css +1 -0
- package/dist/chunks/drag-drop.BASVe3_O.css +1 -0
- package/dist/chunks/hooked.js +23 -39
- package/dist/chunks/hooked.js.map +1 -1
- package/dist/chunks/ignore-row-click.js +5 -0
- package/dist/chunks/ignore-row-click.js.map +1 -0
- package/dist/chunks/is-record.js +7 -0
- package/dist/chunks/is-record.js.map +1 -0
- package/dist/chunks/messages.js +30 -3
- package/dist/chunks/messages.js.map +1 -1
- package/dist/chunks/pagination.DJ7HJSFX.css +1 -0
- package/dist/chunks/resolve-body-cell-props.BA5IRWq0.css +1 -0
- package/dist/chunks/resolve-body-cell-props.js +124 -0
- package/dist/chunks/resolve-body-cell-props.js.map +1 -0
- package/dist/chunks/row-actions.BprAXgu2.css +1 -0
- package/dist/chunks/row-click-utils.js +12 -0
- package/dist/chunks/row-click-utils.js.map +1 -0
- package/dist/chunks/row-click.DAYTmSBO.css +1 -0
- package/dist/chunks/row-number.BxFT_3yP.css +1 -0
- package/dist/chunks/row-select.BjKdiMf5.css +1 -0
- package/dist/chunks/segment.js +16 -9
- package/dist/chunks/segment.js.map +1 -1
- package/dist/chunks/storage-helpers.js +40 -0
- package/dist/chunks/storage-helpers.js.map +1 -0
- package/dist/chunks/table-configuration.a6C_fp7B.css +1 -0
- package/dist/chunks/table-context.js +8 -0
- package/dist/chunks/table-context.js.map +1 -0
- package/dist/chunks/table-helpers.js +20 -0
- package/dist/chunks/table-helpers.js.map +1 -0
- package/dist/chunks/table-tree.DMtpMddS.css +1 -0
- package/dist/chunks/table-types.js +11 -0
- package/dist/chunks/table-types.js.map +1 -0
- package/dist/chunks/table.biUlW2U6.css +1 -0
- package/dist/chunks/use-latest.js +11 -0
- package/dist/chunks/use-latest.js.map +1 -0
- package/dist/components/data-grid/data-grid-types.d.ts +9 -0
- package/dist/components/data-grid/data-grid-types.d.ts.map +1 -1
- package/dist/components/data-grid/data-grid.d.ts +1 -1
- package/dist/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/data-grid/messages.d.ts +25 -0
- package/dist/components/data-grid/messages.d.ts.map +1 -1
- package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts +4 -0
- package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions/actions-types.d.ts +11 -0
- package/dist/components/data-grid/plugins/actions/actions-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts +25 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/data-grid-export-menu-item.d.ts +6 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/data-grid-export-menu-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-cells.d.ts +18 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-cells.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-menu-items.d.ts +9 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-menu-items.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-service.d.ts +5 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-service.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-types.d.ts +77 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/export-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/formatters/csv-formatter.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/formatters/csv-formatter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/formatters/excel-formatter.d.ts +4 -0
- package/dist/components/data-grid/plugins/actions-menu/menu-items/export-menu-items/formatters/excel-formatter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/public.d.ts +5 -0
- package/dist/components/data-grid/plugins/actions-menu/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/components/data-grid-drag-drop-body-cell.d.ts +3 -0
- package/dist/components/data-grid/plugins/drag-drop/components/data-grid-drag-drop-body-cell.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/components/data-grid-drag-drop-content.d.ts +7 -0
- package/dist/components/data-grid/plugins/drag-drop/components/data-grid-drag-drop-content.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/components/data-grid-drag-drop-row.d.ts +8 -0
- package/dist/components/data-grid/plugins/drag-drop/components/data-grid-drag-drop-row.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-data.d.ts +4 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-data.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-drop-plugin.d.ts +18 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-drop-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-drop-types.d.ts +60 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-drop-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-preview.d.ts +2 -0
- package/dist/components/data-grid/plugins/drag-drop/drag-preview.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/drag-drop/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/drag-drop/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/pagination/components/data-grid-pagination.d.ts.map +1 -1
- package/dist/components/data-grid/plugins/pagination/components/pager.d.ts +6 -0
- package/dist/components/data-grid/plugins/pagination/components/pager.d.ts.map +1 -1
- package/dist/components/data-grid/plugins/row-actions/components/data-grid-row-actions-cell.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-actions/components/data-grid-row-actions-cell.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-actions/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-actions/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts +6 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts +24 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts +8 -0
- package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-click/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts +14 -0
- package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts +9 -0
- package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-number/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts +4 -0
- package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts +6 -0
- package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts +2 -0
- package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts +5 -0
- package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts +113 -0
- package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts +10 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts +10 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts +8 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-configuration/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts +5 -0
- package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-tree/components/data-grid-table-tree-body-cell-content.d.ts +9 -0
- package/dist/components/data-grid/plugins/table-tree/components/data-grid-table-tree-body-cell-content.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-tree/components/data-grid-table-tree-expand.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-tree/components/data-grid-table-tree-expand.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-tree/components/data-grid-table-tree-row.d.ts +8 -0
- package/dist/components/data-grid/plugins/table-tree/components/data-grid-table-tree-row.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-tree/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-tree/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-tree/table-tree-helpers.d.ts +4 -0
- package/dist/components/data-grid/plugins/table-tree/table-tree-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-tree/table-tree-plugin.d.ts +5 -0
- package/dist/components/data-grid/plugins/table-tree/table-tree-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-tree/table-tree-types.d.ts +33 -0
- package/dist/components/data-grid/plugins/table-tree/table-tree-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/core/data-grid-label-context.d.ts +7 -0
- package/dist/components/data-grid/services/core/data-grid-label-context.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts.map +1 -1
- package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts +2 -0
- package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/components/data-grid-table.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/table-service.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/table-sticky.d.ts +16 -0
- package/dist/components/data-grid/services/table/table-sticky.d.ts.map +1 -1
- package/dist/components/pagination/pagination.d.ts +7 -4
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +20 -3
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/data-grid/actions-menu.d.ts +1 -0
- package/dist/data-grid/actions-menu.js +373 -0
- package/dist/data-grid/actions-menu.js.map +1 -0
- package/dist/data-grid/actions.d.ts +1 -0
- package/dist/data-grid/actions.js +36 -0
- package/dist/data-grid/actions.js.map +1 -0
- package/dist/data-grid/drag-drop.d.ts +1 -0
- package/dist/data-grid/drag-drop.js +261 -0
- package/dist/data-grid/drag-drop.js.map +1 -0
- package/dist/data-grid/filters.js +27 -25
- package/dist/data-grid/filters.js.map +1 -1
- package/dist/data-grid/pagination.js +152 -143
- package/dist/data-grid/pagination.js.map +1 -1
- package/dist/data-grid/row-actions.d.ts +1 -0
- package/dist/data-grid/row-actions.js +52 -0
- package/dist/data-grid/row-actions.js.map +1 -0
- package/dist/data-grid/row-click.d.ts +1 -0
- package/dist/data-grid/row-click.js +62 -0
- package/dist/data-grid/row-click.js.map +1 -0
- package/dist/data-grid/row-number.d.ts +1 -0
- package/dist/data-grid/row-number.js +38 -0
- package/dist/data-grid/row-number.js.map +1 -0
- package/dist/data-grid/row-select.d.ts +1 -0
- package/dist/data-grid/row-select.js +293 -0
- package/dist/data-grid/row-select.js.map +1 -0
- package/dist/data-grid/table-configuration.d.ts +1 -0
- package/dist/data-grid/table-configuration.js +165 -0
- package/dist/data-grid/table-configuration.js.map +1 -0
- package/dist/data-grid/table-tree.d.ts +1 -0
- package/dist/data-grid/table-tree.js +233 -0
- package/dist/data-grid/table-tree.js.map +1 -0
- package/dist/data-grid.js +791 -887
- package/dist/data-grid.js.map +1 -1
- package/dist/docs/data-grid.md +612 -12
- package/dist/docs/pagination.md +14 -0
- package/dist/docs/table.md +67 -3
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +409 -389
- package/dist/index.js.map +1 -1
- package/dist/pagination.js +23 -23
- package/dist/pagination.js.map +1 -1
- package/dist/table.js +137 -135
- package/dist/table.js.map +1 -1
- package/llms.txt +12 -7
- package/package.json +10 -1
- package/dist/chunks/data-grid.DYrZEU-F.css +0 -1
- package/dist/chunks/pagination.CKDEuWt6.css +0 -1
- package/dist/chunks/table.CMm41tvy.css +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/pagination.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsx as i, jsxs as s, Fragment as c } from "react/jsx-runtime";
|
|
2
|
-
import { Button as
|
|
2
|
+
import { Button as N } from "@base-ui/react/button";
|
|
3
3
|
import { cx as o } from "class-variance-authority";
|
|
4
|
-
import { MoreHorizontalIcon as
|
|
5
|
-
import './chunks/pagination.
|
|
6
|
-
pagination:
|
|
4
|
+
import { MoreHorizontalIcon as f, ChevronRightIcon as g, ChevronLeftIcon as y } from "lucide-react";
|
|
5
|
+
import './chunks/pagination.DJ7HJSFX.css';const h = "_pagination_1yypd_16", P = "_content_1yypd_28", x = "_link_1yypd_43", T = "_square_1yypd_126", q = "_previousNextText_1yypd_131", b = "_icon_1yypd_162", k = "_chevron_1yypd_171", C = "_ellipsis_1yypd_177", E = "_srOnly_1yypd_188", a = {
|
|
6
|
+
pagination: h,
|
|
7
7
|
content: P,
|
|
8
8
|
link: x,
|
|
9
9
|
square: T,
|
|
10
|
-
previousNextText:
|
|
11
|
-
icon:
|
|
12
|
-
chevron:
|
|
10
|
+
previousNextText: q,
|
|
11
|
+
icon: b,
|
|
12
|
+
chevron: k,
|
|
13
13
|
ellipsis: C,
|
|
14
14
|
srOnly: E
|
|
15
15
|
}, I = "Previous", O = "Next";
|
|
16
16
|
function l(n) {
|
|
17
17
|
return /* @__PURE__ */ s(c, { children: [
|
|
18
|
-
/* @__PURE__ */ i(
|
|
18
|
+
/* @__PURE__ */ i(y, { className: o(a.icon, a.chevron) }),
|
|
19
19
|
/* @__PURE__ */ i("span", { className: a.previousNextText, children: n })
|
|
20
20
|
] });
|
|
21
21
|
}
|
|
22
22
|
function u(n) {
|
|
23
23
|
return /* @__PURE__ */ s(c, { children: [
|
|
24
24
|
/* @__PURE__ */ i("span", { className: a.previousNextText, children: n }),
|
|
25
|
-
/* @__PURE__ */ i(
|
|
25
|
+
/* @__PURE__ */ i(g, { className: o(a.icon, a.chevron) })
|
|
26
26
|
] });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function p(n) {
|
|
29
29
|
return n.trim() && n !== I ? n : "Go to previous page";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function _(n) {
|
|
32
32
|
return n.trim() && n !== O ? n : "Go to next page";
|
|
33
33
|
}
|
|
34
34
|
function G({ className: n, ...e }) {
|
|
@@ -48,7 +48,7 @@ function M({ className: n, ...e }) {
|
|
|
48
48
|
function R(n) {
|
|
49
49
|
return /* @__PURE__ */ i("li", { ...n });
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function d({ className: n, isActive: e, square: t = !0, ...r }) {
|
|
52
52
|
return /* @__PURE__ */ i(
|
|
53
53
|
"a",
|
|
54
54
|
{
|
|
@@ -65,9 +65,9 @@ function z({
|
|
|
65
65
|
...t
|
|
66
66
|
}) {
|
|
67
67
|
return /* @__PURE__ */ i(
|
|
68
|
-
|
|
68
|
+
d,
|
|
69
69
|
{
|
|
70
|
-
"aria-label":
|
|
70
|
+
"aria-label": p(e),
|
|
71
71
|
square: !1,
|
|
72
72
|
className: o(a.previous, n),
|
|
73
73
|
...t,
|
|
@@ -77,9 +77,9 @@ function z({
|
|
|
77
77
|
}
|
|
78
78
|
function F({ className: n, text: e = "Next", ...t }) {
|
|
79
79
|
return /* @__PURE__ */ i(
|
|
80
|
-
|
|
80
|
+
d,
|
|
81
81
|
{
|
|
82
|
-
"aria-label":
|
|
82
|
+
"aria-label": _(e),
|
|
83
83
|
square: !1,
|
|
84
84
|
className: o(a.next, n),
|
|
85
85
|
...t,
|
|
@@ -92,16 +92,16 @@ function v({
|
|
|
92
92
|
isActive: e,
|
|
93
93
|
square: t = !0,
|
|
94
94
|
type: r = "button",
|
|
95
|
-
...
|
|
95
|
+
...m
|
|
96
96
|
}) {
|
|
97
97
|
return /* @__PURE__ */ i(
|
|
98
|
-
|
|
98
|
+
N,
|
|
99
99
|
{
|
|
100
100
|
type: r,
|
|
101
101
|
"aria-current": e ? "page" : void 0,
|
|
102
102
|
"data-active": e || void 0,
|
|
103
103
|
className: o(a.link, t && a.square, n),
|
|
104
|
-
...
|
|
104
|
+
...m
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
}
|
|
@@ -109,14 +109,14 @@ function H({
|
|
|
109
109
|
text: n = "Previous",
|
|
110
110
|
...e
|
|
111
111
|
}) {
|
|
112
|
-
return /* @__PURE__ */ i(v, { "aria-label":
|
|
112
|
+
return /* @__PURE__ */ i(v, { "aria-label": p(n), square: !1, ...e, children: l(n) });
|
|
113
113
|
}
|
|
114
114
|
function S({ text: n = "Next", ...e }) {
|
|
115
|
-
return /* @__PURE__ */ i(v, { "aria-label":
|
|
115
|
+
return /* @__PURE__ */ i(v, { "aria-label": _(n), square: !1, ...e, children: u(n) });
|
|
116
116
|
}
|
|
117
117
|
function U({ className: n, ...e }) {
|
|
118
118
|
return /* @__PURE__ */ s("span", { "aria-hidden": "true", className: o(a.ellipsis, n), ...e, children: [
|
|
119
|
-
/* @__PURE__ */ i(
|
|
119
|
+
/* @__PURE__ */ i(f, { className: a.icon }),
|
|
120
120
|
/* @__PURE__ */ i("span", { className: a.srOnly, children: "More pages" })
|
|
121
121
|
] });
|
|
122
122
|
}
|
|
@@ -126,7 +126,7 @@ export {
|
|
|
126
126
|
M as PaginationContent,
|
|
127
127
|
U as PaginationEllipsis,
|
|
128
128
|
R as PaginationItem,
|
|
129
|
-
|
|
129
|
+
d as PaginationLink,
|
|
130
130
|
F as PaginationNext,
|
|
131
131
|
S as PaginationNextButton,
|
|
132
132
|
z as PaginationPrevious,
|
package/dist/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cx } from 'class-variance-authority';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\nimport type { ComponentProps } from 'react';\n\nimport styles from './pagination.module.css';\n\n// The default label of each direction, as the name helpers below compare it.\n// The four parts write the same words as the literal default of their `text`\n// prop and not as these constants, on purpose: the contract compiler reads a\n// prop's default from a literal in the destructured parameter and drops it,\n// with a `cannot_extract` note, from one that goes through a constant (tried:\n// `text.default` vanished from four contracts, two of them already shipped).\n// pagination.test.tsx renders every part without `text` and asserts the\n// page-describing name, which is what fails if a literal and a constant part.\nconst PREVIOUS_TEXT = 'Previous';\nconst NEXT_TEXT = 'Next';\n\n// The visible content and the accessible name of the previous/next parts,\n// shared by the anchor and the button forms so the four cannot drift. The\n// chevrons carry `styles.chevron`: it is what mirrors them under a\n// right-to-left direction.\nfunction previousContent(text: string) {\n return (\n <>\n <ChevronLeftIcon className={cx(styles.icon, styles.chevron)} />\n <span className={styles.previousNextText}>{text}</span>\n </>\n );\n}\n\nfunction nextContent(text: string) {\n return (\n <>\n <span className={styles.previousNextText}>{text}</span>\n <ChevronRightIcon className={cx(styles.icon, styles.chevron)} />\n </>\n );\n}\n\n// The default text keeps the longer name that says which page it goes to. A\n// custom text IS the name: the label is hidden below 640px and the chevron is\n// decorative, so a fixed name would leave the words on screen out of it (and\n// out of a voice-control user's reach). An empty or blank text hides the label,\n// which is the icon-only form, so it keeps the default name rather than none (a\n// whitespace-only aria-label is ignored by the accessible name computation).\nfunction previousLabel(text: string) {\n return text.trim() && text !== PREVIOUS_TEXT ? text : 'Go to previous page';\n}\n\nfunction nextLabel(text: string) {\n return text.trim() && text !== NEXT_TEXT ? text : 'Go to next page';\n}\n\nexport type PaginationProps = ComponentProps<'nav'>;\n\nexport function Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cx(styles.pagination, className)}\n {...props}\n />\n );\n}\n\nexport type PaginationContentProps = ComponentProps<'ul'>;\n\nexport function PaginationContent({ className, ...props }: PaginationContentProps) {\n return <ul className={cx(styles.content, className)} {...props} />;\n}\n\nexport type PaginationItemProps = ComponentProps<'li'>;\n\nexport function PaginationItem(props: PaginationItemProps) {\n return <li {...props} />;\n}\n\nexport interface PaginationLinkProps extends Omit<ComponentProps<'a'>, 'className'> {\n className?: string;\n isActive?: boolean;\n /**\n * Square, icon-sized footprint (aspect-ratio 1, no horizontal padding) —\n * the common case for a bare page number, matching upstream's\n * `size=\"icon\"` default. `PaginationPrevious`/`PaginationNext` opt out\n * (`square={false}`): they carry an icon AND a text label side by side,\n * so a fixed-width square would clip the label.\n * @default true\n */\n square?: boolean;\n}\n\nexport function PaginationLink({ className, isActive, square = true, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n className={cx(styles.link, square && styles.square, className)}\n {...props}\n />\n );\n}\n\nexport interface PaginationPreviousProps extends Omit<PaginationLinkProps, 'square'> {\n /** Label text, hidden below the `sm` breakpoint (640px) — matching\n * upstream's `hidden sm:block`. Also the accessible name when given, since\n * the label is hidden at that width. @default 'Previous' */\n text?: string;\n}\n\nexport function PaginationPrevious({\n className,\n text = 'Previous',\n ...props\n}: PaginationPreviousProps) {\n return (\n <PaginationLink\n aria-label={previousLabel(text)}\n square={false}\n className={cx(styles.previous, className)}\n {...props}\n >\n {previousContent(text)}\n </PaginationLink>\n );\n}\n\nexport interface PaginationNextProps extends Omit<PaginationLinkProps, 'square'> {\n /** Also the accessible name when given. @default 'Next' */\n text?: string;\n}\n\nexport function PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink\n aria-label={nextLabel(text)}\n square={false}\n className={cx(styles.next, className)}\n {...props}\n >\n {nextContent(text)}\n </PaginationLink>\n );\n}\n\n/*\n * The button forms: the same items for state-driven paging, where a page\n * change is a state update and has no URL of its own. They are separate\n * parts rather than a `render`/`as` on the link because PaginationLink's\n * contract promises a real anchor (see pagination-link.contract.yaml); a\n * button part keeps that promise intact and shares every class with it, so\n * the two forms paint identically.\n */\nexport interface PaginationButtonProps extends Omit<ComponentProps<'button'>, 'className'> {\n className?: string;\n /** Marks the page in view: sets `aria-current=\"page\"` and the active\n * paint, same as PaginationLink's. */\n isActive?: boolean;\n /** Same square footprint as PaginationLink's. @default true */\n square?: boolean;\n /**\n * Keep the button in the tab order while `disabled`, reporting\n * `aria-disabled` instead of the native attribute. Without it a button that\n * holds keyboard focus when it becomes disabled (Previous, paged down to the\n * first page) is blurred by the browser and focus falls to the page. Same\n * name and meaning as Button's, which this renders through the same Base UI\n * primitive.\n * @default false\n */\n focusableWhenDisabled?: boolean;\n}\n\nexport function PaginationButton({\n className,\n isActive,\n square = true,\n type = 'button',\n ...props\n}: PaginationButtonProps) {\n return (\n <ButtonPrimitive\n type={type}\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n className={cx(styles.link, square && styles.square, className)}\n {...props}\n />\n );\n}\n\nexport interface PaginationPreviousButtonProps extends Omit<PaginationButtonProps, 'square' | 'isActive'> {\n /** Label text, hidden below the `sm` breakpoint (640px). Also the\n * accessible name when given. @default 'Previous' */\n text?: string;\n}\n\nexport function PaginationPreviousButton({\n text = 'Previous',\n ...props\n}: PaginationPreviousButtonProps) {\n return (\n <PaginationButton aria-label={previousLabel(text)} square={false} {...props}>\n {previousContent(text)}\n </PaginationButton>\n );\n}\n\nexport interface PaginationNextButtonProps extends Omit<PaginationButtonProps, 'square' | 'isActive'> {\n /** Also the accessible name when given. @default 'Next' */\n text?: string;\n}\n\nexport function PaginationNextButton({ text = 'Next', ...props }: PaginationNextButtonProps) {\n return (\n <PaginationButton aria-label={nextLabel(text)} square={false} {...props}>\n {nextContent(text)}\n </PaginationButton>\n );\n}\n\nexport type PaginationEllipsisProps = ComponentProps<'span'>;\n\nexport function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span aria-hidden=\"true\" className={cx(styles.ellipsis, className)} {...props}>\n <MoreHorizontalIcon className={styles.icon} />\n <span className={styles.srOnly}>More pages</span>\n </span>\n );\n}\n"],"names":["PREVIOUS_TEXT","NEXT_TEXT","previousContent","text","jsxs","Fragment","jsx","ChevronLeftIcon","cx","styles","nextContent","ChevronRightIcon","previousLabel","nextLabel","Pagination","className","props","PaginationContent","PaginationItem","PaginationLink","isActive","square","PaginationPrevious","PaginationNext","PaginationButton","type","ButtonPrimitive","PaginationPreviousButton","PaginationNextButton","PaginationEllipsis","MoreHorizontalIcon"],"mappings":";;;;;;;;;;;;;;GAeMA,IAAgB,YAChBC,IAAY;AAMlB,SAASC,EAAgBC,GAAc;AACrC,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAgB,WAAWC,EAAGC,EAAO,MAAMA,EAAO,OAAO,GAAG;AAAA,IAC7D,gBAAAH,EAAC,QAAA,EAAK,WAAWG,EAAO,kBAAmB,UAAAN,EAAA,CAAK;AAAA,EAAA,GAClD;AAEJ;AAEA,SAASO,EAAYP,GAAc;AACjC,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAA,EAAK,WAAWG,EAAO,kBAAmB,UAAAN,GAAK;AAAA,IAChD,gBAAAG,EAACK,KAAiB,WAAWH,EAAGC,EAAO,MAAMA,EAAO,OAAO,EAAA,CAAG;AAAA,EAAA,GAChE;AAEJ;AAQA,SAASG,EAAcT,GAAc;AACnC,SAAOA,EAAK,KAAA,KAAUA,MAASH,IAAgBG,IAAO;AACxD;AAEA,SAASU,EAAUV,GAAc;AAC/B,SAAOA,EAAK,KAAA,KAAUA,MAASF,IAAYE,IAAO;AACpD;AAIO,SAASW,EAAW,EAAE,WAAAC,GAAW,GAAGC,KAA0B;AACnE,SACE,gBAAAV;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAWE,EAAGC,EAAO,YAAYM,CAAS;AAAA,MACzC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAIO,SAASC,EAAkB,EAAE,WAAAF,GAAW,GAAGC,KAAiC;AACjF,SAAO,gBAAAV,EAAC,QAAG,WAAWE,EAAGC,EAAO,SAASM,CAAS,GAAI,GAAGC,GAAO;AAClE;AAIO,SAASE,EAAeF,GAA4B;AACzD,SAAO,gBAAAV,EAAC,MAAA,EAAI,GAAGU,EAAA,CAAO;AACxB;AAgBO,SAASG,EAAe,EAAE,WAAAJ,GAAW,UAAAK,GAAU,QAAAC,IAAS,IAAM,GAAGL,KAA8B;AACpG,SACE,gBAAAV;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,gBAAcc,IAAW,SAAS;AAAA,MAClC,eAAaA,KAAY;AAAA,MACzB,WAAWZ,EAAGC,EAAO,MAAMY,KAAUZ,EAAO,QAAQM,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AASO,SAASM,EAAmB;AAAA,EACjC,WAAAP;AAAA,EACA,MAAAZ,IAAO;AAAA,EACP,GAAGa;AACL,GAA4B;AAC1B,SACE,gBAAAV;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,cAAYP,EAAcT,CAAI;AAAA,MAC9B,QAAQ;AAAA,MACR,WAAWK,EAAGC,EAAO,UAAUM,CAAS;AAAA,MACvC,GAAGC;AAAA,MAEH,YAAgBb,CAAI;AAAA,IAAA;AAAA,EAAA;AAG3B;AAOO,SAASoB,EAAe,EAAE,WAAAR,GAAW,MAAAZ,IAAO,QAAQ,GAAGa,KAA8B;AAC1F,SACE,gBAAAV;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,cAAYN,EAAUV,CAAI;AAAA,MAC1B,QAAQ;AAAA,MACR,WAAWK,EAAGC,EAAO,MAAMM,CAAS;AAAA,MACnC,GAAGC;AAAA,MAEH,YAAYb,CAAI;AAAA,IAAA;AAAA,EAAA;AAGvB;AA6BO,SAASqB,EAAiB;AAAA,EAC/B,WAAAT;AAAA,EACA,UAAAK;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,MAAAI,IAAO;AAAA,EACP,GAAGT;AACL,GAA0B;AACxB,SACE,gBAAAV;AAAA,IAACoB;AAAAA,IAAA;AAAA,MACC,MAAAD;AAAA,MACA,gBAAcL,IAAW,SAAS;AAAA,MAClC,eAAaA,KAAY;AAAA,MACzB,WAAWZ,EAAGC,EAAO,MAAMY,KAAUZ,EAAO,QAAQM,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAQO,SAASW,EAAyB;AAAA,EACvC,MAAAxB,IAAO;AAAA,EACP,GAAGa;AACL,GAAkC;AAChC,SACE,gBAAAV,EAACkB,GAAA,EAAiB,cAAYZ,EAAcT,CAAI,GAAG,QAAQ,IAAQ,GAAGa,GACnE,UAAAd,EAAgBC,CAAI,EAAA,CACvB;AAEJ;AAOO,SAASyB,EAAqB,EAAE,MAAAzB,IAAO,QAAQ,GAAGa,KAAoC;AAC3F,SACE,gBAAAV,EAACkB,GAAA,EAAiB,cAAYX,EAAUV,CAAI,GAAG,QAAQ,IAAQ,GAAGa,GAC/D,UAAAN,EAAYP,CAAI,EAAA,CACnB;AAEJ;AAIO,SAAS0B,EAAmB,EAAE,WAAAd,GAAW,GAAGC,KAAkC;AACnF,SACE,gBAAAZ,EAAC,QAAA,EAAK,eAAY,QAAO,WAAWI,EAAGC,EAAO,UAAUM,CAAS,GAAI,GAAGC,GACtE,UAAA;AAAA,IAAA,gBAAAV,EAACwB,GAAA,EAAmB,WAAWrB,EAAO,KAAA,CAAM;AAAA,IAC5C,gBAAAH,EAAC,QAAA,EAAK,WAAWG,EAAO,QAAQ,UAAA,aAAA,CAAU;AAAA,EAAA,GAC5C;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"pagination.js","sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cx } from 'class-variance-authority';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\nimport type { ComponentProps } from 'react';\n\nimport styles from './pagination.module.css';\n\n// The default label of each direction, as the name helpers below compare it.\n// The four parts write the same words as the literal default of their `text`\n// prop and not as these constants, on purpose: the contract compiler reads a\n// prop's default from a literal in the destructured parameter and drops it,\n// with a `cannot_extract` note, from one that goes through a constant (tried:\n// `text.default` vanished from four contracts, two of them already shipped).\n// pagination.test.tsx renders every part without `text` and asserts the\n// page-describing name, which is what fails if a literal and a constant part.\nconst PREVIOUS_TEXT = 'Previous';\nconst NEXT_TEXT = 'Next';\n\n// The visible content and the accessible name of the previous/next parts,\n// shared by the anchor and the button forms so the four cannot drift. The\n// chevrons carry `styles.chevron`: it is what mirrors them under a\n// right-to-left direction.\nfunction previousContent(text: string) {\n return (\n <>\n <ChevronLeftIcon className={cx(styles.icon, styles.chevron)} />\n <span className={styles.previousNextText}>{text}</span>\n </>\n );\n}\n\nfunction nextContent(text: string) {\n return (\n <>\n <span className={styles.previousNextText}>{text}</span>\n <ChevronRightIcon className={cx(styles.icon, styles.chevron)} />\n </>\n );\n}\n\n// The default text keeps the longer name that says which page it goes to. A\n// custom text IS the name: the label is hidden below 640px and the chevron is\n// decorative, so a fixed name would leave the words on screen out of it (and\n// out of a voice-control user's reach). An empty or blank text hides the label,\n// which is the icon-only form, so it keeps the default name rather than none (a\n// whitespace-only aria-label is ignored by the accessible name computation).\nfunction previousLabel(text: string) {\n return text.trim() && text !== PREVIOUS_TEXT ? text : 'Go to previous page';\n}\n\nfunction nextLabel(text: string) {\n return text.trim() && text !== NEXT_TEXT ? text : 'Go to next page';\n}\n\nexport type PaginationProps = ComponentProps<'nav'>;\n\nexport function Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cx(styles.pagination, className)}\n {...props}\n />\n );\n}\n\nexport type PaginationContentProps = ComponentProps<'ul'>;\n\nexport function PaginationContent({ className, ...props }: PaginationContentProps) {\n return <ul className={cx(styles.content, className)} {...props} />;\n}\n\nexport type PaginationItemProps = ComponentProps<'li'>;\n\nexport function PaginationItem(props: PaginationItemProps) {\n return <li {...props} />;\n}\n\nexport interface PaginationLinkProps extends Omit<ComponentProps<'a'>, 'className'> {\n className?: string;\n isActive?: boolean;\n /**\n * Square, icon-sized footprint (aspect-ratio 1, no horizontal padding) —\n * the common case for a bare page number, matching upstream's\n * `size=\"icon\"` default. `PaginationPrevious`/`PaginationNext` opt out\n * (`square={false}`): they carry an icon AND a text label side by side,\n * so a fixed-width square would clip the label.\n * @default true\n */\n square?: boolean;\n}\n\nexport function PaginationLink({ className, isActive, square = true, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n className={cx(styles.link, square && styles.square, className)}\n {...props}\n />\n );\n}\n\nexport interface PaginationPreviousProps extends Omit<PaginationLinkProps, 'square'> {\n /** Label text, hidden while the `Pagination` root it sits in is narrower\n * than 640px (a container query, so a narrow pane on a wide screen\n * collapses it too); without the root, below a 640px viewport. Also the\n * accessible name when given, since the label is hidden at that width.\n * @default 'Previous' */\n text?: string;\n}\n\nexport function PaginationPrevious({\n className,\n text = 'Previous',\n ...props\n}: PaginationPreviousProps) {\n return (\n <PaginationLink\n aria-label={previousLabel(text)}\n square={false}\n className={cx(styles.previous, className)}\n {...props}\n >\n {previousContent(text)}\n </PaginationLink>\n );\n}\n\nexport interface PaginationNextProps extends Omit<PaginationLinkProps, 'square'> {\n /** Also the accessible name when given. @default 'Next' */\n text?: string;\n}\n\nexport function PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink\n aria-label={nextLabel(text)}\n square={false}\n className={cx(styles.next, className)}\n {...props}\n >\n {nextContent(text)}\n </PaginationLink>\n );\n}\n\n/*\n * The button forms: the same items for state-driven paging, where a page\n * change is a state update and has no URL of its own. They are separate\n * parts rather than a `render`/`as` on the link because PaginationLink's\n * contract promises a real anchor (see pagination-link.contract.yaml); a\n * button part keeps that promise intact and shares every class with it, so\n * the two forms paint identically.\n */\nexport interface PaginationButtonProps extends Omit<ComponentProps<'button'>, 'className'> {\n className?: string;\n /** Marks the page in view: sets `aria-current=\"page\"` and the active\n * paint, same as PaginationLink's. */\n isActive?: boolean;\n /** Same square footprint as PaginationLink's. @default true */\n square?: boolean;\n /**\n * Keep the button in the tab order while `disabled`, reporting\n * `aria-disabled` instead of the native attribute. Without it a button that\n * holds keyboard focus when it becomes disabled (Previous, paged down to the\n * first page) is blurred by the browser and focus falls to the page. Same\n * name and meaning as Button's, which this renders through the same Base UI\n * primitive.\n * @default false\n */\n focusableWhenDisabled?: boolean;\n}\n\nexport function PaginationButton({\n className,\n isActive,\n square = true,\n type = 'button',\n ...props\n}: PaginationButtonProps) {\n return (\n <ButtonPrimitive\n type={type}\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n className={cx(styles.link, square && styles.square, className)}\n {...props}\n />\n );\n}\n\nexport interface PaginationPreviousButtonProps extends Omit<PaginationButtonProps, 'square' | 'isActive'> {\n /** Label text, hidden while the `Pagination` root it sits in is narrower\n * than 640px; without the root, below a 640px viewport. Also the\n * accessible name when given. @default 'Previous' */\n text?: string;\n}\n\nexport function PaginationPreviousButton({\n text = 'Previous',\n ...props\n}: PaginationPreviousButtonProps) {\n return (\n <PaginationButton aria-label={previousLabel(text)} square={false} {...props}>\n {previousContent(text)}\n </PaginationButton>\n );\n}\n\nexport interface PaginationNextButtonProps extends Omit<PaginationButtonProps, 'square' | 'isActive'> {\n /** Also the accessible name when given. @default 'Next' */\n text?: string;\n}\n\nexport function PaginationNextButton({ text = 'Next', ...props }: PaginationNextButtonProps) {\n return (\n <PaginationButton aria-label={nextLabel(text)} square={false} {...props}>\n {nextContent(text)}\n </PaginationButton>\n );\n}\n\nexport type PaginationEllipsisProps = ComponentProps<'span'>;\n\nexport function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span aria-hidden=\"true\" className={cx(styles.ellipsis, className)} {...props}>\n <MoreHorizontalIcon className={styles.icon} />\n <span className={styles.srOnly}>More pages</span>\n </span>\n );\n}\n"],"names":["PREVIOUS_TEXT","NEXT_TEXT","previousContent","text","jsxs","Fragment","jsx","ChevronLeftIcon","cx","styles","nextContent","ChevronRightIcon","previousLabel","nextLabel","Pagination","className","props","PaginationContent","PaginationItem","PaginationLink","isActive","square","PaginationPrevious","PaginationNext","PaginationButton","type","ButtonPrimitive","PaginationPreviousButton","PaginationNextButton","PaginationEllipsis","MoreHorizontalIcon"],"mappings":";;;;;;;;;;;;;;GAeMA,IAAgB,YAChBC,IAAY;AAMlB,SAASC,EAAgBC,GAAc;AACrC,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAgB,WAAWC,EAAGC,EAAO,MAAMA,EAAO,OAAO,GAAG;AAAA,IAC7D,gBAAAH,EAAC,QAAA,EAAK,WAAWG,EAAO,kBAAmB,UAAAN,EAAA,CAAK;AAAA,EAAA,GAClD;AAEJ;AAEA,SAASO,EAAYP,GAAc;AACjC,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAA,EAAK,WAAWG,EAAO,kBAAmB,UAAAN,GAAK;AAAA,IAChD,gBAAAG,EAACK,KAAiB,WAAWH,EAAGC,EAAO,MAAMA,EAAO,OAAO,EAAA,CAAG;AAAA,EAAA,GAChE;AAEJ;AAQA,SAASG,EAAcT,GAAc;AACnC,SAAOA,EAAK,KAAA,KAAUA,MAASH,IAAgBG,IAAO;AACxD;AAEA,SAASU,EAAUV,GAAc;AAC/B,SAAOA,EAAK,KAAA,KAAUA,MAASF,IAAYE,IAAO;AACpD;AAIO,SAASW,EAAW,EAAE,WAAAC,GAAW,GAAGC,KAA0B;AACnE,SACE,gBAAAV;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAWE,EAAGC,EAAO,YAAYM,CAAS;AAAA,MACzC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAIO,SAASC,EAAkB,EAAE,WAAAF,GAAW,GAAGC,KAAiC;AACjF,SAAO,gBAAAV,EAAC,QAAG,WAAWE,EAAGC,EAAO,SAASM,CAAS,GAAI,GAAGC,GAAO;AAClE;AAIO,SAASE,EAAeF,GAA4B;AACzD,SAAO,gBAAAV,EAAC,MAAA,EAAI,GAAGU,EAAA,CAAO;AACxB;AAgBO,SAASG,EAAe,EAAE,WAAAJ,GAAW,UAAAK,GAAU,QAAAC,IAAS,IAAM,GAAGL,KAA8B;AACpG,SACE,gBAAAV;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,gBAAcc,IAAW,SAAS;AAAA,MAClC,eAAaA,KAAY;AAAA,MACzB,WAAWZ,EAAGC,EAAO,MAAMY,KAAUZ,EAAO,QAAQM,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAWO,SAASM,EAAmB;AAAA,EACjC,WAAAP;AAAA,EACA,MAAAZ,IAAO;AAAA,EACP,GAAGa;AACL,GAA4B;AAC1B,SACE,gBAAAV;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,cAAYP,EAAcT,CAAI;AAAA,MAC9B,QAAQ;AAAA,MACR,WAAWK,EAAGC,EAAO,UAAUM,CAAS;AAAA,MACvC,GAAGC;AAAA,MAEH,YAAgBb,CAAI;AAAA,IAAA;AAAA,EAAA;AAG3B;AAOO,SAASoB,EAAe,EAAE,WAAAR,GAAW,MAAAZ,IAAO,QAAQ,GAAGa,KAA8B;AAC1F,SACE,gBAAAV;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,cAAYN,EAAUV,CAAI;AAAA,MAC1B,QAAQ;AAAA,MACR,WAAWK,EAAGC,EAAO,MAAMM,CAAS;AAAA,MACnC,GAAGC;AAAA,MAEH,YAAYb,CAAI;AAAA,IAAA;AAAA,EAAA;AAGvB;AA6BO,SAASqB,EAAiB;AAAA,EAC/B,WAAAT;AAAA,EACA,UAAAK;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,MAAAI,IAAO;AAAA,EACP,GAAGT;AACL,GAA0B;AACxB,SACE,gBAAAV;AAAA,IAACoB;AAAAA,IAAA;AAAA,MACC,MAAAD;AAAA,MACA,gBAAcL,IAAW,SAAS;AAAA,MAClC,eAAaA,KAAY;AAAA,MACzB,WAAWZ,EAAGC,EAAO,MAAMY,KAAUZ,EAAO,QAAQM,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AASO,SAASW,EAAyB;AAAA,EACvC,MAAAxB,IAAO;AAAA,EACP,GAAGa;AACL,GAAkC;AAChC,SACE,gBAAAV,EAACkB,GAAA,EAAiB,cAAYZ,EAAcT,CAAI,GAAG,QAAQ,IAAQ,GAAGa,GACnE,UAAAd,EAAgBC,CAAI,EAAA,CACvB;AAEJ;AAOO,SAASyB,EAAqB,EAAE,MAAAzB,IAAO,QAAQ,GAAGa,KAAoC;AAC3F,SACE,gBAAAV,EAACkB,GAAA,EAAiB,cAAYX,EAAUV,CAAI,GAAG,QAAQ,IAAQ,GAAGa,GAC/D,UAAAN,EAAYP,CAAI,EAAA,CACnB;AAEJ;AAIO,SAAS0B,EAAmB,EAAE,WAAAd,GAAW,GAAGC,KAAkC;AACnF,SACE,gBAAAZ,EAAC,QAAA,EAAK,eAAY,QAAO,WAAWI,EAAGC,EAAO,UAAUM,CAAS,GAAI,GAAGC,GACtE,UAAA;AAAA,IAAA,gBAAAV,EAACwB,GAAA,EAAmB,WAAWrB,EAAO,KAAA,CAAM;AAAA,IAC5C,gBAAAH,EAAC,QAAA,EAAK,WAAWG,EAAO,QAAQ,UAAA,aAAA,CAAU;AAAA,EAAA,GAC5C;AAEJ;"}
|
package/dist/table.js
CHANGED
|
@@ -1,175 +1,176 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { cx as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import './chunks/table.
|
|
6
|
-
tableContainer:
|
|
7
|
-
table:
|
|
8
|
-
stickyHeader:
|
|
9
|
-
tableHeader:
|
|
10
|
-
tableHead:
|
|
11
|
-
tableRow:
|
|
2
|
+
import { jsx as h, jsxs as S } from "react/jsx-runtime";
|
|
3
|
+
import { cx as C, cva as X } from "class-variance-authority";
|
|
4
|
+
import { useRef as k, useState as w, useCallback as M, useEffect as I } from "react";
|
|
5
|
+
import './chunks/table.biUlW2U6.css';const A = "_tableContainer_qh5zk_8", V = "_table_qh5zk_8", j = "_stickyHeader_qh5zk_79", K = "_tableHeader_qh5zk_91", U = "_tableHead_qh5zk_70", Y = "_tableRow_qh5zk_59", G = "_tableBody_qh5zk_147", J = "_columnResizer_qh5zk_285", Q = "_tableCell_qh5zk_127", Z = "_pinned_qh5zk_403", tt = "_variantCollection_qh5zk_94", et = "_variantDefault_qh5zk_445", nt = "_densityCompact_qh5zk_537", lt = "_tableCaption_qh5zk_546", at = "_tableFooter_qh5zk_568", c = {
|
|
6
|
+
tableContainer: A,
|
|
7
|
+
table: V,
|
|
8
|
+
stickyHeader: j,
|
|
9
|
+
tableHeader: K,
|
|
10
|
+
tableHead: U,
|
|
11
|
+
tableRow: Y,
|
|
12
12
|
tableBody: G,
|
|
13
13
|
columnResizer: J,
|
|
14
14
|
tableCell: Q,
|
|
15
|
-
|
|
15
|
+
pinned: Z,
|
|
16
16
|
variantCollection: tt,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
variantDefault: et,
|
|
18
|
+
densityCompact: nt,
|
|
19
|
+
tableCaption: lt,
|
|
20
|
+
tableFooter: at
|
|
21
|
+
}, v = 12, q = 8, ot = 72, rt = 32;
|
|
22
|
+
function E(e) {
|
|
22
23
|
var t;
|
|
23
24
|
return Array.from(((t = e.parentElement) == null ? void 0 : t.children) ?? []).filter(
|
|
24
|
-
(
|
|
25
|
+
(l) => l instanceof HTMLTableCellElement
|
|
25
26
|
);
|
|
26
27
|
}
|
|
27
28
|
function N(e, t) {
|
|
28
|
-
var
|
|
29
|
-
return t !== void 0 ? t : (
|
|
29
|
+
var l;
|
|
30
|
+
return t !== void 0 ? t : (l = e.textContent) != null && l.trim() ? ot : rt;
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
const t =
|
|
33
|
-
if (
|
|
32
|
+
function B(e) {
|
|
33
|
+
const t = E(e), l = e.closest("table");
|
|
34
|
+
if (l && l.style.tableLayout !== "fixed") {
|
|
34
35
|
for (const o of t)
|
|
35
36
|
o.style.width = `${Math.round(o.getBoundingClientRect().width)}px`;
|
|
36
|
-
|
|
37
|
+
l.style.tableLayout = "fixed", F(t);
|
|
37
38
|
}
|
|
38
39
|
return t;
|
|
39
40
|
}
|
|
40
41
|
function H(e) {
|
|
41
42
|
return Number.parseFloat(e.style.width) || 0;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
var
|
|
45
|
-
const t = (
|
|
44
|
+
function F(e) {
|
|
45
|
+
var l;
|
|
46
|
+
const t = (l = e[0]) == null ? void 0 : l.closest("table");
|
|
46
47
|
t && (t.style.width = `${e.reduce((o, s) => o + H(s), 0)}px`);
|
|
47
48
|
}
|
|
48
|
-
function x(e, t,
|
|
49
|
+
function x(e, t, l, o = H) {
|
|
49
50
|
const s = e[t];
|
|
50
51
|
if (!s)
|
|
51
52
|
return 0;
|
|
52
|
-
const u = N(s,
|
|
53
|
-
if (t !== e.length - 1 || !
|
|
53
|
+
const u = N(s, l), d = s.closest("table");
|
|
54
|
+
if (t !== e.length - 1 || !d)
|
|
54
55
|
return u;
|
|
55
|
-
const r = Number.parseFloat(getComputedStyle(
|
|
56
|
+
const r = Number.parseFloat(getComputedStyle(d).minWidth);
|
|
56
57
|
if (!Number.isFinite(r))
|
|
57
58
|
return u;
|
|
58
|
-
const
|
|
59
|
-
return Math.max(u, Math.ceil(r -
|
|
59
|
+
const m = e.slice(0, t).reduce((p, _) => p + o(_), 0);
|
|
60
|
+
return Math.max(u, Math.ceil(r - m));
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
+
function D(e, t, l, o, s, u, d) {
|
|
62
63
|
const r = e[t];
|
|
63
64
|
if (!r)
|
|
64
|
-
return
|
|
65
|
-
const
|
|
66
|
-
return r.style.width = `${
|
|
65
|
+
return l;
|
|
66
|
+
const m = o === null ? null : e[t + 1], p = o === null || !m ? Number.POSITIVE_INFINITY : l + o - d, _ = Math.round(Math.min(Math.max(l + s, u), p));
|
|
67
|
+
return r.style.width = `${_}px`, m && o !== null && (m.style.width = `${l + o - _}px`), F(e), _;
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
-
const t =
|
|
70
|
-
var
|
|
71
|
-
const n = (
|
|
69
|
+
function it({ minWidth: e }) {
|
|
70
|
+
const t = k(null), l = k(null), [o, s] = w(""), [u, d] = w(null), [r, m] = w(null), p = M(() => {
|
|
71
|
+
var f, y;
|
|
72
|
+
const n = (f = t.current) == null ? void 0 : f.closest("th");
|
|
72
73
|
if (!(n instanceof HTMLTableCellElement))
|
|
73
74
|
return;
|
|
74
|
-
const
|
|
75
|
-
|
|
75
|
+
const a = E(n), i = Math.round(n.getBoundingClientRect().width), b = (g) => H(g) || g.getBoundingClientRect().width;
|
|
76
|
+
m({
|
|
76
77
|
now: i,
|
|
77
|
-
min: Math.round(x(
|
|
78
|
-
max: Math.round(((
|
|
79
|
-
}),
|
|
78
|
+
min: Math.round(x(a, a.indexOf(n), e, b)),
|
|
79
|
+
max: Math.round(((y = n.closest("table")) == null ? void 0 : y.getBoundingClientRect().width) ?? 0)
|
|
80
|
+
}), l.current || d((g) => g === null ? null : i);
|
|
80
81
|
}, [e]);
|
|
81
|
-
|
|
82
|
-
var n,
|
|
83
|
-
s(((i = (
|
|
84
|
-
}, [
|
|
85
|
-
const
|
|
82
|
+
I(() => {
|
|
83
|
+
var n, a, i;
|
|
84
|
+
s(((i = (a = (n = t.current) == null ? void 0 : n.closest("th")) == null ? void 0 : a.textContent) == null ? void 0 : i.trim()) ?? ""), p();
|
|
85
|
+
}, [p]);
|
|
86
|
+
const _ = u ?? (r == null ? void 0 : r.now) ?? 0, O = Math.min((r == null ? void 0 : r.min) ?? 0, _), P = Math.max((r == null ? void 0 : r.max) ?? 0, _), z = (n) => {
|
|
86
87
|
document.body.style.cursor = n ? "col-resize" : "", document.body.style.userSelect = n ? "none" : "";
|
|
87
|
-
},
|
|
88
|
+
}, R = (n, a, i) => {
|
|
88
89
|
try {
|
|
89
|
-
i ? n.setPointerCapture(
|
|
90
|
+
i ? n.setPointerCapture(a) : n.hasPointerCapture(a) && n.releasePointerCapture(a);
|
|
90
91
|
} catch {
|
|
91
92
|
}
|
|
92
|
-
}, T =
|
|
93
|
-
const n =
|
|
93
|
+
}, T = M(() => {
|
|
94
|
+
const n = l.current;
|
|
94
95
|
if (!n)
|
|
95
96
|
return;
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
97
|
+
l.current = null, z(!1);
|
|
98
|
+
const a = t.current;
|
|
99
|
+
a && R(a, n.pointerId, !1);
|
|
99
100
|
}, []);
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
if (!(
|
|
101
|
+
I(() => T, [T]);
|
|
102
|
+
const W = (n) => {
|
|
103
|
+
const a = n.currentTarget.closest("th");
|
|
104
|
+
if (!(a instanceof HTMLTableCellElement) || n.button !== 0)
|
|
104
105
|
return;
|
|
105
|
-
const i =
|
|
106
|
-
|
|
106
|
+
const i = B(a), b = i.indexOf(a), f = i[b + 1] ?? null;
|
|
107
|
+
l.current = {
|
|
107
108
|
pointerId: n.pointerId,
|
|
108
109
|
startX: n.clientX,
|
|
109
110
|
cells: i,
|
|
110
111
|
index: b,
|
|
111
|
-
selfStart:
|
|
112
|
-
neighbourStart:
|
|
112
|
+
selfStart: a.getBoundingClientRect().width,
|
|
113
|
+
neighbourStart: f ? f.getBoundingClientRect().width : null,
|
|
113
114
|
minSelf: x(i, b, e),
|
|
114
|
-
minNeighbour:
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
const
|
|
118
|
-
!
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
n.clientX -
|
|
125
|
-
|
|
126
|
-
|
|
115
|
+
minNeighbour: f ? N(f, void 0) : 0
|
|
116
|
+
}, R(n.currentTarget, n.pointerId, !0), z(!0), d(Math.round(l.current.selfStart));
|
|
117
|
+
}, L = (n) => {
|
|
118
|
+
const a = l.current;
|
|
119
|
+
!a || a.pointerId !== n.pointerId || d(
|
|
120
|
+
D(
|
|
121
|
+
a.cells,
|
|
122
|
+
a.index,
|
|
123
|
+
a.selfStart,
|
|
124
|
+
a.neighbourStart,
|
|
125
|
+
n.clientX - a.startX,
|
|
126
|
+
a.minSelf,
|
|
127
|
+
a.minNeighbour
|
|
127
128
|
)
|
|
128
129
|
);
|
|
129
|
-
},
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
130
|
+
}, $ = (n) => {
|
|
131
|
+
const a = n.key === "ArrowLeft" ? -v : n.key === "ArrowRight" ? v : 0;
|
|
132
|
+
if (a === 0)
|
|
132
133
|
return;
|
|
133
134
|
const i = n.currentTarget.closest("th");
|
|
134
135
|
if (!(i instanceof HTMLTableCellElement))
|
|
135
136
|
return;
|
|
136
137
|
n.preventDefault();
|
|
137
|
-
const b =
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
const b = B(i), f = b.indexOf(i), y = b[f + 1] ?? null;
|
|
139
|
+
d(
|
|
140
|
+
D(
|
|
140
141
|
b,
|
|
141
|
-
|
|
142
|
+
f,
|
|
142
143
|
i.getBoundingClientRect().width,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
x(b,
|
|
146
|
-
|
|
144
|
+
y ? y.getBoundingClientRect().width : null,
|
|
145
|
+
a,
|
|
146
|
+
x(b, f, e),
|
|
147
|
+
y ? N(y, void 0) : 0
|
|
147
148
|
)
|
|
148
149
|
);
|
|
149
150
|
};
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ h(
|
|
151
152
|
"span",
|
|
152
153
|
{
|
|
153
154
|
ref: t,
|
|
154
155
|
role: "separator",
|
|
155
156
|
"aria-orientation": "vertical",
|
|
156
157
|
"aria-label": `${o || "Column"} width${u === null ? "" : `, ${u} pixels`}`,
|
|
157
|
-
"aria-valuenow":
|
|
158
|
-
"aria-valuemin":
|
|
159
|
-
"aria-valuemax":
|
|
160
|
-
onFocus:
|
|
158
|
+
"aria-valuenow": _,
|
|
159
|
+
"aria-valuemin": O,
|
|
160
|
+
"aria-valuemax": P,
|
|
161
|
+
onFocus: p,
|
|
161
162
|
tabIndex: 0,
|
|
162
163
|
className: c.columnResizer,
|
|
163
|
-
style: { width:
|
|
164
|
-
onPointerDown:
|
|
165
|
-
onPointerMove:
|
|
164
|
+
style: { width: q, insetInlineEnd: -q / 2 },
|
|
165
|
+
onPointerDown: W,
|
|
166
|
+
onPointerMove: L,
|
|
166
167
|
onPointerUp: T,
|
|
167
168
|
onPointerCancel: T,
|
|
168
|
-
onKeyDown:
|
|
169
|
+
onKeyDown: $
|
|
169
170
|
}
|
|
170
171
|
);
|
|
171
172
|
}
|
|
172
|
-
const
|
|
173
|
+
const ct = X(c.table, {
|
|
173
174
|
variants: {
|
|
174
175
|
/*
|
|
175
176
|
* `collection` is the spec's own guide word for the dense arrangement:
|
|
@@ -188,78 +189,79 @@ const it = A(c.table, {
|
|
|
188
189
|
function ft({
|
|
189
190
|
className: e,
|
|
190
191
|
label: t,
|
|
191
|
-
density:
|
|
192
|
+
density: l,
|
|
192
193
|
variant: o,
|
|
193
194
|
containerClassName: s,
|
|
194
195
|
containerStyle: u,
|
|
195
|
-
containerRef:
|
|
196
|
+
containerRef: d,
|
|
196
197
|
stickyHeader: r,
|
|
197
|
-
...
|
|
198
|
+
...m
|
|
198
199
|
}) {
|
|
199
|
-
return /* @__PURE__ */
|
|
200
|
+
return /* @__PURE__ */ h(
|
|
200
201
|
"div",
|
|
201
202
|
{
|
|
202
|
-
ref:
|
|
203
|
-
className:
|
|
203
|
+
ref: d,
|
|
204
|
+
className: C(c.tableContainer, s),
|
|
204
205
|
style: u,
|
|
205
206
|
tabIndex: 0,
|
|
206
207
|
role: t === void 0 ? void 0 : "region",
|
|
207
208
|
"aria-label": t,
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
+
children: /* @__PURE__ */ h(
|
|
209
210
|
"table",
|
|
210
211
|
{
|
|
211
|
-
className:
|
|
212
|
+
className: ct({
|
|
212
213
|
variant: o,
|
|
213
|
-
className:
|
|
214
|
-
|
|
214
|
+
className: C(
|
|
215
|
+
l === "compact" && c.densityCompact,
|
|
215
216
|
r && c.stickyHeader,
|
|
216
217
|
e
|
|
217
218
|
)
|
|
218
219
|
}),
|
|
219
|
-
...
|
|
220
|
+
...m
|
|
220
221
|
}
|
|
221
222
|
)
|
|
222
223
|
}
|
|
223
224
|
);
|
|
224
225
|
}
|
|
225
|
-
function dt({ className: e, ...t }) {
|
|
226
|
-
return /* @__PURE__ */ m("thead", { className: y(c.tableHeader, e), ...t });
|
|
227
|
-
}
|
|
228
226
|
function bt({ className: e, ...t }) {
|
|
229
|
-
return /* @__PURE__ */
|
|
227
|
+
return /* @__PURE__ */ h("thead", { className: C(c.tableHeader, e), ...t });
|
|
228
|
+
}
|
|
229
|
+
function ht({ className: e, ...t }) {
|
|
230
|
+
return /* @__PURE__ */ h("tbody", { className: C(c.tableBody, e), ...t });
|
|
230
231
|
}
|
|
231
232
|
function mt({ className: e, ...t }) {
|
|
232
|
-
return /* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ h("tfoot", { className: C(c.tableFooter, e), ...t });
|
|
233
234
|
}
|
|
234
|
-
function
|
|
235
|
-
return /* @__PURE__ */
|
|
235
|
+
function _t({ className: e, ...t }) {
|
|
236
|
+
return /* @__PURE__ */ h("tr", { className: C(c.tableRow, e), ...t });
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function Ct({
|
|
238
239
|
className: e,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
pinned: t,
|
|
241
|
+
resizable: l,
|
|
242
|
+
resizeMinWidth: o,
|
|
243
|
+
children: s,
|
|
244
|
+
...u
|
|
243
245
|
}) {
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
return /* @__PURE__ */ S("th", { className: C(c.tableHead, t && c.pinned, e), ...u, children: [
|
|
247
|
+
s,
|
|
248
|
+
l ? /* @__PURE__ */ h(it, { minWidth: o }) : null
|
|
247
249
|
] });
|
|
248
250
|
}
|
|
249
|
-
function
|
|
250
|
-
return /* @__PURE__ */
|
|
251
|
+
function pt({ className: e, pinned: t, ...l }) {
|
|
252
|
+
return /* @__PURE__ */ h("td", { className: C(c.tableCell, t && c.pinned, e), ...l });
|
|
251
253
|
}
|
|
252
|
-
function
|
|
253
|
-
return /* @__PURE__ */
|
|
254
|
+
function yt({ className: e, ...t }) {
|
|
255
|
+
return /* @__PURE__ */ h("caption", { className: C(c.tableCaption, e), ...t });
|
|
254
256
|
}
|
|
255
257
|
export {
|
|
256
258
|
ft as Table,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
ht as TableBody,
|
|
260
|
+
yt as TableCaption,
|
|
261
|
+
pt as TableCell,
|
|
260
262
|
mt as TableFooter,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
263
|
+
Ct as TableHead,
|
|
264
|
+
bt as TableHeader,
|
|
265
|
+
_t as TableRow
|
|
264
266
|
};
|
|
265
267
|
//# sourceMappingURL=table.js.map
|