@levo-so/blocks 0.2.1 → 0.2.3

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/package.json CHANGED
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "@levo-so/blocks",
3
3
  "description": "Set of blocks for Levo studio",
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "author": "Levo Engineering <devs@theinternetfolks.com>",
6
6
  "dependencies": {
7
+ "clsx": "2.1.1",
7
8
  "dayjs": "1.11.13",
8
9
  "lucide-react": "0.575.0",
9
- "use-debounce": "10.0.2",
10
- "@levo/utils": "0.0.0"
10
+ "tailwind-merge": "2.4.0",
11
+ "use-debounce": "10.0.2"
11
12
  },
12
13
  "devDependencies": {
13
14
  "@types/react": "19.2.14",
14
15
  "@types/react-dom": "19.2.3",
15
16
  "typescript": "5.9.3",
16
17
  "@levo-so/core": "0.2.1",
17
- "@levo-so/react": "0.2.1",
18
18
  "@levo/ts-config": "0.0.0",
19
- "@levo-so/studio": "0.2.1"
19
+ "@levo-so/studio": "0.2.3",
20
+ "@levo-so/react": "0.2.1"
20
21
  },
21
22
  "exports": {
22
23
  ".": "./src/index.ts"
@@ -30,7 +31,7 @@
30
31
  "react": ">=18",
31
32
  "react-dom": ">=18",
32
33
  "@levo-so/core": "0.2.1",
33
- "@levo-so/studio": "0.2.1",
34
+ "@levo-so/studio": "0.2.3",
34
35
  "@levo-so/react": "0.2.1"
35
36
  },
36
37
  "publishConfig": {
@@ -71,7 +71,7 @@ const DEFAULT_CONTENT = {
71
71
  timing: "Full Day",
72
72
  "content-section": null,
73
73
  "main-content": null,
74
- "register-button": "Register Now",
74
+ register_button: "Register Now",
75
75
  "registration-ended": "The registration for this event has ended.",
76
76
  event: null,
77
77
  description:
@@ -333,7 +333,12 @@ export const EventDetails2: IBlock = {
333
333
  },
334
334
  },
335
335
  {
336
- key: "register-button",
336
+ key: "register_container",
337
+ label: "Registration Container",
338
+ field_interface: "BoxWidget",
339
+ },
340
+ {
341
+ key: "register_button",
337
342
  label: "Registration Button",
338
343
  field_interface: "ButtonWidget",
339
344
  hint: {
@@ -561,7 +566,7 @@ export const EventDetails2: IBlock = {
561
566
  "flex-basis": "100%",
562
567
  },
563
568
  },
564
- "register-button": {
569
+ register_button: {
565
570
  "background-color": "background-1",
566
571
  color: "text-1",
567
572
  "padding-top": "base",
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
 
3
- import { cn } from "@levo/utils/cn";
4
3
  import type { ILevoBlockBaseProps } from "@levo-so/studio";
5
4
  import {
6
5
  Box,
@@ -19,6 +18,7 @@ import {
19
18
  import { ChevronDown, Menu, X } from "lucide-react";
20
19
  import React, { useEffect, useState } from "react";
21
20
 
21
+ import { cn } from "../../utils/cn";
22
22
  import type { INavbar1Content } from "./navbar-1.schema";
23
23
 
24
24
  const DropdownNavigationItem: React.FC<{
@@ -1,4 +1,3 @@
1
- import { cn } from "@levo/utils/cn";
2
1
  import type { ILevoBlockBaseProps } from "@levo-so/studio";
3
2
  import {
4
3
  Box,
@@ -18,6 +17,7 @@ import { ChevronDown, ChevronRight, Menu, X } from "lucide-react";
18
17
  import React, { useEffect, useState } from "react";
19
18
 
20
19
  import { toArray } from "../../utils/array";
20
+ import { cn } from "../../utils/cn";
21
21
  import type { INavbar3Content } from "./navbar-3.schema";
22
22
 
23
23
  const NestedDropdownItem: React.FC<{
@@ -1,4 +1,3 @@
1
- import { cn } from "@levo/utils/cn";
2
1
  import type { ILevoBlockBaseProps } from "@levo-so/studio";
3
2
  import {
4
3
  Box,
@@ -17,6 +16,7 @@ import {
17
16
  import { ChevronDown, ChevronRight, Menu, X } from "lucide-react";
18
17
  import React, { useEffect, useState } from "react";
19
18
 
19
+ import { cn } from "../../utils/cn";
20
20
  import type { INavbar3Content } from "./navbar-3.schema";
21
21
 
22
22
  const NestedDropdownItem: React.FC<{
@@ -1,8 +1,4 @@
1
- import { useLevo, errorToast, successToast } from "@levo-so/react";
2
-
3
- import { Spinner } from "../../components/Spinner";
4
- import { cn } from "@levo/utils/cn";
5
-
1
+ import { errorToast, successToast, useLevo } from "@levo-so/react";
6
2
  import {
7
3
  Box,
8
4
  Container,
@@ -16,6 +12,8 @@ import {
16
12
  import { CircleCheckBig, LoaderCircle } from "lucide-react";
17
13
  import { useCallback, useEffect, useMemo, useState } from "react";
18
14
 
15
+ import { Spinner } from "../../components/Spinner";
16
+ import { cn } from "../../utils/cn";
19
17
  import type { IPolling1Content } from "./polling-1.schema";
20
18
 
21
19
  const POLLS_RESPONSE_SAMPLE = {
@@ -1,6 +1,7 @@
1
- import { cn } from "@levo/utils/cn";
2
1
  import { Loader2 } from "lucide-react";
3
2
 
3
+ import { cn } from "../utils/cn";
4
+
4
5
  /** Indeterminate loading spinner. */
5
6
  export const Spinner = ({ className }: { className?: string }) => (
6
7
  <Loader2 className={cn("h-8 w-8 animate-spin font-light", className)} />
@@ -0,0 +1,14 @@
1
+ import { type ClassValue, clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ /**
5
+ * Merge conditional class names, de-duplicating conflicting Tailwind utilities.
6
+ * Inlined here (rather than importing `@levo/utils/cn`) because `@levo-so/blocks`
7
+ * publishes to npm as raw source — a `@levo/utils` dependency is private and
8
+ * unpublished, so consumers hit ERR_PNPM_FETCH_404 resolving it.
9
+ */
10
+ export const cn = (...inputs: ClassValue[]) => {
11
+ return twMerge(clsx(inputs));
12
+ };
13
+
14
+ export default cn;