@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,37 +1,14 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
import { buttonVariants } from "
|
|
3
|
-
import { Separator } from "
|
|
4
|
-
|
|
5
|
-
// src/utils/cn.ts
|
|
6
|
-
import { clsx } from "clsx";
|
|
7
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
8
|
-
var twMerge = extendTailwindMerge({
|
|
9
|
-
extend: {
|
|
10
|
-
classGroups: {
|
|
11
|
-
z: [
|
|
12
|
-
"z-content",
|
|
13
|
-
"z-nav",
|
|
14
|
-
"z-overlay",
|
|
15
|
-
"z-modal",
|
|
16
|
-
"z-search",
|
|
17
|
-
"z-toast",
|
|
18
|
-
"z-progress"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
function cn(...inputs) {
|
|
24
|
-
return twMerge(clsx(inputs));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// src/kernel/components/ui/button-group.tsx
|
|
1
|
+
// src/components/ui/button-group.tsx
|
|
2
|
+
import { buttonVariants } from "@publish.os/nextjs/kernel/components/ui/button";
|
|
3
|
+
import { Separator } from "@publish.os/nextjs/kernel/components/ui/separator";
|
|
4
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
28
5
|
import { cva } from "class-variance-authority";
|
|
29
6
|
import { jsx } from "react/jsx-runtime";
|
|
30
7
|
var buttonGroupVariants = cva(
|
|
31
8
|
[
|
|
32
9
|
"inline-flex w-fit items-stretch",
|
|
33
10
|
"has-[>[data-slot=button-group]]:gap-2",
|
|
34
|
-
"[&>*]:focus-visible:relative [&>*]:focus-visible:z-
|
|
11
|
+
"[&>*]:focus-visible:relative [&>*]:focus-visible:z-content",
|
|
35
12
|
"[&>input]:flex-1",
|
|
36
13
|
"[&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit"
|
|
37
14
|
].join(" "),
|
|
@@ -52,7 +29,7 @@ function ButtonGroup({
|
|
|
52
29
|
orientation,
|
|
53
30
|
...props
|
|
54
31
|
}) {
|
|
55
|
-
|
|
32
|
+
let resolvedOrientation = orientation ?? "horizontal";
|
|
56
33
|
return (
|
|
57
34
|
// biome-ignore lint/a11y/useSemanticElements: ButtonGroup can wrap buttons, links, inputs, and composite triggers; fieldset semantics would be too narrow.
|
|
58
35
|
/* @__PURE__ */ jsx(
|
|
@@ -80,7 +57,7 @@ function ButtonGroupText({
|
|
|
80
57
|
"div",
|
|
81
58
|
{
|
|
82
59
|
className: cn(
|
|
83
|
-
buttonVariants({ iconOnly:
|
|
60
|
+
buttonVariants({ iconOnly: !1, size, variant }),
|
|
84
61
|
"pointer-events-none",
|
|
85
62
|
className
|
|
86
63
|
),
|
|
@@ -1,45 +1,22 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/components/ui/button.tsx
|
|
2
2
|
import { Button as BaseButton } from "@base-ui/react/button";
|
|
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/button.tsx
|
|
3
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
27
4
|
import { cva } from "class-variance-authority";
|
|
28
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
6
|
var buttonVariants = cva(
|
|
30
7
|
[
|
|
31
8
|
"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-button border font-medium leading-none",
|
|
32
|
-
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
9
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
33
10
|
"disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
34
11
|
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
|
|
35
12
|
].join(" "),
|
|
36
13
|
{
|
|
37
14
|
variants: {
|
|
38
15
|
variant: {
|
|
39
|
-
solid: "border-accent-
|
|
40
|
-
soft: "border-0 bg-accent-
|
|
41
|
-
outline: "border-stroke-2 bg-transparent text-foreground-1 hover:not-data-disabled:bg-surface-hover active:not-data-disabled:bg-surface-active data-[state=path-active]:border-accent-
|
|
42
|
-
ghost: "border-transparent bg-transparent text-foreground-2 hover:not-data-disabled:bg-surface-hover hover:not-data-disabled:text-foreground-1 active:not-data-disabled:bg-surface-active data-[state=path-active]:bg-accent-
|
|
16
|
+
solid: "border-accent-1 bg-accent-1 text-accent-1-foreground shadow-sm hover:not-data-disabled:border-accent-1-hover hover:not-data-disabled:bg-accent-1-hover active:not-data-disabled:border-accent-1-active active:not-data-disabled:bg-accent-1-active data-[state=path-active]:border-accent-1-hover data-[state=path-active]:bg-accent-1-hover",
|
|
17
|
+
soft: "border-0 bg-accent-2 text-accent-1 hover:not-data-disabled:bg-accent-2-hover active:not-data-disabled:bg-accent-2-active data-[state=path-active]:bg-accent-2-active",
|
|
18
|
+
outline: "border-stroke-2 bg-transparent text-foreground-1 hover:not-data-disabled:bg-surface-hover active:not-data-disabled:bg-surface-active data-[state=path-active]:border-accent-2-stroke data-[state=path-active]:bg-accent-2-hover data-[state=path-active]:text-accent-1",
|
|
19
|
+
ghost: "border-transparent bg-transparent text-foreground-2 hover:not-data-disabled:bg-surface-hover hover:not-data-disabled:text-foreground-1 active:not-data-disabled:bg-surface-active data-[state=path-active]:bg-accent-2-hover data-[state=path-active]:text-accent-1"
|
|
43
20
|
},
|
|
44
21
|
size: {
|
|
45
22
|
xs: "h-7 gap-1.5 px-2 text-xs",
|
|
@@ -54,14 +31,14 @@ var buttonVariants = cva(
|
|
|
54
31
|
}
|
|
55
32
|
},
|
|
56
33
|
compoundVariants: [
|
|
57
|
-
{ className: "size-7 p-0", iconOnly:
|
|
58
|
-
{ className: "size-8 p-0", iconOnly:
|
|
59
|
-
{ className: "size-10 p-0", iconOnly:
|
|
60
|
-
{ className: "size-11 p-0", iconOnly:
|
|
61
|
-
{ className: "size-12 p-0", iconOnly:
|
|
34
|
+
{ className: "size-7 p-0", iconOnly: !0, size: "xs" },
|
|
35
|
+
{ className: "size-8 p-0", iconOnly: !0, size: "sm" },
|
|
36
|
+
{ className: "size-10 p-0", iconOnly: !0, size: "md" },
|
|
37
|
+
{ className: "size-11 p-0", iconOnly: !0, size: "lg" },
|
|
38
|
+
{ className: "size-12 p-0", iconOnly: !0, size: "xl" }
|
|
62
39
|
],
|
|
63
40
|
defaultVariants: {
|
|
64
|
-
iconOnly:
|
|
41
|
+
iconOnly: !1,
|
|
65
42
|
size: "md",
|
|
66
43
|
variant: "solid"
|
|
67
44
|
}
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const cardVariants: (props?: ({
|
|
7
|
-
variant?: "ghost" | "
|
|
7
|
+
variant?: "ghost" | "default" | "elevated" | "inset" | null | undefined;
|
|
8
8
|
padding?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
type CardProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>;
|
|
@@ -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/card.tsx
|
|
1
|
+
// src/components/ui/card.tsx
|
|
2
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
24
3
|
import { cva } from "class-variance-authority";
|
|
25
4
|
import { jsx } from "react/jsx-runtime";
|
|
26
5
|
var cardVariants = cva("rounded-card border text-foreground-1", {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentPropsWithRef } from 'react';
|
|
4
4
|
|
|
5
|
-
type DialogProps =
|
|
6
|
-
type DialogTriggerProps =
|
|
7
|
-
type DialogPortalProps =
|
|
8
|
-
type DialogBackdropProps =
|
|
9
|
-
type DialogPopupProps =
|
|
10
|
-
type DialogTitleProps =
|
|
11
|
-
type DialogDescriptionProps =
|
|
12
|
-
type DialogCloseProps =
|
|
5
|
+
type DialogProps = ComponentPropsWithRef<typeof Dialog$1.Root>;
|
|
6
|
+
type DialogTriggerProps = ComponentPropsWithRef<typeof Dialog$1.Trigger>;
|
|
7
|
+
type DialogPortalProps = ComponentPropsWithRef<typeof Dialog$1.Portal>;
|
|
8
|
+
type DialogBackdropProps = ComponentPropsWithRef<typeof Dialog$1.Backdrop>;
|
|
9
|
+
type DialogPopupProps = ComponentPropsWithRef<typeof Dialog$1.Popup>;
|
|
10
|
+
type DialogTitleProps = ComponentPropsWithRef<typeof Dialog$1.Title>;
|
|
11
|
+
type DialogDescriptionProps = ComponentPropsWithRef<typeof Dialog$1.Description>;
|
|
12
|
+
type DialogCloseProps = ComponentPropsWithRef<typeof Dialog$1.Close>;
|
|
13
13
|
declare function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element;
|
|
14
14
|
declare function DialogTrigger({ className, ...props }: DialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
15
15
|
declare function DialogPortal(props: DialogPortalProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/dialog.tsx
|
|
4
4
|
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
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/dialog.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 Dialog(props) {
|
|
31
9
|
return /* @__PURE__ */ jsx(BaseDialog.Root, { ...props });
|
|
@@ -35,7 +13,7 @@ function DialogTrigger({ className, ...props }) {
|
|
|
35
13
|
BaseDialog.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,14 +21,15 @@ function DialogTrigger({ className, ...props }) {
|
|
|
43
21
|
);
|
|
44
22
|
}
|
|
45
23
|
function DialogPortal(props) {
|
|
46
|
-
|
|
24
|
+
let themeScope = useThemeScope();
|
|
25
|
+
return /* @__PURE__ */ jsx(BaseDialog.Portal, { ...props, ...themeScope });
|
|
47
26
|
}
|
|
48
27
|
function DialogBackdrop({ className, ...props }) {
|
|
49
28
|
return /* @__PURE__ */ jsx(
|
|
50
29
|
BaseDialog.Backdrop,
|
|
51
30
|
{
|
|
52
31
|
className: cn(
|
|
53
|
-
"animate-overlay fixed inset-0 z-modal h-dvh w-dvw bg-
|
|
32
|
+
"animate-overlay fixed inset-0 z-modal h-dvh w-dvw bg-dialog-backdrop",
|
|
54
33
|
className
|
|
55
34
|
),
|
|
56
35
|
...props
|
|
@@ -62,7 +41,7 @@ function DialogPopup({ className, ...props }) {
|
|
|
62
41
|
BaseDialog.Popup,
|
|
63
42
|
{
|
|
64
43
|
className: cn(
|
|
65
|
-
"animate-dialog-popup fixed left-1/2 top-1/2 z-modal w-[min(92vw,32rem)] -translate-x-1/2 -translate-y-1/2 rounded-dialog border border-stroke-2 bg-surface-1 p-6 text-foreground-1 shadow-
|
|
44
|
+
"animate-dialog-popup fixed left-1/2 top-1/2 z-modal w-[min(92vw,32rem)] -translate-x-1/2 -translate-y-1/2 rounded-dialog border border-dialog-stroke-2 bg-dialog-surface-1 p-6 text-dialog-foreground-1 shadow-dialog outline-none",
|
|
66
45
|
className
|
|
67
46
|
),
|
|
68
47
|
...props
|
|
@@ -74,7 +53,7 @@ function DialogTitle({ className, ...props }) {
|
|
|
74
53
|
BaseDialog.Title,
|
|
75
54
|
{
|
|
76
55
|
className: cn(
|
|
77
|
-
"text-lg font-semibold tracking-tight text-foreground-1",
|
|
56
|
+
"text-lg font-semibold tracking-tight text-dialog-foreground-1",
|
|
78
57
|
className
|
|
79
58
|
),
|
|
80
59
|
...props
|
|
@@ -88,7 +67,10 @@ function DialogDescription({
|
|
|
88
67
|
return /* @__PURE__ */ jsx(
|
|
89
68
|
BaseDialog.Description,
|
|
90
69
|
{
|
|
91
|
-
className: cn(
|
|
70
|
+
className: cn(
|
|
71
|
+
"mt-2 text-sm leading-6 text-dialog-foreground-2",
|
|
72
|
+
className
|
|
73
|
+
),
|
|
92
74
|
...props
|
|
93
75
|
}
|
|
94
76
|
);
|
|
@@ -98,8 +80,8 @@ function DialogClose({ className, ...props }) {
|
|
|
98
80
|
BaseDialog.Close,
|
|
99
81
|
{
|
|
100
82
|
className: cn(
|
|
101
|
-
"inline-flex size-8 items-center justify-center rounded-button text-foreground-3 transition-colors hover:bg-surface-
|
|
102
|
-
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
83
|
+
"inline-flex size-8 items-center justify-center rounded-button text-dialog-foreground-3 transition-colors hover:bg-dialog-surface-3 hover:text-dialog-foreground-1",
|
|
84
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
103
85
|
className
|
|
104
86
|
),
|
|
105
87
|
...props
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentPropsWithRef } from 'react';
|
|
4
4
|
|
|
5
|
-
type DrawerProps =
|
|
6
|
-
type DrawerTriggerProps =
|
|
7
|
-
type DrawerPortalProps =
|
|
8
|
-
type DrawerBackdropProps =
|
|
9
|
-
type DrawerViewportProps =
|
|
10
|
-
type DrawerPopupProps =
|
|
11
|
-
type DrawerTitleProps =
|
|
12
|
-
type DrawerDescriptionProps =
|
|
13
|
-
type DrawerCloseProps =
|
|
5
|
+
type DrawerProps = ComponentPropsWithRef<typeof Drawer$1.Root>;
|
|
6
|
+
type DrawerTriggerProps = ComponentPropsWithRef<typeof Drawer$1.Trigger>;
|
|
7
|
+
type DrawerPortalProps = ComponentPropsWithRef<typeof Drawer$1.Portal>;
|
|
8
|
+
type DrawerBackdropProps = ComponentPropsWithRef<typeof Drawer$1.Backdrop>;
|
|
9
|
+
type DrawerViewportProps = ComponentPropsWithRef<typeof Drawer$1.Viewport>;
|
|
10
|
+
type DrawerPopupProps = ComponentPropsWithRef<typeof Drawer$1.Popup>;
|
|
11
|
+
type DrawerTitleProps = ComponentPropsWithRef<typeof Drawer$1.Title>;
|
|
12
|
+
type DrawerDescriptionProps = ComponentPropsWithRef<typeof Drawer$1.Description>;
|
|
13
|
+
type DrawerCloseProps = ComponentPropsWithRef<typeof Drawer$1.Close>;
|
|
14
14
|
declare function Drawer(props: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
15
15
|
declare function DrawerTrigger({ className, ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
declare function DrawerPortal(props: DrawerPortalProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/drawer.tsx
|
|
4
4
|
import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
|
|
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/drawer.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 Drawer(props) {
|
|
31
9
|
return /* @__PURE__ */ jsx(BaseDrawer.Root, { ...props });
|
|
@@ -35,7 +13,7 @@ function DrawerTrigger({ className, ...props }) {
|
|
|
35
13
|
BaseDrawer.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,14 +21,15 @@ function DrawerTrigger({ className, ...props }) {
|
|
|
43
21
|
);
|
|
44
22
|
}
|
|
45
23
|
function DrawerPortal(props) {
|
|
46
|
-
|
|
24
|
+
let themeScope = useThemeScope();
|
|
25
|
+
return /* @__PURE__ */ jsx(BaseDrawer.Portal, { ...props, ...themeScope });
|
|
47
26
|
}
|
|
48
27
|
function DrawerBackdrop({ className, ...props }) {
|
|
49
28
|
return /* @__PURE__ */ jsx(
|
|
50
29
|
BaseDrawer.Backdrop,
|
|
51
30
|
{
|
|
52
31
|
className: cn(
|
|
53
|
-
"animate-overlay fixed inset-0 z-modal h-dvh w-dvw bg-
|
|
32
|
+
"animate-overlay fixed inset-0 z-modal h-dvh w-dvw bg-drawer-backdrop",
|
|
54
33
|
className
|
|
55
34
|
),
|
|
56
35
|
...props
|
|
@@ -74,7 +53,7 @@ function DrawerPopup({ className, ...props }) {
|
|
|
74
53
|
BaseDrawer.Popup,
|
|
75
54
|
{
|
|
76
55
|
className: cn(
|
|
77
|
-
"animate-drawer-popup pointer-events-auto fixed bottom-0 right-0 top-0 w-[min(100vw,20rem)] border-l border-stroke-2 bg-surface-1 p-6 text-foreground-1 shadow-
|
|
56
|
+
"animate-drawer-popup pointer-events-auto fixed bottom-0 right-0 top-0 w-[min(100vw,20rem)] border-l border-drawer-stroke-2 bg-drawer-surface-1 p-6 text-drawer-foreground-1 shadow-drawer outline-none",
|
|
78
57
|
className
|
|
79
58
|
),
|
|
80
59
|
...props
|
|
@@ -86,7 +65,7 @@ function DrawerTitle({ className, ...props }) {
|
|
|
86
65
|
BaseDrawer.Title,
|
|
87
66
|
{
|
|
88
67
|
className: cn(
|
|
89
|
-
"text-lg font-semibold tracking-tight text-foreground-1",
|
|
68
|
+
"text-lg font-semibold tracking-tight text-drawer-foreground-1",
|
|
90
69
|
className
|
|
91
70
|
),
|
|
92
71
|
...props
|
|
@@ -100,7 +79,10 @@ function DrawerDescription({
|
|
|
100
79
|
return /* @__PURE__ */ jsx(
|
|
101
80
|
BaseDrawer.Description,
|
|
102
81
|
{
|
|
103
|
-
className: cn(
|
|
82
|
+
className: cn(
|
|
83
|
+
"mt-2 text-sm leading-6 text-drawer-foreground-2",
|
|
84
|
+
className
|
|
85
|
+
),
|
|
104
86
|
...props
|
|
105
87
|
}
|
|
106
88
|
);
|
|
@@ -110,8 +92,8 @@ function DrawerClose({ className, ...props }) {
|
|
|
110
92
|
BaseDrawer.Close,
|
|
111
93
|
{
|
|
112
94
|
className: cn(
|
|
113
|
-
"inline-flex size-8 items-center justify-center rounded-button text-foreground-3 transition-colors hover:bg-surface-
|
|
114
|
-
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
95
|
+
"inline-flex size-8 items-center justify-center rounded-button text-drawer-foreground-3 transition-colors hover:bg-drawer-surface-3 hover:text-drawer-foreground-1",
|
|
96
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
115
97
|
className
|
|
116
98
|
),
|
|
117
99
|
...props
|
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/components/ui/input.tsx
|
|
2
2
|
import { Input as BaseInput } from "@base-ui/react/input";
|
|
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/input.tsx
|
|
3
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
27
4
|
import { cva } from "class-variance-authority";
|
|
28
5
|
import { forwardRef } from "react";
|
|
29
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -31,7 +8,7 @@ var inputVariants = cva(
|
|
|
31
8
|
[
|
|
32
9
|
"flex w-full rounded-input border bg-surface-1 text-foreground-1 transition-colors",
|
|
33
10
|
"placeholder:text-foreground-3",
|
|
34
|
-
"focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
11
|
+
"focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
35
12
|
"disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50"
|
|
36
13
|
].join(" "),
|
|
37
14
|
{
|
|
@@ -44,8 +21,8 @@ var inputVariants = cva(
|
|
|
44
21
|
xl: "h-12 px-4 text-base"
|
|
45
22
|
},
|
|
46
23
|
variant: {
|
|
47
|
-
default: "border-stroke-2 focus:border-focus-
|
|
48
|
-
ghost: "border-transparent bg-surface-2 focus:border-focus-
|
|
24
|
+
default: "border-stroke-2 focus:border-focus-stroke",
|
|
25
|
+
ghost: "border-transparent bg-surface-2 focus:border-focus-stroke"
|
|
49
26
|
}
|
|
50
27
|
},
|
|
51
28
|
defaultVariants: {
|
|
@@ -53,8 +30,7 @@ var inputVariants = cva(
|
|
|
53
30
|
variant: "default"
|
|
54
31
|
}
|
|
55
32
|
}
|
|
56
|
-
)
|
|
57
|
-
var Input = forwardRef(function Input2({ className, size, variant, ...props }, ref) {
|
|
33
|
+
), Input = forwardRef(function({ className, size, variant, ...props }, ref) {
|
|
58
34
|
return /* @__PURE__ */ jsx(
|
|
59
35
|
BaseInput,
|
|
60
36
|
{
|
|
@@ -1,30 +1,9 @@
|
|
|
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/kbd.tsx
|
|
1
|
+
// src/components/ui/kbd.tsx
|
|
2
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
24
3
|
import { cva } from "class-variance-authority";
|
|
25
4
|
import { jsx } from "react/jsx-runtime";
|
|
26
5
|
var kbdVariants = cva(
|
|
27
|
-
"not-markdown-prose relative -top-[0.03em] inline-flex h-fit shrink-0 select-none items-center justify-center whitespace-nowrap bg-surface-1 px-[0.5em] pt-[0.05em] pb-[0.1em] align-text-top font-sans font-normal leading-[1.7em] text-foreground-1 [--kbd-fallback-shadow:inset_0_-0.05em_0.5em_color-mix(in_oklab,var(--stroke-4)_80%,transparent),inset_0_0.05em_color-mix(in_oklab,var(--
|
|
6
|
+
"not-markdown-prose relative -top-[0.03em] inline-flex h-fit shrink-0 select-none items-center justify-center whitespace-nowrap bg-surface-1 px-[0.5em] pt-[0.05em] pb-[0.1em] align-text-top font-sans font-normal leading-[1.7em] text-foreground-1 [--kbd-fallback-shadow:inset_0_-0.05em_0.5em_color-mix(in_oklab,var(--stroke-4)_80%,transparent),inset_0_0.05em_color-mix(in_oklab,var(--neutral-100)_95%,transparent),inset_0_0.25em_0.5em_color-mix(in_oklab,var(--surface-3)_70%,transparent),inset_0_-0.075em_color-mix(in_oklab,var(--stroke-1)_58%,var(--stroke-2)),0_0_0_0.065em_color-mix(in_oklab,var(--stroke-2)_82%,transparent),0_0.08em_0.17em_color-mix(in_oklab,var(--stroke-1)_45%,transparent)] [--kbd-fallback-shadow-active:inset_0_0.05em_color-mix(in_oklab,var(--foreground-4)_45%,transparent),0_0_0_0.065em_color-mix(in_oklab,var(--stroke-1)_64%,transparent)] [border-radius:max(var(--radius-kbd),1px)] [box-shadow:var(--kbd-shadow,var(--kbd-fallback-shadow))] [word-spacing:-0.1em] transition-[background-color,box-shadow] duration-150 hover:bg-surface-page hover:[box-shadow:var(--kbd-shadow,var(--kbd-fallback-shadow)),0_0_0_0.05em_color-mix(in_oklab,var(--stroke-2)_50%,transparent)] focus-visible:outline-2 focus-visible:outline-focus-stroke active:bg-surface-2 active:pt-[0.1em] active:pb-[0.05em] active:[box-shadow:var(--kbd-shadow-active,var(--kbd-fallback-shadow-active))] [&_*]:leading-none",
|
|
28
7
|
{
|
|
29
8
|
variants: {
|
|
30
9
|
size: {
|
|
@@ -40,20 +19,20 @@ var kbdVariants = cva(
|
|
|
40
19
|
}
|
|
41
20
|
},
|
|
42
21
|
compoundVariants: [
|
|
43
|
-
{ className: "w-[1.75em]", size: "xs", square:
|
|
44
|
-
{ className: "w-[1.75em]", size: "sm", square:
|
|
45
|
-
{ className: "w-[1.75em]", size: "md", square:
|
|
46
|
-
{ className: "w-[1.75em]", size: "lg", square:
|
|
47
|
-
{ className: "w-[1.75em]", size: "xl", square:
|
|
22
|
+
{ className: "w-[1.75em]", size: "xs", square: !0 },
|
|
23
|
+
{ className: "w-[1.75em]", size: "sm", square: !0 },
|
|
24
|
+
{ className: "w-[1.75em]", size: "md", square: !0 },
|
|
25
|
+
{ className: "w-[1.75em]", size: "lg", square: !0 },
|
|
26
|
+
{ className: "w-[1.75em]", size: "xl", square: !0 }
|
|
48
27
|
],
|
|
49
28
|
defaultVariants: {
|
|
50
29
|
size: "md",
|
|
51
|
-
square:
|
|
30
|
+
square: !1
|
|
52
31
|
}
|
|
53
32
|
}
|
|
54
33
|
);
|
|
55
34
|
function isSingleCharacter(children) {
|
|
56
|
-
return typeof children
|
|
35
|
+
return typeof children == "string" && Array.from(children.trim()).length === 1;
|
|
57
36
|
}
|
|
58
37
|
function Kbd({ children, className, size, square, ...props }) {
|
|
59
38
|
return /* @__PURE__ */ jsx(
|
|
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
import { ReactNode, AnchorHTMLAttributes } from 'react';
|
|
6
6
|
|
|
7
7
|
declare const linkVariants: (props?: ({
|
|
8
|
-
color?: "
|
|
8
|
+
color?: "accent" | "default" | null | undefined;
|
|
9
9
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
10
|
variant?: "inline" | "standalone" | null | undefined;
|
|
11
11
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|