diff --git a/package-lock.json b/package-lock.json index 9f8125b34..3de41bc75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12040,6 +12040,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tailwind-merge": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", + "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwind-variants": { "version": "1.0.0", "license": "MIT", @@ -13846,6 +13856,7 @@ "react-markdown": "^10.1.0", "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.1", + "tailwind-merge": "^3.4.0", "tailwind-variants": "^1.0.0", "tailwindcss": "^4.1.7", "tw-animate-css": "^1.3.0", @@ -13868,7 +13879,7 @@ "@vitejs/plugin-react": "^4.4.1", "@vitest/browser": "^3.1.3", "@vitest/coverage-v8": "^3.1.3", - "eslint": "^9.25.0", + "eslint": "^9.39.2", "playwright": "^1.55.1", "react": "^19.1.0", "react-docgen": "^7.1.1", diff --git a/packages/eslint-config/src/stylisticConfigs.ts b/packages/eslint-config/src/stylisticConfigs.ts index 9f5a775df..068185b96 100644 --- a/packages/eslint-config/src/stylisticConfigs.ts +++ b/packages/eslint-config/src/stylisticConfigs.ts @@ -23,7 +23,7 @@ export const stylisticConfigs = [ tabWidth: 2, ignoreStrings: true, ignoreTemplateLiterals: true, - ignoreTrailingComments: true, + ignoreComments: true, ignoreUrls: true, }, ], diff --git a/packages/ui/.storybook/main.ts b/packages/ui/.storybook/main.ts index 4fa6c6027..915e1e890 100644 --- a/packages/ui/.storybook/main.ts +++ b/packages/ui/.storybook/main.ts @@ -7,18 +7,18 @@ import { join, dirname } from "path"; * It is needed in projects that use Yarn PnP or are set up within a monorepo. */ function getAbsolutePath(value: string): string { - return dirname(require.resolve(join(value, "package.json"))); + return dirname(require.resolve(join(value, "package.json"))); } const config: StorybookConfig = { - stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], - addons: [ - getAbsolutePath("@storybook/addon-essentials"), - getAbsolutePath("@chromatic-com/storybook"), - getAbsolutePath("@storybook/experimental-addon-test"), - ], - framework: { - name: getAbsolutePath("@storybook/react-vite"), - options: {}, - }, + stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], + addons: [ + getAbsolutePath("@storybook/addon-essentials"), + getAbsolutePath("@chromatic-com/storybook"), + getAbsolutePath("@storybook/experimental-addon-test"), + ], + framework: { + name: getAbsolutePath("@storybook/react-vite"), + options: {}, + }, }; export default config; diff --git a/packages/ui/.storybook/preview.tsx b/packages/ui/.storybook/preview.tsx index d6c3cbb44..d87cc1e6f 100644 --- a/packages/ui/.storybook/preview.tsx +++ b/packages/ui/.storybook/preview.tsx @@ -4,31 +4,30 @@ import "../src/theme.css"; import "./preview.css"; import { BrowserRouter } from "react-router"; import { useEffect } from "react"; -import React from "react"; const preview: Preview = { - parameters: { - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/i, - }, - }, + parameters: { + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/i, + }, }, - decorators: [ - (Story) => { - useEffect(() => { - document.body.classList.add("bg-level-0"); - }, []); - return ( - -
- -
-
- ); - }, - ], + }, + decorators: [ + (Story) => { + useEffect(() => { + document.body.classList.add("bg-level-0"); + }, []); + return ( + +
+ +
+
+ ); + }, + ], }; export default preview; diff --git a/packages/ui/eslint.config.mjs b/packages/ui/eslint.config.mjs index 81c82f24d..d311e6da6 100644 --- a/packages/ui/eslint.config.mjs +++ b/packages/ui/eslint.config.mjs @@ -1,14 +1,27 @@ -import { browser } from "@probo/eslint-config"; +import { defineConfig } from "eslint/config"; +import { configs } from "@probo/eslint-config"; -export default [ - { - ignores: [ - "dist", - "eslint.config.mjs", - "*.config.{js,mjs,ts}", - ".storybook/**", - "src/Atoms/Icons/**/*.tsx", // Icon files have parsing issues, likely auto-generated - ], +export default defineConfig([ + ...configs.base, + ...configs.ts, + ...configs.react, + ...configs.stylistic, + { + ignores: ["./tailwind.config.js"], + ...configs.languageOptions.browser, + }, + { + files: ["./tailwind.config.js"], + languageOptions: { + ...configs.languageOptions.node.languageOptions, + sourceType: "commonjs", }, - ...browser(["./tsconfig.app.json", "./tsconfig.node.json"], import.meta.dirname), -]; + }, + { + languageOptions: { + parserOptions: { + tsConfigRootDir: import.meta.dirname, + }, + }, + }, +]); diff --git a/packages/ui/package.json b/packages/ui/package.json index ffd2192a8..282d199a6 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -29,6 +29,7 @@ "react-markdown": "^10.1.0", "rehype-raw": "^7.0.0", "remark-gfm": "^4.0.1", + "tailwind-merge": "^3.4.0", "tailwind-variants": "^1.0.0", "tailwindcss": "^4.1.7", "tw-animate-css": "^1.3.0", @@ -51,7 +52,7 @@ "@vitejs/plugin-react": "^4.4.1", "@vitest/browser": "^3.1.3", "@vitest/coverage-v8": "^3.1.3", - "eslint": "^9.25.0", + "eslint": "^9.39.2", "playwright": "^1.55.1", "react": "^19.1.0", "react-docgen": "^7.1.1", diff --git a/packages/ui/src/Atoms/Avatar/Avatar.stories.tsx b/packages/ui/src/Atoms/Avatar/Avatar.stories.tsx index e55bc3f45..e7173d21c 100644 --- a/packages/ui/src/Atoms/Avatar/Avatar.stories.tsx +++ b/packages/ui/src/Atoms/Avatar/Avatar.stories.tsx @@ -2,15 +2,15 @@ import { Avatar } from "./Avatar"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Avatar", - component: Avatar, - argTypes: {}, + title: "Atoms/Avatar", + component: Avatar, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - name: "John Doe", - }, + args: { + name: "John Doe", + }, }; diff --git a/packages/ui/src/Atoms/Avatar/Avatar.tsx b/packages/ui/src/Atoms/Avatar/Avatar.tsx index 3eb0c1798..d52ed8cfd 100644 --- a/packages/ui/src/Atoms/Avatar/Avatar.tsx +++ b/packages/ui/src/Atoms/Avatar/Avatar.tsx @@ -1,42 +1,42 @@ import { tv } from "tailwind-variants"; type Props = { - name: string; - src?: string | null; - size?: "s" | "m" | "l" | "xl"; - className?: string; + name: string; + src?: string | null; + size?: "s" | "m" | "l" | "xl"; + className?: string; }; const avatar = tv({ - base: "bg-txt-success text-txt-invert rounded-full font-semibold flex items-center justify-center flex-none", - variants: { - size: { - s: "size-5 text-xss", - m: "size-6 text-xxs", - l: "size-8 text-sm", - xl: "size-16 text-3xl", - }, - }, - defaultVariants: { - size: "m", + base: "bg-txt-success text-txt-invert rounded-full font-semibold flex items-center justify-center flex-none", + variants: { + size: { + s: "size-5 text-xss", + m: "size-6 text-xxs", + l: "size-8 text-sm", + xl: "size-16 text-3xl", }, + }, + defaultVariants: { + size: "m", + }, }); export function Avatar(props: Props) { - const className = avatar(props); - if (props.src) { - return {props.name}; - } - return
{extractInitials(props.name ?? "")}
; + const className = avatar(props); + if (props.src) { + return {props.name}; + } + return
{extractInitials(props.name ?? "")}
; } function extractInitials(name: string) { - const words = name.split(" "); - if (words.length === 2) { - return words - .map((word) => word[0]) - .join("") - .toUpperCase(); - } - return name.substring(0, 2).toUpperCase(); + const words = name.split(" "); + if (words.length === 2) { + return words + .map(word => word[0]) + .join("") + .toUpperCase(); + } + return name.substring(0, 2).toUpperCase(); } diff --git a/packages/ui/src/Atoms/Badge/Badge.stories.tsx b/packages/ui/src/Atoms/Badge/Badge.stories.tsx index 377e8b74b..f4d81aebb 100644 --- a/packages/ui/src/Atoms/Badge/Badge.stories.tsx +++ b/packages/ui/src/Atoms/Badge/Badge.stories.tsx @@ -2,41 +2,43 @@ import { Badge } from "./Badge"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Badge", - component: Badge, - argTypes: {}, + title: "Atoms/Badge", + component: Badge, + argTypes: {}, } satisfies Meta; type Story = StoryObj; const sizes = ["sm", "md"] as const; const variants = [ - "success", - "warning", - "danger", - "info", - "neutral", - "outline", - "highlight", + "success", + "warning", + "danger", + "info", + "neutral", + "outline", + "highlight", ] as const; export const Default: Story = { - render: () => ( -
- {sizes.map((size) => ( -
-
- Size : {size} -
-
- {variants.map((variant) => ( - - {variant} - - ))} -
-
+ render: () => ( +
+ {sizes.map(size => ( +
+
+ Size : + {" "} + {size} +
+
+ {variants.map(variant => ( + + {variant} + ))} +
- ), + ))} +
+ ), }; diff --git a/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.stories.tsx b/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.stories.tsx index 467350fef..174a92ed0 100644 --- a/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.stories.tsx +++ b/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.stories.tsx @@ -2,28 +2,28 @@ import { Breadcrumb } from "./Breadcrumb"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Breadcrumb", - component: Breadcrumb, - argTypes: {}, + title: "Atoms/Breadcrumb", + component: Breadcrumb, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - items: [ - { - label: "Home", - to: "/", - }, - { - label: "Library", - to: "/library", - }, - { - label: "Data", - to: "/data", - }, - ], - }, + args: { + items: [ + { + label: "Home", + to: "/", + }, + { + label: "Library", + to: "/library", + }, + { + label: "Data", + to: "/data", + }, + ], + }, }; diff --git a/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.tsx b/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.tsx index b4f438d24..110bf75e2 100644 --- a/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.tsx +++ b/packages/ui/src/Atoms/Breadcrumb/Breadcrumb.tsx @@ -4,48 +4,48 @@ import { IconChevronRight } from "../Icons"; import { Fragment } from "react/jsx-runtime"; type Props = { - items: (ItemProps | string)[]; + items: (ItemProps | string)[]; }; type ItemProps = { - label: string; - to?: string; - active?: boolean; + label: string; + to?: string; + active?: boolean; }; export function Breadcrumb({ items }: Props) { - return ( -
- {items.map((item, k) => ( - - {k > 0 && } - - - ))} -
- ); + return ( +
+ {items.map((item, k) => ( + + {k > 0 && } + + + ))} +
+ ); } function BreadcrumbItem({ label, to, active }: ItemProps) { - const className = clsx( - "text-sm px-1 rounded-sm h-5", - active && "text-txt-primary font-medium", + const className = clsx( + "text-sm px-1 rounded-sm h-5", + active && "text-txt-primary font-medium", + ); + if (to) { + return ( + + {label} + ); - if (to) { - return ( - - {label} - - ); - } - return {label}; + } + return {label}; } diff --git a/packages/ui/src/Atoms/Button/Button.stories.tsx b/packages/ui/src/Atoms/Button/Button.stories.tsx index 02b602457..bb2046c2f 100644 --- a/packages/ui/src/Atoms/Button/Button.stories.tsx +++ b/packages/ui/src/Atoms/Button/Button.stories.tsx @@ -3,52 +3,52 @@ import { Button } from "./Button"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Button", - component: Button, - argTypes: {}, + title: "Atoms/Button", + component: Button, + argTypes: {}, } satisfies Meta; type Story = StoryObj; const variants = [ - "primary", - "secondary", - "tertiary", - "quaternary", - "danger", + "primary", + "secondary", + "tertiary", + "quaternary", + "danger", ] as const; export const Default: Story = { - render() { - return ( -
- {variants.map((variant) => ( -
- - -
- ))} -
- ); - }, + render() { + return ( +
+ {variants.map(variant => ( +
+ + +
+ ))} +
+ ); + }, }; diff --git a/packages/ui/src/Atoms/Button/Button.tsx b/packages/ui/src/Atoms/Button/Button.tsx index 702aabc07..aa863622a 100644 --- a/packages/ui/src/Atoms/Button/Button.tsx +++ b/packages/ui/src/Atoms/Button/Button.tsx @@ -1,96 +1,96 @@ import type { - AnchorHTMLAttributes, - ButtonHTMLAttributes, - FC, - PropsWithChildren, + AnchorHTMLAttributes, + ButtonHTMLAttributes, + FC, + PropsWithChildren, } from "react"; import { Link } from "react-router"; import { tv, type VariantProps } from "tailwind-variants"; import { Slot } from "../Slot"; export const button = tv({ - base: "flex items-center justify-center gap-[6px] px-3 py-2 rounded-full cursor-pointer text-sm font-medium h-8 focus:outline-none whitespace-nowrap w-max", - variants: { - variant: { - primary: + base: "flex items-center justify-center gap-[6px] px-3 py-2 rounded-full cursor-pointer text-sm font-medium h-8 focus:outline-none whitespace-nowrap w-max", + variants: { + variant: { + primary: "bg-primary text-invert hover:bg-primary-hover shadow-base hover:shadow-hover active:bg-primary-pressed", - secondary: + secondary: "bg-secondary text-txt-primary hover:bg-secondary-hover shadow-base hover:shadow-hover active:bg-secondary-pressed border border-border-low", - tertiary: + tertiary: "bg-tertiary text-txt-primary hover:bg-tertiary-hover active:bg-tertiary-pressed", - quaternary: + quaternary: "bg-highlight text-txt-primary hover:bg-highlight-hover active:bg-highlight-pressed", - danger: "bg-danger-plain text-txt-invert hover:bg-danger-hover shadow-base hover:shadow-hover active:bg-danger-pressed border border-border-danger", - }, - disabled: { - true: "opacity-60 cursor-default", - }, - empty: { - true: "p-2 size-8", - }, + danger: "bg-danger-plain text-txt-invert hover:bg-danger-hover shadow-base hover:shadow-hover active:bg-danger-pressed border border-border-danger", }, - defaultVariants: { - variant: "primary", - icon: false, - children: undefined, + disabled: { + true: "opacity-60 cursor-default", }, + empty: { + true: "p-2 size-8", + }, + }, + defaultVariants: { + variant: "primary", + icon: false, + children: undefined, + }, }); type Props = PropsWithChildren< - { - icon?: FC<{ size: number; className?: string }>; - iconAfter?: FC<{ size: number; className?: string }>; - disabled?: boolean; - onClick?: () => void; - variant?: - | "primary" - | "secondary" - | "tertiary" - | "quaternary" - | "danger"; - to?: string; - asChild?: boolean; - } & VariantProps -> & - ( - | ButtonHTMLAttributes - | AnchorHTMLAttributes + { + icon?: FC<{ size: number; className?: string }>; + iconAfter?: FC<{ size: number; className?: string }>; + disabled?: boolean; + onClick?: () => void; + variant?: + | "primary" + | "secondary" + | "tertiary" + | "quaternary" + | "danger"; + to?: string; + asChild?: boolean; + } & VariantProps +> +& ( + | ButtonHTMLAttributes + | AnchorHTMLAttributes ); export const Button = (props: Props) => { - const { - icon: IconComponent, - iconAfter: IconAfterComponent, - children, - onClick, - variant, - asChild, - ...componentProps - } = props; - if (asChild) { - return ( - - {children} - - ); - } - - const Component = props.to ? Link : "button"; + const { + icon: IconComponent, + iconAfter: IconAfterComponent, + children, + onClick, + variant, + asChild, + ...componentProps + } = props; + if (asChild) { return ( - // @ts-expect-error Component is too dynamic - - {IconComponent && } - {children} - {IconAfterComponent && ( - - )} - + + {children} + ); + } + + const Component = props.to ? Link : "button"; + return ( + // @ts-expect-error Component is too dynamic + + {IconComponent && } + {children} + {IconAfterComponent && ( + + )} + + ); }; diff --git a/packages/ui/src/Atoms/Card/Card.stories.tsx b/packages/ui/src/Atoms/Card/Card.stories.tsx index 02d07eaab..3ef1f694e 100644 --- a/packages/ui/src/Atoms/Card/Card.stories.tsx +++ b/packages/ui/src/Atoms/Card/Card.stories.tsx @@ -2,16 +2,16 @@ import { Card } from "./Card"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Card", - component: Card, - argTypes: {}, + title: "Atoms/Card", + component: Card, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - padded: true, - children: "lorem ipsum", - }, + args: { + padded: true, + children: "lorem ipsum", + }, }; diff --git a/packages/ui/src/Atoms/Card/Card.tsx b/packages/ui/src/Atoms/Card/Card.tsx index abe6710ff..f934d5128 100644 --- a/packages/ui/src/Atoms/Card/Card.tsx +++ b/packages/ui/src/Atoms/Card/Card.tsx @@ -3,32 +3,32 @@ import { tv } from "tailwind-variants"; import { Slot } from "../Slot"; type Props = PropsWithChildren<{ - padded?: boolean; - className?: string; - style?: CSSProperties; - asChild?: boolean; + padded?: boolean; + className?: string; + style?: CSSProperties; + asChild?: boolean; }>; const card = tv({ - base: "border border-border-low bg-level-1 rounded-2xl", - variants: { - padded: { - true: "p-4", - }, + base: "border border-border-low bg-level-1 rounded-2xl", + variants: { + padded: { + true: "p-4", }, + }, }); export function Card({ - padded = false, - children, - className, - asChild, - style, + padded = false, + children, + className, + asChild, + style, }: Props) { - const Component = asChild ? Slot : "div"; - return ( - - {children} - - ); + const Component = asChild ? Slot : "div"; + return ( + + {children} + + ); } diff --git a/packages/ui/src/Atoms/Checkbox/Checkbox.stories.tsx b/packages/ui/src/Atoms/Checkbox/Checkbox.stories.tsx index 7758b76ba..fffb3f926 100644 --- a/packages/ui/src/Atoms/Checkbox/Checkbox.stories.tsx +++ b/packages/ui/src/Atoms/Checkbox/Checkbox.stories.tsx @@ -2,9 +2,9 @@ import { Checkbox } from "./Checkbox"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Checkbox", - component: Checkbox, - argTypes: {}, + title: "Atoms/Checkbox", + component: Checkbox, + argTypes: {}, } satisfies Meta; type Story = StoryObj; diff --git a/packages/ui/src/Atoms/Checkbox/Checkbox.tsx b/packages/ui/src/Atoms/Checkbox/Checkbox.tsx index f60db0f3f..0d705d51f 100644 --- a/packages/ui/src/Atoms/Checkbox/Checkbox.tsx +++ b/packages/ui/src/Atoms/Checkbox/Checkbox.tsx @@ -3,40 +3,40 @@ import { tv } from "tailwind-variants"; import { IconCheckmark1 } from "../Icons"; type Props = { - checked: boolean; - onChange: (checked: boolean) => void; - disabled?: boolean; + checked: boolean; + onChange: (checked: boolean) => void; + disabled?: boolean; }; const checkbox = tv({ - base: "size-4 border border-border-mid relative rounded-sm flex items-center justify-center", - variants: { - isFocused: { - true: "shadow shadow-focus", - }, - checked: { - true: "bg-accent text-invert", - }, - disabled: { - true: "opacity-50 cursor-not-allowed", - }, + base: "size-4 border border-border-mid relative rounded-sm flex items-center justify-center", + variants: { + isFocused: { + true: "shadow shadow-focus", }, + checked: { + true: "bg-accent text-invert", + }, + disabled: { + true: "opacity-50 cursor-not-allowed", + }, + }, }); export function Checkbox({ checked, onChange, disabled = false }: Props) { - const [isFocused, setFocus] = useState(false); - return ( -
- !disabled && onChange(e.target.checked)} - onFocus={() => !disabled && setFocus(true)} - onBlur={() => setFocus(false)} - /> - {checked && } -
- ); + const [isFocused, setFocus] = useState(false); + return ( +
+ !disabled && onChange(e.target.checked)} + onFocus={() => !disabled && setFocus(true)} + onBlur={() => setFocus(false)} + /> + {checked && } +
+ ); } diff --git a/packages/ui/src/Atoms/ControlItem/ControlItem.stories.tsx b/packages/ui/src/Atoms/ControlItem/ControlItem.stories.tsx index 0a8ab1f2b..a690bd73e 100644 --- a/packages/ui/src/Atoms/ControlItem/ControlItem.stories.tsx +++ b/packages/ui/src/Atoms/ControlItem/ControlItem.stories.tsx @@ -2,26 +2,26 @@ import { ControlItem } from "./ControlItem"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/ControlItem", - component: ControlItem, - argTypes: {}, + title: "Atoms/ControlItem", + component: ControlItem, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - id: "CC1.1", - description: + args: { + id: "CC1.1", + description: "The entity obtains privacy commitments from vendors and other third parties who have access to personal information to meet the entity’s objectives related to privacy. The entity assesses those parties’ compliance on a periodic and as-needed basis and takes corrective action, if necessary.", - }, - render: (args) => ( -
- - - - - -
- ), + }, + render: args => ( +
+ + + + + +
+ ), }; diff --git a/packages/ui/src/Atoms/ControlItem/ControlItem.tsx b/packages/ui/src/Atoms/ControlItem/ControlItem.tsx index f55abbc13..8be1933b4 100644 --- a/packages/ui/src/Atoms/ControlItem/ControlItem.tsx +++ b/packages/ui/src/Atoms/ControlItem/ControlItem.tsx @@ -3,78 +3,78 @@ import { Link } from "react-router"; import { tv } from "tailwind-variants"; type Props = { - active?: boolean; - id: string; - description?: string; - excluded?: boolean; - to: string; + active?: boolean; + id: string; + description?: string; + excluded?: boolean; + to: string; } & HTMLAttributes; const classNames = tv({ - slots: { - wrapper: "block p-4 space-y-[6px] rounded-xl cursor-pointer text-start", - id: "px-[6px] py-[2px] text-base font-medium border border-border-low rounded-lg w-max", - description: "text-sm text-txt-tertiary line-clamp-3", + slots: { + wrapper: "block p-4 space-y-[6px] rounded-xl cursor-pointer text-start", + id: "px-[6px] py-[2px] text-base font-medium border border-border-low rounded-lg w-max", + description: "text-sm text-txt-tertiary line-clamp-3", + }, + variants: { + active: { + true: { + wrapper: "bg-tertiary-pressed", + id: "bg-active", + }, + false: { + wrapper: "hover:bg-tertiary-hover", + id: "bg-highlight", + }, }, - variants: { - active: { - true: { - wrapper: "bg-tertiary-pressed", - id: "bg-active", - }, - false: { - wrapper: "hover:bg-tertiary-hover", - id: "bg-highlight", - }, - }, - excluded: { - true: { - wrapper: "opacity-60", - }, - false: { - wrapper: "", - }, - }, + excluded: { + true: { + wrapper: "opacity-60", + }, + false: { + wrapper: "", + }, }, - compoundVariants: [ - { - active: true, - excluded: true, - class: { - wrapper: "bg-tertiary-pressed opacity-60", - id: "bg-active", - }, - }, - ], - defaultVariants: { - active: false, - excluded: false, + }, + compoundVariants: [ + { + active: true, + excluded: true, + class: { + wrapper: "bg-tertiary-pressed opacity-60", + id: "bg-active", + }, }, + ], + defaultVariants: { + active: false, + excluded: false, + }, }); export function ControlItem({ active, id, description, excluded, to, ...props }: Props) { - const { - wrapper, - id: idCls, - description: descriptionCls, - } = classNames({ - active, - excluded, - }); + const { + wrapper, + id: idCls, + description: descriptionCls, + } = classNames({ + active, + excluded, + }); - const ref = useRef(null); + const ref = useRef(null); - // Make the active element scroll into view when selected - useEffect(() => { - if (ref.current && active) { - ref.current.scrollIntoView({ behavior: "smooth", block: "center" }); - } - }, [active]); + // Make the active element scroll into view when selected + useEffect(() => { + if (ref.current && active) { + ref.current.scrollIntoView({ behavior: "smooth", block: "center" }); + } + }, [active]); - return ( - -
{id}
-
{description}
- - ); + return ( + +
{id}
+
{description}
+ + ); } diff --git a/packages/ui/src/Atoms/DataTable/DataTable.tsx b/packages/ui/src/Atoms/DataTable/DataTable.tsx index f57fe9647..e1e4accb9 100644 --- a/packages/ui/src/Atoms/DataTable/DataTable.tsx +++ b/packages/ui/src/Atoms/DataTable/DataTable.tsx @@ -1,8 +1,8 @@ import { - type ComponentPropsWithRef, - type FC, - type PropsWithChildren, - type ReactNode, + type ComponentPropsWithRef, + type FC, + type PropsWithChildren, + type ReactNode, } from "react"; import { Card } from "../Card/Card"; import clsx from "clsx"; @@ -10,100 +10,100 @@ import { type AsChildProps, Slot } from "../Slot.tsx"; import { IconPlusLarge } from "../Icons"; export function DataTable({ - children, - className, - columns, + children, + className, + columns, }: PropsWithChildren<{ className?: string; columns: number | string[] }>) { - const style = () => { - if (typeof columns === "number") { - return { - gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`, - }; - } - return { - gridTemplateColumns: columns.join(" "), - }; + const style = () => { + if (typeof columns === "number") { + return { + gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`, + }; + } + return { + gridTemplateColumns: columns.join(" "), }; + }; - return ( -
- - {children} - -
- ); + return ( +
+ + {children} + +
+ ); } export function CellHead({ - children, - className, - ...props + children, + className, + ...props }: ComponentPropsWithRef<"div">) { - return ( -
- {children} -
- ); + return ( +
+ {children} +
+ ); } export function Row(props: ComponentPropsWithRef<"div">) { - return
; + return
; } export function Cell({ - asChild, - ...props + asChild, + ...props }: AsChildProps>) { - const Component = asChild ? Slot : "div"; - return ( - - ); + const Component = asChild ? Slot : "div"; + return ( + + ); } export function RowButton({ - icon = IconPlusLarge, - children, - ...props + icon = IconPlusLarge, + children, + ...props }: { - children: ReactNode; - icon?: FC<{ size: number; className?: string }>; + children: ReactNode; + icon?: FC<{ size: number; className?: string }>; } & ComponentPropsWithRef<"button">) { - const IconComponent = icon; - return ( - - ); + const IconComponent = icon; + return ( + + ); } diff --git a/packages/ui/src/Atoms/Dropdown/Dropdown.stories.tsx b/packages/ui/src/Atoms/Dropdown/Dropdown.stories.tsx index e7dbaafc3..5631291fa 100644 --- a/packages/ui/src/Atoms/Dropdown/Dropdown.stories.tsx +++ b/packages/ui/src/Atoms/Dropdown/Dropdown.stories.tsx @@ -4,32 +4,32 @@ import { Dropdown, DropdownItem, DropdownSeparator } from "./Dropdown"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Dropdown", - component: Dropdown, - argTypes: {}, - subcomponents: { - DropdownItem, - DropdownSeparator, - }, + title: "Atoms/Dropdown", + component: Dropdown, + argTypes: {}, + subcomponents: { + DropdownItem, + DropdownSeparator, + }, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - render: () => { - return ( - Dropdown}> - - Item 1 - - - - Item 2 - - - Item 3 - - - ); - }, + render: () => { + return ( + Dropdown}> + + Item 1 + + + + Item 2 + + + Item 3 + + + ); + }, }; diff --git a/packages/ui/src/Atoms/Dropdown/Dropdown.tsx b/packages/ui/src/Atoms/Dropdown/Dropdown.tsx index 4153f1df2..97ec76fb0 100644 --- a/packages/ui/src/Atoms/Dropdown/Dropdown.tsx +++ b/packages/ui/src/Atoms/Dropdown/Dropdown.tsx @@ -7,111 +7,113 @@ import { IconDotGrid1x3Horizontal } from "../Icons"; import { Button } from "../Button/Button.tsx"; type Props = PropsWithChildren<{ - toggle?: ReactNode; - className?: string; - open?: boolean; - onOpenChange?: (open: boolean) => void; + toggle?: ReactNode; + className?: string; + open?: boolean; + onOpenChange?: (open: boolean) => void; }>; export const dropdown = tv({ - base: "z-50 p-2 shadow-mid min-w-[8rem] bg-level-1 overflow-y-auto overflow-x-hidden rounded-2xl border-border-low", + base: "z-50 p-2 shadow-mid min-w-[8rem] bg-level-1 overflow-y-auto overflow-x-hidden rounded-2xl border-border-low", }); export function Dropdown({ children, toggle, className, open, onOpenChange }: Props) { - return ( - - {toggle && ( - {toggle} - )} - - + {toggle && ( + {toggle} + )} + + - {children} - - - - ); + }} + className={dropdown({ className })} + sideOffset={5} + > + {children} + + + + ); } export function DropdownSeparator({ className }: { className?: string }) { - return ( - - ); + return ( + + ); } type DropdownItemProps = PropsWithChildren<{ - className?: string; - icon?: FC; - asChild?: boolean; - variant?: "primary" | "tertiary" | "danger"; -}> & - ComponentProps; + className?: string; + icon?: FC; + asChild?: boolean; + variant?: "primary" | "tertiary" | "danger"; +}> +& ComponentProps; export const dropdownItem = tv({ - base: "text-txt-primary flex items-center gap-2 hover:bg-tertiary-hover active:bg-tertiary-pressed data-active-item:bg-tertiary-pressed cursor-pointer p-2", - variants: { - variant: { - primary: "text-txt-primary", - tertiary: "text-txt-tertiary", - danger: "text-txt-danger", - }, - }, - defaultVariants: { - variant: "primary", + base: "text-txt-primary flex items-center gap-2 hover:bg-tertiary-hover active:bg-tertiary-pressed data-active-item:bg-tertiary-pressed cursor-pointer p-2", + variants: { + variant: { + primary: "text-txt-primary", + tertiary: "text-txt-tertiary", + danger: "text-txt-danger", }, + }, + defaultVariants: { + variant: "primary", + }, }); export function ActionDropdown( - props: Omit & { - variant?: ComponentProps["variant"]; - }, + props: Omit & { + variant?: ComponentProps["variant"]; + }, ) { - return ( - - } + return ( + - ); + )} + /> + ); } export function DropdownItem({ - icon: IconComponent, - variant, - className, - children, - asChild, - ...props + icon: IconComponent, + variant, + className, + children, + asChild, + ...props }: DropdownItemProps) { - return ( - - {asChild ? ( - children - ) : ( - <> - {IconComponent && ( - - )} - {children} - - )} - - ); + return ( + + {asChild + ? ( + children + ) + : ( + <> + {IconComponent && ( + + )} + {children} + + )} + + ); } diff --git a/packages/ui/src/Atoms/Dropzone/Dropzone.stories.tsx b/packages/ui/src/Atoms/Dropzone/Dropzone.stories.tsx index dd88e22b0..3128d6c04 100644 --- a/packages/ui/src/Atoms/Dropzone/Dropzone.stories.tsx +++ b/packages/ui/src/Atoms/Dropzone/Dropzone.stories.tsx @@ -2,31 +2,31 @@ import { Dropzone } from "./Dropzone"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Dropzone", - component: Dropzone, - argTypes: {}, + title: "Atoms/Dropzone", + component: Dropzone, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - description: "Maximum 500 MB file size", - isUploading: false, - disabled: false, - }, + args: { + description: "Maximum 500 MB file size", + isUploading: false, + disabled: false, + }, }; export const Disabled: Story = { - args: { - ...Default.args, - disabled: true, - }, + args: { + ...Default.args, + disabled: true, + }, }; export const Uploading: Story = { - args: { - ...Default.args, - isUploading: true, - }, + args: { + ...Default.args, + isUploading: true, + }, }; diff --git a/packages/ui/src/Atoms/Dropzone/Dropzone.tsx b/packages/ui/src/Atoms/Dropzone/Dropzone.tsx index b8bf0fb2f..b9187d276 100644 --- a/packages/ui/src/Atoms/Dropzone/Dropzone.tsx +++ b/packages/ui/src/Atoms/Dropzone/Dropzone.tsx @@ -7,121 +7,125 @@ import { IconPageCross, IconUpload } from "../Icons"; import { Spinner } from "../Spinner/Spinner"; type Props = { - description: string; - isUploading: boolean; - disabled?: boolean; - accept?: Record; - maxSize?: number; // maxSize in MB - onDrop: (acceptedFiles: File[]) => void; + description: string; + isUploading: boolean; + disabled?: boolean; + accept?: Record; + maxSize?: number; // maxSize in MB + onDrop: (acceptedFiles: File[]) => void; }; export const dropzone = tv({ - slots: { - wrapper: + slots: { + wrapper: "bg-subtle border border border-border-low p-2 rounded-[20px] outline-none focus-visible:shadow-focus", - zone: "bg-secondary min-h-46 border border-border-low border-dashed rounded-2xl flex items-center justify-center", - title: "flex gap-2 text-sm font-medium text-center justify-center", - description: "text-xs text-txt-tertiary text-center", + zone: "bg-secondary min-h-46 border border-border-low border-dashed rounded-2xl flex items-center justify-center", + title: "flex gap-2 text-sm font-medium text-center justify-center", + description: "text-xs text-txt-tertiary text-center", + }, + variants: { + isDragActive: { + true: { + wrapper: "border-border-success shadow-focus", + zone: "border-border-success", + }, }, - variants: { - isDragActive: { - true: { - wrapper: "border-border-success shadow-focus", - zone: "border-border-success", - }, - }, - hasError: { - true: { - wrapper: "bg-danger", - zone: "bg-invert", - title: "text-txt-danger", - description: "text-txt-danger", - }, - }, - disabled: { - true: { - wrapper: "opacity-60 cursor-default", - zone: "bg-highlight", - }, - false: { - zone: "hover:bg-secondary-hover", - }, - }, + hasError: { + true: { + wrapper: "bg-danger", + zone: "bg-invert", + title: "text-txt-danger", + description: "text-txt-danger", + }, }, - defaultVariants: { - isDragActive: false, - disabled: false, - hasError: false, + disabled: { + true: { + wrapper: "opacity-60 cursor-default", + zone: "bg-highlight", + }, + false: { + zone: "hover:bg-secondary-hover", + }, }, + }, + defaultVariants: { + isDragActive: false, + disabled: false, + hasError: false, + }, }); const MB = 1024 * 1024; export function Dropzone(props: Props) { - const { __ } = useTranslate(); - const onDropRef = useRefSync(props.onDrop); - const onDrop = useCallback( - (files: File[]) => { - onDropRef.current(files); - }, - [onDropRef], - ); - const { getRootProps, getInputProps, isDragActive, fileRejections } = - useDropzone({ - disabled: props.disabled || props.isUploading, - accept: props.accept, - onDrop, - maxSize: props.maxSize ? props.maxSize * MB : undefined, - }); - const error = getDropzoneError(__, fileRejections); - const { wrapper, zone, title, description } = dropzone({ - ...props, - isDragActive, - hasError: !!error, + const { __ } = useTranslate(); + const onDropRef = useRefSync(props.onDrop); + const onDrop = useCallback( + (files: File[]) => { + onDropRef.current(files); + }, + [onDropRef], + ); + const { getRootProps, getInputProps, isDragActive, fileRejections } + = useDropzone({ + disabled: props.disabled || props.isUploading, + accept: props.accept, + onDrop, + maxSize: props.maxSize ? props.maxSize * MB : undefined, }); + const error = getDropzoneError(__, fileRejections); + const { wrapper, zone, title, description } = dropzone({ + ...props, + isDragActive, + hasError: !!error, + }); - return ( -
-
- - {props.isUploading ? ( -
- - {__("Uploading file")} -
- ) : ( -
-
- {error ? ( - - ) : ( - - )} - {error ?? __("Drag and drop or browse files")} -
-
{props.description}
-
- )} -
-
- ); + return ( +
+
+ + {props.isUploading + ? ( +
+ + {__("Uploading file")} +
+ ) + : ( +
+
+ {error + ? ( + + ) + : ( + + )} + {error ?? __("Drag and drop or browse files")} +
+
{props.description}
+
+ )} +
+
+ ); } function getDropzoneError( - __: (s: string) => string, - fileRejections: readonly FileRejection[], + __: (s: string) => string, + fileRejections: readonly FileRejection[], ) { - if (fileRejections.length === 0) { - return null; - } + if (fileRejections.length === 0) { + return null; + } - const code = fileRejections[0].errors[0].code; - switch (code) { - case "file-invalid-type": - return __("This file is not supported"); - case "file-too-large": - return __("This file is too large"); - default: - return __("Something went wrong"); - } + const code = fileRejections[0].errors[0].code; + switch (code) { + case "file-invalid-type": + return __("This file is not supported"); + case "file-too-large": + return __("This file is too large"); + default: + return __("Something went wrong"); + } } diff --git a/packages/ui/src/Atoms/FrameworkLogo/FrameworkLogo.tsx b/packages/ui/src/Atoms/FrameworkLogo/FrameworkLogo.tsx index 5b3206bdd..fbe9edd55 100644 --- a/packages/ui/src/Atoms/FrameworkLogo/FrameworkLogo.tsx +++ b/packages/ui/src/Atoms/FrameworkLogo/FrameworkLogo.tsx @@ -2,33 +2,35 @@ import clsx from "clsx"; import { Avatar } from "../Avatar/Avatar"; interface FrameworkLogoProps { - className?: string; - darkLogoURL?: string | null; - lightLogoURL?: string | null; - name: string; + className?: string; + darkLogoURL?: string | null; + lightLogoURL?: string | null; + name: string; } export function FrameworkLogo(props: FrameworkLogoProps) { - const { className, lightLogoURL, darkLogoURL, name } = props; + const { className, lightLogoURL, darkLogoURL, name } = props; - return lightLogoURL || darkLogoURL ? ( + return lightLogoURL || darkLogoURL + ? ( <> - {lightLogoURL && ( - {name} - )} - {darkLogoURL && ( - - )} + {lightLogoURL && ( + {name} + )} + {darkLogoURL && ( + + )} - ) : ( + ) + : ( - ); + ); } diff --git a/packages/ui/src/Atoms/Frameworks/CASA.tsx b/packages/ui/src/Atoms/Frameworks/CASA.tsx index 10c90c4f1..5becb54b5 100644 --- a/packages/ui/src/Atoms/Frameworks/CASA.tsx +++ b/packages/ui/src/Atoms/Frameworks/CASA.tsx @@ -1,39 +1,39 @@ export function CASA(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - - - ); + return ( + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/CCPA.tsx b/packages/ui/src/Atoms/Frameworks/CCPA.tsx index ea20c7557..50afcbbfe 100644 --- a/packages/ui/src/Atoms/Frameworks/CCPA.tsx +++ b/packages/ui/src/Atoms/Frameworks/CCPA.tsx @@ -1,48 +1,48 @@ export function CCPA(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - - - ); + return ( + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/DORA.tsx b/packages/ui/src/Atoms/Frameworks/DORA.tsx index 9f12713fd..62a9e6edb 100644 --- a/packages/ui/src/Atoms/Frameworks/DORA.tsx +++ b/packages/ui/src/Atoms/Frameworks/DORA.tsx @@ -1,77 +1,77 @@ export function DORA(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - - - - - - - - - - - - - - ); + return ( + + + + + + + + + + + + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/FERPA.tsx b/packages/ui/src/Atoms/Frameworks/FERPA.tsx index f07c5488b..3adadac7a 100644 --- a/packages/ui/src/Atoms/Frameworks/FERPA.tsx +++ b/packages/ui/src/Atoms/Frameworks/FERPA.tsx @@ -1,85 +1,85 @@ export function FERPA() { - return ( - - - - - - - - - - - - - - - ); + return ( + + + + + + + + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/GDPR.tsx b/packages/ui/src/Atoms/Frameworks/GDPR.tsx index dcc18ab1e..d3db49160 100644 --- a/packages/ui/src/Atoms/Frameworks/GDPR.tsx +++ b/packages/ui/src/Atoms/Frameworks/GDPR.tsx @@ -1,77 +1,77 @@ export function GDPR(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - - - - - - - - - - - - - - ); + return ( + + + + + + + + + + + + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/HIPAA.tsx b/packages/ui/src/Atoms/Frameworks/HIPAA.tsx index 6d2275ece..f83a94d29 100644 --- a/packages/ui/src/Atoms/Frameworks/HIPAA.tsx +++ b/packages/ui/src/Atoms/Frameworks/HIPAA.tsx @@ -1,73 +1,73 @@ export function HIPAA(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - - - - - - - - - ); + return ( + + + + + + + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/ISO27001.tsx b/packages/ui/src/Atoms/Frameworks/ISO27001.tsx index 807daf678..655bf254e 100644 --- a/packages/ui/src/Atoms/Frameworks/ISO27001.tsx +++ b/packages/ui/src/Atoms/Frameworks/ISO27001.tsx @@ -1,31 +1,31 @@ export function ISO27001(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - ); + return ( + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/ISO27701.tsx b/packages/ui/src/Atoms/Frameworks/ISO27701.tsx index a3966ee9b..ea0d0c3eb 100644 --- a/packages/ui/src/Atoms/Frameworks/ISO27701.tsx +++ b/packages/ui/src/Atoms/Frameworks/ISO27701.tsx @@ -1,31 +1,31 @@ export function ISO27701(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - ); + return ( + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/ISO42001.tsx b/packages/ui/src/Atoms/Frameworks/ISO42001.tsx index b33318a5d..699f62b4c 100644 --- a/packages/ui/src/Atoms/Frameworks/ISO42001.tsx +++ b/packages/ui/src/Atoms/Frameworks/ISO42001.tsx @@ -1,31 +1,31 @@ export function ISO42001(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - ); + return ( + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/NIS2.tsx b/packages/ui/src/Atoms/Frameworks/NIS2.tsx index 2a684d11c..ab1bd7cd6 100644 --- a/packages/ui/src/Atoms/Frameworks/NIS2.tsx +++ b/packages/ui/src/Atoms/Frameworks/NIS2.tsx @@ -1,77 +1,77 @@ export function NIS2(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - - - - - - - - - - - - - - ); + return ( + + + + + + + + + + + + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/SOC2.tsx b/packages/ui/src/Atoms/Frameworks/SOC2.tsx index c7276dca5..a0c1fed1e 100644 --- a/packages/ui/src/Atoms/Frameworks/SOC2.tsx +++ b/packages/ui/src/Atoms/Frameworks/SOC2.tsx @@ -1,35 +1,35 @@ export function SOC2(props: { className?: string }) { - const { className } = props; + const { className } = props; - return ( - - - - - - - ); + return ( + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/SOC2_TYPE1.tsx b/packages/ui/src/Atoms/Frameworks/SOC2_TYPE1.tsx index 76cd6dfc5..99aa6c7af 100644 --- a/packages/ui/src/Atoms/Frameworks/SOC2_TYPE1.tsx +++ b/packages/ui/src/Atoms/Frameworks/SOC2_TYPE1.tsx @@ -1,36 +1,36 @@ export function SOC2_TYPE1() { - return ( - - - - - - - - ); + return ( + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/SOC2_TYPE2.tsx b/packages/ui/src/Atoms/Frameworks/SOC2_TYPE2.tsx index 405ad10f1..4d7d24f59 100644 --- a/packages/ui/src/Atoms/Frameworks/SOC2_TYPE2.tsx +++ b/packages/ui/src/Atoms/Frameworks/SOC2_TYPE2.tsx @@ -1,36 +1,36 @@ export function SOC2_TYPE2() { - return ( - - - - - - - - ); + return ( + + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Frameworks/SOC3.tsx b/packages/ui/src/Atoms/Frameworks/SOC3.tsx index a95815ef0..943f6baea 100644 --- a/packages/ui/src/Atoms/Frameworks/SOC3.tsx +++ b/packages/ui/src/Atoms/Frameworks/SOC3.tsx @@ -1,32 +1,32 @@ export function SOC3() { - return ( - - - - - - - ); + return ( + + + + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconArrowBoxLeft.tsx b/packages/ui/src/Atoms/Icons/IconArrowBoxLeft.tsx index 5712f535e..42b11633c 100644 --- a/packages/ui/src/Atoms/Icons/IconArrowBoxLeft.tsx +++ b/packages/ui/src/Atoms/Icons/IconArrowBoxLeft.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconArrowBoxLeft({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconArrowBoxLeft({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconArrowCornerDownLeft.tsx b/packages/ui/src/Atoms/Icons/IconArrowCornerDownLeft.tsx index e41823362..6c0c9812f 100644 --- a/packages/ui/src/Atoms/Icons/IconArrowCornerDownLeft.tsx +++ b/packages/ui/src/Atoms/Icons/IconArrowCornerDownLeft.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconArrowCornerDownLeft({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconArrowCornerDownLeft({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconArrowDown.tsx b/packages/ui/src/Atoms/Icons/IconArrowDown.tsx index 48c597334..b770762a0 100644 --- a/packages/ui/src/Atoms/Icons/IconArrowDown.tsx +++ b/packages/ui/src/Atoms/Icons/IconArrowDown.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconArrowDown({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconArrowDown({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconArrowInbox.tsx b/packages/ui/src/Atoms/Icons/IconArrowInbox.tsx index facd25b15..fedb0ddf8 100644 --- a/packages/ui/src/Atoms/Icons/IconArrowInbox.tsx +++ b/packages/ui/src/Atoms/Icons/IconArrowInbox.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconArrowInbox({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconArrowInbox({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconArrowInbox1.tsx b/packages/ui/src/Atoms/Icons/IconArrowInbox1.tsx index 869ed7bde..7c61b7519 100644 --- a/packages/ui/src/Atoms/Icons/IconArrowInbox1.tsx +++ b/packages/ui/src/Atoms/Icons/IconArrowInbox1.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconArrowInbox1({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconArrowInbox1({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconArrowLink.tsx b/packages/ui/src/Atoms/Icons/IconArrowLink.tsx index b0110a079..79cc429df 100644 --- a/packages/ui/src/Atoms/Icons/IconArrowLink.tsx +++ b/packages/ui/src/Atoms/Icons/IconArrowLink.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconArrowLink({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconArrowLink({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconArrowUp.tsx b/packages/ui/src/Atoms/Icons/IconArrowUp.tsx index ab2fc3531..ac6eef589 100644 --- a/packages/ui/src/Atoms/Icons/IconArrowUp.tsx +++ b/packages/ui/src/Atoms/Icons/IconArrowUp.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconArrowUp({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconArrowUp({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconBank.tsx b/packages/ui/src/Atoms/Icons/IconBank.tsx index 23d576a76..8ad7098ae 100644 --- a/packages/ui/src/Atoms/Icons/IconBank.tsx +++ b/packages/ui/src/Atoms/Icons/IconBank.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconBank({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconBank({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconBell2.tsx b/packages/ui/src/Atoms/Icons/IconBell2.tsx index b2e3d3465..85a067cdc 100644 --- a/packages/ui/src/Atoms/Icons/IconBell2.tsx +++ b/packages/ui/src/Atoms/Icons/IconBell2.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconBell2({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconBell2({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconBlock.tsx b/packages/ui/src/Atoms/Icons/IconBlock.tsx index e1412a35c..9f9899eb0 100644 --- a/packages/ui/src/Atoms/Icons/IconBlock.tsx +++ b/packages/ui/src/Atoms/Icons/IconBlock.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconBlock({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconBlock({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconBlock1.tsx b/packages/ui/src/Atoms/Icons/IconBlock1.tsx index 74e34de65..8d08a23b9 100644 --- a/packages/ui/src/Atoms/Icons/IconBlock1.tsx +++ b/packages/ui/src/Atoms/Icons/IconBlock1.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconBlock1({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconBlock1({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconBook.tsx b/packages/ui/src/Atoms/Icons/IconBook.tsx index a65e001d9..9c225e49f 100644 --- a/packages/ui/src/Atoms/Icons/IconBook.tsx +++ b/packages/ui/src/Atoms/Icons/IconBook.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconBook({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconBook({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconBox.tsx b/packages/ui/src/Atoms/Icons/IconBox.tsx index 5d295fb3d..71a6b2878 100644 --- a/packages/ui/src/Atoms/Icons/IconBox.tsx +++ b/packages/ui/src/Atoms/Icons/IconBox.tsx @@ -2,22 +2,22 @@ import type { IconProps } from "./type.ts"; // https://lucide.dev/icons/box export function IconBox({ size = 24, className }: IconProps) { - return ( - - - - - - ); + return ( + + + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconCalendar1.tsx b/packages/ui/src/Atoms/Icons/IconCalendar1.tsx index 3169bb681..ec72c923b 100644 --- a/packages/ui/src/Atoms/Icons/IconCalendar1.tsx +++ b/packages/ui/src/Atoms/Icons/IconCalendar1.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCalendar1({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconCalendar1({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCalendar2.tsx b/packages/ui/src/Atoms/Icons/IconCalendar2.tsx index 50664a4ea..e4755e3c0 100644 --- a/packages/ui/src/Atoms/Icons/IconCalendar2.tsx +++ b/packages/ui/src/Atoms/Icons/IconCalendar2.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCalendar2({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCalendar2({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCheckmark1.tsx b/packages/ui/src/Atoms/Icons/IconCheckmark1.tsx index 14af36c6f..63ef7e36a 100644 --- a/packages/ui/src/Atoms/Icons/IconCheckmark1.tsx +++ b/packages/ui/src/Atoms/Icons/IconCheckmark1.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCheckmark1({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCheckmark1({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCheckmark2Small.tsx b/packages/ui/src/Atoms/Icons/IconCheckmark2Small.tsx index 8890ef4c4..cd203353d 100644 --- a/packages/ui/src/Atoms/Icons/IconCheckmark2Small.tsx +++ b/packages/ui/src/Atoms/Icons/IconCheckmark2Small.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCheckmark2Small({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCheckmark2Small({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconChevronDown.tsx b/packages/ui/src/Atoms/Icons/IconChevronDown.tsx index 3e43a98fe..ef3f13df9 100644 --- a/packages/ui/src/Atoms/Icons/IconChevronDown.tsx +++ b/packages/ui/src/Atoms/Icons/IconChevronDown.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconChevronDown({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconChevronDown({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconChevronGrabberVertical.tsx b/packages/ui/src/Atoms/Icons/IconChevronGrabberVertical.tsx index 805873648..e4c1a10bb 100644 --- a/packages/ui/src/Atoms/Icons/IconChevronGrabberVertical.tsx +++ b/packages/ui/src/Atoms/Icons/IconChevronGrabberVertical.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconChevronGrabberVertical({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconChevronGrabberVertical({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconChevronLeft.tsx b/packages/ui/src/Atoms/Icons/IconChevronLeft.tsx index 3c7b43d3c..c477f2f29 100644 --- a/packages/ui/src/Atoms/Icons/IconChevronLeft.tsx +++ b/packages/ui/src/Atoms/Icons/IconChevronLeft.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconChevronLeft({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconChevronLeft({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconChevronRight.tsx b/packages/ui/src/Atoms/Icons/IconChevronRight.tsx index 6e71029cd..c09045e41 100644 --- a/packages/ui/src/Atoms/Icons/IconChevronRight.tsx +++ b/packages/ui/src/Atoms/Icons/IconChevronRight.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconChevronRight({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconChevronRight({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconChevronTriangleDownSmall.tsx b/packages/ui/src/Atoms/Icons/IconChevronTriangleDownSmall.tsx index c8a6851b3..7f6a873e3 100644 --- a/packages/ui/src/Atoms/Icons/IconChevronTriangleDownSmall.tsx +++ b/packages/ui/src/Atoms/Icons/IconChevronTriangleDownSmall.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconChevronTriangleDownSmall({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconChevronTriangleDownSmall({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconChevronUp.tsx b/packages/ui/src/Atoms/Icons/IconChevronUp.tsx index 395e865f0..a09c31940 100644 --- a/packages/ui/src/Atoms/Icons/IconChevronUp.tsx +++ b/packages/ui/src/Atoms/Icons/IconChevronUp.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconChevronUp({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconChevronUp({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleCheck.tsx b/packages/ui/src/Atoms/Icons/IconCircleCheck.tsx index 2699b5760..4b3d7ec82 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleCheck.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleCheck.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleCheck({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCircleCheck({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleCheck1.tsx b/packages/ui/src/Atoms/Icons/IconCircleCheck1.tsx index 48e5d1093..4d28d4565 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleCheck1.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleCheck1.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleCheck1({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconCircleCheck1({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleInfo.tsx b/packages/ui/src/Atoms/Icons/IconCircleInfo.tsx index 20b7c0220..cbfb610f5 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleInfo.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleInfo.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleInfo({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCircleInfo({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleProgress.tsx b/packages/ui/src/Atoms/Icons/IconCircleProgress.tsx index 2d57d407c..593000557 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleProgress.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleProgress.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleProgress({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCircleProgress({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleQuestionmark.tsx b/packages/ui/src/Atoms/Icons/IconCircleQuestionmark.tsx index a0cf8b898..89e92b494 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleQuestionmark.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleQuestionmark.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleQuestionmark({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconCircleQuestionmark({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleQuestionmark1.tsx b/packages/ui/src/Atoms/Icons/IconCircleQuestionmark1.tsx index d3160a6e5..df6f93420 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleQuestionmark1.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleQuestionmark1.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleQuestionmark1({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCircleQuestionmark1({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleQuestionmarkSolid.tsx b/packages/ui/src/Atoms/Icons/IconCircleQuestionmarkSolid.tsx index 0574cedb7..935e8d064 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleQuestionmarkSolid.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleQuestionmarkSolid.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleQuestionmarkSolid({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCircleQuestionmarkSolid({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCircleX.tsx b/packages/ui/src/Atoms/Icons/IconCircleX.tsx index d832dad0d..6de3c7d94 100644 --- a/packages/ui/src/Atoms/Icons/IconCircleX.tsx +++ b/packages/ui/src/Atoms/Icons/IconCircleX.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCircleX({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCircleX({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconClock.tsx b/packages/ui/src/Atoms/Icons/IconClock.tsx index 90f37c2d4..ad369b606 100644 --- a/packages/ui/src/Atoms/Icons/IconClock.tsx +++ b/packages/ui/src/Atoms/Icons/IconClock.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconClock({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconClock({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCollapse.tsx b/packages/ui/src/Atoms/Icons/IconCollapse.tsx index 03623fd0f..99125cec1 100644 --- a/packages/ui/src/Atoms/Icons/IconCollapse.tsx +++ b/packages/ui/src/Atoms/Icons/IconCollapse.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCollapse({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCollapse({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconCrossLargeX.tsx b/packages/ui/src/Atoms/Icons/IconCrossLargeX.tsx index f89a1ad31..2176ea20b 100644 --- a/packages/ui/src/Atoms/Icons/IconCrossLargeX.tsx +++ b/packages/ui/src/Atoms/Icons/IconCrossLargeX.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconCrossLargeX({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconCrossLargeX({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconDotGrid1x3Horizontal.tsx b/packages/ui/src/Atoms/Icons/IconDotGrid1x3Horizontal.tsx index 6f8a75438..521a32fff 100644 --- a/packages/ui/src/Atoms/Icons/IconDotGrid1x3Horizontal.tsx +++ b/packages/ui/src/Atoms/Icons/IconDotGrid1x3Horizontal.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconDotGrid1x3Horizontal({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconDotGrid1x3Horizontal({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconExpand.tsx b/packages/ui/src/Atoms/Icons/IconExpand.tsx index 102b87237..95e21f32a 100644 --- a/packages/ui/src/Atoms/Icons/IconExpand.tsx +++ b/packages/ui/src/Atoms/Icons/IconExpand.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconExpand({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconExpand({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconFilter.tsx b/packages/ui/src/Atoms/Icons/IconFilter.tsx index f266d5ed8..bb10543b0 100644 --- a/packages/ui/src/Atoms/Icons/IconFilter.tsx +++ b/packages/ui/src/Atoms/Icons/IconFilter.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconFilter({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconFilter({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconFire3.tsx b/packages/ui/src/Atoms/Icons/IconFire3.tsx index 75879cf90..ab75778be 100644 --- a/packages/ui/src/Atoms/Icons/IconFire3.tsx +++ b/packages/ui/src/Atoms/Icons/IconFire3.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconFire3({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconFire3({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconFolder2.tsx b/packages/ui/src/Atoms/Icons/IconFolder2.tsx index e398bf642..1f476fd34 100644 --- a/packages/ui/src/Atoms/Icons/IconFolder2.tsx +++ b/packages/ui/src/Atoms/Icons/IconFolder2.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconFolder2({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconFolder2({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconFolderUpload.tsx b/packages/ui/src/Atoms/Icons/IconFolderUpload.tsx index c39fa5755..bafb0f934 100644 --- a/packages/ui/src/Atoms/Icons/IconFolderUpload.tsx +++ b/packages/ui/src/Atoms/Icons/IconFolderUpload.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconFolderUpload({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconFolderUpload({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconFrame.tsx b/packages/ui/src/Atoms/Icons/IconFrame.tsx index 6e26ed38d..f0ed14306 100644 --- a/packages/ui/src/Atoms/Icons/IconFrame.tsx +++ b/packages/ui/src/Atoms/Icons/IconFrame.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconFrame({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconFrame({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconFrame1.tsx b/packages/ui/src/Atoms/Icons/IconFrame1.tsx index 3a8afdb81..f7d20e56a 100644 --- a/packages/ui/src/Atoms/Icons/IconFrame1.tsx +++ b/packages/ui/src/Atoms/Icons/IconFrame1.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconFrame1({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconFrame1({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconFrame2.tsx b/packages/ui/src/Atoms/Icons/IconFrame2.tsx index d56db7d93..b5a8b918d 100644 --- a/packages/ui/src/Atoms/Icons/IconFrame2.tsx +++ b/packages/ui/src/Atoms/Icons/IconFrame2.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconFrame2({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconFrame2({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconGroup1.tsx b/packages/ui/src/Atoms/Icons/IconGroup1.tsx index 6186e0ece..d406385d7 100644 --- a/packages/ui/src/Atoms/Icons/IconGroup1.tsx +++ b/packages/ui/src/Atoms/Icons/IconGroup1.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconGroup1({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconGroup1({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconGroup11.tsx b/packages/ui/src/Atoms/Icons/IconGroup11.tsx index 31508a85f..842993d25 100644 --- a/packages/ui/src/Atoms/Icons/IconGroup11.tsx +++ b/packages/ui/src/Atoms/Icons/IconGroup11.tsx @@ -1,11 +1,12 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconGroup11({size = 24, className}: IconProps) { - return - - - - - - -} \ No newline at end of file +export function IconGroup11({ size = 24, className }: IconProps) { + return ( + + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconHome.tsx b/packages/ui/src/Atoms/Icons/IconHome.tsx index 1746476df..3d0fcf4f0 100644 --- a/packages/ui/src/Atoms/Icons/IconHome.tsx +++ b/packages/ui/src/Atoms/Icons/IconHome.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconHome({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconHome({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconImage.tsx b/packages/ui/src/Atoms/Icons/IconImage.tsx index 1559d420e..44be755e6 100644 --- a/packages/ui/src/Atoms/Icons/IconImage.tsx +++ b/packages/ui/src/Atoms/Icons/IconImage.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconImage({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconImage({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconImport2.tsx b/packages/ui/src/Atoms/Icons/IconImport2.tsx index 77e4f0c70..1ba39e29b 100644 --- a/packages/ui/src/Atoms/Icons/IconImport2.tsx +++ b/packages/ui/src/Atoms/Icons/IconImport2.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconImport2({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconImport2({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconInProgress.tsx b/packages/ui/src/Atoms/Icons/IconInProgress.tsx index 617605ec1..108888d1d 100644 --- a/packages/ui/src/Atoms/Icons/IconInProgress.tsx +++ b/packages/ui/src/Atoms/Icons/IconInProgress.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconInProgress({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconInProgress({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconInboxEmpty.tsx b/packages/ui/src/Atoms/Icons/IconInboxEmpty.tsx index ceb608570..781ba4d37 100644 --- a/packages/ui/src/Atoms/Icons/IconInboxEmpty.tsx +++ b/packages/ui/src/Atoms/Icons/IconInboxEmpty.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconInboxEmpty({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconInboxEmpty({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconKey.tsx b/packages/ui/src/Atoms/Icons/IconKey.tsx index 99b0f011c..48edfaa10 100644 --- a/packages/ui/src/Atoms/Icons/IconKey.tsx +++ b/packages/ui/src/Atoms/Icons/IconKey.tsx @@ -2,21 +2,21 @@ import type { IconProps } from "./type.ts"; // https://lucide.dev/icons/key-round export function IconKey({ size = 24, className }: IconProps) { - return ( - - - - - ); + return ( + + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconListStack.tsx b/packages/ui/src/Atoms/Icons/IconListStack.tsx index af3dea2c8..fdbe5fe25 100644 --- a/packages/ui/src/Atoms/Icons/IconListStack.tsx +++ b/packages/ui/src/Atoms/Icons/IconListStack.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconListStack({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconListStack({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconLock.tsx b/packages/ui/src/Atoms/Icons/IconLock.tsx index 543447c70..abcad537d 100644 --- a/packages/ui/src/Atoms/Icons/IconLock.tsx +++ b/packages/ui/src/Atoms/Icons/IconLock.tsx @@ -1,7 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconLock({size = 24, className}: IconProps) { - return - - +export function IconLock({ size = 24, className }: IconProps) { + return ( + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconMagnifyingGlass.tsx b/packages/ui/src/Atoms/Icons/IconMagnifyingGlass.tsx index aef85be9d..ea9240ebe 100644 --- a/packages/ui/src/Atoms/Icons/IconMagnifyingGlass.tsx +++ b/packages/ui/src/Atoms/Icons/IconMagnifyingGlass.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconMagnifyingGlass({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconMagnifyingGlass({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconMail.tsx b/packages/ui/src/Atoms/Icons/IconMail.tsx index 13d1df5cc..066cff0a4 100644 --- a/packages/ui/src/Atoms/Icons/IconMail.tsx +++ b/packages/ui/src/Atoms/Icons/IconMail.tsx @@ -1,19 +1,19 @@ import type { IconProps } from "./type.ts"; export function IconMail({ size = 24, className }: IconProps) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconMedal.tsx b/packages/ui/src/Atoms/Icons/IconMedal.tsx index d641a43c9..74860dd5a 100644 --- a/packages/ui/src/Atoms/Icons/IconMedal.tsx +++ b/packages/ui/src/Atoms/Icons/IconMedal.tsx @@ -1,21 +1,21 @@ import type { IconProps } from "./type.ts"; export function IconMedal({ size = 24, className }: IconProps) { - return ( - - - - ); + return ( + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconMinusLarge.tsx b/packages/ui/src/Atoms/Icons/IconMinusLarge.tsx index fe1450ab8..a800d6fd7 100644 --- a/packages/ui/src/Atoms/Icons/IconMinusLarge.tsx +++ b/packages/ui/src/Atoms/Icons/IconMinusLarge.tsx @@ -1,6 +1,6 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconMinusLarge({size = 16, className}: IconProps) { +export function IconMinusLarge({ size = 16, className }: IconProps) { return ( - - - -} \ No newline at end of file +export function IconNotStarted({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPageCheck.tsx b/packages/ui/src/Atoms/Icons/IconPageCheck.tsx index 712022942..c40f9e790 100644 --- a/packages/ui/src/Atoms/Icons/IconPageCheck.tsx +++ b/packages/ui/src/Atoms/Icons/IconPageCheck.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPageCheck({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconPageCheck({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPageCheck1.tsx b/packages/ui/src/Atoms/Icons/IconPageCheck1.tsx index e51233302..dc34c6bdd 100644 --- a/packages/ui/src/Atoms/Icons/IconPageCheck1.tsx +++ b/packages/ui/src/Atoms/Icons/IconPageCheck1.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPageCheck1({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconPageCheck1({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPageCross.tsx b/packages/ui/src/Atoms/Icons/IconPageCross.tsx index 97734d727..097093c08 100644 --- a/packages/ui/src/Atoms/Icons/IconPageCross.tsx +++ b/packages/ui/src/Atoms/Icons/IconPageCross.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPageCross({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconPageCross({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPageTextLine.tsx b/packages/ui/src/Atoms/Icons/IconPageTextLine.tsx index 56740718e..72fa2a89a 100644 --- a/packages/ui/src/Atoms/Icons/IconPageTextLine.tsx +++ b/packages/ui/src/Atoms/Icons/IconPageTextLine.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPageTextLine({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconPageTextLine({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPageTextSolid.tsx b/packages/ui/src/Atoms/Icons/IconPageTextSolid.tsx index f1c8a2a96..2d1c95932 100644 --- a/packages/ui/src/Atoms/Icons/IconPageTextSolid.tsx +++ b/packages/ui/src/Atoms/Icons/IconPageTextSolid.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPageTextSolid({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconPageTextSolid({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPencil.tsx b/packages/ui/src/Atoms/Icons/IconPencil.tsx index 2e17a778b..81231caf9 100644 --- a/packages/ui/src/Atoms/Icons/IconPencil.tsx +++ b/packages/ui/src/Atoms/Icons/IconPencil.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPencil({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconPencil({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPeopleAdd.tsx b/packages/ui/src/Atoms/Icons/IconPeopleAdd.tsx index 37f737308..97a784c15 100644 --- a/packages/ui/src/Atoms/Icons/IconPeopleAdd.tsx +++ b/packages/ui/src/Atoms/Icons/IconPeopleAdd.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPeopleAdd({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconPeopleAdd({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPeopleAdd2Line.tsx b/packages/ui/src/Atoms/Icons/IconPeopleAdd2Line.tsx index 756572950..1ab2c7d63 100644 --- a/packages/ui/src/Atoms/Icons/IconPeopleAdd2Line.tsx +++ b/packages/ui/src/Atoms/Icons/IconPeopleAdd2Line.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPeopleAdd2Line({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconPeopleAdd2Line({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPin.tsx b/packages/ui/src/Atoms/Icons/IconPin.tsx index 0b29889d7..cc7763409 100644 --- a/packages/ui/src/Atoms/Icons/IconPin.tsx +++ b/packages/ui/src/Atoms/Icons/IconPin.tsx @@ -1,27 +1,27 @@ import type { IconProps } from "./type.ts"; export function IconPin({ size = 24, className }: IconProps) { - return ( - - - - - ); + return ( + + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconPlusLarge.tsx b/packages/ui/src/Atoms/Icons/IconPlusLarge.tsx index fea8580ab..86107f15d 100644 --- a/packages/ui/src/Atoms/Icons/IconPlusLarge.tsx +++ b/packages/ui/src/Atoms/Icons/IconPlusLarge.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPlusLarge({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconPlusLarge({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPlusSmall.tsx b/packages/ui/src/Atoms/Icons/IconPlusSmall.tsx index 8fabfffea..581b99bb5 100644 --- a/packages/ui/src/Atoms/Icons/IconPlusSmall.tsx +++ b/packages/ui/src/Atoms/Icons/IconPlusSmall.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPlusSmall({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconPlusSmall({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconPriority.tsx b/packages/ui/src/Atoms/Icons/IconPriority.tsx index 126ce20d2..ef851eea0 100644 --- a/packages/ui/src/Atoms/Icons/IconPriority.tsx +++ b/packages/ui/src/Atoms/Icons/IconPriority.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconPriority({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconPriority({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconRadioUnchecked.tsx b/packages/ui/src/Atoms/Icons/IconRadioUnchecked.tsx index 42c2cc004..1513a2bba 100644 --- a/packages/ui/src/Atoms/Icons/IconRadioUnchecked.tsx +++ b/packages/ui/src/Atoms/Icons/IconRadioUnchecked.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconRadioUnchecked({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconRadioUnchecked({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconRecKeyframe.tsx b/packages/ui/src/Atoms/Icons/IconRecKeyframe.tsx index 5a2885a8f..d070f851b 100644 --- a/packages/ui/src/Atoms/Icons/IconRecKeyframe.tsx +++ b/packages/ui/src/Atoms/Icons/IconRecKeyframe.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconRecKeyframe({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconRecKeyframe({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconRotateCw.tsx b/packages/ui/src/Atoms/Icons/IconRotateCw.tsx index e550d190b..dfe2607d4 100644 --- a/packages/ui/src/Atoms/Icons/IconRotateCw.tsx +++ b/packages/ui/src/Atoms/Icons/IconRotateCw.tsx @@ -1,10 +1,12 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; // Source: Lucide Icons "rotate-cw" - https://lucide.dev/icons/rotate-cw // Licensed under ISC License -export function IconRotateCw({size = 24, className}: IconProps) { - return - - - +export function IconRotateCw({ size = 24, className }: IconProps) { + return ( + + + + + ); } diff --git a/packages/ui/src/Atoms/Icons/IconSend.tsx b/packages/ui/src/Atoms/Icons/IconSend.tsx index 881000123..24d33122c 100644 --- a/packages/ui/src/Atoms/Icons/IconSend.tsx +++ b/packages/ui/src/Atoms/Icons/IconSend.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconSend({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconSend({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconSettingsGear2.tsx b/packages/ui/src/Atoms/Icons/IconSettingsGear2.tsx index 61994562b..5e65d4981 100644 --- a/packages/ui/src/Atoms/Icons/IconSettingsGear2.tsx +++ b/packages/ui/src/Atoms/Icons/IconSettingsGear2.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconSettingsGear2({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconSettingsGear2({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconShield.tsx b/packages/ui/src/Atoms/Icons/IconShield.tsx index 4d6cb0c5b..1efa49860 100644 --- a/packages/ui/src/Atoms/Icons/IconShield.tsx +++ b/packages/ui/src/Atoms/Icons/IconShield.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconShield({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconShield({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconSignature.tsx b/packages/ui/src/Atoms/Icons/IconSignature.tsx index 3d667cddc..2a26af61f 100644 --- a/packages/ui/src/Atoms/Icons/IconSignature.tsx +++ b/packages/ui/src/Atoms/Icons/IconSignature.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconSignature({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconSignature({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconSquareBehindSquare2.tsx b/packages/ui/src/Atoms/Icons/IconSquareBehindSquare2.tsx index d5de52e6b..ef6ae943a 100644 --- a/packages/ui/src/Atoms/Icons/IconSquareBehindSquare2.tsx +++ b/packages/ui/src/Atoms/Icons/IconSquareBehindSquare2.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconSquareBehindSquare2({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconSquareBehindSquare2({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconStore.tsx b/packages/ui/src/Atoms/Icons/IconStore.tsx index 5b13061c4..798f5dc3c 100644 --- a/packages/ui/src/Atoms/Icons/IconStore.tsx +++ b/packages/ui/src/Atoms/Icons/IconStore.tsx @@ -1,10 +1,11 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconStore({size = 24, className}: IconProps) { - return - - - - - -} \ No newline at end of file +export function IconStore({ size = 24, className }: IconProps) { + return ( + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconSun.tsx b/packages/ui/src/Atoms/Icons/IconSun.tsx index 5e975b0ea..9bb3370bf 100644 --- a/packages/ui/src/Atoms/Icons/IconSun.tsx +++ b/packages/ui/src/Atoms/Icons/IconSun.tsx @@ -1,16 +1,17 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconSun({size = 24, className}: IconProps) { - return - - - - - - - - - - - -} \ No newline at end of file +export function IconSun({ size = 24, className }: IconProps) { + return ( + + + + + + + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconTodo.tsx b/packages/ui/src/Atoms/Icons/IconTodo.tsx index 022e67c9a..345b33ed1 100644 --- a/packages/ui/src/Atoms/Icons/IconTodo.tsx +++ b/packages/ui/src/Atoms/Icons/IconTodo.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconTodo({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconTodo({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconTodo2.tsx b/packages/ui/src/Atoms/Icons/IconTodo2.tsx index ca7cb347f..2d3da3b6b 100644 --- a/packages/ui/src/Atoms/Icons/IconTodo2.tsx +++ b/packages/ui/src/Atoms/Icons/IconTodo2.tsx @@ -1,12 +1,13 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconTodo2({size = 24, className}: IconProps) { - return - - - - - - - -} \ No newline at end of file +export function IconTodo2({ size = 24, className }: IconProps) { + return ( + + + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconTrashCan.tsx b/packages/ui/src/Atoms/Icons/IconTrashCan.tsx index 568e190f6..b866a89c4 100644 --- a/packages/ui/src/Atoms/Icons/IconTrashCan.tsx +++ b/packages/ui/src/Atoms/Icons/IconTrashCan.tsx @@ -1,12 +1,13 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconTrashCan({size = 24, className}: IconProps) { - return - - - - - - - -} \ No newline at end of file +export function IconTrashCan({ size = 24, className }: IconProps) { + return ( + + + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconTrashCanSolid.tsx b/packages/ui/src/Atoms/Icons/IconTrashCanSolid.tsx index 2befc66c1..ac703eb71 100644 --- a/packages/ui/src/Atoms/Icons/IconTrashCanSolid.tsx +++ b/packages/ui/src/Atoms/Icons/IconTrashCanSolid.tsx @@ -1,8 +1,9 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconTrashCanSolid({size = 24, className}: IconProps) { - return - - - -} \ No newline at end of file +export function IconTrashCanSolid({ size = 24, className }: IconProps) { + return ( + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconUpload.tsx b/packages/ui/src/Atoms/Icons/IconUpload.tsx index 9545feb9c..5064818c9 100644 --- a/packages/ui/src/Atoms/Icons/IconUpload.tsx +++ b/packages/ui/src/Atoms/Icons/IconUpload.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconUpload({size = 24, className}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconUpload({ size = 24, className }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/IconWarning.tsx b/packages/ui/src/Atoms/Icons/IconWarning.tsx index 51e275dd5..d6d8a86c5 100644 --- a/packages/ui/src/Atoms/Icons/IconWarning.tsx +++ b/packages/ui/src/Atoms/Icons/IconWarning.tsx @@ -1,5 +1,5 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconWarning({size = 24, className}: IconProps) { - return -} \ No newline at end of file +export function IconWarning({ size = 24, className }: IconProps) { + return ; +} diff --git a/packages/ui/src/Atoms/Icons/TaskStateIcon.stories.tsx b/packages/ui/src/Atoms/Icons/TaskStateIcon.stories.tsx index 6ac2f2823..e6624374d 100644 --- a/packages/ui/src/Atoms/Icons/TaskStateIcon.stories.tsx +++ b/packages/ui/src/Atoms/Icons/TaskStateIcon.stories.tsx @@ -2,21 +2,21 @@ import { TaskStateIcon } from "./TaskStateIcon"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/TaskStateIcon", - component: TaskStateIcon, - argTypes: {}, + title: "Atoms/TaskStateIcon", + component: TaskStateIcon, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - state: "TODO", - }, + args: { + state: "TODO", + }, }; export const Done: Story = { - args: { - state: "DONE", - }, + args: { + state: "DONE", + }, }; diff --git a/packages/ui/src/Atoms/Icons/TaskStateIcon.tsx b/packages/ui/src/Atoms/Icons/TaskStateIcon.tsx index 28967cb74..8264ce8ff 100644 --- a/packages/ui/src/Atoms/Icons/TaskStateIcon.tsx +++ b/packages/ui/src/Atoms/Icons/TaskStateIcon.tsx @@ -2,13 +2,15 @@ import { IconCircleProgress } from "./IconCircleProgress"; import { IconRadioUnchecked } from "./IconRadioUnchecked"; type Props = { - state: "TODO" | "DONE"; + state: "TODO" | "DONE"; }; export function TaskStateIcon({ state }: Props) { - return state === "TODO" ? ( + return state === "TODO" + ? ( - ) : ( + ) + : ( - ); + ); } diff --git a/packages/ui/src/Atoms/Icons/Todo.tsx b/packages/ui/src/Atoms/Icons/Todo.tsx index 13cb10e3f..5e13e3d45 100644 --- a/packages/ui/src/Atoms/Icons/Todo.tsx +++ b/packages/ui/src/Atoms/Icons/Todo.tsx @@ -1,9 +1,10 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconTodo({size = 24}: IconProps) { - return - - - - -} \ No newline at end of file +export function IconTodo({ size = 24 }: IconProps) { + return ( + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/Todo2.tsx b/packages/ui/src/Atoms/Icons/Todo2.tsx index fc6c4c9e0..105acc083 100644 --- a/packages/ui/src/Atoms/Icons/Todo2.tsx +++ b/packages/ui/src/Atoms/Icons/Todo2.tsx @@ -1,12 +1,13 @@ -import type {IconProps} from "./type.ts"; +import type { IconProps } from "./type.ts"; -export function IconTodo2({size = 24}: IconProps) { - return - - - - - - - -} \ No newline at end of file +export function IconTodo2({ size = 24 }: IconProps) { + return ( + + + + + + + + ); +} diff --git a/packages/ui/src/Atoms/Icons/type.ts b/packages/ui/src/Atoms/Icons/type.ts index eb1932499..be2ba772e 100644 --- a/packages/ui/src/Atoms/Icons/type.ts +++ b/packages/ui/src/Atoms/Icons/type.ts @@ -1,4 +1,4 @@ export type IconProps = { - size?: number; - className?: string; + size?: number; + className?: string; }; diff --git a/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.stories.tsx b/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.stories.tsx index 98c677cdb..551bf11de 100644 --- a/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.stories.tsx +++ b/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.stories.tsx @@ -2,15 +2,15 @@ import { InfiniteScrollTrigger } from "./InfiniteScrollTrigger"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/InfiniteScrollTrigger", - component: InfiniteScrollTrigger, - argTypes: {}, + title: "Atoms/InfiniteScrollTrigger", + component: InfiniteScrollTrigger, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - onView: () => {}, - }, + args: { + onView: () => {}, + }, }; diff --git a/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.tsx b/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.tsx index b72c1edbb..7994b8902 100644 --- a/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.tsx +++ b/packages/ui/src/Atoms/InfiniteScrollTrigger/InfiniteScrollTrigger.tsx @@ -5,32 +5,32 @@ import { useInView } from "react-intersection-observer"; import { Spinner } from "../Spinner/Spinner"; type Props = { - children?: ReactNode; - onView: () => void; - loading?: boolean; + children?: ReactNode; + onView: () => void; + loading?: boolean; }; export function InfiniteScrollTrigger({ children, onView, loading }: Props) { - const { __ } = useTranslate(); - const { ref, inView } = useInView({ - threshold: 0, - }); - const onViewRef = useRefSync(onView); - useEffect(() => { - if (inView && !loading) onViewRef.current(); - }, [inView, loading, onViewRef]); + const { __ } = useTranslate(); + const { ref, inView } = useInView({ + threshold: 0, + }); + const onViewRef = useRefSync(onView); + useEffect(() => { + if (inView && !loading) onViewRef.current(); + }, [inView, loading, onViewRef]); - return ( -
- {children ?? ( - <> - - {__("Loading")} - - )} -
- ); + return ( +
+ {children ?? ( + <> + + {__("Loading")} + + )} +
+ ); } diff --git a/packages/ui/src/Atoms/Input/Input.stories.tsx b/packages/ui/src/Atoms/Input/Input.stories.tsx index 86d97ffe3..c46543967 100644 --- a/packages/ui/src/Atoms/Input/Input.stories.tsx +++ b/packages/ui/src/Atoms/Input/Input.stories.tsx @@ -2,9 +2,9 @@ import { Input } from "./Input"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Form/Input", - component: Input, - argTypes: {}, + title: "Atoms/Form/Input", + component: Input, + argTypes: {}, } satisfies Meta; type Story = StoryObj; @@ -12,14 +12,14 @@ type Story = StoryObj; export const Default: Story = {}; export const Disabled: Story = { - args: { - disabled: true, - }, + args: { + disabled: true, + }, }; export const Title: Story = { - args: { - variant: "title", - placeholder: "Policy title", - }, + args: { + variant: "title", + placeholder: "Policy title", + }, }; diff --git a/packages/ui/src/Atoms/Input/Input.tsx b/packages/ui/src/Atoms/Input/Input.tsx index f2a24ef56..ffcefb86d 100644 --- a/packages/ui/src/Atoms/Input/Input.tsx +++ b/packages/ui/src/Atoms/Input/Input.tsx @@ -3,77 +3,77 @@ import { tv } from "tailwind-variants"; import type { IconProps } from "../Icons/type"; type Props = { - invalid?: boolean; - disabled?: boolean; - icon?: FC; - onValueChange?: (value: string) => void; - variant?: "bordered" | "ghost" | "title"; + invalid?: boolean; + disabled?: boolean; + icon?: FC; + onValueChange?: (value: string) => void; + variant?: "bordered" | "ghost" | "title"; } & InputHTMLAttributes; export const input = tv({ - base: "w-full disabled:bg-transparent", - variants: { - invalid: { - true: "border-border-danger", - }, - variant: { - bordered: + base: "w-full disabled:bg-transparent", + variants: { + invalid: { + true: "border-border-danger", + }, + variant: { + bordered: "py-[6px] bg-secondary border border-border-mid rounded-[10px] hover:border-border-strong text-sm px-3 text-txt-primary", - ghost: "text-base text-txt-secondary outline-none", - title: "text-2xl font-semibold text-txt-primary outline-none", - }, - }, - defaultVariants: { - variant: "bordered", + ghost: "text-base text-txt-secondary outline-none", + title: "text-2xl font-semibold text-txt-primary outline-none", }, + }, + defaultVariants: { + variant: "bordered", + }, }); export function Input({ - invalid, - icon: IconComponent, - onValueChange, - ...props + invalid, + icon: IconComponent, + onValueChange, + ...props }: Props) { - const [focus, setFocus] = useState(false); + const [focus, setFocus] = useState(false); - if (IconComponent) { - return ( -
- - { - setFocus(true); - props.onFocus?.(e); - }} - onBlur={(e) => { - setFocus(false); - props.onBlur?.(e); - }} - aria-invalid={invalid} - className="w-full outline-none" - onChange={(e) => { - onValueChange?.(e.currentTarget.value); - props.onChange?.(e); - }} - /> -
- ); - } + if (IconComponent) { return ( +
+ { - onValueChange?.(e.currentTarget.value); - props.onChange?.(e); - }} + {...props} + onFocus={(e) => { + setFocus(true); + props.onFocus?.(e); + }} + onBlur={(e) => { + setFocus(false); + props.onBlur?.(e); + }} + aria-invalid={invalid} + className="w-full outline-none" + onChange={(e) => { + onValueChange?.(e.currentTarget.value); + props.onChange?.(e); + }} /> +
); + } + return ( + { + onValueChange?.(e.currentTarget.value); + props.onChange?.(e); + }} + /> + ); } diff --git a/packages/ui/src/Atoms/Label/Label.stories.tsx b/packages/ui/src/Atoms/Label/Label.stories.tsx index c29e74d54..fd68cef21 100644 --- a/packages/ui/src/Atoms/Label/Label.stories.tsx +++ b/packages/ui/src/Atoms/Label/Label.stories.tsx @@ -2,9 +2,9 @@ import { Label } from "./Label"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Form/Label", - component: Label, - argTypes: {}, + title: "Atoms/Form/Label", + component: Label, + argTypes: {}, } satisfies Meta; type Story = StoryObj; diff --git a/packages/ui/src/Atoms/Label/Label.tsx b/packages/ui/src/Atoms/Label/Label.tsx index 4c013227d..0ed22af22 100644 --- a/packages/ui/src/Atoms/Label/Label.tsx +++ b/packages/ui/src/Atoms/Label/Label.tsx @@ -5,9 +5,9 @@ import { Label as RadixLabel } from "@radix-ui/react-label"; type Props = ComponentProps; const label = tv({ - base: "block text-sm font-medium text-txt-primary mb-[6px]", + base: "block text-sm font-medium text-txt-primary mb-[6px]", }); export function Label({ ...props }: Props) { - return ; + return ; } diff --git a/packages/ui/src/Atoms/Logo/Logo.stories.tsx b/packages/ui/src/Atoms/Logo/Logo.stories.tsx index c47a92c45..614d401cd 100644 --- a/packages/ui/src/Atoms/Logo/Logo.stories.tsx +++ b/packages/ui/src/Atoms/Logo/Logo.stories.tsx @@ -2,8 +2,8 @@ import type { Meta, StoryObj } from "@storybook/react"; import { Logo } from "./Logo"; const meta = { - title: "Atoms/Logo", - component: Logo, + title: "Atoms/Logo", + component: Logo, } satisfies Meta; export default meta; diff --git a/packages/ui/src/Atoms/Logo/Logo.tsx b/packages/ui/src/Atoms/Logo/Logo.tsx index 34cc65192..cb8e1ddff 100644 --- a/packages/ui/src/Atoms/Logo/Logo.tsx +++ b/packages/ui/src/Atoms/Logo/Logo.tsx @@ -2,85 +2,85 @@ import clsx from "clsx"; import { useId } from "react"; type Props = { - className?: string; - withPicto?: boolean; + className?: string; + withPicto?: boolean; }; export function Logo({ className, withPicto }: Props) { - const id = useId(); - if (withPicto) { - return ( - - - - - - - - - - - - - - - - - - - ); - } + const id = useId(); + if (withPicto) { return ( - - + + + + + + + + + + + + + + - + + + ); + } + return ( + + + + ); } diff --git a/packages/ui/src/Atoms/Markdown/Markdown.stories.tsx b/packages/ui/src/Atoms/Markdown/Markdown.stories.tsx index 21b011bec..b1f399099 100644 --- a/packages/ui/src/Atoms/Markdown/Markdown.stories.tsx +++ b/packages/ui/src/Atoms/Markdown/Markdown.stories.tsx @@ -2,16 +2,16 @@ import { Markdown } from "./Markdown"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Markdown", - component: Markdown, - argTypes: {}, + title: "Atoms/Markdown", + component: Markdown, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - content: `# Siquis facies post + args: { + content: `# Siquis facies post ## Venit Ianigenam egressus a tamen terra frater @@ -71,5 +71,5 @@ Fecissem quem degravat quibus movere inmotus sacer Iovem, sic *urbis mala quoque*. Tereu ut tuos sed recessit petit patriaeque subit palude subposuere certum: tempora, telisque. In quaesitique habitavit nostris Scylaceaque potest omnia pastoribus meminisse ignara. Sed pando functaque perenni gemitus tibi.`, - }, + }, }; diff --git a/packages/ui/src/Atoms/Markdown/Markdown.tsx b/packages/ui/src/Atoms/Markdown/Markdown.tsx index 22101aafb..3d55fcc04 100644 --- a/packages/ui/src/Atoms/Markdown/Markdown.tsx +++ b/packages/ui/src/Atoms/Markdown/Markdown.tsx @@ -3,43 +3,43 @@ import remarkGfm from "remark-gfm"; import rehypeRaw from "rehype-raw"; type Props = { - content: string; + content: string; }; export function Markdown({ content }: Props) { - return ( -
- ( - - {children} - - ), - pre: ({ children, ...props }) => ( -
-                            {children}
-                        
- ), - code: ({ children, ...props }) => ( - - {children} - - ), - }} + return ( + - ); + {children} + + ), + pre: ({ children, ...props }) => ( +
+              {children}
+            
+ ), + code: ({ children, ...props }) => ( + + {children} + + ), + }} + > + {content} +
+
+ ); } diff --git a/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.stories.tsx b/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.stories.tsx index f81ba0f96..401b69e43 100644 --- a/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.stories.tsx +++ b/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.stories.tsx @@ -2,15 +2,15 @@ import { PriorityLevel } from "./PriorityLevel.tsx"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/PriorityLevel", - component: PriorityLevel, - argTypes: {}, + title: "Atoms/PriorityLevel", + component: PriorityLevel, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - level: 1, - }, + args: { + level: 1, + }, }; diff --git a/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.tsx b/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.tsx index f0b75c704..543840fa7 100644 --- a/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.tsx +++ b/packages/ui/src/Atoms/PriorityLevel/PriorityLevel.tsx @@ -1,30 +1,30 @@ import clsx from "clsx"; type Props = { - level: number; + level: number; }; export function PriorityLevel({ level }: Props) { - return ( -
-
= 1 ? "bg-txt-secondary" : "bg-txt-quaternary", - )} - /> -
= 2 ? "bg-txt-secondary" : "bg-txt-quaternary", - )} - /> -
= 3 ? "bg-txt-secondary" : "bg-txt-quaternary", - )} - /> -
- ); + return ( +
+
= 1 ? "bg-txt-secondary" : "bg-txt-quaternary", + )} + /> +
= 2 ? "bg-txt-secondary" : "bg-txt-quaternary", + )} + /> +
= 3 ? "bg-txt-secondary" : "bg-txt-quaternary", + )} + /> +
+ ); } diff --git a/packages/ui/src/Atoms/PropertyRow/PropertyRow.stories.tsx b/packages/ui/src/Atoms/PropertyRow/PropertyRow.stories.tsx index ce81de06c..6d32987f8 100644 --- a/packages/ui/src/Atoms/PropertyRow/PropertyRow.stories.tsx +++ b/packages/ui/src/Atoms/PropertyRow/PropertyRow.stories.tsx @@ -3,24 +3,24 @@ import { PropertyRow } from "./PropertyRow"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/PropertyRow", - component: PropertyRow, - argTypes: {}, + title: "Atoms/PropertyRow", + component: PropertyRow, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - id: "test", - label: "Test", - children: , + }, }; export const WithError: Story = { - args: { - ...Default.args, - error: "This is an error", - }, + args: { + ...Default.args, + error: "This is an error", + }, }; diff --git a/packages/ui/src/Atoms/PropertyRow/PropertyRow.tsx b/packages/ui/src/Atoms/PropertyRow/PropertyRow.tsx index 6febfc59d..ae774b522 100644 --- a/packages/ui/src/Atoms/PropertyRow/PropertyRow.tsx +++ b/packages/ui/src/Atoms/PropertyRow/PropertyRow.tsx @@ -2,28 +2,28 @@ import { Children, type ReactNode } from "react"; import { Label } from "../Label/Label"; type Props = { - label: string; - id?: string; - children: ReactNode; - error?: string; + label: string; + id?: string; + children: ReactNode; + error?: string; }; export function PropertyRow({ id, label, children, error, ...props }: Props) { - const [firstChild, ...restChildren] = Children.toArray(children); + const [firstChild, ...restChildren] = Children.toArray(children); - return ( -
-
- -
{firstChild}
-
- {error &&
{error}
} - {restChildren} -
- ); + return ( +
+
+ +
{firstChild}
+
+ {error &&
{error}
} + {restChildren} +
+ ); } diff --git a/packages/ui/src/Atoms/Select/Select.stories.tsx b/packages/ui/src/Atoms/Select/Select.stories.tsx index 7d89df492..d109d1f38 100644 --- a/packages/ui/src/Atoms/Select/Select.stories.tsx +++ b/packages/ui/src/Atoms/Select/Select.stories.tsx @@ -2,52 +2,52 @@ import { Select, Option } from "./Select"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Form/Select", - component: Select, - argTypes: {}, + title: "Atoms/Form/Select", + component: Select, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - placeholder: "Select an option", - children: ( - <> - - - - - - - ), - }, + args: { + placeholder: "Select an option", + children: ( + <> + + + + + + + ), + }, }; export const Dashed: Story = { - args: { - ...Default.args, - variant: "dashed", - }, + args: { + ...Default.args, + variant: "dashed", + }, }; export const Invalid: Story = { - args: { - ...Default.args, - invalid: true, - }, + args: { + ...Default.args, + invalid: true, + }, }; export const Loading: Story = { - args: { - ...Default.args, - loading: true, - }, + args: { + ...Default.args, + loading: true, + }, }; export const Disabled: Story = { - args: { - ...Default.args, - disabled: true, - }, + args: { + ...Default.args, + disabled: true, + }, }; diff --git a/packages/ui/src/Atoms/Select/Select.tsx b/packages/ui/src/Atoms/Select/Select.tsx index 553652574..f4c2815b2 100644 --- a/packages/ui/src/Atoms/Select/Select.tsx +++ b/packages/ui/src/Atoms/Select/Select.tsx @@ -1,211 +1,211 @@ import { - Root, - Trigger, - Value, - Icon, - Portal, - Content, - Viewport, - Item, - ItemText, + Root, + Trigger, + Value, + Icon, + Portal, + Content, + Viewport, + Item, + ItemText, } from "@radix-ui/react-select"; import * as ScrollArea from "@radix-ui/react-scroll-area"; import { Input, input } from "../Input/Input.tsx"; import { IconChevronGrabberVertical } from "../Icons/IconChevronGrabberVertical.tsx"; import { tv } from "tailwind-variants"; import { - Children, - type ComponentProps, - type CSSProperties, - type PropsWithChildren, - type ReactNode, + Children, + type ComponentProps, + type CSSProperties, + type PropsWithChildren, + type ReactNode, } from "react"; import { IconMagnifyingGlass } from "../Icons/IconMagnifyingGlass.tsx"; import { Spinner } from "../Spinner/Spinner.tsx"; type Props = PropsWithChildren< - { - id?: string; - placeholder?: ReactNode; - onValueChange?: (s: NonNullable) => void; - variant?: "default" | "editor" | "dashed" | "ghost"; - invalid?: boolean; - disabled?: boolean; - className?: string; - value?: T; - searchValue?: string; - onSearch?: (s: string) => void; - searchPlaceholder?: string; - loading?: boolean; - style?: CSSProperties; - dropdownProps?: ComponentProps; - } & Omit, "onChange" | "value"> + { + id?: string; + placeholder?: ReactNode; + onValueChange?: (s: NonNullable) => void; + variant?: "default" | "editor" | "dashed" | "ghost"; + invalid?: boolean; + disabled?: boolean; + className?: string; + value?: T; + searchValue?: string; + onSearch?: (s: string) => void; + searchPlaceholder?: string; + loading?: boolean; + style?: CSSProperties; + dropdownProps?: ComponentProps; + } & Omit, "onChange" | "value"> >; const select = tv({ - slots: { - trigger: + slots: { + trigger: "flex justify-between items-center data-placeholder:text-txt-tertiary whitespace-nowrap cursor-pointer *:first:contents", - content: + content: "z-100 shadow-mid rounded-[10px] bg-level-1 p-1 animate-in fade-in slide-in-from-top-2 overflow-y-auto overflow-y-auto", - icon: "-mr-1", + icon: "-mr-1", + }, + variants: { + invalid: { + true: { + trigger: "border-border-danger", + }, }, - variants: { - invalid: { - true: { - trigger: "border-border-danger", - }, - }, - disabled: { - true: { - trigger: "opacity-60", - }, - }, - loading: { - true: { - trigger: "opacity-60", - }, - }, - variant: { - dashed: { - trigger: input({ - class: "w-full gap-4 border-dashed pointer-events-none", - }), - }, - editor: { - trigger: + disabled: { + true: { + trigger: "opacity-60", + }, + }, + loading: { + true: { + trigger: "opacity-60", + }, + }, + variant: { + dashed: { + trigger: input({ + class: "w-full gap-4 border-dashed pointer-events-none", + }), + }, + editor: { + trigger: "bg-highlight hover:bg-highlight-hover active:bg-highlight-pressed text-txt-primary text-sm px-[10px] py-[6px] rounded-lg w-max gap-2", - }, - default: { - trigger: input({ class: "w-full gap-4 " }), - }, - ghost: { - trigger: "w-full px-3", - content: "bg-level-2", - }, - }, + }, + default: { + trigger: input({ class: "w-full gap-4 " }), + }, + ghost: { + trigger: "w-full px-3", + content: "bg-level-2", + }, }, - compoundVariants: [ - { - invalid: true, - variant: "default", - class: { - trigger: "border-border-danger", - }, - }, - ], - defaultVariants: { - variant: "default", + }, + compoundVariants: [ + { + invalid: true, + variant: "default", + class: { + trigger: "border-border-danger", + }, }, + ], + defaultVariants: { + variant: "default", + }, }); export function Select({ - placeholder, - children, - onValueChange, - value, - searchValue, - onSearch, - searchPlaceholder, - loading, - open, - defaultOpen = false, - onOpenChange, - dropdownProps, - ...props + placeholder, + children, + onValueChange, + value, + searchValue, + onSearch, + searchPlaceholder, + loading, + open, + defaultOpen = false, + onOpenChange, + dropdownProps, + ...props }: Props) { - const { trigger, content, icon } = select({ - ...props, - }); + const { trigger, content, icon } = select({ + ...props, + }); - return ( -
- - - - - {loading ? ( - - ) : ( - - )} - - - - + + + + + {loading + ? ( + + ) + : ( + + )} + + + + - {onSearch && ( - { - e.stopPropagation(); - e.preventDefault(); - }} - autoFocus - icon={IconMagnifyingGlass} - placeholder={searchPlaceholder} - value={searchValue} - onChange={(e) => onSearch(e.target.value)} - /> - )} - - - - {children} - - - - - - -
- ); + ...dropdownProps?.style, + }} + className={content({ + className: dropdownProps?.className, + })} + > + {onSearch && ( + { + e.stopPropagation(); + e.preventDefault(); + }} + autoFocus + icon={IconMagnifyingGlass} + placeholder={searchPlaceholder} + value={searchValue} + onChange={e => onSearch(e.target.value)} + /> + )} + + + + {children} + + + + + + +
+ ); } export function Option({ children, ...props }: ComponentProps) { - const hasSingleChildren = Children.count(children) <= 1; - return ( - + + - - - {children} - - - - ); + {children} + + + + ); } diff --git a/packages/ui/src/Atoms/Sidebar/Sidebar.stories.tsx b/packages/ui/src/Atoms/Sidebar/Sidebar.stories.tsx index 0f80da8eb..f22203258 100644 --- a/packages/ui/src/Atoms/Sidebar/Sidebar.stories.tsx +++ b/packages/ui/src/Atoms/Sidebar/Sidebar.stories.tsx @@ -5,17 +5,17 @@ import { SidebarItem } from "./SidebarItem"; import { IconBank } from "../Icons/IconBank.tsx"; const meta: Meta = { - component: Sidebar, - subcomponents: { SidebarItem }, + component: Sidebar, + subcomponents: { SidebarItem }, }; export default meta; type Story = StoryObj; export const Default: Story = { - render: (args) => ( - - - - ), + render: args => ( + + + + ), }; diff --git a/packages/ui/src/Atoms/Sidebar/Sidebar.tsx b/packages/ui/src/Atoms/Sidebar/Sidebar.tsx index 231c57bbe..0e6f50883 100644 --- a/packages/ui/src/Atoms/Sidebar/Sidebar.tsx +++ b/packages/ui/src/Atoms/Sidebar/Sidebar.tsx @@ -1,8 +1,8 @@ import { - createContext, - type PropsWithChildren, - useContext, - useState, + createContext, + type PropsWithChildren, + useContext, + useState, } from "react"; import { clsx } from "clsx"; import { IconCollapse, IconExpand } from "../Icons"; @@ -11,42 +11,42 @@ import { Button } from "../Button/Button"; const sidebarContext = createContext({ open: true }); function useSidebarState() { - const [open, setOpenState] = useState(() => { - const stored = localStorage.getItem("sidebar-open"); - return stored !== null ? JSON.parse(stored) : true; - }); + const [open, setOpenState] = useState(() => { + const stored = localStorage.getItem("sidebar-open"); + return stored !== null ? !!JSON.parse(stored) : true; + }); - const setOpen = (value: boolean) => { - setOpenState(value); + const setOpen = (value: boolean) => { + setOpenState(value); - localStorage.setItem("sidebar-open", JSON.stringify(value)); - }; + localStorage.setItem("sidebar-open", JSON.stringify(value)); + }; - return [open, setOpen] as const; + return [open, setOpen] as const; } export function Sidebar({ children }: PropsWithChildren) { - const [open, setOpen] = useSidebarState(); - return ( - - - - ); + const [open, setOpen] = useSidebarState(); + return ( + + + + ); } export function useSidebarCollapsed(): boolean { - return !useContext(sidebarContext).open; + return !useContext(sidebarContext).open; } diff --git a/packages/ui/src/Atoms/Sidebar/SidebarItem.tsx b/packages/ui/src/Atoms/Sidebar/SidebarItem.tsx index 4e44c9c6a..3e9c34ae3 100644 --- a/packages/ui/src/Atoms/Sidebar/SidebarItem.tsx +++ b/packages/ui/src/Atoms/Sidebar/SidebarItem.tsx @@ -4,42 +4,41 @@ import { NavLink } from "react-router"; import { useSidebarCollapsed } from "./Sidebar.tsx"; const sidebarItem = tv({ - base: "flex items-center gap-2 w-full py-2 rounded-full", - variants: { - active: { - true: "bg-active hover:bg-active-hover active:bg-active-pressed text-txt-primary", - false: "hover:bg-subtle-hover active:bg-subtle-pressed text-txt-tertiary", - }, - isCollapsed: { - true: "px-[10px]", - false: "px-3", - }, + base: "flex items-center gap-2 w-full py-2 rounded-full", + variants: { + active: { + true: "bg-active hover:bg-active-hover active:bg-active-pressed text-txt-primary", + false: "hover:bg-subtle-hover active:bg-subtle-pressed text-txt-tertiary", }, - defaultVariants: { - active: false, + isCollapsed: { + true: "px-[10px]", + false: "px-3", }, + }, + defaultVariants: { + active: false, + }, }); type Props = PropsWithChildren<{ - icon?: FC<{ size: number }>; - label: string; - to?: string; + icon?: FC<{ size: number }>; + label: string; + to?: string; }>; export function SidebarItem(props: Props) { - const isCollapsed = useSidebarCollapsed(); - return ( -
  • - - sidebarItem({ ...props, active: isActive, isCollapsed }) - } - > - {props.icon && } - {isCollapsed ? null : props.label} - - {props.children &&
      {props.children}
    } -
  • - ); + const isCollapsed = useSidebarCollapsed(); + return ( +
  • + + sidebarItem({ ...props, active: isActive, isCollapsed })} + > + {props.icon && } + {isCollapsed ? null : props.label} + + {props.children &&
      {props.children}
    } +
  • + ); } diff --git a/packages/ui/src/Atoms/Skeleton/Skeleton.stories.tsx b/packages/ui/src/Atoms/Skeleton/Skeleton.stories.tsx index ed45dc617..11b2f6b8c 100644 --- a/packages/ui/src/Atoms/Skeleton/Skeleton.stories.tsx +++ b/packages/ui/src/Atoms/Skeleton/Skeleton.stories.tsx @@ -2,15 +2,15 @@ import { Skeleton } from "./Skeleton"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Skeleton", - component: Skeleton, - argTypes: {}, + title: "Atoms/Skeleton", + component: Skeleton, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - args: { - className: "w-50 h-4", - }, + args: { + className: "w-50 h-4", + }, }; diff --git a/packages/ui/src/Atoms/Skeleton/Skeleton.tsx b/packages/ui/src/Atoms/Skeleton/Skeleton.tsx index 3f8717ae9..f0dda44d0 100644 --- a/packages/ui/src/Atoms/Skeleton/Skeleton.tsx +++ b/packages/ui/src/Atoms/Skeleton/Skeleton.tsx @@ -1,16 +1,16 @@ import { clsx } from "clsx"; export function Skeleton({ - className, - ...props + className, + ...props }: React.HTMLAttributes) { - return ( -
    - ); + return ( +
    + ); } diff --git a/packages/ui/src/Atoms/Slot.tsx b/packages/ui/src/Atoms/Slot.tsx index 430212e25..bb4f7b976 100644 --- a/packages/ui/src/Atoms/Slot.tsx +++ b/packages/ui/src/Atoms/Slot.tsx @@ -1,29 +1,23 @@ import clsx from "clsx"; -import React from "react"; import { cloneElement, isValidElement, Children } from "react"; -import type { ReactNode } from "react"; +import type { PropsWithChildren, ReactNode } from "react"; -export type AsChildProps = - | ({ asChild?: false } & DefaultElementProps) +export type AsChildProps + = | ({ asChild?: false } & DefaultElementProps) | ({ asChild: true; children: ReactNode } & DefaultElementProps); export function Slot({ - children, - ...props -}: React.HTMLAttributes & { - children?: ReactNode; -}) { - if (isValidElement(children)) { - return cloneElement(children, { - ...props, - // @ts-expect-error children.props can be undefined it's ok - ...children.props, - // @ts-expect-error children.props.className can be undefined it's ok - className: clsx(props.className, children.props.className), - }); - } - if (Children.count(children) > 1) { - Children.only(null); - } - return null; + children, + ...props +}: PropsWithChildren<{ className?: string | undefined } & Record>) { + if (isValidElement<{ className?: string | undefined } & Record>(children)) { + return cloneElement(children, { + ...props, + className: clsx(props.className, children.props.className), + }); + } + if (Children.count(children) > 1) { + Children.only(null); + } + return null; } diff --git a/packages/ui/src/Atoms/Spinner/Spinner.stories.tsx b/packages/ui/src/Atoms/Spinner/Spinner.stories.tsx index 6d5856208..6371b0f21 100644 --- a/packages/ui/src/Atoms/Spinner/Spinner.stories.tsx +++ b/packages/ui/src/Atoms/Spinner/Spinner.stories.tsx @@ -2,9 +2,9 @@ import { Spinner } from "./Spinner"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Spinner", - component: Spinner, - argTypes: {}, + title: "Atoms/Spinner", + component: Spinner, + argTypes: {}, } satisfies Meta; type Story = StoryObj; diff --git a/packages/ui/src/Atoms/Spinner/Spinner.tsx b/packages/ui/src/Atoms/Spinner/Spinner.tsx index f0ec16424..7904ff400 100644 --- a/packages/ui/src/Atoms/Spinner/Spinner.tsx +++ b/packages/ui/src/Atoms/Spinner/Spinner.tsx @@ -3,14 +3,14 @@ import clsx from "clsx"; type Props = { size?: number; className?: string; centered?: boolean }; export function Spinner({ size = 16, className, centered }: Props) { - return ( -
    - ); + return ( +
    + ); } diff --git a/packages/ui/src/Atoms/Table/Table.stories.tsx b/packages/ui/src/Atoms/Table/Table.stories.tsx index 9b139cb60..3f06d7ae6 100644 --- a/packages/ui/src/Atoms/Table/Table.stories.tsx +++ b/packages/ui/src/Atoms/Table/Table.stories.tsx @@ -2,40 +2,40 @@ import { Table, Tbody, Td, Th, Thead, Tr, TrButton } from "./Table"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Table", - component: Table, - argTypes: {}, + title: "Atoms/Table", + component: Table, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - render: () => { - return ( - - - - - - - - - - - - - - - - - - - - {}} colspan={3}> - Add row - - -
    Header 1Header 2Header 3
    Row 1, Cell 1Row 1, Cell 2Row 1, Cell 3
    Row 2, Cell 1Row 2, Cell 2Row 2, Cell 3
    - ); - }, + render: () => { + return ( + + + + + + + + + + + + + + + + + + + + {}} colspan={3}> + Add row + + +
    Header 1Header 2Header 3
    Row 1, Cell 1Row 1, Cell 2Row 1, Cell 3
    Row 2, Cell 1Row 2, Cell 2Row 2, Cell 3
    + ); + }, }; diff --git a/packages/ui/src/Atoms/Table/Table.tsx b/packages/ui/src/Atoms/Table/Table.tsx index 418596f63..e64ebd9e6 100644 --- a/packages/ui/src/Atoms/Table/Table.tsx +++ b/packages/ui/src/Atoms/Table/Table.tsx @@ -1,11 +1,11 @@ import { - createContext, - type FC, - type HTMLAttributes, - type PropsWithChildren, - type ReactNode, - type ThHTMLAttributes, - useContext, + createContext, + type FC, + type HTMLAttributes, + type PropsWithChildren, + type ReactNode, + type ThHTMLAttributes, + useContext, } from "react"; import { Card } from "../Card/Card"; import { Link } from "react-router"; @@ -13,146 +13,146 @@ import clsx from "clsx"; import { IconPlusLarge } from "../Icons"; export function Table({ - children, - className, + children, + className, }: PropsWithChildren<{ className?: string }>) { - return ( - - {children}
    -
    - ); + return ( + + {children}
    +
    + ); } export function Thead({ - children, - className, + children, + className, }: PropsWithChildren<{ className?: string }>) { - return ( - - {children} - - ); + return ( + + {children} + + ); } export function Th({ - children, - className, - width, - compact, - ...props + children, + className, + width, + compact, + ...props }: { - className?: string; - width?: number; - colspan?: number; - compact?: boolean; + className?: string; + width?: number; + colspan?: number; + compact?: boolean; } & ThHTMLAttributes) { - return ( - - {children} - - ); + return ( + + {children} + + ); } const TrContext = createContext({} as { to?: string }); export function Tr({ - to, - className, - ...props + to, + className, + ...props }: { to?: string } & HTMLAttributes) { - return ( - - - - ); + return ( + + + + ); } export function Tbody({ children }: PropsWithChildren) { - return ( - - {children} - - ); + return ( + + {children} + + ); } export function Td({ - children, - noLink, - className, - width, - ...props + children, + noLink, + className, + width, + ...props }: { - noLink?: boolean; - width?: number; - colSpan?: number; + noLink?: boolean; + width?: number; + colSpan?: number; } & HTMLAttributes) { - const { to } = useContext(TrContext); - if (!to || noLink) { - return ( - - {children} - - ); - } + const { to } = useContext(TrContext); + if (!to || noLink) { return ( - - - {children} - - + + {children} + ); + } + return ( + + + {children} + + + ); } export function TrButton({ - icon = IconPlusLarge, - children, - colspan, - ...props + icon = IconPlusLarge, + children, + colspan, + ...props }: { - colspan?: number; - children: ReactNode; - icon?: FC<{ size: number; className?: string }>; + colspan?: number; + children: ReactNode; + icon?: FC<{ size: number; className?: string }>; } & HTMLAttributes) { - const IconComponent = icon; - return ( - - - - - - ); + const IconComponent = icon; + return ( + + + + + + ); } diff --git a/packages/ui/src/Atoms/Tabs/Tabs.stories.tsx b/packages/ui/src/Atoms/Tabs/Tabs.stories.tsx index fe9a0984d..30f8cf750 100644 --- a/packages/ui/src/Atoms/Tabs/Tabs.stories.tsx +++ b/packages/ui/src/Atoms/Tabs/Tabs.stories.tsx @@ -2,21 +2,23 @@ import { Tabs, TabLink, TabBadge } from "./Tabs"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Tabs", - component: Tabs, - argTypes: {}, + title: "Atoms/Tabs", + component: Tabs, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = { - render: () => ( - - Tab 1 - Tab 2 - - Tab 3 3 - - - ), + render: () => ( + + Tab 1 + Tab 2 + + Tab 3 + {" "} + 3 + + + ), }; diff --git a/packages/ui/src/Atoms/Tabs/Tabs.tsx b/packages/ui/src/Atoms/Tabs/Tabs.tsx index 880529214..c49d1d955 100644 --- a/packages/ui/src/Atoms/Tabs/Tabs.tsx +++ b/packages/ui/src/Atoms/Tabs/Tabs.tsx @@ -5,51 +5,51 @@ import { Slot, type AsChildProps } from "../Slot"; import { tv } from "tailwind-variants"; const cls = tv({ - slots: { - wrapper: + slots: { + wrapper: "border-b border-border-low flex gap-6 text-sm font-medium text-txt-secondary", - item: "py-4 hover:text-txt-primary border-b-2 active:border-border-active -mb-[1px] active:text-txt-primary flex items-center gap-2 cursor-pointer", - badge: "py-1 px-2 text-txt-secondary text-xs font-semibold rounded-lg bg-highlight", - }, - variants: { - active: { - true: { - item: "border-border-active text-txt-primary", - wrapper: "border-border-active", - }, - false: { - item: "border-transparent", - }, - }, + item: "py-4 hover:text-txt-primary border-b-2 active:border-border-active -mb-[1px] active:text-txt-primary flex items-center gap-2 cursor-pointer", + badge: "py-1 px-2 text-txt-secondary text-xs font-semibold rounded-lg bg-highlight", + }, + variants: { + active: { + true: { + item: "border-border-active text-txt-primary", + wrapper: "border-border-active", + }, + false: { + item: "border-transparent", + }, }, + }, })(); export function Tabs(props: HTMLAttributes) { - return ( - - - - ); + return ( + + + + ); } export function TabItem({ - asChild, - active, - ...props + asChild, + active, + ...props }: AsChildProps<{ active?: boolean; onClick?: () => void }>) { - const Component = asChild ? Slot : "div"; - return ; + const Component = asChild ? Slot : "div"; + return ; } export function TabLink(props: PropsWithChildren boolean }>) { - return ( - cls.item({ active: params.isActive })} - {...props} - /> - ); + return ( + cls.item({ active: params.isActive })} + {...props} + /> + ); } export function TabBadge(props: PropsWithChildren) { - return {props.children}; + return {props.children}; } diff --git a/packages/ui/src/Atoms/Textarea/Textarea.stories.tsx b/packages/ui/src/Atoms/Textarea/Textarea.stories.tsx index 9d3c2ccfc..2762bc457 100644 --- a/packages/ui/src/Atoms/Textarea/Textarea.stories.tsx +++ b/packages/ui/src/Atoms/Textarea/Textarea.stories.tsx @@ -2,16 +2,16 @@ import { Textarea } from "./Textarea"; import type { Meta, StoryObj } from "@storybook/react"; export default { - title: "Atoms/Form/Textarea", - component: Textarea, - argTypes: {}, + title: "Atoms/Form/Textarea", + component: Textarea, + argTypes: {}, } satisfies Meta; type Story = StoryObj; export const Default: Story = {}; export const Autogrow: Story = { - args: { - autogrow: true, - }, + args: { + autogrow: true, + }, }; diff --git a/packages/ui/src/Atoms/Textarea/Textarea.tsx b/packages/ui/src/Atoms/Textarea/Textarea.tsx index f7843dbf4..2ab3b61a8 100644 --- a/packages/ui/src/Atoms/Textarea/Textarea.tsx +++ b/packages/ui/src/Atoms/Textarea/Textarea.tsx @@ -1,49 +1,49 @@ import { - useRef, - type TextareaHTMLAttributes, - type RefCallback, - useLayoutEffect, - useCallback, + useRef, + type TextareaHTMLAttributes, + type RefCallback, + useLayoutEffect, + useCallback, } from "react"; import { input } from "../Input/Input"; import clsx from "clsx"; type Props = TextareaHTMLAttributes & { - variant?: "bordered" | "ghost" | "title"; - autogrow?: boolean; - ref?: RefCallback; + variant?: "bordered" | "ghost" | "title"; + autogrow?: boolean; + ref?: RefCallback; }; export function Textarea(props: Props) { - const ref = useRef(null); - const { autogrow, ref: propsRef, ...restProps } = props; + const ref = useRef(null); + const { autogrow, ref: propsRef, ...restProps } = props; - const adjustHeight = useCallback(() => { - if (!autogrow || !ref.current) return; - ref.current.style.height = "inherit"; - const paddingY = 2; - ref.current.style.height = `${ref.current.scrollHeight + paddingY * 2}px`; - }, [autogrow, ref]); + const adjustHeight = useCallback(() => { + if (!autogrow || !ref.current) return; + ref.current.style.height = "inherit"; + const paddingY = 2; + ref.current.style.height = `${ref.current.scrollHeight + paddingY * 2}px`; + }, [autogrow, ref]); - useLayoutEffect(() => { + useLayoutEffect(() => { + adjustHeight(); + }, [adjustHeight]); + + return ( +