Reorganize components
This commit is contained in:
1 parent
db3c0274f6
commit
6f178e934f
61 files changed
+45
-44
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { getAllBlogPosts } from "../../lib/content";
|
import { getAllBlogPosts } from "../../lib/content";
|
||||||
import ContentThumbnailTemplate from "../components/ContentThumbnailTemplate";
|
import ContentThumbnailTemplate from "../components/content/ContentThumbnailTemplate";
|
||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import { getAssetPath, ASSETS } from "../../../lib/assetUtils";
|
import { getAssetPath, ASSETS } from "../../../../lib/assetUtils";
|
||||||
import ContentContainerView from "./ContentContainer.view";
|
import ContentContainerView from "./ContentContainer.view";
|
||||||
import type { ContentContainerProps } from "./ContentContainer.types";
|
import type { ContentContainerProps } from "./ContentContainer.types";
|
||||||
import { normalizeContentContainerSize } from "../../../lib/propNormalization";
|
import { normalizeContentContainerSize } from "../../../../lib/propNormalization";
|
||||||
|
|
||||||
const ContentContainerContainer = memo<ContentContainerProps>(
|
const ContentContainerContainer = memo<ContentContainerProps>(
|
||||||
({ post, width = "200px", size: sizeProp = "responsive" }) => {
|
({ post, width = "200px", size: sizeProp = "responsive" }) => {
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import type { BlogPost } from "../../../lib/content";
|
import type { BlogPost } from "../../../../lib/content";
|
||||||
|
|
||||||
export type ContentContainerSizeValue = "xs" | "responsive" | "Xs" | "Responsive";
|
export type ContentContainerSizeValue = "xs" | "responsive" | "Xs" | "Responsive";
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import { getAssetPath, ASSETS } from "../../../lib/assetUtils";
|
import { getAssetPath, ASSETS } from "../../../../lib/assetUtils";
|
||||||
import ContentThumbnailTemplateView from "./ContentThumbnailTemplate.view";
|
import ContentThumbnailTemplateView from "./ContentThumbnailTemplate.view";
|
||||||
import type { ContentThumbnailTemplateProps } from "./ContentThumbnailTemplate.types";
|
import type { ContentThumbnailTemplateProps } from "./ContentThumbnailTemplate.types";
|
||||||
import { normalizeContentThumbnailVariant } from "../../../lib/propNormalization";
|
import { normalizeContentThumbnailVariant } from "../../../../lib/propNormalization";
|
||||||
|
|
||||||
const ContentThumbnailTemplateContainer = memo<ContentThumbnailTemplateProps>(
|
const ContentThumbnailTemplateContainer = memo<ContentThumbnailTemplateProps>(
|
||||||
({ post, className = "", variant: variantProp = "vertical" }) => {
|
({ post, className = "", variant: variantProp = "vertical" }) => {
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import type { BlogPost } from "../../../lib/content";
|
import type { BlogPost } from "../../../../lib/content";
|
||||||
|
|
||||||
export type ContentThumbnailTemplateVariantValue = "vertical" | "horizontal" | "Vertical" | "Horizontal";
|
export type ContentThumbnailTemplateVariantValue = "vertical" | "horizontal" | "Vertical" | "Horizontal";
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import Chip from "../Chip";
|
import Chip from "../Chip";
|
||||||
import InputLabel from "../../InputLabel";
|
import InputLabel from "../../utility/InputLabel";
|
||||||
import type { MultiSelectViewProps } from "./MultiSelect.types";
|
import type { MultiSelectViewProps } from "./MultiSelect.types";
|
||||||
|
|
||||||
function MultiSelectView({
|
function MultiSelectView({
|
||||||
|
|||||||
File renamed without changes.
@@ -1,7 +1,7 @@
|
|||||||
import React, { Children, type ReactNode } from "react";
|
import React, { Children, type ReactNode } from "react";
|
||||||
import { getAssetPath, ASSETS } from "../../../../lib/assetUtils";
|
import { getAssetPath, ASSETS } from "../../../../lib/assetUtils";
|
||||||
import SelectDropdown from "../../SelectDropdown";
|
import SelectDropdown from "./SelectDropdown";
|
||||||
import SelectOption from "../../SelectOption";
|
import SelectOption from "./SelectOption";
|
||||||
import type { SelectOptionData } from "./SelectInput.types";
|
import type { SelectOptionData } from "./SelectInput.types";
|
||||||
|
|
||||||
export interface SelectInputViewProps {
|
export interface SelectInputViewProps {
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
import { forwardRef, memo, useCallback } from "react";
|
import { forwardRef, memo, useCallback } from "react";
|
||||||
import { SelectOptionView } from "./SelectOption.view";
|
import { SelectOptionView } from "./SelectOption.view";
|
||||||
import type { SelectOptionProps } from "./SelectOption.types";
|
import type { SelectOptionProps } from "./SelectOption.types";
|
||||||
import { normalizeContextMenuItemSize } from "../../../lib/propNormalization";
|
import { normalizeContextMenuItemSize } from "../../../../lib/propNormalization";
|
||||||
|
|
||||||
const SelectOptionContainer = forwardRef<HTMLDivElement, SelectOptionProps>(
|
const SelectOptionContainer = forwardRef<HTMLDivElement, SelectOptionProps>(
|
||||||
(
|
(
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import { useTranslation } from "../../contexts/MessagesContext";
|
import { useTranslation } from "../../../contexts/MessagesContext";
|
||||||
import type { LanguageSwitcherProps, Language } from "./LanguageSwitcher.types";
|
import type { LanguageSwitcherProps, Language } from "./LanguageSwitcher.types";
|
||||||
|
|
||||||
function LanguageSwitcherView({ className = "" }: LanguageSwitcherProps) {
|
function LanguageSwitcherView({ className = "" }: LanguageSwitcherProps) {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import HomeHeader from "../navigation/HomeHeader";
|
import HomeHeader from "../HomeHeader";
|
||||||
import Header from "../navigation/Header";
|
import Header from "../Header";
|
||||||
import type { ConditionalHeaderViewProps } from "./ConditionalHeader.types";
|
import type { ConditionalHeaderViewProps } from "./ConditionalHeader.types";
|
||||||
|
|
||||||
export function ConditionalHeaderView({
|
export function ConditionalHeaderView({
|
||||||
File renamed without changes.
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import { getAssetPath } from "../../../lib/assetUtils";
|
import { getAssetPath } from "../../../lib/assetUtils";
|
||||||
import ContentContainer from "../ContentContainer";
|
import ContentContainer from "../content/ContentContainer";
|
||||||
import type { BlogPost } from "../../../lib/content";
|
import type { BlogPost } from "../../../lib/content";
|
||||||
|
|
||||||
interface ContentBannerProps {
|
interface ContentBannerProps {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { useTranslation } from "../../../contexts/MessagesContext";
|
import { useTranslation } from "../../../contexts/MessagesContext";
|
||||||
import ContentLockup from "../../type/ContentLockup";
|
import ContentLockup from "../../type/ContentLockup";
|
||||||
import MiniCard from "../../MiniCard";
|
import MiniCard from "../../cards/MiniCard";
|
||||||
import type { FeatureGridViewProps } from "./FeatureGrid.types";
|
import type { FeatureGridViewProps } from "./FeatureGrid.types";
|
||||||
|
|
||||||
function FeatureGridView({
|
function FeatureGridView({
|
||||||
|
|||||||
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import { useTranslation } from "../../contexts/MessagesContext";
|
import { useTranslation } from "../../../contexts/MessagesContext";
|
||||||
import ContentLockup from "../type/ContentLockup";
|
import ContentLockup from "../../type/ContentLockup";
|
||||||
import HeroDecor from "../HeroDecor";
|
import HeroDecor from "./HeroDecor";
|
||||||
import { getAssetPath } from "../../../lib/assetUtils";
|
import { getAssetPath } from "../../../../lib/assetUtils";
|
||||||
|
|
||||||
interface HeroBannerProps {
|
interface HeroBannerProps {
|
||||||
title?: string;
|
title?: string;
|
||||||
File renamed without changes.
@@ -0,0 +1 @@
|
|||||||
|
export { default } from "./HeroBanner";
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useTranslation } from "../../../contexts/MessagesContext";
|
import { useTranslation } from "../../../contexts/MessagesContext";
|
||||||
import QuoteDecor from "../../QuoteDecor";
|
import QuoteDecor from "./QuoteDecor";
|
||||||
import type { QuoteBlockViewProps } from "./QuoteBlock.types";
|
import type { QuoteBlockViewProps } from "./QuoteBlock.types";
|
||||||
|
|
||||||
function QuoteBlockView({
|
function QuoteBlockView({
|
||||||
|
|||||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
|||||||
import ContentThumbnailTemplate from "../../ContentThumbnailTemplate";
|
import ContentThumbnailTemplate from "../../content/ContentThumbnailTemplate";
|
||||||
import type { RelatedArticlesViewProps } from "./RelatedArticles.types";
|
import type { RelatedArticlesViewProps } from "./RelatedArticles.types";
|
||||||
|
|
||||||
export function RelatedArticlesView({
|
export function RelatedArticlesView({
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import type { InputLabelProps } from "./InputLabel.types";
|
|||||||
import {
|
import {
|
||||||
normalizeInputLabelSize,
|
normalizeInputLabelSize,
|
||||||
normalizeInputLabelPalette,
|
normalizeInputLabelPalette,
|
||||||
} from "../../../lib/propNormalization";
|
} from "../../../../lib/propNormalization";
|
||||||
|
|
||||||
const InputLabelContainer = memo<InputLabelProps>(
|
const InputLabelContainer = memo<InputLabelProps>(
|
||||||
({
|
({
|
||||||
File renamed without changes.
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import { getAssetPath, ASSETS } from "../../../lib/assetUtils";
|
import { getAssetPath, ASSETS } from "../../../../lib/assetUtils";
|
||||||
import type { InputLabelViewProps } from "./InputLabel.types";
|
import type { InputLabelViewProps } from "./InputLabel.types";
|
||||||
|
|
||||||
function InputLabelView({
|
function InputLabelView({
|
||||||
File renamed without changes.
+1
-1
@@ -5,7 +5,7 @@ import dynamic from "next/dynamic";
|
|||||||
import { MessagesProvider } from "./contexts/MessagesContext";
|
import { MessagesProvider } from "./contexts/MessagesContext";
|
||||||
import messages from "../messages/en/index";
|
import messages from "../messages/en/index";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import ConditionalHeader from "./components/ConditionalHeader";
|
import ConditionalHeader from "./components/navigation/ConditionalHeader";
|
||||||
|
|
||||||
// Code split Footer - below the fold, can be lazy loaded
|
// Code split Footer - below the fold, can be lazy loaded
|
||||||
const Footer = dynamic(() => import("./components/navigation/Footer"), {
|
const Footer = dynamic(() => import("./components/navigation/Footer"), {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import messages from "../../messages/en/index";
|
import messages from "../../messages/en/index";
|
||||||
import { getTranslation } from "../../lib/i18n/getTranslation";
|
import { getTranslation } from "../../lib/i18n/getTranslation";
|
||||||
import ContentThumbnailTemplate from "../components/ContentThumbnailTemplate";
|
import ContentThumbnailTemplate from "../components/content/ContentThumbnailTemplate";
|
||||||
import ContentLockup from "../components/type/ContentLockup";
|
import ContentLockup from "../components/type/ContentLockup";
|
||||||
import AskOrganizer from "../components/sections/AskOrganizer";
|
import AskOrganizer from "../components/sections/AskOrganizer";
|
||||||
import { getAllBlogPosts } from "../../lib/content";
|
import { getAllBlogPosts } from "../../lib/content";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import ConditionalHeader from "../app/components/ConditionalHeader";
|
import ConditionalHeader from "../app/components/navigation/ConditionalHeader";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Components/ConditionalHeader",
|
title: "Components/ConditionalHeader",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import ContentContainer from "../app/components/ContentContainer";
|
import ContentContainer from "../app/components/content/ContentContainer";
|
||||||
|
|
||||||
const mockPost = {
|
const mockPost = {
|
||||||
slug: "sample-article",
|
slug: "sample-article",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import ContentThumbnailTemplate from "../app/components/ContentThumbnailTemplate";
|
import ContentThumbnailTemplate from "../app/components/content/ContentThumbnailTemplate";
|
||||||
|
|
||||||
const mockPost = {
|
const mockPost = {
|
||||||
slug: "sample-article",
|
slug: "sample-article",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import ContextMenu from "../app/components/ContextMenu";
|
import ContextMenu from "../app/components/ContextMenu/ContextMenu";
|
||||||
import ContextMenuItem from "../app/components/ContextMenuItem";
|
import ContextMenuItem from "../app/components/ContextMenu/ContextMenuItem";
|
||||||
import ContextMenuSection from "../app/components/ContextMenuSection";
|
import ContextMenuSection from "../app/components/ContextMenu/ContextMenuSection";
|
||||||
import ContextMenuDivider from "../app/components/ContextMenuDivider";
|
import ContextMenuDivider from "../app/components/ContextMenu/ContextMenuDivider";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Forms/ContextMenu",
|
title: "Forms/ContextMenu",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import HeroBanner from "../app/components/HeroBanner";
|
import HeroBanner from "../app/components/sections/HeroBanner";
|
||||||
import ContentLockup from "../app/components/ContentLockup";
|
import ContentLockup from "../app/components/type/ContentLockup";
|
||||||
import HeroDecor from "../app/components/HeroDecor";
|
import HeroDecor from "../app/components/sections/HeroBanner/HeroDecor";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Systems/HeroBanner System",
|
title: "Systems/HeroBanner System",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import HeroDecor from "../app/components/HeroDecor";
|
import HeroDecor from "../app/components/sections/HeroBanner/HeroDecor";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Components/HeroDecor",
|
title: "Components/HeroDecor",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import MiniCard from "../app/components/MiniCard";
|
import MiniCard from "../app/components/cards/MiniCard";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Components/MiniCard",
|
title: "Components/MiniCard",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ContextMenu from "../../app/components/ContextMenu";
|
import ContextMenu from "../../app/components/ContextMenu/ContextMenu";
|
||||||
import ContextMenuItem from "../../app/components/ContextMenuItem";
|
import ContextMenuItem from "../../app/components/ContextMenu/ContextMenuItem";
|
||||||
import { componentTestSuite } from "../utils/componentTestSuite";
|
import { componentTestSuite } from "../utils/componentTestSuite";
|
||||||
|
|
||||||
type ContextMenuProps = React.ComponentProps<typeof ContextMenu>;
|
type ContextMenuProps = React.ComponentProps<typeof ContextMenu>;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ContextMenuItem from "../../app/components/ContextMenuItem";
|
import ContextMenuItem from "../../app/components/ContextMenu/ContextMenuItem";
|
||||||
import { componentTestSuite } from "../utils/componentTestSuite";
|
import { componentTestSuite } from "../utils/componentTestSuite";
|
||||||
|
|
||||||
type ContextMenuItemProps = React.ComponentProps<typeof ContextMenuItem>;
|
type ContextMenuItemProps = React.ComponentProps<typeof ContextMenuItem>;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { describe, it, expect } from "vitest";
|
import { describe, it, expect } from "vitest";
|
||||||
import { screen } from "@testing-library/react";
|
import { screen } from "@testing-library/react";
|
||||||
import { renderWithProviders as render } from "../utils/test-utils";
|
import { renderWithProviders as render } from "../utils/test-utils";
|
||||||
import InputLabel from "../../app/components/InputLabel";
|
import InputLabel from "../../app/components/utility/InputLabel";
|
||||||
import {
|
import {
|
||||||
componentTestSuite,
|
componentTestSuite,
|
||||||
type ComponentTestSuiteConfig,
|
type ComponentTestSuiteConfig,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, vi } from "vitest";
|
import { describe, it, expect, vi } from "vitest";
|
||||||
import { render, screen } from "@testing-library/react";
|
import { render, screen } from "@testing-library/react";
|
||||||
import ContentContainer from "../../app/components/ContentContainer";
|
import ContentContainer from "../../app/components/content/ContentContainer";
|
||||||
|
|
||||||
// Mock asset utils
|
// Mock asset utils
|
||||||
vi.mock("../../lib/assetUtils", () => ({
|
vi.mock("../../lib/assetUtils", () => ({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, vi } from "vitest";
|
import { describe, it, expect, vi } from "vitest";
|
||||||
import { render, screen } from "@testing-library/react";
|
import { render, screen } from "@testing-library/react";
|
||||||
import ContentThumbnailTemplate from "../../app/components/ContentThumbnailTemplate";
|
import ContentThumbnailTemplate from "../../app/components/content/ContentThumbnailTemplate";
|
||||||
|
|
||||||
// Mock Next.js components
|
// Mock Next.js components
|
||||||
vi.mock("next/link", () => {
|
vi.mock("next/link", () => {
|
||||||
|
|||||||
Reference in new issue
Block a user