@docubook/ui-react 2.0.0-alpha.0 → 2.0.0-alpha.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/chunk-REZ4W4BZ.cjs +92 -0
- package/dist/chunk-WY6GLRTT.js +92 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/pagination.cjs +2 -2
- package/dist/pagination.d.cts +1 -0
- package/dist/pagination.d.ts +1 -0
- package/dist/pagination.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4QUABBES.js +0 -43
- package/dist/chunk-K22HSWMW.cjs +0 -43
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk2DFF5NELcjs = require('./chunk-2DFF5NEL.cjs');
|
|
4
|
+
|
|
5
|
+
// src/base/pagination.tsx
|
|
6
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
7
|
+
function PaginationDocs({
|
|
8
|
+
prev,
|
|
9
|
+
next,
|
|
10
|
+
className,
|
|
11
|
+
prevIcon,
|
|
12
|
+
nextIcon,
|
|
13
|
+
linkClassName
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
16
|
+
"nav",
|
|
17
|
+
{
|
|
18
|
+
id: "pagination",
|
|
19
|
+
"aria-label": "Pagination",
|
|
20
|
+
className: _chunk2DFF5NELcjs.cn.call(void 0, "bg-base-200/50 flex w-full gap-1 rounded-2xl p-1", className),
|
|
21
|
+
children: [
|
|
22
|
+
prev && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
23
|
+
"a",
|
|
24
|
+
{
|
|
25
|
+
href: prev.href,
|
|
26
|
+
rel: "prev",
|
|
27
|
+
"data-component-part": "pagination-prev",
|
|
28
|
+
className: _chunk2DFF5NELcjs.cn.call(void 0,
|
|
29
|
+
"group text-muted-foreground hover:bg-base-200/60 hover:text-base-content flex items-center justify-start gap-1.5 rounded-xl px-3 py-3 text-sm no-underline transition-colors",
|
|
30
|
+
// 30/70 split with next; calc subtracts half the gap so the two
|
|
31
|
+
// cards plus gap-1 fill the pill exactly. No min-w-0: the card
|
|
32
|
+
// floors at its content width, so a narrow screen never crushes
|
|
33
|
+
// the icon/text into the next card.
|
|
34
|
+
next && "w-[calc(30%-2px)]",
|
|
35
|
+
linkClassName
|
|
36
|
+
),
|
|
37
|
+
children: [
|
|
38
|
+
prevIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex shrink-0 items-center", children: prevIcon }),
|
|
39
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-component-part": "pagination-label", children: "Previous" })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
next && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
44
|
+
"a",
|
|
45
|
+
{
|
|
46
|
+
href: next.href,
|
|
47
|
+
rel: "next",
|
|
48
|
+
"data-component-part": "pagination-next",
|
|
49
|
+
className: _chunk2DFF5NELcjs.cn.call(void 0,
|
|
50
|
+
"group min-w-0 rounded-xl no-underline",
|
|
51
|
+
// Next-only (e.g. docs index): full width on mobile, half the
|
|
52
|
+
// container above 640px — pushed right like a forward button.
|
|
53
|
+
// With prev: calc-based 70% (minus half the gap) so the pair
|
|
54
|
+
// always fills the pill without overlapping.
|
|
55
|
+
prev ? "w-[calc(70%-2px)]" : "w-full sm:ml-auto sm:w-1/2",
|
|
56
|
+
linkClassName
|
|
57
|
+
),
|
|
58
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-primary/15 hover:bg-primary/20 hover:ring-primary/30 flex h-16 flex-1 items-center justify-end rounded-xl transition-shadow hover:ring-1", children: [
|
|
59
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col items-end justify-center px-5", children: [
|
|
60
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
"data-component-part": "pagination-title",
|
|
64
|
+
className: "text-primary w-full truncate text-right text-sm font-semibold",
|
|
65
|
+
children: next.title
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
next.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
69
|
+
"span",
|
|
70
|
+
{
|
|
71
|
+
"data-component-part": "pagination-description",
|
|
72
|
+
className: "text-primary/75 hidden w-full max-w-72 truncate text-right text-xs sm:block",
|
|
73
|
+
children: next.description
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary/20 h-8 w-px" }),
|
|
78
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-primary/75 flex items-center gap-1.5 pr-3 pl-5 text-sm", children: [
|
|
79
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-component-part": "pagination-label", children: "Next" }),
|
|
80
|
+
nextIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex shrink-0 items-center", children: nextIcon })
|
|
81
|
+
] })
|
|
82
|
+
] })
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
exports.PaginationDocs = PaginationDocs;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-GRADTONK.js";
|
|
4
|
+
|
|
5
|
+
// src/base/pagination.tsx
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function PaginationDocs({
|
|
8
|
+
prev,
|
|
9
|
+
next,
|
|
10
|
+
className,
|
|
11
|
+
prevIcon,
|
|
12
|
+
nextIcon,
|
|
13
|
+
linkClassName
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ jsxs(
|
|
16
|
+
"nav",
|
|
17
|
+
{
|
|
18
|
+
id: "pagination",
|
|
19
|
+
"aria-label": "Pagination",
|
|
20
|
+
className: cn("bg-base-200/50 flex w-full gap-1 rounded-2xl p-1", className),
|
|
21
|
+
children: [
|
|
22
|
+
prev && /* @__PURE__ */ jsxs(
|
|
23
|
+
"a",
|
|
24
|
+
{
|
|
25
|
+
href: prev.href,
|
|
26
|
+
rel: "prev",
|
|
27
|
+
"data-component-part": "pagination-prev",
|
|
28
|
+
className: cn(
|
|
29
|
+
"group text-muted-foreground hover:bg-base-200/60 hover:text-base-content flex items-center justify-start gap-1.5 rounded-xl px-3 py-3 text-sm no-underline transition-colors",
|
|
30
|
+
// 30/70 split with next; calc subtracts half the gap so the two
|
|
31
|
+
// cards plus gap-1 fill the pill exactly. No min-w-0: the card
|
|
32
|
+
// floors at its content width, so a narrow screen never crushes
|
|
33
|
+
// the icon/text into the next card.
|
|
34
|
+
next && "w-[calc(30%-2px)]",
|
|
35
|
+
linkClassName
|
|
36
|
+
),
|
|
37
|
+
children: [
|
|
38
|
+
prevIcon && /* @__PURE__ */ jsx("span", { className: "flex shrink-0 items-center", children: prevIcon }),
|
|
39
|
+
/* @__PURE__ */ jsx("span", { "data-component-part": "pagination-label", children: "Previous" })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
next && /* @__PURE__ */ jsx(
|
|
44
|
+
"a",
|
|
45
|
+
{
|
|
46
|
+
href: next.href,
|
|
47
|
+
rel: "next",
|
|
48
|
+
"data-component-part": "pagination-next",
|
|
49
|
+
className: cn(
|
|
50
|
+
"group min-w-0 rounded-xl no-underline",
|
|
51
|
+
// Next-only (e.g. docs index): full width on mobile, half the
|
|
52
|
+
// container above 640px — pushed right like a forward button.
|
|
53
|
+
// With prev: calc-based 70% (minus half the gap) so the pair
|
|
54
|
+
// always fills the pill without overlapping.
|
|
55
|
+
prev ? "w-[calc(70%-2px)]" : "w-full sm:ml-auto sm:w-1/2",
|
|
56
|
+
linkClassName
|
|
57
|
+
),
|
|
58
|
+
children: /* @__PURE__ */ jsxs("div", { className: "bg-primary/15 hover:bg-primary/20 hover:ring-primary/30 flex h-16 flex-1 items-center justify-end rounded-xl transition-shadow hover:ring-1", children: [
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-end justify-center px-5", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
"data-component-part": "pagination-title",
|
|
64
|
+
className: "text-primary w-full truncate text-right text-sm font-semibold",
|
|
65
|
+
children: next.title
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
next.description && /* @__PURE__ */ jsx(
|
|
69
|
+
"span",
|
|
70
|
+
{
|
|
71
|
+
"data-component-part": "pagination-description",
|
|
72
|
+
className: "text-primary/75 hidden w-full max-w-72 truncate text-right text-xs sm:block",
|
|
73
|
+
children: next.description
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ jsx("div", { className: "bg-primary/20 h-8 w-px" }),
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { className: "text-primary/75 flex items-center gap-1.5 pr-3 pl-5 text-sm", children: [
|
|
79
|
+
/* @__PURE__ */ jsx("span", { "data-component-part": "pagination-label", children: "Next" }),
|
|
80
|
+
nextIcon && /* @__PURE__ */ jsx("span", { className: "flex shrink-0 items-center", children: nextIcon })
|
|
81
|
+
] })
|
|
82
|
+
] })
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
PaginationDocs
|
|
92
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -10,7 +10,7 @@ var _chunkHTH2UTCLcjs = require('./chunk-HTH2UTCL.cjs');
|
|
|
10
10
|
var _chunk6B7U7IWTcjs = require('./chunk-6B7U7IWT.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkREZ4W4BZcjs = require('./chunk-REZ4W4BZ.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _chunk5SA5UPFQcjs = require('./chunk-5SA5UPFQ.cjs');
|
|
@@ -81,4 +81,4 @@ var _chunk2DFF5NELcjs = require('./chunk-2DFF5NEL.cjs');
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
exports.Accordion = _chunkSV4L2FGTcjs.Accordion; exports.Breadcrumb = _chunkRDRDPR67cjs.Breadcrumb; exports.BreadcrumbItem = _chunkRDRDPR67cjs.BreadcrumbItem; exports.BreadcrumbList = _chunkRDRDPR67cjs.BreadcrumbList; exports.BreadcrumbPage = _chunkRDRDPR67cjs.BreadcrumbPage; exports.Collapse = _chunkSV4L2FGTcjs.Collapse; exports.Drawer = _chunkBHHZBMD4cjs.Drawer; exports.DrawerContent = _chunkBHHZBMD4cjs.DrawerContent; exports.DrawerSidePanel = _chunkBHHZBMD4cjs.DrawerSidePanel; exports.DrawerTrigger = _chunkBHHZBMD4cjs.DrawerTrigger; exports.Dropdown = _chunkCK4TY6B7cjs.Dropdown; exports.DropdownItem = _chunkCK4TY6B7cjs.DropdownItem; exports.DropdownLink = _chunkCK4TY6B7cjs.DropdownLink; exports.FnKey = _chunkTDFVUBGOcjs.FnKey; exports.Input = _chunkMWJV72OMcjs.Input; exports.InputGroup = _chunkMWJV72OMcjs.InputGroup; exports.Kbd = _chunkTDFVUBGOcjs.Kbd; exports.Logo = _chunk6B7U7IWTcjs.Logo; exports.Modal = _chunkHTH2UTCLcjs.Modal; exports.NavMenu = _chunk6B7U7IWTcjs.NavMenu; exports.NavMenuLink = _chunk6B7U7IWTcjs.NavMenuLink; exports.Navbar = _chunk6B7U7IWTcjs.Navbar; exports.PaginationDocs =
|
|
84
|
+
exports.Accordion = _chunkSV4L2FGTcjs.Accordion; exports.Breadcrumb = _chunkRDRDPR67cjs.Breadcrumb; exports.BreadcrumbItem = _chunkRDRDPR67cjs.BreadcrumbItem; exports.BreadcrumbList = _chunkRDRDPR67cjs.BreadcrumbList; exports.BreadcrumbPage = _chunkRDRDPR67cjs.BreadcrumbPage; exports.Collapse = _chunkSV4L2FGTcjs.Collapse; exports.Drawer = _chunkBHHZBMD4cjs.Drawer; exports.DrawerContent = _chunkBHHZBMD4cjs.DrawerContent; exports.DrawerSidePanel = _chunkBHHZBMD4cjs.DrawerSidePanel; exports.DrawerTrigger = _chunkBHHZBMD4cjs.DrawerTrigger; exports.Dropdown = _chunkCK4TY6B7cjs.Dropdown; exports.DropdownItem = _chunkCK4TY6B7cjs.DropdownItem; exports.DropdownLink = _chunkCK4TY6B7cjs.DropdownLink; exports.FnKey = _chunkTDFVUBGOcjs.FnKey; exports.Input = _chunkMWJV72OMcjs.Input; exports.InputGroup = _chunkMWJV72OMcjs.InputGroup; exports.Kbd = _chunkTDFVUBGOcjs.Kbd; exports.Logo = _chunk6B7U7IWTcjs.Logo; exports.Modal = _chunkHTH2UTCLcjs.Modal; exports.NavMenu = _chunk6B7U7IWTcjs.NavMenu; exports.NavMenuLink = _chunk6B7U7IWTcjs.NavMenuLink; exports.Navbar = _chunk6B7U7IWTcjs.Navbar; exports.PaginationDocs = _chunkREZ4W4BZcjs.PaginationDocs; exports.ThemeControllerToggle = _chunk5SA5UPFQcjs.ThemeControllerToggle; exports.Toggle = _chunkOO3HHTPVcjs.Toggle; exports.ToggleGroup = _chunkOO3HHTPVcjs.ToggleGroup; exports.cn = _chunk2DFF5NELcjs.cn; exports.useDrawerState = _chunkBHHZBMD4cjs.useDrawerState; exports.useModal = _chunkHTH2UTCLcjs.useModal;
|
package/dist/index.js
CHANGED
package/dist/pagination.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkREZ4W4BZcjs = require('./chunk-REZ4W4BZ.cjs');
|
|
4
4
|
require('./chunk-2DFF5NEL.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.PaginationDocs =
|
|
7
|
+
exports.PaginationDocs = _chunkREZ4W4BZcjs.PaginationDocs;
|
package/dist/pagination.d.cts
CHANGED
package/dist/pagination.d.ts
CHANGED
package/dist/pagination.js
CHANGED
package/package.json
CHANGED
package/dist/chunk-4QUABBES.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-GRADTONK.js";
|
|
4
|
-
|
|
5
|
-
// src/base/pagination.tsx
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
function PaginationDocs({
|
|
8
|
-
prev,
|
|
9
|
-
next,
|
|
10
|
-
className,
|
|
11
|
-
prevIcon,
|
|
12
|
-
nextIcon,
|
|
13
|
-
linkClassName
|
|
14
|
-
}) {
|
|
15
|
-
const linkBase = "flex flex-col no-underline rounded-lg border border-base-300 bg-base-100 transition-colors hover:bg-base-200 hover:border-base-300";
|
|
16
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("grid grow grid-cols-1 gap-4 py-8 sm:grid-cols-2", className), children: [
|
|
17
|
-
/* @__PURE__ */ jsx("div", { children: prev && /* @__PURE__ */ jsxs("a", { href: prev.href, className: cn(linkBase, "items-start px-4 py-4", linkClassName), children: [
|
|
18
|
-
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground flex items-center justify-start text-xs", children: [
|
|
19
|
-
prevIcon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: prevIcon }),
|
|
20
|
-
"Previous"
|
|
21
|
-
] }),
|
|
22
|
-
/* @__PURE__ */ jsx("span", { className: "text-base-content mt-1 text-sm font-medium", children: prev.title })
|
|
23
|
-
] }) }),
|
|
24
|
-
/* @__PURE__ */ jsx("div", { children: next && /* @__PURE__ */ jsxs(
|
|
25
|
-
"a",
|
|
26
|
-
{
|
|
27
|
-
href: next.href,
|
|
28
|
-
className: cn(linkBase, "items-end px-4 py-4 text-right", linkClassName),
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground flex items-center justify-end text-xs", children: [
|
|
31
|
-
"Next",
|
|
32
|
-
nextIcon && /* @__PURE__ */ jsx("span", { className: "ml-1", children: nextIcon })
|
|
33
|
-
] }),
|
|
34
|
-
/* @__PURE__ */ jsx("span", { className: "text-base-content mt-1 text-sm font-medium", children: next.title })
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
) })
|
|
38
|
-
] });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
PaginationDocs
|
|
43
|
-
};
|
package/dist/chunk-K22HSWMW.cjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk2DFF5NELcjs = require('./chunk-2DFF5NEL.cjs');
|
|
4
|
-
|
|
5
|
-
// src/base/pagination.tsx
|
|
6
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
7
|
-
function PaginationDocs({
|
|
8
|
-
prev,
|
|
9
|
-
next,
|
|
10
|
-
className,
|
|
11
|
-
prevIcon,
|
|
12
|
-
nextIcon,
|
|
13
|
-
linkClassName
|
|
14
|
-
}) {
|
|
15
|
-
const linkBase = "flex flex-col no-underline rounded-lg border border-base-300 bg-base-100 transition-colors hover:bg-base-200 hover:border-base-300";
|
|
16
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk2DFF5NELcjs.cn.call(void 0, "grid grow grid-cols-1 gap-4 py-8 sm:grid-cols-2", className), children: [
|
|
17
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: prev && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "a", { href: prev.href, className: _chunk2DFF5NELcjs.cn.call(void 0, linkBase, "items-start px-4 py-4", linkClassName), children: [
|
|
18
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground flex items-center justify-start text-xs", children: [
|
|
19
|
-
prevIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-1", children: prevIcon }),
|
|
20
|
-
"Previous"
|
|
21
|
-
] }),
|
|
22
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-base-content mt-1 text-sm font-medium", children: prev.title })
|
|
23
|
-
] }) }),
|
|
24
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: next && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
25
|
-
"a",
|
|
26
|
-
{
|
|
27
|
-
href: next.href,
|
|
28
|
-
className: _chunk2DFF5NELcjs.cn.call(void 0, linkBase, "items-end px-4 py-4 text-right", linkClassName),
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground flex items-center justify-end text-xs", children: [
|
|
31
|
-
"Next",
|
|
32
|
-
nextIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ml-1", children: nextIcon })
|
|
33
|
-
] }),
|
|
34
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-base-content mt-1 text-sm font-medium", children: next.title })
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
) })
|
|
38
|
-
] });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
exports.PaginationDocs = PaginationDocs;
|