@publish.os/nextjs 0.0.1-alpha.4 → 0.0.1-alpha.5
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/kernel/components/blocks/design-system-preview.cjs +18 -17
- package/dist/kernel/components/blocks/design-system-preview.js +18 -17
- package/dist/kernel/components/blocks/link-playground.cjs +3 -3
- package/dist/kernel/components/blocks/link-playground.js +3 -3
- package/dist/kernel/components/blocks/navbar.cjs +1 -1
- package/dist/kernel/components/blocks/navbar.js +1 -1
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +2 -2
- package/dist/kernel/components/blocks/navigation-progress-playground.js +2 -2
- package/dist/kernel/components/ui/button-group.cjs +2 -3
- package/dist/kernel/components/ui/button-group.d.cts +2 -2
- package/dist/kernel/components/ui/button-group.d.ts +2 -2
- package/dist/kernel/components/ui/button-group.js +2 -3
- package/dist/kernel/components/ui/button.cjs +4 -12
- package/dist/kernel/components/ui/button.d.cts +3 -4
- package/dist/kernel/components/ui/button.d.ts +3 -4
- package/dist/kernel/components/ui/button.js +4 -12
- package/dist/kernel/components/ui/card.d.cts +1 -1
- package/dist/kernel/components/ui/card.d.ts +1 -1
- package/dist/kernel/components/ui/tag.cjs +104 -0
- package/dist/kernel/components/ui/tag.d.cts +14 -0
- package/dist/kernel/components/ui/tag.d.ts +14 -0
- package/dist/kernel/components/ui/tag.js +76 -0
- package/dist/kernel/components/ui/text.d.cts +1 -1
- package/dist/kernel/components/ui/text.d.ts +1 -1
- package/dist/kernel/components/ui/theme-toggle.cjs +1 -1
- package/dist/kernel/components/ui/theme-toggle.js +1 -1
- package/dist/kernel/defaults.registry.cjs +4 -4
- package/dist/kernel/defaults.registry.d.cts +4 -4
- package/dist/kernel/defaults.registry.d.ts +4 -4
- package/dist/kernel/defaults.registry.js +4 -4
- package/package.json +3 -4
- package/release/package.json +1 -1
- package/release/pnpm-lock.yaml +224 -201
- package/release/release.json +3 -3
- package/dist/kernel/components/ui/badge.cjs +0 -75
- package/dist/kernel/components/ui/badge.d.cts +0 -12
- package/dist/kernel/components/ui/badge.d.ts +0 -12
- package/dist/kernel/components/ui/badge.js +0 -47
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/kernel/components/ui/tag.tsx
|
|
21
|
+
var tag_exports = {};
|
|
22
|
+
__export(tag_exports, {
|
|
23
|
+
Tag: () => Tag,
|
|
24
|
+
tagVariants: () => tagVariants
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(tag_exports);
|
|
27
|
+
|
|
28
|
+
// src/utils/cn.ts
|
|
29
|
+
var import_clsx = require("clsx");
|
|
30
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
31
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
32
|
+
extend: {
|
|
33
|
+
classGroups: {
|
|
34
|
+
z: [
|
|
35
|
+
"z-content",
|
|
36
|
+
"z-nav",
|
|
37
|
+
"z-overlay",
|
|
38
|
+
"z-modal",
|
|
39
|
+
"z-search",
|
|
40
|
+
"z-toast",
|
|
41
|
+
"z-progress"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function cn(...inputs) {
|
|
47
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/kernel/components/ui/tag.tsx
|
|
51
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
52
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
53
|
+
var tagVariants = (0, import_class_variance_authority.cva)(
|
|
54
|
+
"inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-tag border px-2 py-0.5 text-xs font-medium leading-5 [&_svg]:shrink-0",
|
|
55
|
+
{
|
|
56
|
+
variants: {
|
|
57
|
+
borderStyle: {
|
|
58
|
+
dotted: "",
|
|
59
|
+
solid: ""
|
|
60
|
+
},
|
|
61
|
+
tone: {
|
|
62
|
+
accent: "[--tag-color:var(--accent-1)] [--tag-solid-background:var(--accent-solid)] [--tag-solid-foreground:var(--accent-foreground)]",
|
|
63
|
+
neutral: "[--tag-color:var(--foreground-2)] [--tag-solid-background:var(--foreground-1)] [--tag-solid-foreground:var(--surface-1)]"
|
|
64
|
+
},
|
|
65
|
+
variant: {
|
|
66
|
+
outline: "border-[color-mix(in_oklch,var(--tag-color)_48%,transparent)] bg-transparent text-[var(--tag-color)]",
|
|
67
|
+
soft: "border-[color-mix(in_oklch,var(--tag-color)_20%,transparent)] bg-[color-mix(in_oklch,var(--tag-color)_9%,transparent)] text-[var(--tag-color)]",
|
|
68
|
+
solid: "border-[color-mix(in_oklch,var(--tag-solid-foreground)_12%,transparent)] bg-[var(--tag-solid-background)] text-[var(--tag-solid-foreground)] shadow-[inset_0_1px_0_rgb(255_255_255_/_0.035),0_1px_1px_rgb(0_0_0_/_0.025)]"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
compoundVariants: [
|
|
72
|
+
{
|
|
73
|
+
borderStyle: "dotted",
|
|
74
|
+
className: "border-dotted",
|
|
75
|
+
variant: ["solid", "soft", "outline"]
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
borderStyle: "solid",
|
|
80
|
+
tone: "neutral",
|
|
81
|
+
variant: "solid"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
function Tag({
|
|
86
|
+
borderStyle,
|
|
87
|
+
className,
|
|
88
|
+
tone,
|
|
89
|
+
variant,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
className: cn(tagVariants({ borderStyle, tone, variant }), className),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
+
0 && (module.exports = {
|
|
102
|
+
Tag,
|
|
103
|
+
tagVariants
|
|
104
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
declare const tagVariants: (props?: ({
|
|
7
|
+
borderStyle?: "solid" | "dotted" | null | undefined;
|
|
8
|
+
tone?: "accent" | "neutral" | null | undefined;
|
|
9
|
+
variant?: "solid" | "soft" | "outline" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
type TagProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof tagVariants>;
|
|
12
|
+
declare function Tag({ borderStyle, className, tone, variant, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Tag, type TagProps, tagVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
declare const tagVariants: (props?: ({
|
|
7
|
+
borderStyle?: "solid" | "dotted" | null | undefined;
|
|
8
|
+
tone?: "accent" | "neutral" | null | undefined;
|
|
9
|
+
variant?: "solid" | "soft" | "outline" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
type TagProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof tagVariants>;
|
|
12
|
+
declare function Tag({ borderStyle, className, tone, variant, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Tag, type TagProps, tagVariants };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// src/utils/cn.ts
|
|
2
|
+
import { clsx } from "clsx";
|
|
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/tag.tsx
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { jsx } from "react/jsx-runtime";
|
|
26
|
+
var tagVariants = cva(
|
|
27
|
+
"inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-tag border px-2 py-0.5 text-xs font-medium leading-5 [&_svg]:shrink-0",
|
|
28
|
+
{
|
|
29
|
+
variants: {
|
|
30
|
+
borderStyle: {
|
|
31
|
+
dotted: "",
|
|
32
|
+
solid: ""
|
|
33
|
+
},
|
|
34
|
+
tone: {
|
|
35
|
+
accent: "[--tag-color:var(--accent-1)] [--tag-solid-background:var(--accent-solid)] [--tag-solid-foreground:var(--accent-foreground)]",
|
|
36
|
+
neutral: "[--tag-color:var(--foreground-2)] [--tag-solid-background:var(--foreground-1)] [--tag-solid-foreground:var(--surface-1)]"
|
|
37
|
+
},
|
|
38
|
+
variant: {
|
|
39
|
+
outline: "border-[color-mix(in_oklch,var(--tag-color)_48%,transparent)] bg-transparent text-[var(--tag-color)]",
|
|
40
|
+
soft: "border-[color-mix(in_oklch,var(--tag-color)_20%,transparent)] bg-[color-mix(in_oklch,var(--tag-color)_9%,transparent)] text-[var(--tag-color)]",
|
|
41
|
+
solid: "border-[color-mix(in_oklch,var(--tag-solid-foreground)_12%,transparent)] bg-[var(--tag-solid-background)] text-[var(--tag-solid-foreground)] shadow-[inset_0_1px_0_rgb(255_255_255_/_0.035),0_1px_1px_rgb(0_0_0_/_0.025)]"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
compoundVariants: [
|
|
45
|
+
{
|
|
46
|
+
borderStyle: "dotted",
|
|
47
|
+
className: "border-dotted",
|
|
48
|
+
variant: ["solid", "soft", "outline"]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
borderStyle: "solid",
|
|
53
|
+
tone: "neutral",
|
|
54
|
+
variant: "solid"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
function Tag({
|
|
59
|
+
borderStyle,
|
|
60
|
+
className,
|
|
61
|
+
tone,
|
|
62
|
+
variant,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: cn(tagVariants({ borderStyle, tone, variant }), className),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
Tag,
|
|
75
|
+
tagVariants
|
|
76
|
+
};
|
|
@@ -6,7 +6,7 @@ import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
|
6
6
|
declare const textVariants: (props?: ({
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
|
|
8
8
|
variant?: "body" | "label" | "overline" | "headline" | null | undefined;
|
|
9
|
-
weight?: "
|
|
9
|
+
weight?: "bold" | "medium" | "default" | "semibold" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type TextProps<T extends ElementType = "p"> = {
|
|
12
12
|
as?: T;
|
|
@@ -6,7 +6,7 @@ import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
|
6
6
|
declare const textVariants: (props?: ({
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
|
|
8
8
|
variant?: "body" | "label" | "overline" | "headline" | null | undefined;
|
|
9
|
-
weight?: "
|
|
9
|
+
weight?: "bold" | "medium" | "default" | "semibold" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type TextProps<T extends ElementType = "p"> = {
|
|
12
12
|
as?: T;
|
|
@@ -94,12 +94,12 @@ var kernelDefaultsRegistry = {
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
category: "ui",
|
|
97
|
-
name: "
|
|
97
|
+
name: "Tag",
|
|
98
98
|
status: "available",
|
|
99
99
|
description: "Small status and metadata label component.",
|
|
100
|
-
kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
101
|
-
tenantPath: "publish.os/components/ui/
|
|
102
|
-
contract: "
|
|
100
|
+
kernelImport: "@publish.os/nextjs/kernel/components/ui/tag",
|
|
101
|
+
tenantPath: "publish.os/components/ui/tag.tsx",
|
|
102
|
+
contract: "TagProps"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
category: "ui",
|
|
@@ -78,12 +78,12 @@ declare const kernelDefaultsRegistry: {
|
|
|
78
78
|
readonly contract: "CardProps";
|
|
79
79
|
}, {
|
|
80
80
|
readonly category: "ui";
|
|
81
|
-
readonly name: "
|
|
81
|
+
readonly name: "Tag";
|
|
82
82
|
readonly status: "available";
|
|
83
83
|
readonly description: "Small status and metadata label component.";
|
|
84
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
85
|
-
readonly tenantPath: "publish.os/components/ui/
|
|
86
|
-
readonly contract: "
|
|
84
|
+
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/tag";
|
|
85
|
+
readonly tenantPath: "publish.os/components/ui/tag.tsx";
|
|
86
|
+
readonly contract: "TagProps";
|
|
87
87
|
}, {
|
|
88
88
|
readonly category: "ui";
|
|
89
89
|
readonly name: "Kbd";
|
|
@@ -78,12 +78,12 @@ declare const kernelDefaultsRegistry: {
|
|
|
78
78
|
readonly contract: "CardProps";
|
|
79
79
|
}, {
|
|
80
80
|
readonly category: "ui";
|
|
81
|
-
readonly name: "
|
|
81
|
+
readonly name: "Tag";
|
|
82
82
|
readonly status: "available";
|
|
83
83
|
readonly description: "Small status and metadata label component.";
|
|
84
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
85
|
-
readonly tenantPath: "publish.os/components/ui/
|
|
86
|
-
readonly contract: "
|
|
84
|
+
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/tag";
|
|
85
|
+
readonly tenantPath: "publish.os/components/ui/tag.tsx";
|
|
86
|
+
readonly contract: "TagProps";
|
|
87
87
|
}, {
|
|
88
88
|
readonly category: "ui";
|
|
89
89
|
readonly name: "Kbd";
|
|
@@ -70,12 +70,12 @@ var kernelDefaultsRegistry = {
|
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
category: "ui",
|
|
73
|
-
name: "
|
|
73
|
+
name: "Tag",
|
|
74
74
|
status: "available",
|
|
75
75
|
description: "Small status and metadata label component.",
|
|
76
|
-
kernelImport: "@publish.os/nextjs/kernel/components/ui/
|
|
77
|
-
tenantPath: "publish.os/components/ui/
|
|
78
|
-
contract: "
|
|
76
|
+
kernelImport: "@publish.os/nextjs/kernel/components/ui/tag",
|
|
77
|
+
tenantPath: "publish.os/components/ui/tag.tsx",
|
|
78
|
+
contract: "TagProps"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
category: "ui",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@publish.os/nextjs",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"engines": {
|
|
@@ -110,11 +110,10 @@
|
|
|
110
110
|
"react": "^19.2.0",
|
|
111
111
|
"react-medium-image-zoom": "^5.4.8",
|
|
112
112
|
"remark-gfm": "^4.0.1",
|
|
113
|
-
"tailwind-merge": "^3.0.0"
|
|
114
|
-
"tslib": "^2.8.1"
|
|
113
|
+
"tailwind-merge": "^3.0.0"
|
|
115
114
|
},
|
|
116
115
|
"peerDependencies": {
|
|
117
|
-
"next": ">=16.
|
|
116
|
+
"next": ">=16.2.11",
|
|
118
117
|
"react": ">=19.0.0",
|
|
119
118
|
"react-dom": ">=19.0.0",
|
|
120
119
|
"typescript": ">=5.0.0"
|