@vantageos/mosaic-blocks 0.3.5-alpha → 0.3.6-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.
@@ -0,0 +1,43 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+
3
+ /**
4
+ * buttonVariants — pure CVA variant function for MosaicButton.
5
+ *
6
+ * Isolated in its own module so it can be re-exported from the
7
+ * `@vantageos/mosaic-blocks/server` subpath without pulling in
8
+ * React or @base-ui/react/button (which are in Button.tsx but not here).
9
+ *
10
+ * Zero browser / React runtime dependencies — safe in RSC / Node.js.
11
+ */
12
+ declare const buttonVariants: (props?: ({
13
+ variant?: "link" | "default" | "secondary" | "ghost" | "destructive" | "outline" | null | undefined;
14
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
15
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
16
+
17
+ /**
18
+ * skeletonVariants — pure CVA variant function for MosaicSkeleton.
19
+ *
20
+ * Isolated in its own module so it can be re-exported from the
21
+ * `@vantageos/mosaic-blocks/server` subpath without pulling in React
22
+ * (which is imported in MosaicSkeleton.tsx but not here).
23
+ *
24
+ * Zero browser / React runtime dependencies — safe in RSC / Node.js.
25
+ */
26
+ declare const skeletonVariants: (props?: ({
27
+ variant?: "default" | "button" | "circle" | "text" | null | undefined;
28
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
29
+
30
+ /**
31
+ * badgeVariants — pure CVA variant function for MosaicBadge.
32
+ *
33
+ * Isolated in its own module so it can be re-exported from the
34
+ * `@vantageos/mosaic-blocks/server` subpath without pulling in React
35
+ * (which is imported in MosaicBadge.tsx but not here).
36
+ *
37
+ * Zero browser / React runtime dependencies — safe in RSC / Node.js.
38
+ */
39
+ declare const badgeVariants: (props?: ({
40
+ variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
41
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
42
+
43
+ export { badgeVariants as a, buttonVariants as b, skeletonVariants as s };
@@ -0,0 +1,43 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+
3
+ /**
4
+ * buttonVariants — pure CVA variant function for MosaicButton.
5
+ *
6
+ * Isolated in its own module so it can be re-exported from the
7
+ * `@vantageos/mosaic-blocks/server` subpath without pulling in
8
+ * React or @base-ui/react/button (which are in Button.tsx but not here).
9
+ *
10
+ * Zero browser / React runtime dependencies — safe in RSC / Node.js.
11
+ */
12
+ declare const buttonVariants: (props?: ({
13
+ variant?: "link" | "default" | "secondary" | "ghost" | "destructive" | "outline" | null | undefined;
14
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
15
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
16
+
17
+ /**
18
+ * skeletonVariants — pure CVA variant function for MosaicSkeleton.
19
+ *
20
+ * Isolated in its own module so it can be re-exported from the
21
+ * `@vantageos/mosaic-blocks/server` subpath without pulling in React
22
+ * (which is imported in MosaicSkeleton.tsx but not here).
23
+ *
24
+ * Zero browser / React runtime dependencies — safe in RSC / Node.js.
25
+ */
26
+ declare const skeletonVariants: (props?: ({
27
+ variant?: "default" | "button" | "circle" | "text" | null | undefined;
28
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
29
+
30
+ /**
31
+ * badgeVariants — pure CVA variant function for MosaicBadge.
32
+ *
33
+ * Isolated in its own module so it can be re-exported from the
34
+ * `@vantageos/mosaic-blocks/server` subpath without pulling in React
35
+ * (which is imported in MosaicBadge.tsx but not here).
36
+ *
37
+ * Zero browser / React runtime dependencies — safe in RSC / Node.js.
38
+ */
39
+ declare const badgeVariants: (props?: ({
40
+ variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
41
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
42
+
43
+ export { badgeVariants as a, buttonVariants as b, skeletonVariants as s };
package/dist/index.cjs CHANGED
@@ -46,7 +46,7 @@ function _interopNamespace(e) {
46
46
  var React27__namespace = /*#__PURE__*/_interopNamespace(React27);
47
47
 
48
48
  // src/version.ts
49
- var version = "0.3.5-alpha";
49
+ var version = "0.3.6-alpha";
50
50
  function Placeholder({ label = "mosaic-blocks placeholder" }) {
51
51
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
52
52
  }
@@ -9835,6 +9835,207 @@ function MosaicDataTable({
9835
9835
  );
9836
9836
  }
9837
9837
  MosaicDataTable.displayName = "MosaicDataTable";
9838
+ var stepPipelineVariants = classVarianceAuthority.cva(["flex", "items-stretch"], {
9839
+ variants: {
9840
+ orientation: {
9841
+ horizontal: "flex-row items-center w-full",
9842
+ vertical: "flex-col"
9843
+ }
9844
+ },
9845
+ defaultVariants: {
9846
+ orientation: "horizontal"
9847
+ }
9848
+ });
9849
+ var stepIndicatorVariants = classVarianceAuthority.cva(
9850
+ [
9851
+ "flex items-center justify-center shrink-0",
9852
+ "rounded-full border-2 font-semibold text-sm select-none",
9853
+ "transition-colors"
9854
+ ],
9855
+ {
9856
+ variants: {
9857
+ status: {
9858
+ done: "bg-foreground text-background border-foreground",
9859
+ current: "bg-background text-foreground border-foreground ring-2 ring-ring ring-offset-2",
9860
+ upcoming: "bg-muted text-muted-foreground border-border"
9861
+ },
9862
+ orientation: {
9863
+ horizontal: "size-8",
9864
+ vertical: "size-8"
9865
+ }
9866
+ },
9867
+ defaultVariants: {
9868
+ status: "upcoming",
9869
+ orientation: "horizontal"
9870
+ }
9871
+ }
9872
+ );
9873
+ var stepConnectorVariants = classVarianceAuthority.cva(["shrink-0 transition-colors"], {
9874
+ variants: {
9875
+ status: {
9876
+ done: "bg-foreground",
9877
+ current: "bg-border",
9878
+ upcoming: "bg-border"
9879
+ },
9880
+ orientation: {
9881
+ horizontal: "h-px flex-1 min-w-4",
9882
+ vertical: "w-px self-stretch min-h-4 ml-4"
9883
+ }
9884
+ },
9885
+ defaultVariants: {
9886
+ status: "upcoming",
9887
+ orientation: "horizontal"
9888
+ }
9889
+ });
9890
+ var stepLabelVariants = classVarianceAuthority.cva(["text-sm font-medium transition-colors"], {
9891
+ variants: {
9892
+ status: {
9893
+ done: "text-foreground",
9894
+ current: "text-foreground",
9895
+ upcoming: "text-muted-foreground"
9896
+ }
9897
+ },
9898
+ defaultVariants: {
9899
+ status: "upcoming"
9900
+ }
9901
+ });
9902
+ var stepDescriptionVariants = classVarianceAuthority.cva(["text-xs transition-colors"], {
9903
+ variants: {
9904
+ status: {
9905
+ done: "text-muted-foreground",
9906
+ current: "text-muted-foreground",
9907
+ upcoming: "text-muted-foreground/60"
9908
+ }
9909
+ },
9910
+ defaultVariants: {
9911
+ status: "upcoming"
9912
+ }
9913
+ });
9914
+ function cn67(...classes) {
9915
+ return classes.filter(Boolean).join(" ");
9916
+ }
9917
+ function resolveStatus(step, index, currentIndex) {
9918
+ if (step.status !== void 0) return step.status;
9919
+ if (index < currentIndex) return "done";
9920
+ if (index === currentIndex) return "current";
9921
+ return "upcoming";
9922
+ }
9923
+ function MosaicStepPipeline({
9924
+ steps,
9925
+ currentIndex = 0,
9926
+ orientation = "horizontal",
9927
+ className,
9928
+ ref
9929
+ }) {
9930
+ return /* @__PURE__ */ jsxRuntime.jsx(
9931
+ "ol",
9932
+ {
9933
+ ref,
9934
+ "data-slot": "step-pipeline",
9935
+ className: cn67(stepPipelineVariants({ orientation }), className),
9936
+ children: steps.map((step, index) => {
9937
+ const status = resolveStatus(step, index, currentIndex);
9938
+ const isCurrent = status === "current";
9939
+ const isLast = index === steps.length - 1;
9940
+ const key = step.id !== void 0 ? step.id : index;
9941
+ return /* @__PURE__ */ jsxRuntime.jsx(
9942
+ "li",
9943
+ {
9944
+ "data-slot": "step",
9945
+ "data-status": status,
9946
+ "aria-current": isCurrent ? "step" : void 0,
9947
+ className: cn67(
9948
+ "flex shrink-0",
9949
+ orientation === "horizontal" ? "flex-col items-center gap-2" : "flex-row items-start gap-3",
9950
+ orientation === "horizontal" && !isLast && "flex-1"
9951
+ ),
9952
+ children: orientation === "horizontal" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9953
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center", children: [
9954
+ index > 0 && /* @__PURE__ */ jsxRuntime.jsx(
9955
+ "div",
9956
+ {
9957
+ "data-slot": "step-connector",
9958
+ className: cn67(stepConnectorVariants({ status, orientation }))
9959
+ }
9960
+ ),
9961
+ /* @__PURE__ */ jsxRuntime.jsx(
9962
+ "div",
9963
+ {
9964
+ "data-slot": "step-indicator",
9965
+ className: cn67(stepIndicatorVariants({ status, orientation })),
9966
+ "aria-hidden": "true",
9967
+ children: status === "done" ? "\u2713" : /* @__PURE__ */ jsxRuntime.jsx("span", { children: index + 1 })
9968
+ }
9969
+ ),
9970
+ !isLast && /* @__PURE__ */ jsxRuntime.jsx(
9971
+ "div",
9972
+ {
9973
+ "data-slot": "step-connector",
9974
+ className: cn67(
9975
+ stepConnectorVariants({
9976
+ // connector after current step is still upcoming
9977
+ status: status === "done" ? "done" : "upcoming",
9978
+ orientation
9979
+ })
9980
+ )
9981
+ }
9982
+ )
9983
+ ] }),
9984
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-0.5 text-center px-1", children: [
9985
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className: cn67(stepLabelVariants({ status })), children: step.label }),
9986
+ step.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
9987
+ "span",
9988
+ {
9989
+ "data-slot": "step-description",
9990
+ className: cn67(stepDescriptionVariants({ status })),
9991
+ children: step.description
9992
+ }
9993
+ )
9994
+ ] })
9995
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9996
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
9997
+ /* @__PURE__ */ jsxRuntime.jsx(
9998
+ "div",
9999
+ {
10000
+ "data-slot": "step-indicator",
10001
+ className: cn67(stepIndicatorVariants({ status, orientation })),
10002
+ "aria-hidden": "true",
10003
+ children: status === "done" ? "\u2713" : /* @__PURE__ */ jsxRuntime.jsx("span", { children: index + 1 })
10004
+ }
10005
+ ),
10006
+ !isLast && /* @__PURE__ */ jsxRuntime.jsx(
10007
+ "div",
10008
+ {
10009
+ "data-slot": "step-connector",
10010
+ className: cn67(
10011
+ stepConnectorVariants({
10012
+ status: status === "done" ? "done" : "upcoming",
10013
+ orientation
10014
+ })
10015
+ )
10016
+ }
10017
+ )
10018
+ ] }),
10019
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 pt-1 pb-4", children: [
10020
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "step-label", className: cn67(stepLabelVariants({ status })), children: step.label }),
10021
+ step.description !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
10022
+ "span",
10023
+ {
10024
+ "data-slot": "step-description",
10025
+ className: cn67(stepDescriptionVariants({ status })),
10026
+ children: step.description
10027
+ }
10028
+ )
10029
+ ] })
10030
+ ] })
10031
+ },
10032
+ key
10033
+ );
10034
+ })
10035
+ }
10036
+ );
10037
+ }
10038
+ MosaicStepPipeline.displayName = "MosaicStepPipeline";
9838
10039
  var WorkspaceCtx = React27__namespace.createContext({
9839
10040
  workspaceId: null,
9840
10041
  isLoading: false
@@ -10065,6 +10266,7 @@ exports.MosaicSignUpLayout = MosaicSignUpLayout;
10065
10266
  exports.MosaicSkeleton = MosaicSkeleton;
10066
10267
  exports.MosaicSlider = MosaicSlider;
10067
10268
  exports.MosaicStatsGrid = MosaicStatsGrid;
10269
+ exports.MosaicStepPipeline = MosaicStepPipeline;
10068
10270
  exports.MosaicSwitch = MosaicSwitch;
10069
10271
  exports.MosaicTabs = MosaicTabs;
10070
10272
  exports.MosaicTabsList = MosaicTabsList;