Skip to content

Commit

Permalink
chore: remove @docs alias
Browse files Browse the repository at this point in the history
  • Loading branch information
zettca committed Jan 15, 2025
1 parent f9a96dc commit d177228
Show file tree
Hide file tree
Showing 46 changed files with 169 additions and 170 deletions.
2 changes: 1 addition & 1 deletion apps/docs/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UIKitLogo } from "@docs/components/logo/uikit";
import { UIKitLogo } from "./logo/uikit";

const footerLinks = [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/code/Live.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
LivePreview,
LiveProvider,
} from "react-live-runner";
import useEditorTheme from "@docs/hooks/useEditorTheme";
import * as HvCore from "@hitachivantara/uikit-react-core";
import * as HvIcons from "@hitachivantara/uikit-react-icons";

import useEditorTheme from "../../hooks/useEditorTheme";
import { Toolbar } from "./Toolbar";

interface LiveProps {
Expand Down
6 changes: 2 additions & 4 deletions apps/docs/src/components/code/Playground.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Children, isValidElement, useCallback, useState } from "react";
import jsxToString from "react-element-to-jsx-string";
import { CodeEditor } from "react-live-runner";
import useEditorTheme from "@docs/hooks/useEditorTheme";

import useEditorTheme from "../../hooks/useEditorTheme";
import { Controls, type Control } from "./Controls";

type PlaygroundProps = {
Expand Down Expand Up @@ -55,7 +55,7 @@ const generateCode = (
return `<${componentName} ${componentPropsString}/>`.trim();
};

const Playground = ({
export const Playground = ({
Component,
componentName,
componentProps,
Expand Down Expand Up @@ -139,5 +139,3 @@ const Playground = ({
</>
);
};

export default Playground;
3 changes: 2 additions & 1 deletion apps/docs/src/hooks/useEditorTheme.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import useIsMounted from "@docs/hooks/useIsMounted";
import { useTheme } from "nextra-theme-docs";
// @ts-ignore
import { themes } from "prism-react-renderer";

import useIsMounted from "./useIsMounted";

const useEditorTheme = () => {
const isMounted = useIsMounted();
const { resolvedTheme } = useTheme();
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/accordion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
HvTypography,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Accordion", "core", accordionClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/avatar-group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
HvAvatarGroup,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/avatar.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { avatarClasses, HvAvatar } from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Avatar", "core", avatarClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/badge.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { badgeClasses, HvBadge } from "@hitachivantara/uikit-react-core";
import { Alert } from "@hitachivantara/uikit-react-icons";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Badge", "core", badgeClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/banner.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { css } from "@emotion/css";
import { bannerClasses, HvBanner } from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Banner", "core", bannerClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
HvButton,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Button", "core", buttonClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/card.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { cardClasses, HvCard } from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Card", "core", cardClasses, [
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/checkbox.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { checkBoxClasses, HvCheckBox } from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("CheckBox", "core", checkBoxClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/color-picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
HvColorPicker,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/date-picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
HvDatePicker,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("DatePicker", "core", datePickerClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/dialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {
HvDialogTitle,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Dialog", "core", dialogClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/dot-pagination.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
HvDotPagination,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/dropdown-menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
} from "@hitachivantara/uikit-react-core";
import { Open, Preview, Save } from "@hitachivantara/uikit-react-icons";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/dropdown.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { dropdownClasses, HvDropdown } from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Dropdown", "core", dropdownClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/empty-state.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
} from "@hitachivantara/uikit-react-core";
import { Info } from "@hitachivantara/uikit-react-icons";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("EmptyState", "core", emptyStateClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/file-uploader.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
HvFileUploader,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/form-element.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
} from "@hitachivantara/uikit-react-core";
import { Fail, Success } from "@hitachivantara/uikit-react-icons";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/input.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HvInput, inputClasses } from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Input", "core", inputClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/loading-container.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
loadingContainerClasses,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/loading.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HvLoading, loadingClasses } from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Loading", "core", loadingClasses);
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/multi-button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
Map,
} from "@hitachivantara/uikit-react-icons";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/overflow-tooltip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
overflowTooltipClasses,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData(
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/pages/components/pagination.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
paginationClasses,
} from "@hitachivantara/uikit-react-core";

import Playground from "@docs/components/code/Playground";
import { Description } from "@docs/components/page/Description";
import { Page } from "@docs/components/page/Page";
import { getComponentData } from "@docs/utils/component";
import { Playground } from "../../components/code/Playground";
import { Description } from "../../components/page/Description";
import { Page } from "../../components/page/Page";
import { getComponentData } from "../../utils/component";

export const getStaticProps = async ({ params }) => {
const meta = await getComponentData("Pagination", "core", paginationClasses);
Expand Down
Loading

0 comments on commit d177228

Please sign in to comment.