Skip to content

Commit

Permalink
fix: Fixed bug that was preventing to build and restructured the old …
Browse files Browse the repository at this point in the history
…ui package
  • Loading branch information
FleetAdmiralJakob committed Jan 8, 2024
1 parent 1ec845a commit 3a101dd
Show file tree
Hide file tree
Showing 17 changed files with 119 additions and 62 deletions.
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@vercel/speed-insights": "^1.0.2",
"@weatherio/api": "workspace:^0.1.0",
"@weatherio/types": "workspace:^0.1.0",
"@weatherio/ui": "workspace:^0.1.0",
"@weatherio/components": "workspace:^0.1.0",
"classnames": "^2.5.1",
"dayjs": "^1.11.10",
"next": "^14.0.4",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FaMapMarkedAlt, FaShare } from "react-icons/fa";
import { IoIosSettings, IoMdContact } from "react-icons/io";
import { LuMenu, LuX } from "react-icons/lu";

import { cn } from "@weatherio/ui";
import { cn } from "@weatherio/components";

interface LayoutProps {
title?: string;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SpeedInsights } from "@vercel/speed-insights/next";
import { AxiomWebVitals } from "next-axiom";
import { appWithTranslation } from "next-i18next";

import { Toaster } from "@weatherio/ui/sonner";
import { Toaster } from "@weatherio/components/ui/sonner";

import { PWALifeCycle } from "~/components/PWALifecycle";
import { api } from "~/lib/utils/api";
Expand Down
14 changes: 7 additions & 7 deletions apps/web/src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ import { PiSunglasses } from "react-icons/pi";
import { WiRaindrop } from "react-icons/wi";

import type { IDailyForecast, IHourlyForecast } from "@weatherio/types";
import { Button } from "@weatherio/ui/button";
import { Button } from "@weatherio/components/ui/button";
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@weatherio/ui/collapsible";
} from "@weatherio/components/ui/collapsible";
import {
HoverCard,
HoverCardContent,
HoverCardTrigger,
} from "@weatherio/ui/hover-card";
import { ScrollArea, ScrollBar } from "@weatherio/ui/scroll-area";
import { Skeleton } from "@weatherio/ui/skeleton";
} from "@weatherio/components/ui/hover-card";
import { ScrollArea, ScrollBar } from "@weatherio/components/ui/scroll-area";
import { Skeleton } from "@weatherio/components/ui/skeleton";

import type { WindSpeedUnitType } from "~/states";
import Layout from "~/components/Layout";
import { MoonPhaseInfo } from "~/components/moon-phase-info";
import { api } from "~/lib/utils/api";
import { MoonPhaseInfo } from "~/pages/home/moon-phase-info";
import { activeCity$, temperatureUnit$, windSpeedUnit$ } from "~/states";

const Map = dynamic(() => import("@weatherio/ui/map"), { ssr: false });
const Map = dynamic(() => import("@weatherio/components/map"), { ssr: false });

dayjs.extend(utc);
dayjs.extend(timezone);
Expand Down
18 changes: 9 additions & 9 deletions packages/ui/package.json → packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@weatherio/ui",
"name": "@weatherio/components",
"private": true,
"version": "0.1.0",
"type": "module",
"exports": {
".": "./src/index.ts",
"./button": "./src/button.tsx",
"./collapsible": "./src/collapsible.tsx",
"./hover-card": "./src/hover-card.tsx",
"./map": "./src/map.tsx",
"./scroll-area": "./src/scroll-area.tsx",
"./skeleton": "./src/skeleton.tsx",
"./sonner": "./src/sonner.tsx"
"./ui/button": "./src/ui/button.tsx",
"./ui/collapsible": "./src/ui/collapsible.tsx",
"./ui/hover-card": "./src/ui/hover-card.tsx",
"./ui/scroll-area": "./src/ui/scroll-area.tsx",
"./ui/skeleton": "./src/ui/skeleton.tsx",
"./ui/sonner": "./src/ui/sonner.tsx",
"./map": "./src/map.tsx"
},
"license": "MIT",
"scripts": {
Expand All @@ -37,9 +37,9 @@
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/leaflet": "^1.9.8",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/leaflet": "^1.9.8",
"@weatherio/eslint-config": "workspace:^0.2.0",
"@weatherio/prettier-config": "workspace:^0.1.0",
"@weatherio/tailwind-config": "workspace:^0.1.0",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva } from "class-variance-authority";

import { cn } from ".";
import { cn } from "../index";

const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";

import { cn } from ".";
import { cn } from "../index";

const HoverCard = HoverCardPrimitive.Root;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";

import { cn } from ".";
import { cn } from "../index";

const ScrollArea = React.forwardRef<
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cn } from ".";
import { cn } from "../index";

function Skeleton({
className,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
135 changes: 96 additions & 39 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 3a101dd

@vercel
Copy link

@vercel vercel bot commented on 3a101dd Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.