@publish.os/nextjs 0.0.1-alpha.6 → 0.0.1-alpha.8
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/README.md +3 -5
- package/compiler-assets/nextjs/defaults/app/globals.css +6 -0
- package/compiler-assets/nextjs/defaults/group/layout.tsx +23 -0
- package/compiler-assets/nextjs/defaults/group/leaf.tsx +48 -0
- package/compiler-assets/nextjs/defaults/group/page.tsx +50 -0
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +45 -0
- package/compiler-assets/nextjs/defaults/project/postcss.config.mjs +5 -0
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +41 -0
- package/compiler-assets/nextjs/defaults/root/css/animation.css +90 -0
- package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +21 -0
- package/compiler-assets/nextjs/defaults/root/css/components/drawer.css +21 -0
- package/compiler-assets/nextjs/defaults/root/css/components/menu.css +23 -0
- package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +25 -0
- package/compiler-assets/nextjs/defaults/root/css/components/popover.css +17 -0
- package/compiler-assets/nextjs/defaults/root/css/components/select.css +23 -0
- package/compiler-assets/nextjs/defaults/root/css/components/toast.css +19 -0
- package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +15 -0
- package/compiler-assets/nextjs/defaults/root/css/layout.css +22 -0
- package/compiler-assets/nextjs/defaults/root/css/media.css +81 -0
- package/compiler-assets/nextjs/defaults/root/css/radius.css +49 -0
- package/compiler-assets/nextjs/defaults/root/css/scrollbar.css +43 -0
- package/compiler-assets/nextjs/defaults/root/css/shadow.css +145 -0
- package/compiler-assets/nextjs/defaults/root/css/typography.css +607 -0
- package/compiler-assets/nextjs/defaults/root/css/zindex.css +39 -0
- package/compiler-assets/nextjs/defaults/root/globals.css +191 -0
- package/compiler-assets/nextjs/defaults/root/layout.tsx +19 -0
- package/compiler-assets/nextjs/defaults/root/page.tsx +61 -0
- package/compiler-assets/nextjs/defaults/root/theme.css +50 -0
- package/compiler-assets/nextjs/defaults/source/_internal/logger.ts +21 -0
- package/compiler-assets/nextjs/shims/generated-group-layout.tsx +19 -0
- package/compiler-assets/nextjs/shims/generated-group-page.tsx +18 -0
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +21 -0
- package/compiler-assets/nextjs/shims/global-layout.tsx +134 -0
- package/compiler-assets/nextjs/shims/markdown-route.ts +29 -0
- package/compiler-assets/nextjs/shims/og-image-route.ts +18 -0
- package/compiler-assets/nextjs/shims/powered-by-footer.tsx +40 -0
- package/compiler-assets/nextjs/shims/providers.tsx +13 -0
- package/compiler-assets/nextjs/shims/proxy.ts +317 -0
- package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +77 -0
- package/compiler-assets/nextjs/shims/root-page.tsx +13 -0
- package/compiler-assets/nextjs/shims/theme-defaults.css +177 -0
- package/dist/button-CFdx-ohV.d.ts +20 -0
- package/dist/cache/tags.js +6 -14
- package/dist/compiler.d.ts +100 -0
- package/dist/compiler.js +13379 -0
- package/dist/config/createNextConfig.d.ts +2 -1
- package/dist/config/createNextConfig.js +16 -12
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +303 -15
- package/dist/index.js +30 -1198
- package/dist/kernel/components/blocks/AgentActions.d.ts +9 -3
- package/dist/kernel/components/blocks/AgentActions.js +114 -200
- package/dist/kernel/components/blocks/animated-icon-swap.js +4 -25
- package/dist/kernel/components/blocks/color-palette.js +88 -169
- package/dist/kernel/components/blocks/design-system-preview.d.ts +38 -6
- package/dist/kernel/components/blocks/design-system-preview.js +44 -52
- package/dist/kernel/components/blocks/link-playground.js +23 -71
- package/dist/kernel/components/blocks/logo-block.js +18 -47
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +28 -42
- package/dist/kernel/components/blocks/navbar.d.ts +1 -1
- package/dist/kernel/components/blocks/navbar.js +14 -41
- package/dist/kernel/components/blocks/navigation-progress-playground.js +56 -149
- package/dist/kernel/components/blocks/navigation-progress.js +53 -157
- package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
- package/dist/kernel/components/blocks/next-prev.js +16 -42
- package/dist/kernel/components/blocks/page-list.d.ts +1 -1
- package/dist/kernel/components/blocks/page-list.js +11 -16
- package/dist/kernel/components/blocks/search.d.ts +13 -2
- package/dist/kernel/components/blocks/search.js +116 -247
- package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
- package/dist/kernel/components/blocks/sidebar-node.js +56 -95
- package/dist/kernel/components/blocks/sidebar.d.ts +5 -23
- package/dist/kernel/components/blocks/sidebar.js +35 -103
- package/dist/kernel/components/blocks/theme-toggle.d.ts +7 -3
- package/dist/kernel/components/blocks/theme-toggle.js +2 -2
- package/dist/kernel/components/blocks/toc.js +42 -178
- package/dist/kernel/components/mdx/components/blockquote.js +3 -24
- package/dist/kernel/components/mdx/components/callout.d.ts +1 -1
- package/dist/kernel/components/mdx/components/callout.js +15 -47
- package/dist/kernel/components/mdx/components/code-block.js +2 -2
- package/dist/kernel/components/mdx/components/figure-caption.js +6 -24
- package/dist/kernel/components/mdx/components/figure.js +9 -36
- package/dist/kernel/components/mdx/components/footnotes.js +3 -24
- package/dist/kernel/components/mdx/components/heading-copy-link.js +13 -37
- package/dist/kernel/components/mdx/components/heading.d.ts +8 -3
- package/dist/kernel/components/mdx/components/heading.js +32 -116
- package/dist/kernel/components/mdx/components/hr.d.ts +5 -3
- package/dist/kernel/components/mdx/components/hr.js +2 -2
- package/dist/kernel/components/mdx/components/image-zoom.js +2 -3
- package/dist/kernel/components/mdx/components/image.js +22 -62
- package/dist/kernel/components/mdx/components/inline-code.js +3 -24
- package/dist/kernel/components/mdx/components/kbd.d.ts +9 -4
- package/dist/kernel/components/mdx/components/kbd.js +2 -2
- package/dist/kernel/components/mdx/components/link.d.ts +1 -2
- package/dist/kernel/components/mdx/components/link.js +2 -2
- package/dist/kernel/components/mdx/components/paragraph.js +13 -41
- package/dist/kernel/components/mdx/components/pre.js +3 -24
- package/dist/kernel/components/mdx/components/strikethrough.js +6 -24
- package/dist/kernel/components/mdx/components/table.js +2 -2
- package/dist/kernel/components/mdx/components/task-list.js +6 -28
- package/dist/kernel/components/mdx/components/video-player.js +53 -88
- package/dist/kernel/components/mdx/components/video.js +27 -75
- package/dist/kernel/components/mdx/error-boundary.d.ts +1 -1
- package/dist/kernel/components/mdx/error-boundary.js +12 -15
- package/dist/kernel/components/mdx/error-fallback.js +4 -4
- package/dist/kernel/components/mdx/mdx.d.ts +68 -11
- package/dist/kernel/components/mdx/mdx.js +29 -29
- package/dist/kernel/components/mdx/rehype-heading-ids.js +11 -67
- package/dist/kernel/components/mdx/types.d.ts +1 -1
- package/dist/kernel/components/ui/accordion.js +3 -26
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +23 -7
- package/dist/kernel/components/ui/breadcrumb-trail.js +32 -80
- package/dist/kernel/components/ui/breadcrumb.d.ts +1 -1
- package/dist/kernel/components/ui/breadcrumb.js +20 -54
- package/dist/kernel/components/ui/button-group.d.ts +4 -3
- package/dist/kernel/components/ui/button-group.js +7 -30
- package/dist/kernel/components/ui/button.js +13 -36
- package/dist/kernel/components/ui/card.d.ts +1 -1
- package/dist/kernel/components/ui/card.js +2 -23
- package/dist/kernel/components/ui/dialog.d.ts +9 -9
- package/dist/kernel/components/ui/dialog.js +15 -33
- package/dist/kernel/components/ui/drawer.d.ts +10 -10
- package/dist/kernel/components/ui/drawer.js +15 -33
- package/dist/kernel/components/ui/input.js +6 -30
- package/dist/kernel/components/ui/kbd.js +10 -31
- package/dist/kernel/components/ui/link.d.ts +1 -1
- package/dist/kernel/components/ui/link.js +53 -104
- package/dist/kernel/components/ui/menu.d.ts +21 -21
- package/dist/kernel/components/ui/menu.js +10 -32
- package/dist/kernel/components/ui/meta-key.d.ts +9 -4
- package/dist/kernel/components/ui/meta-key.js +2 -2
- package/dist/kernel/components/ui/navigation-menu.d.ts +14 -14
- package/dist/kernel/components/ui/navigation-menu.js +9 -30
- package/dist/kernel/components/ui/popover.d.ts +10 -10
- package/dist/kernel/components/ui/popover.js +19 -34
- package/dist/kernel/components/ui/progress.js +2 -25
- package/dist/kernel/components/ui/scroll-area.js +39 -118
- package/dist/kernel/components/ui/select.d.ts +15 -15
- package/dist/kernel/components/ui/select.js +19 -35
- package/dist/kernel/components/ui/separator.js +2 -25
- package/dist/kernel/components/ui/table.js +2 -23
- package/dist/kernel/components/ui/tabs.js +39 -99
- package/dist/kernel/components/ui/tag.d.ts +2 -2
- package/dist/kernel/components/ui/tag.js +4 -25
- package/dist/kernel/components/ui/text.d.ts +2 -2
- package/dist/kernel/components/ui/text.js +3 -25
- package/dist/kernel/components/ui/theme-toggle.d.ts +18 -4
- package/dist/kernel/components/ui/theme-toggle.js +18 -44
- package/dist/kernel/components/ui/toast.d.ts +10 -10
- package/dist/kernel/components/ui/toast.js +13 -35
- package/dist/kernel/components/ui/tooltip.d.ts +8 -8
- package/dist/kernel/components/ui/tooltip.js +8 -29
- package/dist/kernel/defaults.registry.d.ts +1 -1
- package/dist/kernel/defaults.registry.js +2 -2
- package/dist/kernel/framework-icons.d.ts +1 -0
- package/dist/kernel/framework-icons.js +39 -0
- package/dist/kernel/routes/agent/markdown.js +36 -65
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/layouts/group.js +20 -109
- package/dist/kernel/routes/metadata/feed.d.ts +1 -2
- package/dist/kernel/routes/metadata/feed.js +46 -127
- package/dist/kernel/routes/metadata/llms.d.ts +1 -2
- package/dist/kernel/routes/metadata/llms.js +40 -120
- package/dist/kernel/routes/metadata/og-image.d.ts +10 -0
- package/dist/kernel/routes/metadata/og-image.js +264 -198
- package/dist/kernel/routes/metadata/robots.d.ts +1 -2
- package/dist/kernel/routes/metadata/robots.js +21 -90
- package/dist/kernel/routes/metadata/sitemap.d.ts +1 -2
- package/dist/kernel/routes/metadata/sitemap.js +36 -102
- package/dist/kernel/routes/pages/group.d.ts +1 -1
- package/dist/kernel/routes/pages/group.js +42 -137
- package/dist/kernel/routes/pages/leaf.d.ts +1 -1
- package/dist/kernel/routes/pages/leaf.js +74 -213
- package/dist/kernel/routes/pages/root.d.ts +1 -1
- package/dist/kernel/routes/pages/root.js +37 -108
- package/dist/keyboard-shortcuts.js +69 -141
- package/dist/link-CYaCRDb6.d.ts +35 -0
- package/dist/resolvers/manifest-resolver.d.ts +3 -3
- package/dist/resolvers/manifest-resolver.js +15 -21
- package/dist/route-metadata-og-image-BeKKFHg7.d.ts +58 -0
- package/dist/search.d.ts +81 -4
- package/dist/search.js +124 -195
- package/dist/sidebar-types-Bgchdfd6.d.ts +25 -0
- package/dist/theme-scope.d.ts +15 -0
- package/dist/theme-scope.js +23 -0
- package/dist/types-B_b3C0U6.d.ts +63 -0
- package/dist/types-CIwwieNw.d.ts +127 -0
- package/dist/types-DHBm7-j6.d.ts +57 -0
- package/dist/types-sM2g9nW0.d.ts +12 -0
- package/dist/types.d.ts +0 -1
- package/dist/types.js +1 -1
- package/dist/utils/cn.d.ts +5 -9
- package/dist/utils/cn.js +13 -7
- package/dist/utils/heading-ids.js +20 -47
- package/dist/utils/pretty-date.js +7 -13
- package/init/seed/minimal/publish.os/assets/logo/publish-dev-logo.dark.png +0 -0
- package/init/seed/minimal/publish.os/assets/logo/publish-dev-logo.png +0 -0
- package/init/seed/minimal/publish.os/docs/content/get-started.mdx +54 -0
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +31 -0
- package/init/seed/minimal/publish.os/docs/content/theme.mdx +64 -0
- package/init/seed/minimal/publish.os/publish.os.config.json +21 -0
- package/init/seed/minimal/publish.os/theme.css +47 -0
- package/init/seed/minimal/seed.json +13 -0
- package/package.json +469 -35
- package/release/{package.json → app/lucide/package.json} +11 -5
- package/release/app/lucide/pnpm-lock.yaml.template +2905 -0
- package/release/app/lucide/pnpm-workspace.yaml +11 -0
- package/release/app/phosphor/package.json +30 -0
- package/release/app/phosphor/pnpm-lock.yaml.template +2908 -0
- package/release/app/phosphor/pnpm-workspace.yaml +11 -0
- package/release/app/tabler/package.json +30 -0
- package/release/app/tabler/pnpm-lock.yaml.template +2911 -0
- package/release/app/tabler/pnpm-workspace.yaml +11 -0
- package/release/compiler/package.json +20 -0
- package/release/compiler/pnpm-lock.yaml.template +2432 -0
- package/release/compiler/pnpm-workspace.yaml +11 -0
- package/release/release.json +29 -5
- package/release/runtime-pnpm-lock.yaml +0 -1316
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/popover.tsx
|
|
4
4
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
9
|
-
var twMerge = extendTailwindMerge({
|
|
10
|
-
extend: {
|
|
11
|
-
classGroups: {
|
|
12
|
-
z: [
|
|
13
|
-
"z-content",
|
|
14
|
-
"z-nav",
|
|
15
|
-
"z-overlay",
|
|
16
|
-
"z-modal",
|
|
17
|
-
"z-search",
|
|
18
|
-
"z-toast",
|
|
19
|
-
"z-progress"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function cn(...inputs) {
|
|
25
|
-
return twMerge(clsx(inputs));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/kernel/components/ui/popover.tsx
|
|
5
|
+
import { useThemeScope } from "@publish.os/nextjs/theme-scope";
|
|
6
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
29
7
|
import { jsx } from "react/jsx-runtime";
|
|
30
8
|
function Popover(props) {
|
|
31
9
|
return /* @__PURE__ */ jsx(BasePopover.Root, { ...props });
|
|
@@ -35,7 +13,7 @@ function PopoverTrigger({ className, ...props }) {
|
|
|
35
13
|
BasePopover.Trigger,
|
|
36
14
|
{
|
|
37
15
|
className: cn(
|
|
38
|
-
"rounded-button focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
16
|
+
"rounded-button focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
39
17
|
className
|
|
40
18
|
),
|
|
41
19
|
...props
|
|
@@ -43,7 +21,8 @@ function PopoverTrigger({ className, ...props }) {
|
|
|
43
21
|
);
|
|
44
22
|
}
|
|
45
23
|
function PopoverPortal(props) {
|
|
46
|
-
|
|
24
|
+
let themeScope = useThemeScope();
|
|
25
|
+
return /* @__PURE__ */ jsx(BasePopover.Portal, { ...props, ...themeScope });
|
|
47
26
|
}
|
|
48
27
|
function PopoverPositioner({
|
|
49
28
|
className,
|
|
@@ -53,7 +32,7 @@ function PopoverPositioner({
|
|
|
53
32
|
return /* @__PURE__ */ jsx(
|
|
54
33
|
BasePopover.Positioner,
|
|
55
34
|
{
|
|
56
|
-
className: cn("z-
|
|
35
|
+
className: cn("z-overlay outline-none", className),
|
|
57
36
|
sideOffset,
|
|
58
37
|
...props
|
|
59
38
|
}
|
|
@@ -64,7 +43,7 @@ function PopoverPopup({ className, ...props }) {
|
|
|
64
43
|
BasePopover.Popup,
|
|
65
44
|
{
|
|
66
45
|
className: cn(
|
|
67
|
-
"animate-popup w-72 rounded-popup border border-
|
|
46
|
+
"animate-popup w-72 rounded-popup border border-popover-stroke-3 bg-popover-surface-1 p-4 text-popover-foreground-1 shadow-popover outline-none [--text-foreground:var(--popover-foreground-1)] [--text-muted-foreground:var(--popover-foreground-4)]",
|
|
68
47
|
className
|
|
69
48
|
),
|
|
70
49
|
...props
|
|
@@ -75,7 +54,10 @@ function PopoverTitle({ className, ...props }) {
|
|
|
75
54
|
return /* @__PURE__ */ jsx(
|
|
76
55
|
BasePopover.Title,
|
|
77
56
|
{
|
|
78
|
-
className: cn(
|
|
57
|
+
className: cn(
|
|
58
|
+
"text-sm font-semibold text-popover-foreground-1",
|
|
59
|
+
className
|
|
60
|
+
),
|
|
79
61
|
...props
|
|
80
62
|
}
|
|
81
63
|
);
|
|
@@ -87,7 +69,10 @@ function PopoverDescription({
|
|
|
87
69
|
return /* @__PURE__ */ jsx(
|
|
88
70
|
BasePopover.Description,
|
|
89
71
|
{
|
|
90
|
-
className: cn(
|
|
72
|
+
className: cn(
|
|
73
|
+
"mt-1 text-sm leading-6 text-popover-foreground-4",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
91
76
|
...props
|
|
92
77
|
}
|
|
93
78
|
);
|
|
@@ -97,8 +82,8 @@ function PopoverClose({ className, ...props }) {
|
|
|
97
82
|
BasePopover.Close,
|
|
98
83
|
{
|
|
99
84
|
className: cn(
|
|
100
|
-
"inline-flex size-8 items-center justify-center rounded-button text-
|
|
101
|
-
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
85
|
+
"inline-flex size-8 items-center justify-center rounded-button text-popover-foreground-4 transition-colors hover:bg-popover-surface-3 hover:text-popover-foreground-1",
|
|
86
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
102
87
|
className
|
|
103
88
|
),
|
|
104
89
|
...props
|
|
@@ -110,7 +95,7 @@ function PopoverArrow({ className, ...props }) {
|
|
|
110
95
|
BasePopover.Arrow,
|
|
111
96
|
{
|
|
112
97
|
className: cn(
|
|
113
|
-
"size-2 rotate-45 border border-
|
|
98
|
+
"size-2 rotate-45 border border-popover-stroke-3 bg-popover-surface-1",
|
|
114
99
|
className
|
|
115
100
|
),
|
|
116
101
|
...props
|
|
@@ -1,31 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/progress.tsx
|
|
4
4
|
import { Progress as BaseProgress } from "@base-ui/react/progress";
|
|
5
|
-
|
|
6
|
-
// src/utils/cn.ts
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
9
|
-
var twMerge = extendTailwindMerge({
|
|
10
|
-
extend: {
|
|
11
|
-
classGroups: {
|
|
12
|
-
z: [
|
|
13
|
-
"z-content",
|
|
14
|
-
"z-nav",
|
|
15
|
-
"z-overlay",
|
|
16
|
-
"z-modal",
|
|
17
|
-
"z-search",
|
|
18
|
-
"z-toast",
|
|
19
|
-
"z-progress"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function cn(...inputs) {
|
|
25
|
-
return twMerge(clsx(inputs));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/kernel/components/ui/progress.tsx
|
|
5
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
29
6
|
import { jsx } from "react/jsx-runtime";
|
|
30
7
|
function Progress(props) {
|
|
31
8
|
return /* @__PURE__ */ jsx(BaseProgress.Root, { ...props });
|
|
@@ -1,31 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/scroll-area.tsx
|
|
4
4
|
import { ScrollArea as BaseScrollArea } from "@base-ui/react/scroll-area";
|
|
5
|
-
|
|
6
|
-
// src/utils/cn.ts
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
9
|
-
var twMerge = extendTailwindMerge({
|
|
10
|
-
extend: {
|
|
11
|
-
classGroups: {
|
|
12
|
-
z: [
|
|
13
|
-
"z-content",
|
|
14
|
-
"z-nav",
|
|
15
|
-
"z-overlay",
|
|
16
|
-
"z-modal",
|
|
17
|
-
"z-search",
|
|
18
|
-
"z-toast",
|
|
19
|
-
"z-progress"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function cn(...inputs) {
|
|
25
|
-
return twMerge(clsx(inputs));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/kernel/components/ui/scroll-area.tsx
|
|
5
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
29
6
|
import { cva } from "class-variance-authority";
|
|
30
7
|
import {
|
|
31
8
|
Children,
|
|
@@ -50,18 +27,11 @@ var scrollAreaVariants = cva(
|
|
|
50
27
|
variant: "default"
|
|
51
28
|
}
|
|
52
29
|
}
|
|
53
|
-
);
|
|
54
|
-
var DEFAULT_MASK_SIZE = 24;
|
|
30
|
+
), DEFAULT_MASK_SIZE = 24;
|
|
55
31
|
function mergeRefs(...refs) {
|
|
56
32
|
return (value) => {
|
|
57
|
-
for (
|
|
58
|
-
|
|
59
|
-
if (typeof ref === "function") {
|
|
60
|
-
ref(value);
|
|
61
|
-
} else {
|
|
62
|
-
ref.current = value;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
33
|
+
for (let ref of refs)
|
|
34
|
+
ref && (typeof ref == "function" ? ref(value) : ref.current = value);
|
|
65
35
|
};
|
|
66
36
|
}
|
|
67
37
|
function normalizeMaskConfig({
|
|
@@ -69,11 +39,8 @@ function normalizeMaskConfig({
|
|
|
69
39
|
orientation,
|
|
70
40
|
variant
|
|
71
41
|
}) {
|
|
72
|
-
if (mask ===
|
|
73
|
-
|
|
74
|
-
const maskConfig = typeof mask === "object" ? mask : {};
|
|
75
|
-
const axis = maskConfig.axis ?? (orientation === "horizontal" ? "horizontal" : "vertical");
|
|
76
|
-
const size = maskConfig.size ?? (axis === "horizontal" ? maskConfig.width : maskConfig.height) ?? maskConfig.height ?? maskConfig.width ?? DEFAULT_MASK_SIZE;
|
|
42
|
+
if (mask === !1 || !mask && variant !== "gradient") return null;
|
|
43
|
+
let maskConfig = typeof mask == "object" ? mask : {}, axis = maskConfig.axis ?? (orientation === "horizontal" ? "horizontal" : "vertical"), size = maskConfig.size ?? (axis === "horizontal" ? maskConfig.width : maskConfig.height) ?? maskConfig.height ?? maskConfig.width ?? DEFAULT_MASK_SIZE;
|
|
77
44
|
return {
|
|
78
45
|
axis,
|
|
79
46
|
size,
|
|
@@ -85,12 +52,11 @@ function createMaskValue({
|
|
|
85
52
|
endSize,
|
|
86
53
|
startSize
|
|
87
54
|
}) {
|
|
88
|
-
|
|
89
|
-
return `linear-gradient(${direction}, transparent 0, black ${startSize}px, black calc(100% - ${endSize}px), transparent 100%)`;
|
|
55
|
+
return `linear-gradient(${axis === "horizontal" ? "to right" : "to bottom"}, transparent 0, black ${startSize}px, black calc(100% - ${endSize}px), transparent 100%)`;
|
|
90
56
|
}
|
|
91
57
|
function initialMaskStyle(mask) {
|
|
92
58
|
if (!mask) return {};
|
|
93
|
-
|
|
59
|
+
let maskValue = createMaskValue({
|
|
94
60
|
axis: mask.axis,
|
|
95
61
|
endSize: mask.size,
|
|
96
62
|
startSize: 0
|
|
@@ -106,7 +72,7 @@ function isScrollAreaBlock(child) {
|
|
|
106
72
|
function hasScrollAreaBlocks(children) {
|
|
107
73
|
return Children.toArray(children).some(isScrollAreaBlock);
|
|
108
74
|
}
|
|
109
|
-
var ScrollAreaRoot = forwardRef(function
|
|
75
|
+
var ScrollAreaRoot = forwardRef(function({ className, ...props }, ref) {
|
|
110
76
|
return /* @__PURE__ */ jsx(
|
|
111
77
|
BaseScrollArea.Root,
|
|
112
78
|
{
|
|
@@ -129,7 +95,7 @@ function ScrollArea({
|
|
|
129
95
|
cornerProps,
|
|
130
96
|
mask,
|
|
131
97
|
orientation = "vertical",
|
|
132
|
-
scrollbar =
|
|
98
|
+
scrollbar = !0,
|
|
133
99
|
scrollbarClassName,
|
|
134
100
|
scrollbarProps,
|
|
135
101
|
thumbClassName,
|
|
@@ -140,18 +106,7 @@ function ScrollArea({
|
|
|
140
106
|
viewportRef,
|
|
141
107
|
...props
|
|
142
108
|
}) {
|
|
143
|
-
|
|
144
|
-
const [showStartBorder, setShowStartBorder] = useState(false);
|
|
145
|
-
const [showEndBorder, setShowEndBorder] = useState(false);
|
|
146
|
-
const maskConfig = typeof mask === "object" ? mask : void 0;
|
|
147
|
-
const maskFallback = typeof mask === "object" ? true : mask;
|
|
148
|
-
const hasMaskConfig = maskConfig !== void 0;
|
|
149
|
-
const maskAxis = maskConfig?.axis;
|
|
150
|
-
const maskHeight = maskConfig?.height;
|
|
151
|
-
const maskSize = maskConfig?.size;
|
|
152
|
-
const maskTriggerSize = maskConfig?.triggerSize;
|
|
153
|
-
const maskWidth = maskConfig?.width;
|
|
154
|
-
const normalizedMask = useMemo(
|
|
109
|
+
let internalViewportRef = useRef(null), [showStartBorder, setShowStartBorder] = useState(!1), [showEndBorder, setShowEndBorder] = useState(!1), maskConfig = typeof mask == "object" ? mask : void 0, maskFallback = typeof mask == "object" ? !0 : mask, hasMaskConfig = maskConfig !== void 0, maskAxis = maskConfig?.axis, maskHeight = maskConfig?.height, maskSize = maskConfig?.size, maskTriggerSize = maskConfig?.triggerSize, maskWidth = maskConfig?.width, normalizedMask = useMemo(
|
|
155
110
|
() => normalizeMaskConfig({
|
|
156
111
|
mask: hasMaskConfig ? {
|
|
157
112
|
axis: maskAxis,
|
|
@@ -174,68 +129,44 @@ function ScrollArea({
|
|
|
174
129
|
orientation,
|
|
175
130
|
variant
|
|
176
131
|
]
|
|
177
|
-
)
|
|
178
|
-
const viewportStyle = useMemo(
|
|
132
|
+
), viewportStyle = useMemo(
|
|
179
133
|
() => ({
|
|
180
134
|
...initialMaskStyle(normalizedMask),
|
|
181
135
|
...viewportProps?.style
|
|
182
136
|
}),
|
|
183
137
|
[normalizedMask, viewportProps?.style]
|
|
184
|
-
)
|
|
185
|
-
const setViewportRef = useMemo(
|
|
138
|
+
), setViewportRef = useMemo(
|
|
186
139
|
() => mergeRefs(internalViewportRef, viewportRef),
|
|
187
140
|
[viewportRef]
|
|
188
141
|
);
|
|
189
|
-
useEffect(() => {
|
|
190
|
-
|
|
191
|
-
if (!viewport || !normalizedMask && border === "none")
|
|
142
|
+
if (useEffect(() => {
|
|
143
|
+
let viewport = internalViewportRef.current;
|
|
144
|
+
if (!viewport || !normalizedMask && border === "none")
|
|
192
145
|
return;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
const isHorizontal = scrollAxis === "horizontal";
|
|
197
|
-
const scrollOffset = isHorizontal ? viewport.scrollLeft : viewport.scrollTop;
|
|
198
|
-
const scrollSize = isHorizontal ? viewport.scrollWidth : viewport.scrollHeight;
|
|
199
|
-
const clientSize = isHorizontal ? viewport.clientWidth : viewport.clientHeight;
|
|
200
|
-
const maxScroll = Math.max(0, scrollSize - clientSize);
|
|
201
|
-
const hasOverflow = maxScroll > 1;
|
|
202
|
-
const showStart = hasOverflow && scrollOffset > 1;
|
|
203
|
-
const showEnd = hasOverflow && scrollOffset < maxScroll - 1;
|
|
204
|
-
setShowStartBorder(showStart);
|
|
205
|
-
setShowEndBorder(showEnd);
|
|
206
|
-
if (!normalizedMask) return;
|
|
146
|
+
let updateScrollState = () => {
|
|
147
|
+
let isHorizontal = (normalizedMask?.axis ?? (orientation === "horizontal" ? "horizontal" : "vertical")) === "horizontal", scrollOffset = isHorizontal ? viewport.scrollLeft : viewport.scrollTop, scrollSize = isHorizontal ? viewport.scrollWidth : viewport.scrollHeight, clientSize = isHorizontal ? viewport.clientWidth : viewport.clientHeight, maxScroll = Math.max(0, scrollSize - clientSize), hasOverflow = maxScroll > 1, showStart = hasOverflow && scrollOffset > 1, showEnd = hasOverflow && scrollOffset < maxScroll - 1;
|
|
148
|
+
if (setShowStartBorder(showStart), setShowEndBorder(showEnd), !normalizedMask) return;
|
|
207
149
|
if (!hasOverflow) {
|
|
208
|
-
viewport.style.removeProperty("mask-image");
|
|
209
|
-
viewport.style.removeProperty("-webkit-mask-image");
|
|
150
|
+
viewport.style.removeProperty("mask-image"), viewport.style.removeProperty("-webkit-mask-image");
|
|
210
151
|
return;
|
|
211
152
|
}
|
|
212
|
-
|
|
153
|
+
let startSize = Math.min(
|
|
213
154
|
normalizedMask.size,
|
|
214
155
|
scrollOffset / normalizedMask.triggerSize * normalizedMask.size
|
|
215
|
-
)
|
|
216
|
-
const remainingScroll = maxScroll - scrollOffset;
|
|
217
|
-
const endSize = Math.min(
|
|
156
|
+
), remainingScroll = maxScroll - scrollOffset, endSize = Math.min(
|
|
218
157
|
normalizedMask.size,
|
|
219
158
|
remainingScroll / normalizedMask.triggerSize * normalizedMask.size
|
|
220
|
-
)
|
|
221
|
-
const maskValue = createMaskValue({
|
|
159
|
+
), maskValue = createMaskValue({
|
|
222
160
|
axis: normalizedMask.axis,
|
|
223
161
|
endSize,
|
|
224
162
|
startSize
|
|
225
163
|
});
|
|
226
|
-
viewport.style.setProperty("mask-image", maskValue);
|
|
227
|
-
|
|
164
|
+
viewport.style.setProperty("mask-image", maskValue), viewport.style.setProperty("-webkit-mask-image", maskValue);
|
|
165
|
+
}, resizeObserver = new ResizeObserver(updateScrollState);
|
|
166
|
+
return resizeObserver.observe(viewport), viewport.addEventListener("scroll", updateScrollState, { passive: !0 }), updateScrollState(), () => {
|
|
167
|
+
resizeObserver.disconnect(), viewport.removeEventListener("scroll", updateScrollState);
|
|
228
168
|
};
|
|
229
|
-
|
|
230
|
-
resizeObserver.observe(viewport);
|
|
231
|
-
viewport.addEventListener("scroll", updateScrollState, { passive: true });
|
|
232
|
-
updateScrollState();
|
|
233
|
-
return () => {
|
|
234
|
-
resizeObserver.disconnect();
|
|
235
|
-
viewport.removeEventListener("scroll", updateScrollState);
|
|
236
|
-
};
|
|
237
|
-
}, [border, normalizedMask, orientation]);
|
|
238
|
-
if (hasScrollAreaBlocks(children)) {
|
|
169
|
+
}, [border, normalizedMask, orientation]), hasScrollAreaBlocks(children))
|
|
239
170
|
return /* @__PURE__ */ jsx(
|
|
240
171
|
ScrollAreaRoot,
|
|
241
172
|
{
|
|
@@ -244,13 +175,7 @@ function ScrollArea({
|
|
|
244
175
|
children
|
|
245
176
|
}
|
|
246
177
|
);
|
|
247
|
-
|
|
248
|
-
const showVerticalScrollbar = scrollbar && orientation !== "horizontal";
|
|
249
|
-
const showHorizontalScrollbar = scrollbar && orientation !== "vertical";
|
|
250
|
-
const showCorner = corner ?? orientation === "both";
|
|
251
|
-
const defaultStartBorderClassName = orientation === "horizontal" ? "border-l-stroke-2" : "border-t-stroke-2";
|
|
252
|
-
const defaultEndBorderClassName = orientation === "horizontal" ? "border-r-stroke-2" : "border-b-stroke-2";
|
|
253
|
-
const scrollBorderClassName = orientation === "horizontal" ? cn(
|
|
178
|
+
let showVerticalScrollbar = scrollbar && orientation !== "horizontal", showHorizontalScrollbar = scrollbar && orientation !== "vertical", showCorner = corner ?? orientation === "both", defaultStartBorderClassName = orientation === "horizontal" ? "border-l-stroke-2" : "border-t-stroke-2", defaultEndBorderClassName = orientation === "horizontal" ? "border-r-stroke-2" : "border-b-stroke-2", scrollBorderClassName = orientation === "horizontal" ? cn(
|
|
254
179
|
border !== "none" && "border-x border-x-transparent transition-colors",
|
|
255
180
|
(border === "start" || border === "both") && showStartBorder && (borderStartClassName ?? defaultStartBorderClassName),
|
|
256
181
|
(border === "end" || border === "both") && showEndBorder && (borderEndClassName ?? defaultEndBorderClassName)
|
|
@@ -327,7 +252,7 @@ function ScrollArea({
|
|
|
327
252
|
}
|
|
328
253
|
);
|
|
329
254
|
}
|
|
330
|
-
var ScrollAreaViewport = forwardRef(function
|
|
255
|
+
var ScrollAreaViewport = forwardRef(function({ className, ...props }, ref) {
|
|
331
256
|
return /* @__PURE__ */ jsx(
|
|
332
257
|
BaseScrollArea.Viewport,
|
|
333
258
|
{
|
|
@@ -336,17 +261,15 @@ var ScrollAreaViewport = forwardRef(function ScrollAreaViewport2({ className, ..
|
|
|
336
261
|
...props
|
|
337
262
|
}
|
|
338
263
|
);
|
|
339
|
-
})
|
|
340
|
-
var ScrollAreaContent = forwardRef(function ScrollAreaContent2({ className, ...props }, ref) {
|
|
264
|
+
}), ScrollAreaContent = forwardRef(function({ className, ...props }, ref) {
|
|
341
265
|
return /* @__PURE__ */ jsx(BaseScrollArea.Content, { className: cn(className), ref, ...props });
|
|
342
|
-
})
|
|
343
|
-
var ScrollAreaScrollbar = forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", ...props }, ref) {
|
|
266
|
+
}), ScrollAreaScrollbar = forwardRef(function({ className, orientation = "vertical", ...props }, ref) {
|
|
344
267
|
return /* @__PURE__ */ jsx(
|
|
345
268
|
BaseScrollArea.Scrollbar,
|
|
346
269
|
{
|
|
347
270
|
className: cn(
|
|
348
|
-
"flex touch-none select-none bg-
|
|
349
|
-
orientation === "vertical" ? "h-full w-
|
|
271
|
+
"flex touch-none select-none bg-[var(--scrollbar-track-surface)] p-[var(--scrollbar-thumb-stroke-width)] transition-colors",
|
|
272
|
+
orientation === "vertical" ? "h-full w-[var(--scrollbar-size)]" : "h-[var(--scrollbar-size)] w-full",
|
|
350
273
|
className
|
|
351
274
|
),
|
|
352
275
|
orientation,
|
|
@@ -354,25 +277,23 @@ var ScrollAreaScrollbar = forwardRef(function ScrollAreaScrollbar2({ className,
|
|
|
354
277
|
...props
|
|
355
278
|
}
|
|
356
279
|
);
|
|
357
|
-
})
|
|
358
|
-
var ScrollAreaThumb = forwardRef(function ScrollAreaThumb2({ className, ...props }, ref) {
|
|
280
|
+
}), ScrollAreaThumb = forwardRef(function({ className, ...props }, ref) {
|
|
359
281
|
return /* @__PURE__ */ jsx(
|
|
360
282
|
BaseScrollArea.Thumb,
|
|
361
283
|
{
|
|
362
284
|
className: cn(
|
|
363
|
-
"flex-1 rounded-scrollbar-thumb bg-stroke
|
|
285
|
+
"flex-1 rounded-scrollbar-thumb bg-[var(--scrollbar-thumb-stroke)] transition-colors hover:bg-[var(--scrollbar-thumb-hover-stroke)]",
|
|
364
286
|
className
|
|
365
287
|
),
|
|
366
288
|
ref,
|
|
367
289
|
...props
|
|
368
290
|
}
|
|
369
291
|
);
|
|
370
|
-
})
|
|
371
|
-
var ScrollAreaCorner = forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
292
|
+
}), ScrollAreaCorner = forwardRef(function({ className, ...props }, ref) {
|
|
372
293
|
return /* @__PURE__ */ jsx(
|
|
373
294
|
BaseScrollArea.Corner,
|
|
374
295
|
{
|
|
375
|
-
className: cn("bg-
|
|
296
|
+
className: cn("bg-[var(--scrollbar-track-surface)]", className),
|
|
376
297
|
ref,
|
|
377
298
|
...props
|
|
378
299
|
}
|
|
@@ -2,26 +2,26 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { Select as Select$1 } from '@base-ui/react/select';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import {
|
|
5
|
+
import { ComponentPropsWithRef } from 'react';
|
|
6
6
|
|
|
7
|
-
type SelectRootProps =
|
|
8
|
-
type SelectLabelProps =
|
|
7
|
+
type SelectRootProps = ComponentPropsWithRef<typeof Select$1.Root>;
|
|
8
|
+
type SelectLabelProps = ComponentPropsWithRef<typeof Select$1.Label>;
|
|
9
9
|
declare const selectTriggerVariants: (props?: ({
|
|
10
10
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
11
11
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
12
|
type SelectTriggerVariantProps = VariantProps<typeof selectTriggerVariants>;
|
|
13
|
-
type SelectTriggerProps =
|
|
14
|
-
type SelectValueProps =
|
|
15
|
-
type SelectIconProps =
|
|
16
|
-
type SelectPortalProps =
|
|
17
|
-
type SelectPositionerProps =
|
|
18
|
-
type SelectPopupProps =
|
|
19
|
-
type SelectListProps =
|
|
20
|
-
type SelectItemProps =
|
|
21
|
-
type SelectItemIndicatorProps =
|
|
22
|
-
type SelectItemTextProps =
|
|
23
|
-
type SelectGroupProps =
|
|
24
|
-
type SelectGroupLabelProps =
|
|
13
|
+
type SelectTriggerProps = ComponentPropsWithRef<typeof Select$1.Trigger> & SelectTriggerVariantProps;
|
|
14
|
+
type SelectValueProps = ComponentPropsWithRef<typeof Select$1.Value>;
|
|
15
|
+
type SelectIconProps = ComponentPropsWithRef<typeof Select$1.Icon>;
|
|
16
|
+
type SelectPortalProps = ComponentPropsWithRef<typeof Select$1.Portal>;
|
|
17
|
+
type SelectPositionerProps = ComponentPropsWithRef<typeof Select$1.Positioner>;
|
|
18
|
+
type SelectPopupProps = ComponentPropsWithRef<typeof Select$1.Popup>;
|
|
19
|
+
type SelectListProps = ComponentPropsWithRef<typeof Select$1.List>;
|
|
20
|
+
type SelectItemProps = ComponentPropsWithRef<typeof Select$1.Item>;
|
|
21
|
+
type SelectItemIndicatorProps = ComponentPropsWithRef<typeof Select$1.ItemIndicator>;
|
|
22
|
+
type SelectItemTextProps = ComponentPropsWithRef<typeof Select$1.ItemText>;
|
|
23
|
+
type SelectGroupProps = ComponentPropsWithRef<typeof Select$1.Group>;
|
|
24
|
+
type SelectGroupLabelProps = ComponentPropsWithRef<typeof Select$1.GroupLabel>;
|
|
25
25
|
declare function Select(props: SelectRootProps): react_jsx_runtime.JSX.Element;
|
|
26
26
|
declare function SelectLabel({ className, ...props }: SelectLabelProps): react_jsx_runtime.JSX.Element;
|
|
27
27
|
declare function SelectTrigger({ className, size, ...props }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,38 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
3
|
-
|
|
4
|
-
// src/utils/cn.ts
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
7
|
-
var twMerge = extendTailwindMerge({
|
|
8
|
-
extend: {
|
|
9
|
-
classGroups: {
|
|
10
|
-
z: [
|
|
11
|
-
"z-content",
|
|
12
|
-
"z-nav",
|
|
13
|
-
"z-overlay",
|
|
14
|
-
"z-modal",
|
|
15
|
-
"z-search",
|
|
16
|
-
"z-toast",
|
|
17
|
-
"z-progress"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
function cn(...inputs) {
|
|
23
|
-
return twMerge(clsx(inputs));
|
|
24
|
-
}
|
|
1
|
+
"use client";
|
|
25
2
|
|
|
26
|
-
// src/
|
|
3
|
+
// src/components/ui/select.tsx
|
|
4
|
+
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
5
|
+
import {
|
|
6
|
+
FrameworkCheckIcon as Check,
|
|
7
|
+
FrameworkChevronDownIcon as ChevronDown
|
|
8
|
+
} from "@publish.os/nextjs/kernel/framework-icons";
|
|
9
|
+
import { useThemeScope } from "@publish.os/nextjs/theme-scope";
|
|
10
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
27
11
|
import { cva } from "class-variance-authority";
|
|
28
|
-
import { Check, ChevronDown } from "lucide-react";
|
|
29
12
|
import { jsx } from "react/jsx-runtime";
|
|
30
13
|
var selectTriggerVariants = cva(
|
|
31
14
|
[
|
|
32
15
|
"inline-flex w-full min-w-0 items-center justify-between gap-2 rounded-input border border-stroke-2 bg-surface-1 text-foreground-1 transition-colors",
|
|
33
|
-
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
16
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
34
17
|
"disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
35
|
-
"data-[placeholder]:text-foreground-3 data-[popup-open]:border-focus-
|
|
18
|
+
"data-[placeholder]:text-foreground-3 data-[popup-open]:border-focus-stroke"
|
|
36
19
|
].join(" "),
|
|
37
20
|
{
|
|
38
21
|
variants: {
|
|
@@ -97,7 +80,8 @@ function SelectIcon({ children, className, ...props }) {
|
|
|
97
80
|
);
|
|
98
81
|
}
|
|
99
82
|
function SelectPortal(props) {
|
|
100
|
-
|
|
83
|
+
let themeScope = useThemeScope();
|
|
84
|
+
return /* @__PURE__ */ jsx(BaseSelect.Portal, { ...props, ...themeScope });
|
|
101
85
|
}
|
|
102
86
|
function SelectPositioner({
|
|
103
87
|
className,
|
|
@@ -107,7 +91,7 @@ function SelectPositioner({
|
|
|
107
91
|
return /* @__PURE__ */ jsx(
|
|
108
92
|
BaseSelect.Positioner,
|
|
109
93
|
{
|
|
110
|
-
className: cn("z-
|
|
94
|
+
className: cn("z-overlay outline-none", className),
|
|
111
95
|
sideOffset,
|
|
112
96
|
...props
|
|
113
97
|
}
|
|
@@ -118,7 +102,7 @@ function SelectPopup({ className, ...props }) {
|
|
|
118
102
|
BaseSelect.Popup,
|
|
119
103
|
{
|
|
120
104
|
className: cn(
|
|
121
|
-
"animate-popup max-h-72 w-[min(calc(var(--anchor-width)+2rem),var(--available-width))] min-w-[var(--anchor-width)] overflow-hidden rounded-popup border border-
|
|
105
|
+
"animate-popup max-h-72 w-[min(calc(var(--anchor-width)+2rem),var(--available-width))] min-w-[var(--anchor-width)] overflow-hidden rounded-popup border border-select-stroke-3 bg-select-surface-1 p-1 text-select-foreground-1 shadow-select outline-none [--text-foreground:var(--select-foreground-1)] [--text-muted-foreground:var(--select-foreground-4)]",
|
|
122
106
|
className
|
|
123
107
|
),
|
|
124
108
|
...props
|
|
@@ -133,9 +117,9 @@ function SelectItem({ className, ...props }) {
|
|
|
133
117
|
BaseSelect.Item,
|
|
134
118
|
{
|
|
135
119
|
className: cn(
|
|
136
|
-
"relative flex min-w-0 cursor-default select-none items-center rounded-[max(calc(var(--radius-popup)_-_0.25rem),0px)] py-1.5 pl-8 pr-2 text-sm text-
|
|
137
|
-
"data-[highlighted]:bg-
|
|
138
|
-
"data-disabled:pointer-events-none data-disabled:text-
|
|
120
|
+
"relative flex min-w-0 cursor-default select-none items-center rounded-[max(calc(var(--radius-popup)_-_0.25rem),0px)] py-1.5 pl-8 pr-2 text-sm text-select-foreground-1 outline-none",
|
|
121
|
+
"data-[highlighted]:bg-select-highlight-surface data-[highlighted]:text-select-highlight-foreground data-[selected]:bg-select-surface-4 data-[selected]:text-select-foreground-1 data-[selected]:data-[highlighted]:bg-select-highlight-surface data-[selected]:data-[highlighted]:text-select-highlight-foreground",
|
|
122
|
+
"data-disabled:pointer-events-none data-disabled:text-select-foreground-4",
|
|
139
123
|
className
|
|
140
124
|
),
|
|
141
125
|
...props
|
|
@@ -179,7 +163,7 @@ function SelectGroupLabel({
|
|
|
179
163
|
BaseSelect.GroupLabel,
|
|
180
164
|
{
|
|
181
165
|
className: cn(
|
|
182
|
-
"px-2 py-1 text-xs font-medium text-
|
|
166
|
+
"px-2 py-1 text-xs font-medium text-select-foreground-4",
|
|
183
167
|
className
|
|
184
168
|
),
|
|
185
169
|
...props
|
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/components/ui/separator.tsx
|
|
2
2
|
import { Separator as BaseSeparator } from "@base-ui/react/separator";
|
|
3
|
-
|
|
4
|
-
// src/utils/cn.ts
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
7
|
-
var twMerge = extendTailwindMerge({
|
|
8
|
-
extend: {
|
|
9
|
-
classGroups: {
|
|
10
|
-
z: [
|
|
11
|
-
"z-content",
|
|
12
|
-
"z-nav",
|
|
13
|
-
"z-overlay",
|
|
14
|
-
"z-modal",
|
|
15
|
-
"z-search",
|
|
16
|
-
"z-toast",
|
|
17
|
-
"z-progress"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
function cn(...inputs) {
|
|
23
|
-
return twMerge(clsx(inputs));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// src/kernel/components/ui/separator.tsx
|
|
3
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
27
4
|
import { jsx } from "react/jsx-runtime";
|
|
28
5
|
function Separator({
|
|
29
6
|
className,
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
import {
|
|
3
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
-
var twMerge = extendTailwindMerge({
|
|
5
|
-
extend: {
|
|
6
|
-
classGroups: {
|
|
7
|
-
z: [
|
|
8
|
-
"z-content",
|
|
9
|
-
"z-nav",
|
|
10
|
-
"z-overlay",
|
|
11
|
-
"z-modal",
|
|
12
|
-
"z-search",
|
|
13
|
-
"z-toast",
|
|
14
|
-
"z-progress"
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
function cn(...inputs) {
|
|
20
|
-
return twMerge(clsx(inputs));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// src/kernel/components/ui/table.tsx
|
|
1
|
+
// src/components/ui/table.tsx
|
|
2
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
24
3
|
import { jsx } from "react/jsx-runtime";
|
|
25
4
|
function Table({
|
|
26
5
|
className,
|