Skip to content

Commit 5a43124

Browse files
committed
chore: fixes
1 parent 648ffe5 commit 5a43124

16 files changed

+91
-127
lines changed

apps/docs/src/components/Header.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Suspense } from "react";
2+
13
import { ComponentDataParams, getComponentData } from "../utils/component";
24
import { PlaygroundProps } from "./code/Playground";
35
import { Description } from "./usage/Description";
@@ -17,7 +19,9 @@ export async function Header({ params, ...playgroundProps }: HeaderProps) {
1719
return (
1820
<div>
1921
<Description meta={meta} />
20-
<Tabs meta={meta} playgroundProps={{ ...playgroundProps, meta }} />
22+
<Suspense fallback={null}>
23+
<Tabs meta={meta} playgroundProps={{ ...playgroundProps, meta }} />
24+
</Suspense>
2125
</div>
2226
);
2327
}

apps/docs/src/components/home/HeroSection.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useMemo } from "react";
2-
import { ArrowRight } from "@phosphor-icons/react/ArrowRight";
32
import { clsx } from "clsx";
43
import Link from "next/link";
54
import { HvButton } from "@hitachivantara/uikit-react-core";
@@ -81,7 +80,7 @@ export const HeroSection = () => (
8180
variant="subtle"
8281
size="lg"
8382
className="mt-md max-sm:w-full hidden sm:inline-flex"
84-
endIcon={<ArrowRight />}
83+
endIcon={<div className="i-ph-arrow-right" />}
8584
>
8685
Explore components
8786
</HvButton>

apps/docs/src/components/home/Home.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"use client";
2-
31
import { CardsSection } from "./CardsSection";
42
import { HeroSection } from "./HeroSection";
53

apps/docs/src/components/home/cards/ApiUsage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { HvLineChart } from "@hitachivantara/uikit-react-viz";
24

35
import { Card } from "./Card";

apps/docs/src/components/home/cards/DataSecurity.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import { HvTag, HvTypography } from "@hitachivantara/uikit-react-core";
2-
import { SystemActivity } from "@hitachivantara/uikit-react-icons";
1+
import {
2+
HvIconContainer,
3+
HvTag,
4+
HvTypography,
5+
} from "@hitachivantara/uikit-react-core";
36

47
import { Card } from "./Card";
58

@@ -14,7 +17,11 @@ export const DataSecurity = () => {
1417
<Card
1518
title="Data Security Overview"
1619
subtitle="Incidents from the last 30 days."
17-
icon={<SystemActivity color="primary" />}
20+
icon={
21+
<HvIconContainer color="primary">
22+
<div className="i-ph-presentation-chart" />
23+
</HvIconContainer>
24+
}
1825
>
1926
<div className="flex gap-xs justify-between">
2027
{securityData.map(({ title, count, color }) => (

apps/docs/src/components/home/cards/FinancialPerformance.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { HvTypography } from "@hitachivantara/uikit-react-core";
2-
import { BottomXS, TopXS } from "@hitachivantara/uikit-react-icons";
32

43
import { Card } from "./Card";
54

@@ -22,10 +21,10 @@ const Item = ({ title, value, percentage, isPositive }: ItemProps) => {
2221

2322
return (
2423
<div>
25-
<div className="flex items-center">
24+
<div className="flex items-center gap-4px">
2625
<HvTypography variant="caption1">{title}</HvTypography>
27-
{isPositive && <TopXS color="positive" />}
28-
{!isPositive && <BottomXS color="negative" />}
26+
{isPositive && <div className="i-ph-arrow-up text-positive" />}
27+
{!isPositive && <div className="i-ph-arrow-down text-negative" />}
2928
<HvTypography className={percentageColor}>{percentage}%</HvTypography>
3029
</div>
3130
<HvTypography variant="title2">{value}</HvTypography>

apps/docs/src/components/home/cards/StorageOverview.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { HvBarChart } from "@hitachivantara/uikit-react-viz";
24

35
import { Card } from "./Card";

apps/docs/src/components/home/cards/TeamOverview.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
HvButton,
44
HvTypography,
55
} from "@hitachivantara/uikit-react-core";
6-
import { Open } from "@hitachivantara/uikit-react-icons";
76

87
import { Card } from "./Card";
98

@@ -50,7 +49,7 @@ export const TeamOverview = () => (
5049
variant="primaryGhost"
5150
aria-label={`View profile of ${name}`}
5251
>
53-
<Open />
52+
<div className="i-ph-arrow-square-out" />
5453
</HvButton>
5554
</div>
5655
))}

apps/docs/src/components/icons.tsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"use client";
2+
3+
import { HvPanel } from "@hitachivantara/uikit-react-core";
4+
import { Alert, icons } from "@hitachivantara/uikit-react-icons";
5+
6+
import { Playground } from "./code/Playground";
7+
8+
export function IconLibrary() {
9+
return (
10+
<HvPanel className="flex flex-wrap gap-xs justify-around px-xs">
11+
{Object.entries(icons).map(([name, Icon]) => (
12+
<div
13+
key={name}
14+
className="flex flex-col items-center justify-center w-112px"
15+
>
16+
<Icon size="S" />
17+
<code className="text-sm h-2em text-center break-all">{name}</code>
18+
</div>
19+
))}
20+
</HvPanel>
21+
);
22+
}
23+
24+
export function IconPlayground() {
25+
return (
26+
<Playground
27+
Component={Alert}
28+
componentName="Alert"
29+
controls={{
30+
color: { type: "color", defaultValue: "warning" },
31+
size: {
32+
type: "slider",
33+
defaultValue: "md",
34+
values: ["xs", "sm", "md", "lg", "xl"],
35+
},
36+
}}
37+
/>
38+
);
39+
}

apps/docs/src/content/components/icon-container.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { User } from "@phosphor-icons/react/User";
21
import {
32
iconContainerClasses as classes,
43
HvIconContainer,
@@ -20,5 +19,5 @@ import { Header } from "../../components/Header";
2019
rotate: { defaultValue: false },
2120
}}
2221
>
23-
<User />
22+
<div className="i-ph-user" />
2423
</Header>

apps/docs/src/content/components/step-navigation.mdx

Lines changed: 10 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,9 @@ import { Header } from "../../components/Header";
1616
}}
1717
componentProps={{
1818
steps: [
19-
{
20-
title: "Completed",
21-
state: "Completed",
22-
onClick: () => {
23-
alert("You clicked on 'Completed' step");
24-
},
25-
},
26-
{
27-
title: "Failed",
28-
state: "Failed",
29-
onClick: () => {
30-
alert("You clicked on 'Failed' step");
31-
},
32-
},
33-
{
34-
title: "Pending",
35-
state: "Pending",
36-
onClick: () => {
37-
alert("You clicked on 'Pending' step");
38-
},
39-
},
19+
{ title: "Completed", state: "Completed" },
20+
{ title: "Failed", state: "Failed" },
21+
{ title: "Pending", state: "Pending" },
4022
],
4123
}}
4224
/>
@@ -47,57 +29,15 @@ You can use the `width` prop to pass an array of custom breakpoints for the step
4729

4830
```tsx live
4931
<HvStepNavigation
32+
width={{ xs: 200, sm: 400, md: 600, lg: 800, xl: 1000 }}
5033
steps={[
51-
{
52-
title: "Completed",
53-
state: "Completed",
54-
onClick: () => {
55-
alert("You clicked on 'Completed' step");
56-
},
57-
},
58-
{
59-
title: "Failed",
60-
state: "Failed",
61-
onClick: () => {
62-
alert("You clicked on 'Failed' step");
63-
},
64-
},
65-
{
66-
title: "Pending",
67-
state: "Pending",
68-
onClick: () => {
69-
alert("You clicked on 'Pending' step");
70-
},
71-
},
72-
{
73-
title: "Current",
74-
state: "Current",
75-
onClick: () => {
76-
alert("You clicked on 'Current' step");
77-
},
78-
},
79-
{
80-
title: "Enabled",
81-
state: "Enabled",
82-
onClick: () => {
83-
alert("You clicked on 'Enabled' step");
84-
},
85-
},
86-
{
87-
title: "Disabled",
88-
state: "Disabled",
89-
onClick: () => {
90-
alert("You clicked on 'Disabled' step");
91-
},
92-
},
34+
{ title: "Completed", state: "Completed" },
35+
{ title: "Failed", state: "Failed" },
36+
{ title: "Pending", state: "Pending" },
37+
{ title: "Current", state: "Current" },
38+
{ title: "Enabled", state: "Enabled" },
39+
{ title: "Disabled", state: "Disabled" },
9340
]}
94-
width={{
95-
xs: 200,
96-
sm: 400,
97-
md: 600,
98-
lg: 800,
99-
xl: 1000,
100-
}}
10141
/>
10242
```
10343

apps/docs/src/content/components/vertical-navigation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Callout } from "nextra/components";
2-
import { LogOut, User } from "@hitachivantara/uikit-react-icons";
2+
import { verticalNavigationClasses as classes } from "@hitachivantara/uikit-react-core";
33

