;
8 |
9 | export function AvatarFallback({ className, ...props }: AvatarFallbackProps) {
10 | return (
11 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/.storybook/theme/dark.ts:
--------------------------------------------------------------------------------
1 | import { create } from "storybook/theming";
2 |
3 | export default create({
4 | base: "dark",
5 |
6 | // Typography
7 | fontBase: "'Poppins', sans-serif",
8 | fontCode: "'JetBrains Mono', monospace",
9 |
10 | brandTitle: "Szum-Tech Design System",
11 |
12 | //
13 | colorPrimary: "#168FFF",
14 | colorSecondary: "#42A4FF",
15 |
16 | appBg: "#111111",
17 | appContentBg: "#1C1C1C",
18 | appBorderRadius: 0,
19 | appBorderColor: "#2e2e2e",
20 |
21 | barBg: "#111111",
22 | barTextColor: "#c0c0c0",
23 | barSelectedColor: "#168FFF",
24 |
25 | textColor: "#eaeaea"
26 | });
27 |
--------------------------------------------------------------------------------
/src/components/item/item-description.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { cn } from "~/utils";
4 |
5 | export type ItemDescriptionProps = React.ComponentProps<"p">;
6 |
7 | export function ItemDescription({ className, ...props }: ItemDescriptionProps) {
8 | return (
9 | a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
14 | className
15 | )}
16 | {...props}
17 | />
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/.storybook/theme/light.ts:
--------------------------------------------------------------------------------
1 | import { create } from "storybook/theming";
2 |
3 | export default create({
4 | base: "light",
5 |
6 | // Typography
7 | fontBase: "'Poppins', sans-serif",
8 | fontCode: "'JetBrains Mono', monospace",
9 |
10 | brandTitle: "Szum-Tech Design System",
11 |
12 | //
13 | colorPrimary: "#0085FF",
14 | colorSecondary: "#339CFF",
15 |
16 | appBg: "#ffffff",
17 | appContentBg: "#f7f7f7",
18 | appBorderRadius: 0,
19 | appBorderColor: "#EBEBEB",
20 |
21 | barBg: "#ffffff",
22 | barTextColor: "#585757",
23 | barSelectedColor: "#0085FF",
24 |
25 | textColor: "#1C1C1C"
26 | });
27 |
--------------------------------------------------------------------------------
/src/tests/integration/vitest.setup.ts:
--------------------------------------------------------------------------------
1 | import { beforeAll } from "vitest";
2 |
3 | import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview";
4 | import { setProjectAnnotations } from "@storybook/react-vite";
5 |
6 | import * as projectAnnotations from "../../../.storybook/preview";
7 |
8 | // This is an important step to apply the right configuration when testing your stories.
9 | // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
10 | const project = setProjectAnnotations([projectAnnotations, a11yAddonAnnotations]);
11 |
12 | beforeAll(project.beforeAll);
13 |
--------------------------------------------------------------------------------
/src/components/card/card-header.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { cn } from "~/utils";
4 |
5 | export type CardHeaderProps = React.DetailedHTMLProps, HTMLDivElement>;
6 |
7 | export function CardHeader({ className, ...props }: CardHeaderProps) {
8 | return (
9 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/src/icons/Iconography.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, IconGallery, IconItem } from "@storybook/addon-docs/blocks";
2 |
3 | import * as CustomIcons from "./index";
4 |
5 |
6 |
7 | # Iconography
8 |
9 | # Custom
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/tailwind/global.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
3 | @import "./typography.css";
4 | @import "./palette.css";
5 | @import "./animation.css";
6 | @import "./scroll.css";
7 |
8 | @plugin "tailwindcss-animate";
9 |
10 | @layer base {
11 | button:not(:disabled),
12 | [role="button"]:not(:disabled) {
13 | cursor: pointer;
14 | }
15 |
16 | body {
17 | @apply bg-background font-poppins text-foreground text-body-default antialiased;
18 | }
19 | }
20 |
21 | @utility container {
22 | @apply mx-auto max-w-7xl px-4 sm:px-8;
23 | }
24 |
25 | @utility container-* {
26 | max-width: --value(--container-*);
27 | @apply mx-auto;
28 | }
29 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation_issue.yaml:
--------------------------------------------------------------------------------
1 | name: "📖 Documentation Issue"
2 | description: "Report an issue with the documentation"
3 | title: "[Docs]: "
4 | labels: ["documentation"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: "### 📝 Describe the documentation issue"
9 | - type: textarea
10 | attributes:
11 | label: "Issue"
12 | description: "What part of the documentation is unclear or incorrect?"
13 | - type: input
14 | attributes:
15 | label: "Suggested Fix"
16 | description: "Provide a suggestion for improvement."
17 | - type: input
18 | attributes:
19 | label: "Additional Context"
20 |
--------------------------------------------------------------------------------
/src/components/color-swatch/color-swatch.utils.ts:
--------------------------------------------------------------------------------
1 | export function getIsCssColor(v: string): boolean {
2 | try {
3 | return typeof CSS !== "undefined" && typeof CSS.supports === "function" ? CSS.supports("color", v) : true;
4 | } catch {
5 | return false;
6 | }
7 | }
8 |
9 | export function getHasAlpha(v: string): boolean {
10 | const s = v.trim().toLowerCase();
11 |
12 | if (s === "transparent") return true;
13 |
14 | if (/^#(?:[0-9a-f]{4}|[0-9a-f]{8})$/i.test(s)) return true;
15 |
16 | if (/\b(?:rgba|hsla)\s*\(/i.test(s)) return true;
17 |
18 | return /\b(?:rgb|hsl|lab|lch|oklab|oklch|color)\s*\([^)]*\/\s*[\d.]+%?\s*\)/i.test(s);
19 | }
20 |
--------------------------------------------------------------------------------
/src/components/field/field.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { type VariantProps } from "class-variance-authority";
4 |
5 | import { cn } from "~/utils";
6 |
7 | import { fieldVariants } from "./field.styles";
8 |
9 | export type FieldProps = React.ComponentProps<"div"> & VariantProps;
10 |
11 | export function Field({ className, orientation = "vertical", ...props }: FieldProps) {
12 | return (
13 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/src/hooks/use-validation-log.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | interface UseValidationLogProps {
4 | check: boolean;
5 | scope: string;
6 | message: string;
7 | }
8 |
9 | export function useValidationLog({ check, scope, message }: UseValidationLogProps) {
10 | React.useEffect(() => {
11 | if (!check) {
12 | // eslint-disable-next-line no-console
13 | console.error(
14 | `%c[Szum Tech-Design System]%c\n ${scope}%c\n ${message}`,
15 | "color: #ef4444; font-weight: bold;",
16 | "color: #3b82f6; font-weight: bold;",
17 | "color: #f59e0b;"
18 | );
19 | }
20 | }, [check, scope, message]);
21 | }
22 |
--------------------------------------------------------------------------------
/src/components/empty/empty.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { cn } from "~/utils";
4 |
5 | export type EmptyProps = React.ComponentProps<"div"> & { border?: boolean | "dashed" };
6 |
7 | export function Empty({ className, border = false, ...props }: EmptyProps) {
8 | return (
9 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/src/components/badge/badge.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { Slot as SlotPrimitive } from "radix-ui";
4 |
5 | import { badgeVariants } from "~/components/badge/badge.styles";
6 | import { cn } from "~/utils";
7 |
8 | import { type BadgeVariant } from "./badge.types";
9 |
10 | export type BadgeProps = React.ComponentProps<"span"> & { variant?: BadgeVariant; asChild?: boolean };
11 |
12 | export function Badge({ className, variant = "primary", asChild = false, ...props }: BadgeProps) {
13 | const Comp = asChild ? SlotPrimitive.Slot : "span";
14 |
15 | return ;
16 | }
17 |
--------------------------------------------------------------------------------
/src/components/alert/alert.styles.ts:
--------------------------------------------------------------------------------
1 | import { cva } from "class-variance-authority";
2 |
3 | export const alertVariants = cva(
4 | "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border border-border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
5 | {
6 | variants: {
7 | variant: {
8 | default: "bg-card text-card-foreground",
9 | destructive: "text-error bg-card *:data-[slot=alert-description]:text-error/90 [&>svg]:text-current"
10 | }
11 | },
12 | defaultVariants: {
13 | variant: "default"
14 | }
15 | }
16 | );
17 |
--------------------------------------------------------------------------------
/src/components/item/item-media.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { itemMediaVariants } from "~/components/item/item-media.styles";
4 | import { type ItemMediaVariantType } from "~/components/item/item-media.types";
5 | import { cn } from "~/utils";
6 |
7 | export type ItemMediaProps = React.ComponentProps<"div"> & {
8 | variant?: ItemMediaVariantType;
9 | };
10 |
11 | export function ItemMedia({ className, variant = "default", ...props }: ItemMediaProps) {
12 | return (
13 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/src/scripts/post-build.js:
--------------------------------------------------------------------------------
1 | import fs from "fs/promises";
2 |
3 | export async function updateFilesWithText(filePaths, text) {
4 | for (const filePath of filePaths) {
5 | try {
6 | const content = await fs.readFile(filePath, "utf8");
7 | const updatedContent = text + content;
8 | await fs.writeFile(filePath, updatedContent, "utf8");
9 | console.log(`Updated: ${filePath}`);
10 | } catch (err) {
11 | console.error(`Error updating ${filePath}:`, err);
12 | }
13 | }
14 | }
15 |
16 | updateFilesWithText(["dist/components/index.js", "dist/components/index.cjs"], '"use client";\n\n').then(() => {
17 | console.log("Files updated successfully");
18 | });
19 |
--------------------------------------------------------------------------------
/src/components/stepper/index.tsx:
--------------------------------------------------------------------------------
1 | export * from "./stepper";
2 | export * from "./stepper.types";
3 | export { useStepperContext } from "./stepper.context";
4 | export { useStepperFocusContext } from "./stepper-focus.context";
5 |
6 | export * from "./stepper-nav";
7 |
8 | export * from "./stepper-item";
9 | export { useStepperItemContext } from "./stepper-item.context";
10 |
11 | export * from "./stepper-trigger";
12 | export * from "./stepper-indicator";
13 | export * from "./stepper-title";
14 | export * from "./stepper-description";
15 | export * from "./stepper-panel";
16 | export * from "./stepper-content";
17 | export * from "./stepper-next-trigger";
18 | export * from "./stepper-prev-trigger";
19 |
--------------------------------------------------------------------------------
/src/components/label/label.stories.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { type Meta, type StoryObj } from "@storybook/react-vite";
4 | import { Checkbox } from "~/components/checkbox";
5 |
6 | import { Label } from ".";
7 |
8 | const meta = {
9 | title: "Components/Label",
10 | component: Label,
11 | tags: ["autodocs", "beta"]
12 | } satisfies Meta;
13 | export default meta;
14 |
15 | type Story = StoryObj;
16 |
17 | export const Example: Story = {
18 | render: () => (
19 |
20 |
21 |
22 |
23 | )
24 | };
25 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | # Maintain dependencies for GitHub Actions
4 | - package-ecosystem: "github-actions"
5 | directory: "/"
6 | schedule:
7 | interval: "weekly"
8 | day: "sunday"
9 | time: "21:37"
10 | timezone: "Europe/Warsaw"
11 | groups:
12 | github-dependencies:
13 | patterns:
14 | - "*"
15 |
16 | # Maintain dependencies for npm
17 | - package-ecosystem: "npm"
18 | directory: "/"
19 | schedule:
20 | interval: "weekly"
21 | day: "sunday"
22 | time: "21:37"
23 | timezone: "Europe/Warsaw"
24 | groups:
25 | design-system-dependencies:
26 | patterns:
27 | - "*"
28 |
--------------------------------------------------------------------------------
/.storybook/manager.ts:
--------------------------------------------------------------------------------
1 | import { addons } from "storybook/manager-api";
2 | import { defaultConfig, type TagBadgeParameters } from "storybook-addon-tag-badges/manager-helpers";
3 |
4 | addons.setConfig({
5 | tagBadges: [
6 | {
7 | tags: "test-only",
8 | badge: {
9 | text: "Test ⚡", // Vitest-style lightning bolt
10 | style: {
11 | background: "#729b1b",
12 | color: "white"
13 | },
14 | tooltip: "Testing story - powered by Vitest spirit ⚡"
15 | },
16 | display: {
17 | toolbar: true
18 | }
19 | },
20 | // Place the default config after your custom matchers.
21 | ...defaultConfig
22 | ] satisfies TagBadgeParameters
23 | });
24 |
--------------------------------------------------------------------------------
/src/components/label/label.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { Label as ReactLabel } from "radix-ui";
4 |
5 | import { cn } from "~/utils";
6 |
7 | export type LabelProps = React.ComponentProps;
8 |
9 | export function Label({ className, ...props }: LabelProps) {
10 | return (
11 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/src/components/stepper/stepper-item.context.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { STEPPER_ITEM_NAME } from "./stepper.constants";
4 | import { type StepperStepState } from "./stepper.store";
5 |
6 | export type StepperItemContextValue = {
7 | value: string;
8 | stepState: StepperStepState | undefined;
9 | };
10 |
11 | export const StepperItemContext = React.createContext(null);
12 |
13 | export function useStepperItemContext(consumerName: string) {
14 | const context = React.useContext(StepperItemContext);
15 |
16 | if (!context) {
17 | throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ITEM_NAME}\``);
18 | }
19 |
20 | return context;
21 | }
22 |
--------------------------------------------------------------------------------
/src/components/item/item-media.styles.ts:
--------------------------------------------------------------------------------
1 | import { cva } from "class-variance-authority";
2 |
3 | export const itemMediaVariants = cva(
4 | "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",
5 | {
6 | variants: {
7 | variant: {
8 | default: "bg-transparent",
9 | icon: "border-border bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",
10 | image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
11 | }
12 | },
13 | defaultVariants: {
14 | variant: "default"
15 | }
16 | }
17 | );
18 |
--------------------------------------------------------------------------------
/src/components/field/field-description.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { cn } from "~/utils";
4 |
5 | export type FieldDescriptionProps = React.ComponentProps<"p">;
6 |
7 | export function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {
8 | return (
9 | a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
15 | className
16 | )}
17 | {...props}
18 | />
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yaml:
--------------------------------------------------------------------------------
1 | name: "✨ Feature Request"
2 | description: "Suggest a new feature or improvement"
3 | title: "[Feature]: "
4 | labels: ["enhancement"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: "### 💡 Feature Description"
9 | - type: textarea
10 | attributes:
11 | label: "Describe the Feature"
12 | description: "What feature would you like to see?"
13 | - type: textarea
14 | attributes:
15 | label: "Use Case"
16 | description: "Explain why this feature is useful."
17 | - type: textarea
18 | attributes:
19 | label: "Alternatives"
20 | description: "Any alternative solutions?"
21 | - type: input
22 | attributes:
23 | label: "Additional Context"
24 |
--------------------------------------------------------------------------------
/src/components/item/item.styles.ts:
--------------------------------------------------------------------------------
1 | import { cva } from "class-variance-authority";
2 |
3 | export const itemVariants = cva(
4 | "group/item [a]:hover:bg-accent/50 [a]:transition-colors focus-visible:border-ring focus-visible:ring-ring/50 flex flex-wrap items-center rounded border border-transparent text-sm outline-none transition-colors duration-100 focus-visible:ring",
5 | {
6 | variants: {
7 | variant: {
8 | default: "bg-transparent",
9 | outline: "border-border",
10 | muted: "bg-muted/50"
11 | },
12 | size: {
13 | default: "gap-4 p-4 ",
14 | sm: "gap-2.5 px-4 py-3"
15 | }
16 | },
17 | defaultVariants: {
18 | variant: "default",
19 | size: "default"
20 | }
21 | }
22 | );
23 |
--------------------------------------------------------------------------------
/src/icons/x-logo.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | export function XLogoIcon(props: React.SVGProps) {
4 | return (
5 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish 🚀
2 |
3 | on:
4 | push:
5 | branches: [main]
6 |
7 | env:
8 | NODE_VERSION: 24.x
9 |
10 | jobs:
11 | publish:
12 | name: Publish 🚀
13 | runs-on: ubuntu-latest
14 | steps:
15 | - name: Checkout code 📚
16 | uses: actions/checkout@v6
17 | - name: Set up Node 🟢
18 | uses: actions/setup-node@v6
19 | with:
20 | node-version: ${{ env.NODE_VERSION }}
21 | cache: "npm"
22 | - name: Install packages ⚙️
23 | run: npm ci
24 | - name: Build 🏗️
25 | run: npm run build
26 | - name: Publish package 🚀
27 | run: npx semantic-release
28 | env:
29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31 |
--------------------------------------------------------------------------------
/src/components/badge/badge-button.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import { Slot as SlotPrimitive } from "radix-ui";
4 |
5 | import { cn } from "~/utils";
6 |
7 | export type BadgeButtonProps = React.ComponentProps<"button"> & { asChild?: boolean };
8 |
9 | export function BadgeButton({ className, asChild = false, ...props }: BadgeButtonProps) {
10 | const Comp = asChild ? SlotPrimitive.Slot : "span";
11 | return (
12 | svg]:size-3.5! [&>svg]:opacity-100!",
16 | className
17 | )}
18 | role="button"
19 | {...props}
20 | />
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/security_issue.yaml:
--------------------------------------------------------------------------------
1 | name: "🔒 Security Issue"
2 | description: "Report a security vulnerability"
3 | title: "[Security]: "
4 | labels: ["security"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: "### 🚨 Security Concern"
9 | - type: textarea
10 | attributes:
11 | label: "Describe the Security Issue"
12 | description: "Provide details of the vulnerability."
13 | - type: input
14 | attributes:
15 | label: "Severity Level"
16 | description: "How critical is this issue?"
17 | - type: textarea
18 | attributes:
19 | label: "Possible Fix"
20 | description: "Do you have a suggested fix?"
21 | - type: textarea
22 | attributes:
23 | label: "Additional Context"
24 | description: "Any other relevant information."
25 |
--------------------------------------------------------------------------------
/src/components/separator/separator.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { Separator as ReactSeparator } from "radix-ui";
4 |
5 | import { cn } from "~/utils";
6 |
7 | export type SeparatorProps = React.ComponentProps;
8 |
9 | export function Separator({ className, orientation = "horizontal", decorative = false, ...props }: SeparatorProps) {
10 | return (
11 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "tsup";
2 |
3 | export default defineConfig({
4 | splitting: true,
5 | clean: true,
6 | dts: true,
7 | format: ["esm", "cjs"],
8 | bundle: true,
9 | treeshake: true,
10 | outDir: "dist",
11 | entry: [
12 | "src/components/*/index.tsx",
13 | "src/components/index.tsx",
14 | "src/utils/index.ts",
15 | "src/hooks/index.tsx",
16 | "src/contexts/index.tsx",
17 | "src/icons/index.tsx"
18 | ],
19 | esbuildOptions(options) {
20 | // the directory structure will be the same as the source
21 | options.outbase = "./src";
22 | },
23 | external: [
24 | "react",
25 | "react-dom",
26 | "class-variance-authority",
27 | "radix-ui",
28 | "@radix-ui/react-slot",
29 | "tailwind-merge",
30 | "clx"
31 | ]
32 | });
33 |
--------------------------------------------------------------------------------
/src/components/index.tsx:
--------------------------------------------------------------------------------
1 | export * from "./alert-dialog";
2 | export * from "./avatar";
3 | export * from "./badge";
4 | export * from "./button";
5 | export * from "./card";
6 | export * from "./checkbox";
7 | export * from "./dialog";
8 | export * from "./field";
9 | export * from "./header";
10 | export * from "./input";
11 | export * from "./item";
12 | export * from "./label";
13 | export * from "./progress";
14 | export * from "./select";
15 | export * from "./separator";
16 | export * from "./sheet";
17 | export * from "./spinner";
18 | export * from "./stepper";
19 | export * from "./textarea";
20 | export * from "./toaster";
21 | export * from "./tooltip";
22 | export * from "./radio-group";
23 | export * from "./color-swatch";
24 | export * from "./scroll-area";
25 | export * from "./alert";
26 | export * from "./empty";
27 |
--------------------------------------------------------------------------------
/src/components/stepper/stepper-panel.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | import { Slot } from "@radix-ui/react-slot";
4 | import { cn } from "~/utils";
5 |
6 | import { useStepperStore } from "./stepper.store";
7 |
8 | export type StepperPanelProps = React.ComponentProps<"div"> & {
9 | asChild?: boolean;
10 | };
11 |
12 | export function StepperPanel({ children, asChild = false, className, ...props }: StepperPanelProps) {
13 | const currentValue = useStepperStore((state) => state.value);
14 |
15 | const StepperPanelPrimitive = asChild ? Slot : "div";
16 |
17 | return (
18 |
24 | {children}
25 |
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/src/components/item/item.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { Slot } from "@radix-ui/react-slot";
4 | import { type ItemSizeType, type ItemVariantType } from "~/components";
5 | import { itemVariants } from "~/components/item/item.styles";
6 | import { cn } from "~/utils";
7 |
8 | export type ItemProps = React.ComponentProps<"div"> & {
9 | asChild?: boolean;
10 | variant?: ItemVariantType;
11 | size?: ItemSizeType;
12 | };
13 |
14 | export function Item({ className, variant = "default", size = "default", asChild = false, ...props }: ItemProps) {
15 | const Comp = asChild ? Slot : "div";
16 | return (
17 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/src/components/progress/progress.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { Progress as ProgressPrimitive } from "radix-ui";
4 |
5 | import { cn } from "~/utils";
6 |
7 | export type ProgressProps = React.ComponentProps;
8 |
9 | export function Progress({ className, value, ...props }: ProgressProps) {
10 | return (
11 |
17 |
22 |
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/src/icons/google-logo.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | export function GoogleLogoIcon(props: React.SVGProps) {
4 | return (
5 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/src/components/field/field-label.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { cn } from "~/utils";
4 |
5 | import { Label } from "../label";
6 |
7 | export type FieldLabelProps = React.ComponentProps;
8 |
9 | export function FieldLabel({ className, ...props }: FieldLabelProps) {
10 | return (
11 |