@vantageos/mosaic-blocks 0.2.3-alpha → 0.2.4-alpha
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/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -8
- package/dist/index.d.ts +22 -8
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +71 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +30 -0
- package/dist/server.d.ts +30 -0
- package/dist/server.js +68 -0
- package/dist/server.js.map +1 -0
- package/package.json +6 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import { Button } from '@base-ui/react/button';
|
|
4
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { buttonVariants, badgeVariants } from './server.cjs';
|
|
5
5
|
import { Avatar } from '@base-ui/react/avatar';
|
|
6
6
|
import { Input } from '@base-ui/react/input';
|
|
7
7
|
import { Field } from '@base-ui/react/field';
|
|
8
8
|
import { Switch } from '@base-ui/react/switch';
|
|
9
|
+
import 'class-variance-authority/types';
|
|
9
10
|
|
|
10
11
|
declare const version = "0.1.0-alpha.1";
|
|
11
12
|
|
|
@@ -18,10 +19,17 @@ interface PlaceholderProps {
|
|
|
18
19
|
}
|
|
19
20
|
declare function Placeholder({ label }: PlaceholderProps): React.JSX.Element;
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
/**
|
|
23
|
+
* MosaicButton — @base-ui/react Button primitive
|
|
24
|
+
*
|
|
25
|
+
* Ported from heyfabrika/styleui (MIT) with namespace and import adaptations.
|
|
26
|
+
* Source: https://github.com/heyfabrika/styleui/blob/main/components/ui/button.tsx
|
|
27
|
+
*
|
|
28
|
+
* Uses @base-ui/react/button as the headless base per ADR-0001.
|
|
29
|
+
* Styling: Tailwind v4 + cva variants. No tailwind-merge needed (single source).
|
|
30
|
+
* API: data-slot="button" attribution, ref as regular prop (React 19).
|
|
31
|
+
*/
|
|
32
|
+
|
|
25
33
|
interface MosaicButtonProps extends Omit<Button.Props, "ref">, VariantProps<typeof buttonVariants> {
|
|
26
34
|
className?: string;
|
|
27
35
|
/** ref is typed as HTMLElement to preserve the original public API surface */
|
|
@@ -802,9 +810,15 @@ declare namespace MosaicCardFooter {
|
|
|
802
810
|
var displayName: string;
|
|
803
811
|
}
|
|
804
812
|
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
813
|
+
/**
|
|
814
|
+
* MosaicBadge — style-only badge atom
|
|
815
|
+
*
|
|
816
|
+
* Renders a <span> with cva variants: default, secondary, destructive, outline.
|
|
817
|
+
* data-slot="badge" for composability.
|
|
818
|
+
*
|
|
819
|
+
* Design tokens: Tailwind v4 semantic classes only. No hardcoded colors.
|
|
820
|
+
*/
|
|
821
|
+
|
|
808
822
|
interface MosaicBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
809
823
|
className?: string;
|
|
810
824
|
ref?: React.Ref<HTMLSpanElement>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import { Button } from '@base-ui/react/button';
|
|
4
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { buttonVariants, badgeVariants } from './server.js';
|
|
5
5
|
import { Avatar } from '@base-ui/react/avatar';
|
|
6
6
|
import { Input } from '@base-ui/react/input';
|
|
7
7
|
import { Field } from '@base-ui/react/field';
|
|
8
8
|
import { Switch } from '@base-ui/react/switch';
|
|
9
|
+
import 'class-variance-authority/types';
|
|
9
10
|
|
|
10
11
|
declare const version = "0.1.0-alpha.1";
|
|
11
12
|
|
|
@@ -18,10 +19,17 @@ interface PlaceholderProps {
|
|
|
18
19
|
}
|
|
19
20
|
declare function Placeholder({ label }: PlaceholderProps): React.JSX.Element;
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
/**
|
|
23
|
+
* MosaicButton — @base-ui/react Button primitive
|
|
24
|
+
*
|
|
25
|
+
* Ported from heyfabrika/styleui (MIT) with namespace and import adaptations.
|
|
26
|
+
* Source: https://github.com/heyfabrika/styleui/blob/main/components/ui/button.tsx
|
|
27
|
+
*
|
|
28
|
+
* Uses @base-ui/react/button as the headless base per ADR-0001.
|
|
29
|
+
* Styling: Tailwind v4 + cva variants. No tailwind-merge needed (single source).
|
|
30
|
+
* API: data-slot="button" attribution, ref as regular prop (React 19).
|
|
31
|
+
*/
|
|
32
|
+
|
|
25
33
|
interface MosaicButtonProps extends Omit<Button.Props, "ref">, VariantProps<typeof buttonVariants> {
|
|
26
34
|
className?: string;
|
|
27
35
|
/** ref is typed as HTMLElement to preserve the original public API surface */
|
|
@@ -802,9 +810,15 @@ declare namespace MosaicCardFooter {
|
|
|
802
810
|
var displayName: string;
|
|
803
811
|
}
|
|
804
812
|
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
813
|
+
/**
|
|
814
|
+
* MosaicBadge — style-only badge atom
|
|
815
|
+
*
|
|
816
|
+
* Renders a <span> with cva variants: default, secondary, destructive, outline.
|
|
817
|
+
* data-slot="badge" for composability.
|
|
818
|
+
*
|
|
819
|
+
* Design tokens: Tailwind v4 semantic classes only. No hardcoded colors.
|
|
820
|
+
*/
|
|
821
|
+
|
|
808
822
|
interface MosaicBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
809
823
|
className?: string;
|
|
810
824
|
ref?: React.Ref<HTMLSpanElement>;
|
package/dist/index.js
CHANGED
|
@@ -18,9 +18,6 @@ var version = "0.1.0-alpha.1";
|
|
|
18
18
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
19
19
|
return /* @__PURE__ */ jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
20
20
|
}
|
|
21
|
-
function cn(...classes) {
|
|
22
|
-
return classes.filter(Boolean).join(" ");
|
|
23
|
-
}
|
|
24
21
|
var buttonVariants = cva(
|
|
25
22
|
// Base classes — identical to styleui base (adapted for Tailwind v4)
|
|
26
23
|
[
|
|
@@ -59,6 +56,9 @@ var buttonVariants = cva(
|
|
|
59
56
|
}
|
|
60
57
|
}
|
|
61
58
|
);
|
|
59
|
+
function cn(...classes) {
|
|
60
|
+
return classes.filter(Boolean).join(" ");
|
|
61
|
+
}
|
|
62
62
|
function MosaicButton({ className, variant, size, ref, ...props }) {
|
|
63
63
|
return /* @__PURE__ */ jsx(
|
|
64
64
|
Button,
|
|
@@ -1055,9 +1055,6 @@ function MosaicCardFooter({ className, ref, ...props }) {
|
|
|
1055
1055
|
);
|
|
1056
1056
|
}
|
|
1057
1057
|
MosaicCardFooter.displayName = "MosaicCardFooter";
|
|
1058
|
-
function cn14(...classes) {
|
|
1059
|
-
return classes.filter(Boolean).join(" ");
|
|
1060
|
-
}
|
|
1061
1058
|
var badgeVariants = cva(
|
|
1062
1059
|
[
|
|
1063
1060
|
"inline-flex items-center justify-center",
|
|
@@ -1081,6 +1078,9 @@ var badgeVariants = cva(
|
|
|
1081
1078
|
}
|
|
1082
1079
|
}
|
|
1083
1080
|
);
|
|
1081
|
+
function cn14(...classes) {
|
|
1082
|
+
return classes.filter(Boolean).join(" ");
|
|
1083
|
+
}
|
|
1084
1084
|
function MosaicBadge({ className, variant, ref, ...props }) {
|
|
1085
1085
|
return /* @__PURE__ */ jsx(
|
|
1086
1086
|
"span",
|