44
import { Header } from "../../components/Header";
55

apps/docs/src/content/docs/_meta.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { MetaRecord } from "nextra";
2+
13
export default {
24
"-- Overview": {
35
type: "separator",
@@ -20,20 +22,19 @@ export default {
2022
theming: "Theming",
2123
"color-tokens": {
2224
title: "Color Tokens",
23-
theme: {
24-
toc: false,
25-
},
25+
theme: { layout: "full", toc: false },
2626
},
2727
"color-palette": {
2828
title: "Color Palette",
29-
theme: {
30-
toc: false,
31-
},
29+
theme: { layout: "full", toc: false },
30+
},
31+
icons: {
32+
title: "Icons",
33+
theme: { toc: false },
3234
},
33-
icons: "Icons",
3435
"icon-library": {
3536
title: "Icon Library",
36-
theme: { toc: false },
37+
theme: { layout: "full", toc: false },
3738
},
3839
"-- Guides": {
3940
type: "separator",
@@ -43,4 +44,4 @@ export default {
4344
layout: "Layout",
4445
forms: "Forms",
4546
accessibility: "Accessibility",
46-
};
47+
} satisfies MetaRecord;

apps/docs/src/content/docs/get-started.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { CodesandboxLogo, Lightning } from "@phosphor-icons/react";
21
import { Card, Cards, Steps, Tabs } from "nextra/components";
32

43
# Get Started
@@ -7,13 +6,13 @@ If you just want to try out **UI Kit** without setting up a local project, launc
76

87
<Cards>
98
<Cards.Card
10-
icon={<Lightning />}
9+
icon={<div className="i-ph-lightning" />}
1110
title="Open on StackBlitz"
1211
href="https://stackblitz.com/github.com/lumada-design/hv-uikit-react/tree/master/examples/uikit-vite-ts"
1312
target="_blank"
1413
/>
1514
<Cards.Card
16-
icon={<CodesandboxLogo />}
15+
icon={<div className="i-ph-codesandbox-logo" />}
1716
title="Open on CodeSandbox"
1817
href="https://codesandbox.io/p/sandbox/github.com/lumada-design/hv-uikit-react/tree/master/examples/uikit-vite-ts"
1918
target="_blank"
Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import { HvPanel } from "@hitachivantara/uikit-react-core";
2-
import { Alert, icons } from "@hitachivantara/uikit-react-icons";
3-
4-
import { Playground } from "../../components/code/Playground";
1+
import { IconLibrary, IconPlayground } from "../../components/icons";
52

63
# Icon Library
74

@@ -15,31 +12,10 @@ import { Alert } from "@hitachivantara/uikit-react-icons";
1512

1613
<br />
1714

18-
<Playground
19-
Component={Alert}
20-
componentName="Alert"
21-
controls={{
22-
color: { type: "color", defaultValue: "warning" },
23-
size: {
24-
type: "slider",
25-
defaultValue: "md",
26-
values: ["xs", "sm", "md", "lg", "xl"],
27-
},
28-
}}
29-
/>
15+
<IconPlayground />
3016

3117
## Library
3218

3319
<br />
3420

35-
<HvPanel className="flex flex-wrap gap-xs justify-around px-xs">
36-
{Object.entries(icons).map(([name, Icon]) => (
37-
<div
38-
key={name}
39-
className="flex flex-col items-center justify-center w-112px"
40-
>
41-
<Icon size="S" />
42-
<code className="text-sm h-2em text-center break-all">{name}</code>
43-
</div>
44-
))}
45-
</HvPanel>
21+
<IconLibrary />

packages/core/src/Badge/Badge.styles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const { staticClasses, useClasses } = createClasses("HvBadge", {
88
":has($badgeIcon)": {
99
width: "fit-content",
1010
height: "fit-content",
11-
"&>div:first-child": {
11+
"&>div:first-of-type": {
1212
minWidth: 32,
1313
minHeight: 32,
1414
"--icsize": "100%",

0 commit comments

Comments
 (0)