Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

refactor: drop tailwind from radix package (#4704)

Bogdan Chadkinee89198084d5
diff --git a/packages/sdk-components-react-radix/package.json b/packages/sdk-components-react-radix/package.json
index 6c345ffe12..663385987c 100644
--- a/packages/sdk-components-react-radix/package.json
+++ b/packages/sdk-components-react-radix/package.json
@@ -42,7 +42,6 @@
"scripts": {
"build": "vite build --config ../../vite.sdk-components.config.ts",
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts !./src/*.test.{ts,tsx}' -e asChild -e modal -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
- "build:tailwind": "tsx --conditions=webstudio scripts/generate-tailwind-theme.ts && prettier --write src/theme/__generated__",
"build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
"dts": "tsc --project tsconfig.dts.json",
"typecheck": "tsc"
@@ -81,7 +80,6 @@
"@webstudio-is/template": "workspace:*",
"@webstudio-is/tsconfig": "workspace:*",
"react": "18.3.0-canary-14898b6a9-20240318",
- "react-dom": "18.3.0-canary-14898b6a9-20240318",
- "tailwindcss": "^3.3.3"
+ "react-dom": "18.3.0-canary-14898b6a9-20240318"
}
}
diff --git a/packages/sdk-components-react-radix/scripts/generate-tailwind-theme.ts b/packages/sdk-components-react-radix/scripts/generate-tailwind-theme.ts
deleted file mode 100644
index 851b9eb9a4..0000000000
--- a/packages/sdk-components-react-radix/scripts/generate-tailwind-theme.ts
+++ /dev/null
@@ -1,216 +0,0 @@
-import { writeFile, mkdir } from "node:fs/promises";
-// Imported theme https://github.com/tailwindlabs/tailwindcss/blob/e0c52a9332a64ef7eb0ba23d2a0fd5a16fe57ab7/stubs/config.full.js
-import defaultTheme from "tailwindcss/defaultTheme";
-import type { StyleValue, StyleProperty } from "@webstudio-is/css-engine";
-import { parseCssValue } from "@webstudio-is/css-data";
-import type { ResolvableTo } from "tailwindcss/types/config";
-import { colors as colorOverrides } from "../src/theme/tailwind-colors";
-
-const theme = {
- ...defaultTheme,
- colors: colorOverrides,
- borderRadius: {
- ...defaultTheme.borderRadius,
- DEFAULT: "0.5rem",
- },
-};
-
-type GeneratedThemeItem = {
- name: string;
- extends?: string;
- values: Record<string, StyleValue>;
-};
-
-// preparse each object value to avoid loading csstree in cli
-const parsePropertyValues = (
- property: StyleProperty,
- values: ResolvableTo<Record<string, string>> | Record<string, string>
-) => {
- return Object.fromEntries(
- Object.entries(values).map(([name, value]) => [
- name,
- parseCssValue(property, value),
- ])
- );
-};
-
-// some theme fields are functions returning values
-// usually to reuse other values like spacing in margin
-const invokeResolvable = (
- values?: ResolvableTo<Record<string, string>> | Record<string, string>
-) => {
- if (typeof values === "function") {
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore stub empty because no need to return anything
- return values({ theme: () => {}, breakpoints: () => ({}) });
- }
- return values;
-};
-
-const generatedThemeData: GeneratedThemeItem[] = [
- {
- name: "spacing",
- values: parsePropertyValues("paddingLeft", theme.spacing),
- },
- {
- name: "padding",
- extends: "spacing",
- values: {},
- },
- {
- name: "margin",
- extends: "spacing",
- values: parsePropertyValues("marginLeft", {
- ...invokeResolvable(theme.margin),
- }),
- },
- {
- name: "width",
- extends: "spacing",
- values: parsePropertyValues("width", {
- ...invokeResolvable(theme.width),
- }),
- },
- {
- name: "maxWidth",
- values: parsePropertyValues("maxWidth", {
- ...invokeResolvable(theme.maxWidth),
- }),
- },
- {
- name: "height",
- extends: "spacing",
- values: parsePropertyValues("height", {
- ...invokeResolvable(theme.height),
- }),
- },
- {
- name: "minHeight",
- values: parsePropertyValues("minHeight", {
- ...invokeResolvable(theme.minHeight),
- }),
- },
- {
- name: "inset",
- extends: "spacing",
- values: parsePropertyValues("top", {
- ...invokeResolvable(theme.inset),
- }),
- },
- {
- name: "borderWidth",
- values: parsePropertyValues("borderTopWidth", theme.borderWidth),
- },
- {
- name: "borderRadius",
- values: parsePropertyValues("borderStartStartRadius", theme.borderRadius),
- },
- {
- name: "colors",
- values: parsePropertyValues("color", theme.colors),
- },
- {
- name: "zIndex",
- values: parsePropertyValues("zIndex", theme.zIndex),
- },
- {
- name: "opacity",
- values: parsePropertyValues("opacity", theme.opacity),
- },
- {
- name: "cursor",
- values: parsePropertyValues("cursor", theme.cursor),
- },
- {
- name: "lineHeight",
- values: parsePropertyValues("lineHeight", theme.lineHeight),
- },
- {
- name: "letterSpacing",
- values: parsePropertyValues("letterSpacing", theme.letterSpacing),
- },
- {
- name: "listStyleType",
- values: parsePropertyValues("listStyleType", theme.listStyleType),
- },
- {
- name: "lineClamp",
- values: parsePropertyValues("-webkit-line-clamp", theme.lineClamp),
- },
- {
- name: "textUnderlineOffset",
- values: parsePropertyValues(
- "textUnderlineOffset",
- theme.textUnderlineOffset
- ),
- },
- {
- name: "ringWidth",
- values: parsePropertyValues("width", theme.ringWidth),
- },
- {
- name: "ringOffsetWidth",
- values: parsePropertyValues("width", theme.ringOffsetWidth),
- },
- {
- name: "boxShadow",
- // there is a special parser for shadow
- values: Object.fromEntries(
- Object.entries(theme.boxShadow).map(([name, value]) => [
- name,
- parseCssValue("boxShadow", value),
- ])
- ),
- },
- {
- name: "blur",
- values: Object.fromEntries(
- Object.entries(theme.boxShadow).map(([name, value]) => [
- name,
- // original blur theme provides pixel values
- // though they need to be represented as style value
- // so wrap with blur() and convert to unparsed
- { type: "unparsed", value: `blur(${value})` },
- ])
- ),
- },
- // fontSize use complex tuple to describe multiple values
- // here replace with 2 theme values instead
- {
- name: "fontSize",
- values: Object.fromEntries(
- Object.entries(theme.fontSize).map(([name, [fontSize]]) => [
- name,
- parseCssValue("fontSize", fontSize),
- ])
- ),
- },
- {
- name: "fontSizeLineHeight",
- values: Object.fromEntries(
- Object.entries(theme.fontSize).map(
- ([name, [_fontSize, { lineHeight }]]) => [
- name,
- parseCssValue("lineHeight", lineHeight),
- ]
- )
- ),
- },
-];
-
-let generatedTheme = "";
-generatedTheme += `import type { StyleValue } from '@webstudio-is/css-engine';\n\n`;
-for (const item of generatedThemeData) {
- const enumItems = Object.keys(item.values).map((key) => JSON.stringify(key));
- let jsonString = JSON.stringify(item.values);
- // extend both record keys and runtime values
- if (item.extends) {
- enumItems.unshift(`keyof typeof ${item.extends}`);
- jsonString = `{\n ...${item.extends},\n${jsonString.slice(1)}`;
- }
- const enumString = enumItems.join(" | ");
- generatedTheme += `export const ${item.name}: Record<${enumString}, StyleValue> = ${jsonString};\n\n`;
-}
-
-await mkdir("./src/theme/__generated__", { recursive: true });
-await writeFile("./src/theme/__generated__/tailwind-theme.ts", generatedTheme);
diff --git a/packages/sdk-components-react-radix/src/accordion.ws.ts b/packages/sdk-components-react-radix/src/accordion.ws.ts
index fece7c41d7..0f30bcdf7b 100644
--- a/packages/sdk-components-react-radix/src/accordion.ws.ts
+++ b/packages/sdk-components-react-radix/src/accordion.ws.ts
@@ -12,8 +12,7 @@ import {
type WsComponentPropsMeta,
} from "@webstudio-is/react-sdk";
import { div, h3, button } from "@webstudio-is/sdk/normalize.css";
-import * as tc from "./theme/tailwind-classes";
-import { buttonReset } from "./theme/styles";
+import { buttonReset } from "./shared/preset-styles";
import {
propsAccordion,
propsAccordionItem,
@@ -75,7 +74,17 @@ export const metaAccordionHeader: WsComponentMeta = {
},
],
presetStyle: {
- h3: [h3, tc.my(0)].flat(),
+ h3: [
+ ...h3,
+ {
+ property: "marginTop",
+ value: { type: "unit", unit: "px", value: 0 },
+ },
+ {
+ property: "marginBottom",
+ value: { type: "unit", unit: "px", value: 0 },
+ },
+ ],
},
};
diff --git a/packages/sdk-components-react-radix/src/checkbox.ws.ts b/packages/sdk-components-react-radix/src/checkbox.ws.ts
index fd3abcfd9f..01cb5ad271 100644
--- a/packages/sdk-components-react-radix/src/checkbox.ws.ts
+++ b/packages/sdk-components-react-radix/src/checkbox.ws.ts
@@ -5,7 +5,7 @@ import {
type WsComponentPropsMeta,
} from "@webstudio-is/react-sdk";
import { button, span } from "@webstudio-is/sdk/normalize.css";
-import { buttonReset } from "./theme/styles";
+import { buttonReset } from "./shared/preset-styles";
import {
propsCheckbox,
propsCheckboxIndicator,
diff --git a/packages/sdk-components-react-radix/src/dialog.ws.ts b/packages/sdk-components-react-radix/src/dialog.ws.ts
index 569b3b7eea..9b3aaa1cd6 100644
--- a/packages/sdk-components-react-radix/src/dialog.ws.ts
+++ b/packages/sdk-components-react-radix/src/dialog.ws.ts
@@ -23,7 +23,7 @@ import {
propsDialogTitle,
propsDialogDescription,
} from "./__generated__/dialog.props";
-import { buttonReset } from "./theme/styles";
+import { buttonReset } from "./shared/preset-styles";
const presetStyle = {
div,
diff --git a/packages/sdk-components-react-radix/src/radio-group.ws.ts b/packages/sdk-components-react-radix/src/radio-group.ws.ts
index cb56c4ccd8..3c8bfdc613 100644
--- a/packages/sdk-components-react-radix/src/radio-group.ws.ts
+++ b/packages/sdk-components-react-radix/src/radio-group.ws.ts
@@ -5,7 +5,7 @@ import {
type WsComponentPropsMeta,
} from "@webstudio-is/react-sdk";
import { button, div, span } from "@webstudio-is/sdk/normalize.css";
-import { buttonReset } from "./theme/styles";
+import { buttonReset } from "./shared/preset-styles";
import {
propsRadioGroup,
propsRadioGroupIndicator,
diff --git a/packages/sdk-components-react-radix/src/shared/preset-styles.ts b/packages/sdk-components-react-radix/src/shared/preset-styles.ts
new file mode 100644
index 0000000000..fef27e255e
--- /dev/null
+++ b/packages/sdk-components-react-radix/src/shared/preset-styles.ts
@@ -0,0 +1,47 @@
+// this module should not rely on "template" and other unpublished packages
+import type { StyleProperty, Unit } from "@webstudio-is/css-engine";
+import type { EmbedTemplateStyleDecl } from "@webstudio-is/react-sdk";
+
+const unit = (property: StyleProperty, value: number, unit: Unit) => ({
+ property,
+ value: { type: "unit", unit, value } as const,
+});
+
+const keyword = (property: StyleProperty, value: string) => ({
+ property,
+ value: { type: "keyword", value } as const,
+});
+
+const rgb = (property: StyleProperty, r: number, g: number, b: number) => ({
+ property,
+ value: { type: "rgb", alpha: 1, r, g, b } as const,
+});
+
+export const buttonReset: EmbedTemplateStyleDecl[] = [
+ {
+ property: "backgroundColor",
+ value: { type: "keyword", value: "transparent" },
+ },
+ {
+ property: "backgroundImage",
+ value: { type: "keyword", value: "none" },
+ },
+
+ unit("borderTopWidth", 0, "px"),
+ unit("borderRightWidth", 0, "px"),
+ unit("borderBottomWidth", 0, "px"),
+ unit("borderLeftWidth", 0, "px"),
+ keyword("borderTopStyle", "solid"),
+ keyword("borderRightStyle", "solid"),
+ keyword("borderBottomStyle", "solid"),
+ keyword("borderLeftStyle", "solid"),
+ rgb("borderTopColor", 226, 232, 240),
+ rgb("borderRightColor", 226, 232, 240),
+ rgb("borderBottomColor", 226, 232, 240),
+ rgb("borderLeftColor", 226, 232, 240),
+
+ unit("paddingTop", 0, "px"),
+ unit("paddingRight", 0, "px"),
+ unit("paddingBottom", 0, "px"),
+ unit("paddingLeft", 0, "px"),
+];
diff --git a/packages/sdk-components-react-radix/src/shared/theme.ts b/packages/sdk-components-react-radix/src/shared/theme.ts
index 5deb02ff65..e7af221ec9 100644
--- a/packages/sdk-components-react-radix/src/shared/theme.ts
+++ b/packages/sdk-components-react-radix/src/shared/theme.ts
@@ -1,71 +1,24 @@
export const fontSize = {
- xs: "0.75rem",
sm: "0.875rem",
- base: "1rem",
lg: "1.125rem",
- xl: "1.25rem",
- "2xl": "1.5rem",
- "3xl": "1.875rem",
- "4xl": "2.25rem",
- "5xl": "3rem",
- "6xl": "3.75rem",
- "7xl": "4.5rem",
- "8xl": "6rem",
- "9xl": "8rem",
} as const;
export const fontSizeLineHeight = {
- xs: "1rem",
sm: "1.25rem",
- base: "1.5rem",
lg: "1.75rem",
- xl: "1.75rem",
- "2xl": "2rem",
- "3xl": "2.25rem",
- "4xl": "2.5rem",
- "5xl": "1",
- "6xl": "1",
- "7xl": "1",
- "8xl": "1",
- "9xl": "1",
} as const;
export const lineHeight = {
- "3": "0.75rem",
- "4": "1rem",
- "5": "1.25rem",
- "6": "1.5rem",
- "7": "1.75rem",
- "8": "2rem",
- "9": "2.25rem",
- "10": "2.5rem",
none: "1",
- tight: "1.25",
snug: "1.375",
- normal: "1.5",
- relaxed: "1.625",
- loose: "2",
} as const;
export const weights = {
- thin: "100",
- extralight: "200",
- light: "300",
- normal: "400",
medium: "500",
- semibold: "600",
- bold: "700",
- extrabold: "800",
- black: "900",
} as const;
export const letterSpacing = {
- tighter: "-0.05em",
tight: "-0.025em",
- normal: "0em",
- wide: "0.025em",
- wider: "0.05em",
- widest: "0.1em",
} as const;
export const spacing = {
@@ -113,27 +66,7 @@ export const width = {
export const height = {
...spacing,
- auto: "auto",
- "1/2": "50%",
- "1/3": "33.333333%",
- "2/3": "66.666667%",
- "1/4": "25%",
- "2/4": "50%",
- "3/4": "75%",
- "1/5": "20%",
- "2/5": "40%",
- "3/5": "60%",
- "4/5": "80%",
- "1/6": "16.666667%",
- "2/6": "33.333333%",
- "3/6": "50%",
- "4/6": "66.666667%",
- "5/6": "83.333333%",
full: "100%",
- screen: "100vh",
- min: "min-content",
- max: "max-content",
- fit: "fit-content",
} as const;
export const maxWidth = {
@@ -143,16 +76,6 @@ export const maxWidth = {
md: "28rem",
lg: "32rem",
xl: "36rem",
- "2xl": "42rem",
- "3xl": "48rem",
- "4xl": "56rem",
- "5xl": "64rem",
- "6xl": "72rem",
- "7xl": "80rem",
- full: "100%",
- min: "min-content",
- max: "max-content",
- fit: "fit-content",
prose: "65ch",
} as const;
@@ -165,14 +88,8 @@ export const borderWidth = {
};
export const borderRadius = {
- none: "0px",
sm: "0.125rem",
- DEFAULT: "0.5rem",
md: "0.375rem",
- lg: "0.5rem",
- xl: "0.75rem",
- "2xl": "1rem",
- "3xl": "1.5rem",
full: "9999px",
} as const;
@@ -241,13 +158,8 @@ const ringOffsetWidth = {
export const boxShadow = {
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
- DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
- xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
- "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
- inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
- none: "none",
// 0 0 0 ringOffsetWidth ringOffsetColor
// 0 0 0 ringWidth + ringOffsetWidth ringColor
ring:
@@ -266,12 +178,4 @@ export const zIndex = {
export const blur = {
sm: "blur(0 1px 2px 0 rgb(0 0 0 / 0.05))",
- DEFAULT:
- "blur(0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1))",
- md: "blur(0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))",
- lg: "blur(0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))",
- xl: "blur(0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1))",
- "2xl": "blur(0 25px 50px -12px rgb(0 0 0 / 0.25))",
- inner: "blur(inset 0 2px 4px 0 rgb(0 0 0 / 0.05))",
- none: "blur(none)",
};
diff --git a/packages/sdk-components-react-radix/src/switch.ws.ts b/packages/sdk-components-react-radix/src/switch.ws.ts
index f5d7925922..6073ef11ed 100644
--- a/packages/sdk-components-react-radix/src/switch.ws.ts
+++ b/packages/sdk-components-react-radix/src/switch.ws.ts
@@ -5,7 +5,7 @@ import {
type WsComponentPropsMeta,
} from "@webstudio-is/react-sdk";
import { button, span } from "@webstudio-is/sdk/normalize.css";
-import { buttonReset } from "./theme/styles";
+import { buttonReset } from "./shared/preset-styles";
import { propsSwitch, propsSwitchThumb } from "./__generated__/switch.props";
export const metaSwitch: WsComponentMeta = {
diff --git a/packages/sdk-components-react-radix/src/tabs.ws.ts b/packages/sdk-components-react-radix/src/tabs.ws.ts
index c58ecb4520..12938482e3 100644
--- a/packages/sdk-components-react-radix/src/tabs.ws.ts
+++ b/packages/sdk-components-react-radix/src/tabs.ws.ts
@@ -11,7 +11,7 @@ import {
type WsComponentPropsMeta,
} from "@webstudio-is/react-sdk";
import { button, div } from "@webstudio-is/sdk/normalize.css";
-import { buttonReset } from "./theme/styles";
+import { buttonReset } from "./shared/preset-styles";
import {
propsTabs,
propsTabsList,
diff --git a/packages/sdk-components-react-radix/src/theme/__generated__/tailwind-theme.ts b/packages/sdk-components-react-radix/src/theme/__generated__/tailwind-theme.ts
deleted file mode 100644
index 3ef6ffa5cf..0000000000
--- a/packages/sdk-components-react-radix/src/theme/__generated__/tailwind-theme.ts
+++ /dev/null
@@ -1,825 +0,0 @@
-import type { StyleValue } from "@webstudio-is/css-engine";
-
-export const spacing: Record<
- | "0"
- | "1"
- | "2"
- | "3"
- | "4"
- | "5"
- | "6"
- | "7"
- | "8"
- | "9"
- | "10"
- | "11"
- | "12"
- | "14"
- | "16"
- | "20"
- | "24"
- | "28"
- | "32"
- | "36"
- | "40"
- | "44"
- | "48"
- | "52"
- | "56"
- | "60"
- | "64"
- | "72"
- | "80"
- | "96"
- | "px"
- | "0.5"
- | "1.5"
- | "2.5"
- | "3.5",
- StyleValue
-> = {
- "0": { type: "unit", unit: "px", value: 0 },
- "1": { type: "unit", unit: "rem", value: 0.25 },
- "2": { type: "unit", unit: "rem", value: 0.5 },
- "3": { type: "unit", unit: "rem", value: 0.75 },
- "4": { type: "unit", unit: "rem", value: 1 },
- "5": { type: "unit", unit: "rem", value: 1.25 },
- "6": { type: "unit", unit: "rem", value: 1.5 },
- "7": { type: "unit", unit: "rem", value: 1.75 },
- "8": { type: "unit", unit: "rem", value: 2 },
- "9": { type: "unit", unit: "rem", value: 2.25 },
- "10": { type: "unit", unit: "rem", value: 2.5 },
- "11": { type: "unit", unit: "rem", value: 2.75 },
- "12": { type: "unit", unit: "rem", value: 3 },
- "14": { type: "unit", unit: "rem", value: 3.5 },
- "16": { type: "unit", unit: "rem", value: 4 },
- "20": { type: "unit", unit: "rem", value: 5 },
- "24": { type: "unit", unit: "rem", value: 6 },
- "28": { type: "unit", unit: "rem", value: 7 },
- "32": { type: "unit", unit: "rem", value: 8 },
- "36": { type: "unit", unit: "rem", value: 9 },
- "40": { type: "unit", unit: "rem", value: 10 },
- "44": { type: "unit", unit: "rem", value: 11 },
- "48": { type: "unit", unit: "rem", value: 12 },
- "52": { type: "unit", unit: "rem", value: 13 },
- "56": { type: "unit", unit: "rem", value: 14 },
- "60": { type: "unit", unit: "rem", value: 15 },
- "64": { type: "unit", unit: "rem", value: 16 },
- "72": { type: "unit", unit: "rem", value: 18 },
- "80": { type: "unit", unit: "rem", value: 20 },
- "96": { type: "unit", unit: "rem", value: 24 },
- px: { type: "unit", unit: "px", value: 1 },
- "0.5": { type: "unit", unit: "rem", value: 0.125 },
- "1.5": { type: "unit", unit: "rem", value: 0.375 },
- "2.5": { type: "unit", unit: "rem", value: 0.625 },
- "3.5": { type: "unit", unit: "rem", value: 0.875 },
-};
-
-export const padding: Record<keyof typeof spacing, StyleValue> = {
- ...spacing,
-};
-
-export const margin: Record<keyof typeof spacing | "auto", StyleValue> = {
- ...spacing,
- auto: { type: "keyword", value: "auto" },
-};
-
-export const width: Record<
- | keyof typeof spacing
- | "auto"
- | "1/2"
- | "1/3"
- | "2/3"
- | "1/4"
- | "2/4"
- | "3/4"
- | "1/5"
- | "2/5"
- | "3/5"
- | "4/5"
- | "1/6"
- | "2/6"
- | "3/6"
- | "4/6"
- | "5/6"
- | "1/12"
- | "2/12"
- | "3/12"
- | "4/12"
- | "5/12"
- | "6/12"
- | "7/12"
- | "8/12"
- | "9/12"
- | "10/12"
- | "11/12"
- | "full"
- | "screen"
- | "min"
- | "max"
- | "fit",
- StyleValue
-> = {
- ...spacing,
- auto: { type: "keyword", value: "auto" },
- "1/2": { type: "unit", unit: "%", value: 50 },
- "1/3": { type: "unit", unit: "%", value: 33.333333 },
- "2/3": { type: "unit", unit: "%", value: 66.666667 },
- "1/4": { type: "unit", unit: "%", value: 25 },
- "2/4": { type: "unit", unit: "%", value: 50 },
- "3/4": { type: "unit", unit: "%", value: 75 },
- "1/5": { type: "unit", unit: "%", value: 20 },
- "2/5": { type: "unit", unit: "%", value: 40 },
- "3/5": { type: "unit", unit: "%", value: 60 },
- "4/5": { type: "unit", unit: "%", value: 80 },
- "1/6": { type: "unit", unit: "%", value: 16.666667 },
- "2/6": { type: "unit", unit: "%", value: 33.333333 },
- "3/6": { type: "unit", unit: "%", value: 50 },
- "4/6": { type: "unit", unit: "%", value: 66.666667 },
- "5/6": { type: "unit", unit: "%", value: 83.333333 },
- "1/12": { type: "unit", unit: "%", value: 8.333333 },
- "2/12": { type: "unit", unit: "%", value: 16.666667 },
- "3/12": { type: "unit", unit: "%", value: 25 },
- "4/12": { type: "unit", unit: "%", value: 33.333333 },
- "5/12": { type: "unit", unit: "%", value: 41.666667 },
- "6/12": { type: "unit", unit: "%", value: 50 },
- "7/12": { type: "unit", unit: "%", value: 58.333333 },
- "8/12": { type: "unit", unit: "%", value: 66.666667 },
- "9/12": { type: "unit", unit: "%", value: 75 },
- "10/12": { type: "unit", unit: "%", value: 83.333333 },
- "11/12": { type: "unit", unit: "%", value: 91.666667 },
- full: { type: "unit", unit: "%", value: 100 },
- screen: { type: "unit", unit: "vw", value: 100 },
- min: { type: "keyword", value: "min-content" },
- max: { type: "keyword", value: "max-content" },
- fit: { type: "keyword", value: "fit-content" },
-};
-
-export const maxWidth: Record<
- | "0"
- | "none"
- | "xs"
- | "sm"
- | "md"
- | "lg"
- | "xl"
- | "2xl"
- | "3xl"
- | "4xl"
- | "5xl"
- | "6xl"
- | "7xl"
- | "full"
- | "min"
- | "max"
- | "fit"
- | "prose",
- StyleValue
-> = {
- "0": { type: "unit", unit: "rem", value: 0 },
- none: { type: "keyword", value: "none" },
- xs: { type: "unit", unit: "rem", value: 20 },
- sm: { type: "unit", unit: "rem", value: 24 },
- md: { type: "unit", unit: "rem", value: 28 },
- lg: { type: "unit", unit: "rem", value: 32 },
- xl: { type: "unit", unit: "rem", value: 36 },
- "2xl": { type: "unit", unit: "rem", value: 42 },
- "3xl": { type: "unit", unit: "rem", value: 48 },
- "4xl": { type: "unit", unit: "rem", value: 56 },
- "5xl": { type: "unit", unit: "rem", value: 64 },
- "6xl": { type: "unit", unit: "rem", value: 72 },
- "7xl": { type: "unit", unit: "rem", value: 80 },
- full: { type: "unit", unit: "%", value: 100 },
- min: { type: "keyword", value: "min-content" },
- max: { type: "keyword", value: "max-content" },
- fit: { type: "keyword", value: "fit-content" },
- prose: { type: "unit", unit: "ch", value: 65 },
-};
-
-export const height: Record<
- | keyof typeof spacing
- | "auto"
- | "1/2"
- | "1/3"
- | "2/3"
- | "1/4"
- | "2/4"
- | "3/4"
- | "1/5"
- | "2/5"
- | "3/5"
- | "4/5"
- | "1/6"
- | "2/6"
- | "3/6"
- | "4/6"
- | "5/6"
- | "full"
- | "screen"
- | "min"
- | "max"
- | "fit",
- StyleValue
-> = {
- ...spacing,
- auto: { type: "keyword", value: "auto" },
- "1/2": { type: "unit", unit: "%", value: 50 },
- "1/3": { type: "unit", unit: "%", value: 33.333333 },
- "2/3": { type: "unit", unit: "%", value: 66.666667 },
- "1/4": { type: "unit", unit: "%", value: 25 },
- "2/4": { type: "unit", unit: "%", value: 50 },
- "3/4": { type: "unit", unit: "%", value: 75 },
- "1/5": { type: "unit", unit: "%", value: 20 },
- "2/5": { type: "unit", unit: "%", value: 40 },
- "3/5": { type: "unit", unit: "%", value: 60 },
- "4/5": { type: "unit", unit: "%", value: 80 },
- "1/6": { type: "unit", unit: "%", value: 16.666667 },
- "2/6": { type: "unit", unit: "%", value: 33.333333 },
- "3/6": { type: "unit", unit: "%", value: 50 },
- "4/6": { type: "unit", unit: "%", value: 66.666667 },
- "5/6": { type: "unit", unit: "%", value: 83.333333 },
- full: { type: "unit", unit: "%", value: 100 },
- screen: { type: "unit", unit: "vh", value: 100 },
- min: { type: "keyword", value: "min-content" },
- max: { type: "keyword", value: "max-content" },
- fit: { type: "keyword", value: "fit-content" },
-};
-
-export const minHeight: Record<
- "0" | "full" | "screen" | "min" | "max" | "fit",
- StyleValue
-> = {
- "0": { type: "unit", unit: "px", value: 0 },
- full: { type: "unit", unit: "%", value: 100 },
- screen: { type: "unit", unit: "vh", value: 100 },
- min: { type: "keyword", value: "min-content" },
- max: { type: "keyword", value: "max-content" },
- fit: { type: "keyword", value: "fit-content" },
-};
-
-export const inset: Record<
- | keyof typeof spacing
- | "auto"
- | "1/2"
- | "1/3"
- | "2/3"
- | "1/4"
- | "2/4"
- | "3/4"
- | "full",
- StyleValue
-> = {
- ...spacing,
- auto: { type: "keyword", value: "auto" },
- "1/2": { type: "unit", unit: "%", value: 50 },
- "1/3": { type: "unit", unit: "%", value: 33.333333 },
- "2/3": { type: "unit", unit: "%", value: 66.666667 },
- "1/4": { type: "unit", unit: "%", value: 25 },
- "2/4": { type: "unit", unit: "%", value: 50 },
- "3/4": { type: "unit", unit: "%", value: 75 },
- full: { type: "unit", unit: "%", value: 100 },
-};
-
-export const borderWidth: Record<
- "0" | "2" | "4" | "8" | "DEFAULT",
- StyleValue
-> = {
- "0": { type: "unit", unit: "px", value: 0 },
- "2": { type: "unit", unit: "px", value: 2 },
- "4": { type: "unit", unit: "px", value: 4 },
- "8": { type: "unit", unit: "px", value: 8 },
- DEFAULT: { type: "unit", unit: "px", value: 1 },
-};
-
-export const borderRadius: Record<
- "none" | "sm" | "DEFAULT" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full",
- StyleValue
-> = {
- none: { type: "unit", unit: "px", value: 0 },
- sm: { type: "unit", unit: "rem", value: 0.125 },
- DEFAULT: { type: "unit", unit: "rem", value: 0.5 },
- md: { type: "unit", unit: "rem", value: 0.375 },
- lg: { type: "unit", unit: "rem", value: 0.5 },
- xl: { type: "unit", unit: "rem", value: 0.75 },
- "2xl": { type: "unit", unit: "rem", value: 1 },
- "3xl": { type: "unit", unit: "rem", value: 1.5 },
- full: { type: "unit", unit: "px", value: 9999 },
-};
-
-export const colors: Record<
- | "transparent"
- | "current"
- | "inherit"
- | "popover"
- | "popoverForeground"
- | "border"
- | "background"
- | "foreground"
- | "ring"
- | "mutedForeground"
- | "muted"
- | "primary"
- | "primaryForeground"
- | "destructive"
- | "destructiveForeground"
- | "accent"
- | "accentForeground"
- | "input"
- | "secondary"
- | "secondaryForeground",
- StyleValue
-> = {
- transparent: { type: "keyword", value: "transparent" },
- current: { type: "keyword", value: "currentColor" },
- inherit: { type: "keyword", value: "inherit" },
- popover: { type: "rgb", alpha: 1, r: 255, g: 255, b: 255 },
- popoverForeground: { type: "rgb", alpha: 1, r: 2, g: 8, b: 23 },
- border: { type: "rgb", alpha: 1, r: 226, g: 232, b: 240 },
- background: { type: "rgb", alpha: 1, r: 255, g: 255, b: 255 },
- foreground: { type: "rgb", alpha: 1, r: 2, g: 8, b: 23 },
- ring: { type: "rgb", alpha: 1, r: 148, g: 163, b: 184 },
- mutedForeground: { type: "rgb", alpha: 1, r: 100, g: 116, b: 139 },
- muted: { type: "rgb", alpha: 1, r: 241, g: 245, b: 249 },
- primary: { type: "rgb", alpha: 1, r: 15, g: 23, b: 42 },
- primaryForeground: { type: "rgb", alpha: 1, r: 248, g: 250, b: 252 },
- destructive: { type: "rgb", alpha: 1, r: 239, g: 68, b: 68 },
- destructiveForeground: { type: "rgb", alpha: 1, r: 248, g: 250, b: 252 },
- accent: { type: "rgb", alpha: 1, r: 241, g: 245, b: 249 },
- accentForeground: { type: "rgb", alpha: 1, r: 15, g: 23, b: 42 },
- input: { type: "rgb", alpha: 1, r: 226, g: 232, b: 240 },
- secondary: { type: "rgb", alpha: 1, r: 241, g: 245, b: 249 },
- secondaryForeground: { type: "rgb", alpha: 1, r: 15, g: 23, b: 42 },
-};
-
-export const zIndex: Record<
- "0" | "10" | "20" | "30" | "40" | "50" | "auto",
- StyleValue
-> = {
- "0": { type: "unit", unit: "number", value: 0 },
- "10": { type: "unit", unit: "number", value: 10 },
- "20": { type: "unit", unit: "number", value: 20 },
- "30": { type: "unit", unit: "number", value: 30 },
- "40": { type: "unit", unit: "number", value: 40 },
- "50": { type: "unit", unit: "number", value: 50 },
- auto: { type: "keyword", value: "auto" },
-};
-
-export const opacity: Record<
- | "0"
- | "5"
- | "10"
- | "20"
- | "25"
- | "30"
- | "40"
- | "50"
- | "60"
- | "70"
- | "75"
- | "80"
- | "90"
- | "95"
- | "100",
- StyleValue
-> = {
- "0": { type: "unit", unit: "number", value: 0 },
- "5": { type: "unit", unit: "number", value: 0.05 },
- "10": { type: "unit", unit: "number", value: 0.1 },
- "20": { type: "unit", unit: "number", value: 0.2 },
- "25": { type: "unit", unit: "number", value: 0.25 },
- "30": { type: "unit", unit: "number", value: 0.3 },
- "40": { type: "unit", unit: "number", value: 0.4 },
- "50": { type: "unit", unit: "number", value: 0.5 },
- "60": { type: "unit", unit: "number", value: 0.6 },
- "70": { type: "unit", unit: "number", value: 0.7 },
- "75": { type: "unit", unit: "number", value: 0.75 },
- "80": { type: "unit", unit: "number", value: 0.8 },
- "90": { type: "unit", unit: "number", value: 0.9 },
- "95": { type: "unit", unit: "number", value: 0.95 },
- "100": { type: "unit", unit: "number", value: 1 },
-};
-
-export const cursor: Record<
- | "auto"
- | "default"
- | "pointer"
- | "wait"
- | "text"
- | "move"
- | "help"
- | "not-allowed"
- | "none"
- | "context-menu"
- | "progress"
- | "cell"
- | "crosshair"
- | "vertical-text"
- | "alias"
- | "copy"
- | "no-drop"
- | "grab"
- | "grabbing"
- | "all-scroll"
- | "col-resize"
- | "row-resize"
- | "n-resize"
- | "e-resize"
- | "s-resize"
- | "w-resize"
- | "ne-resize"
- | "nw-resize"
- | "se-resize"
- | "sw-resize"
- | "ew-resize"
- | "ns-resize"
- | "nesw-resize"
- | "nwse-resize"
- | "zoom-in"
- | "zoom-out",
- StyleValue
-> = {
- auto: { type: "keyword", value: "auto" },
- default: { type: "keyword", value: "default" },
- pointer: { type: "keyword", value: "pointer" },
- wait: { type: "keyword", value: "wait" },
- text: { type: "keyword", value: "text" },
- move: { type: "keyword", value: "move" },
- help: { type: "keyword", value: "help" },
- "not-allowed": { type: "keyword", value: "not-allowed" },
- none: { type: "keyword", value: "none" },
- "context-menu": { type: "keyword", value: "context-menu" },
- progress: { type: "keyword", value: "progress" },
- cell: { type: "keyword", value: "cell" },
- crosshair: { type: "keyword", value: "crosshair" },
- "vertical-text": { type: "keyword", value: "vertical-text" },
- alias: { type: "keyword", value: "alias" },
- copy: { type: "keyword", value: "copy" },
- "no-drop": { type: "keyword", value: "no-drop" },
- grab: { type: "keyword", value: "grab" },
- grabbing: { type: "keyword", value: "grabbing" },
- "all-scroll": { type: "keyword", value: "all-scroll" },
- "col-resize": { type: "keyword", value: "col-resize" },
- "row-resize": { type: "keyword", value: "row-resize" },
- "n-resize": { type: "keyword", value: "n-resize" },
- "e-resize": { type: "keyword", value: "e-resize" },
- "s-resize": { type: "keyword", value: "s-resize" },
- "w-resize": { type: "keyword", value: "w-resize" },
- "ne-resize": { type: "keyword", value: "ne-resize" },
- "nw-resize": { type: "keyword", value: "nw-resize" },
- "se-resize": { type: "keyword", value: "se-resize" },
- "sw-resize": { type: "keyword", value: "sw-resize" },
- "ew-resize": { type: "keyword", value: "ew-resize" },
- "ns-resize": { type: "keyword", value: "ns-resize" },
- "nesw-resize": { type: "keyword", value: "nesw-resize" },
- "nwse-resize": { type: "keyword", value: "nwse-resize" },
- "zoom-in": { type: "keyword", value: "zoom-in" },
- "zoom-out": { type: "keyword", value: "zoom-out" },
-};
-
-export const lineHeight: Record<
- | "3"
- | "4"
- | "5"
- | "6"
- | "7"
- | "8"
- | "9"
- | "10"
- | "none"
- | "tight"
- | "snug"
- | "normal"
- | "relaxed"
- | "loose",
- StyleValue
-> = {
- "3": { type: "unit", unit: "rem", value: 0.75 },
- "4": { type: "unit", unit: "rem", value: 1 },
- "5": { type: "unit", unit: "rem", value: 1.25 },
- "6": { type: "unit", unit: "rem", value: 1.5 },
- "7": { type: "unit", unit: "rem", value: 1.75 },
- "8": { type: "unit", unit: "rem", value: 2 },
- "9": { type: "unit", unit: "rem", value: 2.25 },
- "10": { type: "unit", unit: "rem", value: 2.5 },
- none: { type: "unit", unit: "number", value: 1 },
- tight: { type: "unit", unit: "number", value: 1.25 },
- snug: { type: "unit", unit: "number", value: 1.375 },
- normal: { type: "unit", unit: "number", value: 1.5 },
- relaxed: { type: "unit", unit: "number", value: 1.625 },
- loose: { type: "unit", unit: "number", value: 2 },
-};
-
-export const letterSpacing: Record<
- "tighter" | "tight" | "normal" | "wide" | "wider" | "widest",
- StyleValue
-> = {
- tighter: { type: "unit", unit: "em", value: -0.05 },
- tight: { type: "unit", unit: "em", value: -0.025 },
- normal: { type: "unit", unit: "em", value: 0 },
- wide: { type: "unit", unit: "em", value: 0.025 },
- wider: { type: "unit", unit: "em", value: 0.05 },
- widest: { type: "unit", unit: "em", value: 0.1 },
-};
-
-export const listStyleType: Record<"none" | "disc" | "decimal", StyleValue> = {
- none: { type: "keyword", value: "none" },
- disc: { type: "keyword", value: "disc" },
- decimal: { type: "keyword", value: "decimal" },
-};
-
-export const lineClamp: Record<"1" | "2" | "3" | "4" | "5" | "6", StyleValue> =
- {
- "1": { type: "unit", unit: "number", value: 1 },
- "2": { type: "unit", unit: "number", value: 2 },
- "3": { type: "unit", unit: "number", value: 3 },
- "4": { type: "unit", unit: "number", value: 4 },
- "5": { type: "unit", unit: "number", value: 5 },
- "6": { type: "unit", unit: "number", value: 6 },
- };
-
-export const textUnderlineOffset: Record<
- "0" | "1" | "2" | "4" | "8" | "auto",
- StyleValue
-> = {
- "0": { type: "unit", unit: "px", value: 0 },
- "1": { type: "unit", unit: "px", value: 1 },
- "2": { type: "unit", unit: "px", value: 2 },
- "4": { type: "unit", unit: "px", value: 4 },
- "8": { type: "unit", unit: "px", value: 8 },
- auto: { type: "keyword", value: "auto" },
-};
-
-export const ringWidth: Record<
- "0" | "1" | "2" | "4" | "8" | "DEFAULT",
- StyleValue
-> = {
- "0": { type: "unit", unit: "px", value: 0 },
- "1": { type: "unit", unit: "px", value: 1 },
- "2": { type: "unit", unit: "px", value: 2 },
- "4": { type: "unit", unit: "px", value: 4 },
- "8": { type: "unit", unit: "px", value: 8 },
- DEFAULT: { type: "unit", unit: "px", value: 3 },
-};
-
-export const ringOffsetWidth: Record<"0" | "1" | "2" | "4" | "8", StyleValue> =
- {
- "0": { type: "unit", unit: "px", value: 0 },
- "1": { type: "unit", unit: "px", value: 1 },
- "2": { type: "unit", unit: "px", value: 2 },
- "4": { type: "unit", unit: "px", value: 4 },
- "8": { type: "unit", unit: "px", value: 8 },
- };
-
-export const boxShadow: Record<
- "sm" | "DEFAULT" | "md" | "lg" | "xl" | "2xl" | "inner" | "none",
- StyleValue
-> = {
- sm: {
- type: "layers",
- value: [
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 1, unit: "px" },
- { type: "unit", value: 2, unit: "px" },
- { type: "unit", value: 0, unit: "number" },
- { type: "rgb", alpha: 0.05, r: 0, g: 0, b: 0 },
- ],
- },
- ],
- },
- DEFAULT: {
- type: "layers",
- value: [
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 1, unit: "px" },
- { type: "unit", value: 3, unit: "px" },
- { type: "unit", value: 0, unit: "number" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 1, unit: "px" },
- { type: "unit", value: 2, unit: "px" },
- { type: "unit", value: -1, unit: "px" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- ],
- },
- md: {
- type: "layers",
- value: [
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 4, unit: "px" },
- { type: "unit", value: 6, unit: "px" },
- { type: "unit", value: -1, unit: "px" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 2, unit: "px" },
- { type: "unit", value: 4, unit: "px" },
- { type: "unit", value: -2, unit: "px" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- ],
- },
- lg: {
- type: "layers",
- value: [
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 10, unit: "px" },
- { type: "unit", value: 15, unit: "px" },
- { type: "unit", value: -3, unit: "px" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 4, unit: "px" },
- { type: "unit", value: 6, unit: "px" },
- { type: "unit", value: -4, unit: "px" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- ],
- },
- xl: {
- type: "layers",
- value: [
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 20, unit: "px" },
- { type: "unit", value: 25, unit: "px" },
- { type: "unit", value: -5, unit: "px" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 8, unit: "px" },
- { type: "unit", value: 10, unit: "px" },
- { type: "unit", value: -6, unit: "px" },
- { type: "rgb", alpha: 0.1, r: 0, g: 0, b: 0 },
- ],
- },
- ],
- },
- "2xl": {
- type: "layers",
- value: [
- {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 25, unit: "px" },
- { type: "unit", value: 50, unit: "px" },
- { type: "unit", value: -12, unit: "px" },
- { type: "rgb", alpha: 0.25, r: 0, g: 0, b: 0 },
- ],
- },
- ],
- },
- inner: {
- type: "layers",
- value: [
- {
- type: "tuple",
- value: [
- { type: "keyword", value: "inset" },
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 2, unit: "px" },
- { type: "unit", value: 4, unit: "px" },
- { type: "unit", value: 0, unit: "number" },
- { type: "rgb", alpha: 0.05, r: 0, g: 0, b: 0 },
- ],
- },
- ],
- },
- none: {
- type: "layers",
- value: [{ type: "tuple", value: [{ type: "keyword", value: "none" }] }],
- },
-};
-
-export const blur: Record<
- "sm" | "DEFAULT" | "md" | "lg" | "xl" | "2xl" | "inner" | "none",
- StyleValue
-> = {
- sm: { type: "unparsed", value: "blur(0 1px 2px 0 rgb(0 0 0 / 0.05))" },
- DEFAULT: {
- type: "unparsed",
- value:
- "blur(0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1))",
- },
- md: {
- type: "unparsed",
- value:
- "blur(0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))",
- },
- lg: {
- type: "unparsed",
- value:
- "blur(0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))",
- },
- xl: {
- type: "unparsed",
- value:
- "blur(0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1))",
- },
- "2xl": {
- type: "unparsed",
- value: "blur(0 25px 50px -12px rgb(0 0 0 / 0.25))",
- },
- inner: {
- type: "unparsed",
- value: "blur(inset 0 2px 4px 0 rgb(0 0 0 / 0.05))",
- },
- none: { type: "unparsed", value: "blur(none)" },
-};
-
-export const fontSize: Record<
- | "xs"
- | "sm"
- | "base"
- | "lg"
- | "xl"
- | "2xl"
- | "3xl"
- | "4xl"
- | "5xl"
- | "6xl"
- | "7xl"
- | "8xl"
- | "9xl",
- StyleValue
-> = {
- xs: { type: "unit", unit: "rem", value: 0.75 },
- sm: { type: "unit", unit: "rem", value: 0.875 },
- base: { type: "unit", unit: "rem", value: 1 },
- lg: { type: "unit", unit: "rem", value: 1.125 },
- xl: { type: "unit", unit: "rem", value: 1.25 },
- "2xl": { type: "unit", unit: "rem", value: 1.5 },
- "3xl": { type: "unit", unit: "rem", value: 1.875 },
- "4xl": { type: "unit", unit: "rem", value: 2.25 },
- "5xl": { type: "unit", unit: "rem", value: 3 },
- "6xl": { type: "unit", unit: "rem", value: 3.75 },
- "7xl": { type: "unit", unit: "rem", value: 4.5 },
- "8xl": { type: "unit", unit: "rem", value: 6 },
- "9xl": { type: "unit", unit: "rem", value: 8 },
-};
-
-export const fontSizeLineHeight: Record<
- | "xs"
- | "sm"
- | "base"
- | "lg"
- | "xl"
- | "2xl"
- | "3xl"
- | "4xl"
- | "5xl"
- | "6xl"
- | "7xl"
- | "8xl"
- | "9xl",
- StyleValue
-> = {
- xs: { type: "unit", unit: "rem", value: 1 },
- sm: { type: "unit", unit: "rem", value: 1.25 },
- base: { type: "unit", unit: "rem", value: 1.5 },
- lg: { type: "unit", unit: "rem", value: 1.75 },
- xl: { type: "unit", unit: "rem", value: 1.75 },
- "2xl": { type: "unit", unit: "rem", value: 2 },
- "3xl": { type: "unit", unit: "rem", value: 2.25 },
- "4xl": { type: "unit", unit: "rem", value: 2.5 },
- "5xl": { type: "unit", unit: "number", value: 1 },
- "6xl": { type: "unit", unit: "number", value: 1 },
- "7xl": { type: "unit", unit: "number", value: 1 },
- "8xl": { type: "unit", unit: "number", value: 1 },
- "9xl": { type: "unit", unit: "number", value: 1 },
-};
diff --git a/packages/sdk-components-react-radix/src/theme/styles.ts b/packages/sdk-components-react-radix/src/theme/styles.ts
deleted file mode 100644
index 6ecc22e42e..0000000000
--- a/packages/sdk-components-react-radix/src/theme/styles.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import type { EmbedTemplateStyleDecl } from "@webstudio-is/react-sdk";
-import * as tc from "./tailwind-classes";
-
-export const getButtonStyles = (
- variant: "outline" | "ghost",
- size: "default" | "sm" | "icon" = "default"
-) => {
- const styles: EmbedTemplateStyleDecl[] = [
- // 'inline-flex items-center justify-center rounded-md text-sm font-medium
- // ring-offset-background transition-colors
- // focus-visible:outline-none focus-visible:ring-2
- // focus-visible:ring-ring focus-visible:ring-offset-2
- // disabled:pointer-events-none disabled:opacity-50'
- tc.border(0),
- tc.bg("transparent"),
- tc.inlineFlex(),
- tc.items("center"),
- tc.justify("center"),
- tc.rounded("md"),
- tc.text("sm"),
- tc.font("medium"),
- tc.text("current"),
- tc.focusVisible(
- [tc.outline("none"), tc.ring("ring", 2, "background", 2)].flat()
- ),
- tc.state([tc.pointerEvents("none"), tc.opacity(50)].flat(), ":disabled"),
- ].flat();
-
- let variantStyles: EmbedTemplateStyleDecl[] = [];
- if (variant === "ghost") {
- // hover:bg-accent hover:text-accent-foreground
- variantStyles = [
- tc.state([tc.bg("accent"), tc.text("accentForeground")].flat(), ":hover"),
- ].flat();
- }
- if (variant === "outline") {
- // border border-input bg-background hover:bg-accent hover:text-accent-foreground
- variantStyles = [
- tc.border(),
- tc.border("input"),
- tc.bg("background"),
- tc.state(
- [tc.bg("accent", 90), tc.text("accentForeground")].flat(),
- ":hover"
- ),
- ].flat();
- }
-
- let sizeStyles: EmbedTemplateStyleDecl[] = [];
- if (size === "icon") {
- // Set explicit paddings for IOS Safari to prevent the icon from collapsing
- // h-10 w-10
- sizeStyles = [tc.h(10), tc.w(10), tc.px(1.5), tc.py(0)].flat();
- }
- if (size === "sm") {
- // h-9 rounded-md px-3
- sizeStyles = [tc.h(10), tc.px(3)].flat();
- }
- if (size === "default") {
- // h-10 px-4 py-2
- sizeStyles = [tc.h(10), tc.px(4), tc.py(2)].flat();
- }
-
- return [...styles, ...variantStyles, ...sizeStyles];
-};
-
-export const buttonReset: EmbedTemplateStyleDecl[] = [
- {
- property: "backgroundColor",
- value: { type: "keyword", value: "transparent" },
- } as const,
- {
- property: "backgroundImage",
- value: { type: "keyword", value: "none" },
- } as const,
- tc.border(0),
- tc.p(0),
-].flat();
diff --git a/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts b/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts
deleted file mode 100644
index 51934e998d..0000000000
--- a/packages/sdk-components-react-radix/src/theme/tailwind-classes.ts
+++ /dev/null
@@ -1,945 +0,0 @@
-/**
- * Quik and dirty implementation of tailwind classes conversion to webstudio styles.
- */
-import type { EmbedTemplateStyleDecl } from "@webstudio-is/react-sdk";
-import type {
- StyleValue,
- StyleProperty,
- TupleValue,
- TupleValueItem,
-} from "@webstudio-is/css-engine";
-import * as theme from "./__generated__/tailwind-theme";
-
-export const property = (
- property: StyleProperty,
- value: string
-): EmbedTemplateStyleDecl => {
- if (value.startsWith("--")) {
- return {
- property,
- value: { type: "var", value: value.slice(2) },
- };
- }
- return {
- property,
- value: { type: "unparsed", value },
- };
-};
-
-// https://github.com/tailwindlabs/tailwindcss/blob/master/src/css/preflight.css
-const preflight = (): EmbedTemplateStyleDecl[] => {
- const borderColorValue = theme.colors.border;
-
- return [
- {
- property: "borderTopStyle",
- value: { type: "keyword", value: "solid" },
- },
- {
- property: "borderRightStyle",
- value: { type: "keyword", value: "solid" },
- },
- {
- property: "borderBottomStyle",
- value: { type: "keyword", value: "solid" },
- },
- {
- property: "borderLeftStyle",
- value: { type: "keyword", value: "solid" },
- },
-
- {
- property: "borderTopColor",
- value: borderColorValue,
- },
- {
- property: "borderRightColor",
- value: borderColorValue,
- },
- {
- property: "borderBottomColor",
- value: borderColorValue,
- },
- {
- property: "borderLeftColor",
- value: borderColorValue,
- },
- ];
-};
-
-export const z = (
- value: StringEnumToNumeric<keyof typeof theme.zIndex>
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "zIndex",
- value: theme.zIndex[value],
- },
- ];
-};
-
-export const overflow = (
- value: "hidden" | "visible" | "scroll" | "auto"
-): EmbedTemplateStyleDecl[] => [
- {
- property: "overflowX",
- value: { type: "keyword", value },
- },
- {
- property: "overflowY",
- value: { type: "keyword", value },
- },
-];
-
-export const rounded = (
- value: keyof typeof theme.borderRadius = "DEFAULT"
-): EmbedTemplateStyleDecl[] => {
- const styleValue = theme.borderRadius[value];
- return [
- { property: "borderTopLeftRadius", value: styleValue },
- { property: "borderTopRightRadius", value: styleValue },
- { property: "borderBottomRightRadius", value: styleValue },
- { property: "borderBottomLeftRadius", value: styleValue },
- ];
-};
-
-type StringEnumToNumeric<T extends string> = T extends `${infer Z extends
- number}`
- ? Z
- : never;
-
-type NonNumeric<T extends string> = T extends `${infer _Z extends number}`
- ? never
- : T;
-
-export const border = (
- borderWidthOrColor?:
- | StringEnumToNumeric<keyof typeof theme.borderWidth>
- | keyof typeof theme.colors
-): EmbedTemplateStyleDecl[] => {
- if (
- typeof borderWidthOrColor === "number" ||
- borderWidthOrColor === undefined
- ) {
- const styleValue = theme.borderWidth[borderWidthOrColor ?? "DEFAULT"];
- return [
- ...preflight(),
- { property: "borderTopWidth", value: styleValue },
- { property: "borderRightWidth", value: styleValue },
- { property: "borderBottomWidth", value: styleValue },
- { property: "borderLeftWidth", value: styleValue },
- ];
- }
-
- const styleValue = theme.colors[borderWidthOrColor];
-
- return [
- { property: "borderTopColor", value: styleValue },
- { property: "borderRightColor", value: styleValue },
- { property: "borderBottomColor", value: styleValue },
- { property: "borderLeftColor", value: styleValue },
- ];
-};
-
-export const borderB = (
- borderWidthOrColor?:
- | StringEnumToNumeric<keyof typeof theme.borderWidth>
- | keyof typeof theme.colors
-): EmbedTemplateStyleDecl[] => {
- let widthValue: StyleValue = { type: "unit", value: 1, unit: "number" };
- let colorValue: StyleValue = theme.colors.border;
- if (
- typeof borderWidthOrColor === "number" ||
- borderWidthOrColor === undefined
- ) {
- widthValue = theme.borderWidth[borderWidthOrColor ?? "DEFAULT"];
- } else {
- colorValue = theme.colors[borderWidthOrColor];
- }
-
- return [
- {
- property: "borderBottomWidth",
- value: widthValue,
- },
- {
- property: "borderBottomStyle",
- value: { type: "keyword", value: "solid" },
- },
- {
- property: "borderBottomColor",
- value: colorValue,
- },
- ];
-};
-
-const paddingProperty =
- (property: "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft") =>
- (
- padding:
- | StringEnumToNumeric<keyof typeof theme.padding>
- | NonNumeric<keyof typeof theme.padding>
- ): EmbedTemplateStyleDecl[] => {
- return [{ property, value: theme.padding[padding] }];
- };
-
-export const pt: ReturnType<typeof paddingProperty> = (padding) => {
- return paddingProperty("paddingTop")(padding);
-};
-
-export const pb: ReturnType<typeof paddingProperty> = (padding) => {
- return paddingProperty("paddingBottom")(padding);
-};
-
-export const pl: ReturnType<typeof paddingProperty> = (padding) => {
- return paddingProperty("paddingLeft")(padding);
-};
-
-export const pr: ReturnType<typeof paddingProperty> = (padding) => {
- return paddingProperty("paddingRight")(padding);
-};
-
-export const px: ReturnType<typeof paddingProperty> = (padding) => {
- return [pl(padding), pr(padding)].flat();
-};
-
-export const py: ReturnType<typeof paddingProperty> = (padding) => {
- return [pt(padding), pb(padding)].flat();
-};
-
-export const p: ReturnType<typeof paddingProperty> = (padding) => {
- return [px(padding), py(padding)].flat();
-};
-
-const marginProperty =
- (property: "marginTop" | "marginRight" | "marginBottom" | "marginLeft") =>
- (
- margin:
- | StringEnumToNumeric<keyof typeof theme.margin>
- | NonNumeric<keyof typeof theme.margin>
- ): EmbedTemplateStyleDecl[] => {
- return [{ property, value: theme.margin[margin] }];
- };
-
-export const ml: ReturnType<typeof marginProperty> = (margin) => {
- return marginProperty("marginLeft")(margin);
-};
-
-export const mr: ReturnType<typeof marginProperty> = (margin) => {
- return marginProperty("marginRight")(margin);
-};
-
-export const mt: ReturnType<typeof marginProperty> = (margin) => {
- return marginProperty("marginTop")(margin);
-};
-
-export const mb: ReturnType<typeof marginProperty> = (margin) => {
- return marginProperty("marginBottom")(margin);
-};
-
-export const mx: ReturnType<typeof marginProperty> = (margin) => {
- return [ml(margin), mr(margin)].flat();
-};
-
-export const my: ReturnType<typeof marginProperty> = (margin) => {
- return [mt(margin), mb(margin)].flat();
-};
-
-export const m: ReturnType<typeof marginProperty> = (margin) => {
- return [mx(margin), my(margin)].flat();
-};
-
-export const w = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.width>
- | NonNumeric<keyof typeof theme.width>
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "width", value: theme.width[spacing] }];
-};
-
-export const h = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.height>
- | NonNumeric<keyof typeof theme.height>
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "height", value: theme.height[spacing] }];
-};
-
-export const minH = (
- spacing: StringEnumToNumeric<keyof typeof theme.minHeight>
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "minHeight", value: theme.minHeight[spacing] }];
-};
-
-export const opacity = (
- opacity: StringEnumToNumeric<keyof typeof theme.opacity>
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "opacity",
- value: theme.opacity[opacity],
- },
- ];
-};
-
-export const cursor = (
- cursor: keyof typeof theme.cursor
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "cursor",
- value: theme.cursor[cursor],
- },
- ];
-};
-
-export const maxW = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.maxWidth>
- | NonNumeric<keyof typeof theme.maxWidth>
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "maxWidth", value: theme.maxWidth[spacing] }];
-};
-
-const positionStyle = (
- property: "left" | "right" | "top" | "bottom",
- spacing:
- | StringEnumToNumeric<keyof typeof theme.inset>
- | NonNumeric<keyof typeof theme.inset>
-): EmbedTemplateStyleDecl => {
- return { property, value: theme.inset[spacing] };
-};
-
-export const top = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.inset>
- | NonNumeric<keyof typeof theme.inset>
-): EmbedTemplateStyleDecl[] => [positionStyle("top", spacing)];
-
-export const right = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.inset>
- | NonNumeric<keyof typeof theme.inset>
-): EmbedTemplateStyleDecl[] => [positionStyle("right", spacing)];
-
-export const bottom = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.inset>
- | NonNumeric<keyof typeof theme.inset>
-): EmbedTemplateStyleDecl[] => [positionStyle("bottom", spacing)];
-
-export const left = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.inset>
- | NonNumeric<keyof typeof theme.inset>
-): EmbedTemplateStyleDecl[] => [positionStyle("left", spacing)];
-
-export const inset = (
- spacing:
- | StringEnumToNumeric<keyof typeof theme.inset>
- | NonNumeric<keyof typeof theme.inset>
-): EmbedTemplateStyleDecl[] => [
- positionStyle("left", spacing),
- positionStyle("right", spacing),
- positionStyle("top", spacing),
- positionStyle("bottom", spacing),
-];
-
-export const aspect = (
- value: "auto" | "square" | "video"
-): EmbedTemplateStyleDecl[] => {
- let unparsed: string = value;
- if (value === "square") {
- unparsed = "1 / 1";
- }
- if (value === "video") {
- unparsed = "16 / 9";
- }
- return [
- {
- property: "aspectRatio",
- value: { type: "unparsed", value: unparsed },
- },
- ];
-};
-
-export const backdropBlur = (
- blur: keyof typeof theme.blur
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "backdropFilter", value: theme.blur[blur] }];
-};
-
-export const list = (
- listStyle: keyof typeof theme.listStyleType
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "listStyleType", value: theme.listStyleType[listStyle] }];
-};
-
-export const select = (_selectValue: "none"): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "userSelect",
- value: {
- type: "keyword",
- value: "none",
- },
- },
- ];
-};
-
-export const bg = (
- color: keyof typeof theme.colors,
- alpha?: number
-): EmbedTemplateStyleDecl[] => {
- const value = theme.colors[color];
-
- if (alpha !== undefined && value.type === "rgb") {
- value.alpha = alpha / 100;
- }
-
- return [
- {
- property: "backgroundColor",
- value,
- },
- ];
-};
-
-export const fixed = (): EmbedTemplateStyleDecl[] => {
- return [{ property: "position", value: { type: "keyword", value: "fixed" } }];
-};
-
-export const relative = (): EmbedTemplateStyleDecl[] => {
- return [
- { property: "position", value: { type: "keyword", value: "relative" } },
- ];
-};
-
-export const absolute = (): EmbedTemplateStyleDecl[] => {
- return [
- { property: "position", value: { type: "keyword", value: "absolute" } },
- ];
-};
-
-export const grid = (): EmbedTemplateStyleDecl[] => {
- return [{ property: "display", value: { type: "keyword", value: "grid" } }];
-};
-
-const alignItems = {
- start: "flex-start",
- end: "flex-end",
- center: "center",
- baseline: "baseline",
- stretch: "stretch",
-} as const;
-type AlignItems = keyof typeof alignItems;
-
-export const items = (
- alignItemsParam: AlignItems
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "alignItems",
- value: {
- type: "keyword",
- value: alignItems[alignItemsParam],
- },
- },
- ];
-};
-
-const justifyContent = {
- start: "flex-start",
- end: "flex-end",
- center: "center",
- between: "space-between",
- around: "space-around",
- evenly: "space-evenly",
- stretch: "stretch",
-} as const;
-type JustifyContent = keyof typeof justifyContent;
-
-export const justify = (
- justifyContentParam: JustifyContent
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "justifyContent",
- value: {
- type: "keyword",
- value: justifyContent[justifyContentParam],
- },
- },
- ];
-};
-
-export const inlineFlex = (): EmbedTemplateStyleDecl[] => {
- return [
- { property: "display", value: { type: "keyword", value: "inline-flex" } },
- ];
-};
-
-export const block = (): EmbedTemplateStyleDecl[] => {
- return [{ property: "display", value: { type: "keyword", value: "block" } }];
-};
-
-const flexDirection = { row: "row", col: "column" } as const;
-type FlexDirection = keyof typeof flexDirection;
-
-type FlexSizing = 1 | "auto" | "initial" | "none";
-
-export const flex = (
- flexParam?: FlexDirection | FlexSizing
-): EmbedTemplateStyleDecl[] => {
- if (flexParam === undefined) {
- return [{ property: "display", value: { type: "keyword", value: "flex" } }];
- }
-
- if (flexParam === 1) {
- return [
- {
- property: "flexGrow",
- value: { type: "unit", value: 1, unit: "number" },
- },
- {
- property: "flexShrink",
- value: { type: "unit", value: 1, unit: "number" },
- },
- {
- property: "flexBasis",
- value: { type: "unit", value: 0, unit: "%" },
- },
- ];
- }
-
- if (flexParam === "auto") {
- return [
- {
- property: "flexGrow",
- value: { type: "unit", value: 1, unit: "number" },
- },
- {
- property: "flexShrink",
- value: { type: "unit", value: 1, unit: "number" },
- },
- {
- property: "flexBasis",
- value: { type: "keyword", value: "auto" },
- },
- ];
- }
-
- if (flexParam === "initial") {
- return [
- {
- property: "flexGrow",
- value: { type: "unit", value: 0, unit: "number" },
- },
- {
- property: "flexShrink",
- value: { type: "unit", value: 1, unit: "number" },
- },
- {
- property: "flexBasis",
- value: { type: "keyword", value: "auto" },
- },
- ];
- }
-
- if (flexParam === "none") {
- return [
- {
- property: "flexGrow",
- value: { type: "unit", value: 0, unit: "number" },
- },
- {
- property: "flexShrink",
- value: { type: "unit", value: 0, unit: "number" },
- },
- {
- property: "flexBasis",
- value: { type: "keyword", value: "auto" },
- },
- ];
- }
-
- return [
- {
- property: "flexDirection",
- value: {
- type: "keyword",
- value: flexDirection[flexParam],
- },
- },
- ];
-};
-
-export const grow = (): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "flexGrow",
- value: { type: "unit", value: 1, unit: "number" },
- },
- ];
-};
-
-export const shrink = (value: number): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "flexGrow",
- value: { type: "unit", value, unit: "number" },
- },
- ];
-};
-
-export const gap = (
- gapValue: StringEnumToNumeric<keyof typeof theme.spacing>
-): EmbedTemplateStyleDecl[] => {
- const value = theme.spacing[gapValue];
-
- return [
- { property: "rowGap", value },
- { property: "columnGap", value },
- ];
-};
-
-export const lineClamp = (
- lineClampValue: StringEnumToNumeric<keyof typeof theme.lineClamp>
-): EmbedTemplateStyleDecl[] => {
- return [
- ...overflow("hidden"),
- {
- property: "display",
-
- value: {
- type: "keyword",
- value: "-webkit-box",
- },
- },
- {
- property: "-webkit-box-orient" as "display",
- value: {
- type: "keyword",
- value: "vertical",
- },
- },
- {
- property: "-webkit-line-clamp" as "display",
- value: theme.lineClamp[lineClampValue],
- },
- ];
-};
-
-export const leading = (
- lineHeight:
- | StringEnumToNumeric<keyof typeof theme.lineHeight>
- | NonNumeric<keyof typeof theme.lineHeight>
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "lineHeight", value: theme.lineHeight[lineHeight] }];
-};
-
-export const tracking = (
- letterSpacing:
- | StringEnumToNumeric<keyof typeof theme.letterSpacing>
- | NonNumeric<keyof typeof theme.letterSpacing>
-): EmbedTemplateStyleDecl[] => {
- return [
- { property: "letterSpacing", value: theme.letterSpacing[letterSpacing] },
- ];
-};
-
-export const outline = (_value: "none"): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "outlineWidth",
- value: { type: "unit", value: 2, unit: "px" },
- },
- {
- property: "outlineStyle",
- value: { type: "keyword", value: "solid" },
- },
- {
- property: "outlineColor",
- value: { type: "keyword", value: "transparent" },
- },
- {
- property: "outlineOffset",
- value: { type: "unit", value: 2, unit: "px" },
- },
- ];
-};
-
-const textSizes = Object.keys(theme.fontSize);
-type TextSize = keyof typeof theme.fontSize;
-
-const isTextSize = (value: string): value is TextSize =>
- textSizes.includes(value);
-
-export const text = (
- sizeOrColor: TextSize | keyof typeof theme.colors
-): EmbedTemplateStyleDecl[] => {
- if (isTextSize(sizeOrColor)) {
- return [
- { property: "fontSize", value: theme.fontSize[sizeOrColor] },
- { property: "lineHeight", value: theme.fontSizeLineHeight[sizeOrColor] },
- ];
- }
- return [
- {
- property: "color",
- value: theme.colors[sizeOrColor],
- },
- ];
-};
-
-export const noUnderline = (): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "textDecorationLine",
- value: { type: "keyword", value: "none" },
- },
- ];
-};
-
-export const underline = (): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "textDecorationLine",
- value: { type: "keyword", value: "underline" },
- },
- ];
-};
-
-export const underlineOffset = (
- offset: StringEnumToNumeric<keyof typeof theme.textUnderlineOffset>
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "textUnderlineOffset",
- value: theme.textUnderlineOffset[offset],
- },
- ];
-};
-
-const weights = {
- thin: "100",
- extralight: "200",
- light: "300",
- normal: "400",
- medium: "500",
- semibold: "600",
- bold: "700",
- extrabold: "800",
- black: "900",
-} as const;
-
-export const font = (
- weight:
- | "thin"
- | "extralight"
- | "light"
- | "normal"
- | "medium"
- | "semibold"
- | "bold"
- | "extrabold"
- | "black"
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "fontWeight",
- value: { type: "keyword", value: weights[weight] },
- },
- ];
-};
-
-export const whitespace = (
- value: "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap" | "break-spaces"
-): EmbedTemplateStyleDecl[] => {
- let whiteSpaceCollapse = "collapse";
- let textWrapMode = "wrap";
- if (value === "normal") {
- [whiteSpaceCollapse, textWrapMode] = ["collapse", "wrap"];
- }
- if (value === "pre") {
- [whiteSpaceCollapse, textWrapMode] = ["preserve", "nowrap"];
- }
- if (value === "pre-wrap") {
- [whiteSpaceCollapse, textWrapMode] = ["preserve", "wrap"];
- }
- if (value === "pre-line") {
- [whiteSpaceCollapse, textWrapMode] = ["preserve-breaks", "wrap"];
- }
- if (value === "break-spaces") {
- [whiteSpaceCollapse, textWrapMode] = ["break-spaces", "wrap"];
- }
- return [
- {
- property: "whiteSpaceCollapse",
- value: { type: "keyword", value: whiteSpaceCollapse },
- },
- {
- property: "textWrapMode",
- value: { type: "keyword", value: textWrapMode },
- },
- ];
-};
-
-export const shadow = (
- shadowSize: keyof typeof theme.boxShadow
-): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "boxShadow",
- value: theme.boxShadow[shadowSize],
- },
- ];
-};
-
-export const ring = (
- ringColor: keyof typeof theme.colors,
- ringWidth: StringEnumToNumeric<keyof typeof theme.ringWidth>,
- ringOffsetColor: keyof typeof theme.colors = "background",
- ringOffsetWidth: StringEnumToNumeric<keyof typeof theme.ringOffsetWidth> = 0
-): EmbedTemplateStyleDecl[] => {
- const ringWidthStyleValue = theme.ringWidth[ringWidth];
- const ringOffsetWidthStyleValue = theme.ringOffsetWidth[ringOffsetWidth];
- const ringColorStyleValue = theme.colors[ringColor];
- const ringOffsetColorStyleValue = theme.colors[ringOffsetColor];
-
- // 0 0 0 ringOffsetWidth ringOffsetColor
- const ringOffsetShadow: TupleValue = {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 0, unit: "number" },
- ringOffsetWidthStyleValue as TupleValueItem,
- ringOffsetColorStyleValue as TupleValueItem,
- ],
- };
-
- const ringWidthValue =
- ringWidthStyleValue.type === "unit" ? ringWidthStyleValue.value : 0;
- const ringOffsetWidthValue =
- ringOffsetWidthStyleValue.type === "unit"
- ? ringOffsetWidthStyleValue.value
- : 0;
-
- // 0 0 0 ringWidth + ringOffsetWidth ringColor
- const ringShadow: TupleValue = {
- type: "tuple",
- value: [
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 0, unit: "number" },
- { type: "unit", value: 0, unit: "number" },
- {
- type: "unit",
- value: ringWidthValue + ringOffsetWidthValue,
- unit:
- ringWidthStyleValue.type === "unit"
- ? ringWidthStyleValue.unit
- : "number",
- },
- ringColorStyleValue as TupleValueItem,
- ],
- };
-
- return [
- {
- property: "boxShadow",
- value: {
- type: "layers",
- value: [ringOffsetShadow, ringShadow],
- },
- },
- ];
-};
-
-export const pointerEvents = (
- value: "none" | "auto"
-): EmbedTemplateStyleDecl[] => {
- return [{ property: "pointerEvents", value: { type: "keyword", value } }];
-};
-
-export const transition = (
- value: "none" | "all" | "transform"
-): EmbedTemplateStyleDecl[] => {
- if (value === "none") {
- return [
- {
- property: "transitionProperty",
- value: { type: "keyword", value: "all" },
- },
- ];
- }
- return [
- {
- property: "transitionProperty",
- value: { type: "keyword", value },
- },
- {
- property: "transitionTimingFunction",
- value: { type: "unparsed", value: "cubic-bezier(0.4, 0, 0.2, 1)" },
- },
- {
- property: "transitionDuration",
- value: { type: "unparsed", value: "150ms" },
- },
- ];
-};
-
-export const duration = (ms: number): EmbedTemplateStyleDecl[] => {
- return [
- {
- property: "transitionDuration",
- value: { type: "unit", value: ms, unit: "ms" },
- },
- ];
-};
-
-export const hover = (
- value: EmbedTemplateStyleDecl[]
-): EmbedTemplateStyleDecl[] => {
- return value.map((decl) => ({
- ...decl,
- state: ":hover",
- }));
-};
-
-export const focus = (
- value: EmbedTemplateStyleDecl[]
-): EmbedTemplateStyleDecl[] => {
- return value.map((decl) => ({
- ...decl,
- state: ":focus",
- }));
-};
-
-export const focusVisible = (
- value: EmbedTemplateStyleDecl[]
-): EmbedTemplateStyleDecl[] => {
- return value.map((decl) => ({
- ...decl,
- state: ":focus-visible",
- }));
-};
-
-export const disabled = (
- value: EmbedTemplateStyleDecl[]
-): EmbedTemplateStyleDecl[] => {
- return value.map((decl) => ({
- ...decl,
- state: ":disabled",
- }));
-};
-
-export const state = (
- value: EmbedTemplateStyleDecl[],
- state: string
-): EmbedTemplateStyleDecl[] => {
- return value.map((decl) => ({
- ...decl,
- state,
- }));
-};
diff --git a/packages/sdk-components-react-radix/src/theme/tailwind-colors.ts b/packages/sdk-components-react-radix/src/theme/tailwind-colors.ts
deleted file mode 100644
index e9e9842676..0000000000
--- a/packages/sdk-components-react-radix/src/theme/tailwind-colors.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Variables source:
- * https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/themes.ts#L1
- * https://github.com/shadcn-ui/ui/blob/5e172fc34fdf015aa0d141f52cc8c082b8ae6613/apps/www/scripts/build-registry.ts#L220
- *
- * Attributions
- * MIT License
- * Copyright (c) 2023 shadcn
- **/
-
-export const colors = {
- transparent: "transparent",
- current: "currentColor",
- inherit: "inherit",
- popover: "rgb(255, 255, 255)",
- popoverForeground: "rgb(2, 8, 23)",
- border: "rgb(226, 232, 240)",
- background: "rgb(255, 255, 255)",
- foreground: "hsl(222.2 84% 4.9%)",
- ring: "rgb(148, 163, 184)",
- mutedForeground: "rgb(100, 116, 139)",
- muted: `hsl(210 40% 96.1%)`,
- primary: "rgb(15, 23, 42)",
- primaryForeground: "hsl(210 40% 98%)",
- destructive: "rgb(239, 68, 68)",
- destructiveForeground: "rgb(248, 250, 252)",
- accent: "rgb(241, 245, 249)",
- accentForeground: "rgb(15, 23, 42)",
- input: "rgb(226, 232, 240)",
- secondary: "rgb(241, 245, 249)",
- secondaryForeground: "rgb(15, 23, 42)",
-} as const;
-
-/*
-// Not used, leave it for the following components.
-
---card: 0 0% 100%;
---card-foreground: 222.2 84% 4.9%;
-*/
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 48518fdcb3..0799d87bb7 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -78,13 +78,13 @@ importers:
version: 0.24.2
eslint:
specifier: ^9.17.0
- version: 9.17.0([email protected])
+ version: 9.17.0
eslint-plugin-react-hooks:
specifier: ^5.1.0
+ version: 5.1.0([email protected])
eslint-plugin-unicorn:
specifier: ^56.0.1
+ version: 56.0.1([email protected])
nano-staged:
specifier: ^0.8.0
version: 0.8.0
@@ -111,7 +111,7 @@ importers:
version: 5.7.2
typescript-eslint:
specifier: ^8.18.2
vite:
specifier: ^5.4.11
version: 5.4.11(@types/[email protected])
@@ -1930,9 +1930,6 @@ importers:
react-dom:
specifier: 18.3.0-canary-14898b6a9-20240318
version: 18.3.0-canary-14898b6a9-20240318([email protected])
- tailwindcss:
- specifier: ^3.3.3
- version: 3.3.3
packages/sdk-components-react-remix:
dependencies:
@@ -2025,10 +2022,6 @@ importers:
packages:
- '@alloc/[email protected]':
- resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
- engines: {node: '>=10'}
-
'@ampproject/[email protected]':
resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==}
engines: {node: '>=6.0.0'}
@@ -4980,9 +4973,6 @@ packages:
resolution: {integrity: sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==}
-
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
engines: {node: '>= 8'}
@@ -5162,10 +5152,6 @@ packages:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
- resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
- engines: {node: '>= 6'}
-
resolution: {integrity: sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==}
@@ -5298,10 +5284,6 @@ packages:
resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}
- resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
- engines: {node: '>= 6'}
-
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
engines: {node: '>= 10'}
@@ -5521,9 +5503,6 @@ packages:
resolution: {integrity: sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==}
- resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
-
resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==}
engines: {node: '>=0.3.1'}
@@ -5531,9 +5510,6 @@ packages:
resolution: {integrity: sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==}
- resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
-
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'}
@@ -6005,10 +5981,6 @@ packages:
engines: {node: '>=16 || 14 >=14.17'}
hasBin: true
- resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==}
- deprecated: Glob versions prior to v9 are no longer supported
-
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Glob versions prior to v9 are no longer supported
@@ -6381,10 +6353,6 @@ packages:
resolution: {integrity: sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==}
- resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==}
- hasBin: true
-
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
@@ -6962,9 +6930,6 @@ packages:
resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==}
hasBin: true
- resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
-
resolution: {integrity: sha512-QSEqPGTCJbkHU2yLvfY6huqYPjdBrOaTMKatO1F8nCSrkQGXeKwtCiCnsdxnuMhbg3DTVywKaeWLGCE5oJpq0g==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -7067,10 +7032,6 @@ packages:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
- resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==}
- engines: {node: '>= 6'}
-
resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==}
@@ -7252,14 +7213,6 @@ packages:
engines: {node: '>=0.10'}
hasBin: true
- resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
- engines: {node: '>=0.10.0'}
-
- resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==}
- engines: {node: '>= 6'}
-
resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
@@ -7285,18 +7238,6 @@ packages:
peerDependencies:
postcss: ^8.2.15
- resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==}
- engines: {node: '>=14.0.0'}
- peerDependencies:
- postcss: ^8.0.0
-
- resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==}
- engines: {node: ^12 || ^14 || >= 16}
- peerDependencies:
- postcss: ^8.4.21
-
resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==}
engines: {node: '>= 14'}
@@ -7338,12 +7279,6 @@ packages:
peerDependencies:
postcss: ^8.0.0
- resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==}
- engines: {node: '>=12.0'}
- peerDependencies:
- postcss: ^8.2.14
-
resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==}
engines: {node: '>=4'}
@@ -7351,10 +7286,6 @@ packages:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
- resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==}
- engines: {node: ^10 || ^12 || >=14}
-
resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==}
engines: {node: ^10 || ^12 || >=14}
@@ -7603,9 +7534,6 @@ packages:
resolution: {integrity: sha512-v7DaMx1oNRNNHjqS3htQ5ZHo3klcaX8qyN391ymlAJLVs6FR97q4YdvL7juB0Z1BO718JuYAxzDehozvwKZwUw==}
engines: {node: '>=0.10.0'}
- resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==}
-
resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==}
engines: {node: '>=8'}
@@ -7745,10 +7673,6 @@ packages:
resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==}
- hasBin: true
-
resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
hasBin: true
@@ -7907,10 +7831,6 @@ packages:
solid-js: ^1.2
swr-store: ^0.10
- resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
- engines: {node: '>=0.10.0'}
-
resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==}
engines: {node: '>=0.10.0'}
@@ -8055,11 +7975,6 @@ packages:
resolution: {integrity: sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==}
- resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==}
- engines: {node: '>=8'}
- hasBin: true
-
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
engines: {node: '>=4'}
@@ -8101,11 +8016,6 @@ packages:
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
- resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==}
- engines: {node: '>=14.0.0'}
- hasBin: true
-
resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==}
@@ -8117,13 +8027,6 @@ packages:
resolution: {integrity: sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==}
- engines: {node: '>=0.8'}
-
- resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
-
resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==}
@@ -8207,9 +8110,6 @@ packages:
resolution: {integrity: sha512-e4g0EJtAjk64xgnFPD6kTBUtpnMVzDrMb12N1YZV0VvSlhnVT3SGxiYTLdGy8Q5cYHOIC/FAHmZ10eGrAguicQ==}
- resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
-
resolution: {integrity: sha512-VHC8XgU2fFW7yO1f/b3mxKDje1vmyzFXHWzOYmKEkCEwcLjDtbdLgBQviqj4ZwP4MJkQtRo6Ha2I29lq/B+VxA==}
@@ -8759,8 +8659,6 @@ packages:
snapshots:
- '@alloc/[email protected]': {}
-
'@ampproject/[email protected]':
dependencies:
'@jridgewell/gen-mapping': 0.3.2
@@ -9601,9 +9499,9 @@ snapshots:
'@esbuild/[email protected]':
optional: true
+ '@eslint-community/[email protected]([email protected])':
dependencies:
- eslint: 9.17.0([email protected])
+ eslint: 9.17.0
eslint-visitor-keys: 3.4.3
'@eslint-community/[email protected]': {}
@@ -11403,15 +11301,15 @@ snapshots:
dependencies:
'@types/yargs-parser': 21.0.0
dependencies:
'@eslint-community/regexpp': 4.12.1
- '@typescript-eslint/parser': 8.18.2([email protected]([email protected]))([email protected])
+ '@typescript-eslint/parser': 8.18.2([email protected])([email protected])
'@typescript-eslint/scope-manager': 8.18.2
- '@typescript-eslint/type-utils': 8.18.2([email protected]([email protected]))([email protected])
- '@typescript-eslint/utils': 8.18.2([email protected]([email protected]))([email protected])
+ '@typescript-eslint/type-utils': 8.18.2([email protected])([email protected])
+ '@typescript-eslint/utils': 8.18.2([email protected])([email protected])
'@typescript-eslint/visitor-keys': 8.18.2
- eslint: 9.17.0([email protected])
+ eslint: 9.17.0
graphemer: 1.4.0
ignore: 5.3.2
natural-compare: 1.4.0
@@ -11420,14 +11318,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@typescript-eslint/scope-manager': 8.18.2
'@typescript-eslint/types': 8.18.2
'@typescript-eslint/typescript-estree': 8.18.2([email protected])
'@typescript-eslint/visitor-keys': 8.18.2
debug: 4.3.7
- eslint: 9.17.0([email protected])
+ eslint: 9.17.0
typescript: 5.7.2
transitivePeerDependencies:
- supports-color
@@ -11437,12 +11335,12 @@ snapshots:
'@typescript-eslint/types': 8.18.2
'@typescript-eslint/visitor-keys': 8.18.2
dependencies:
'@typescript-eslint/typescript-estree': 8.18.2([email protected])
- '@typescript-eslint/utils': 8.18.2([email protected]([email protected]))([email protected])
+ '@typescript-eslint/utils': 8.18.2([email protected])([email protected])
debug: 4.3.7
- eslint: 9.17.0([email protected])
+ eslint: 9.17.0
ts-api-utils: 1.4.3([email protected])
typescript: 5.7.2
transitivePeerDependencies:
@@ -11464,13 +11362,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
- '@eslint-community/eslint-utils': 4.4.1([email protected]([email protected]))
+ '@eslint-community/eslint-utils': 4.4.1([email protected])
'@typescript-eslint/scope-manager': 8.18.2
'@typescript-eslint/types': 8.18.2
'@typescript-eslint/typescript-estree': 8.18.2([email protected])
- eslint: 9.17.0([email protected])
+ eslint: 9.17.0
typescript: 5.7.2
transitivePeerDependencies:
- supports-color
@@ -11791,8 +11689,6 @@ snapshots:
-
dependencies:
normalize-path: 3.0.0
@@ -11998,8 +11894,6 @@ snapshots:
-
@@ -12132,8 +12026,6 @@ snapshots:
-
@@ -12333,8 +12225,6 @@ snapshots:
-
@@ -12342,8 +12232,6 @@ snapshots:
base-64: 0.1.0
md5: 2.3.0
-
dependencies:
esutils: 2.0.3
@@ -12635,18 +12523,18 @@ snapshots:
source-map: 0.6.1
optional: true
dependencies:
- eslint: 9.17.0([email protected])
+ eslint: 9.17.0
dependencies:
'@babel/helper-validator-identifier': 7.25.9
- '@eslint-community/eslint-utils': 4.4.1([email protected]([email protected]))
+ '@eslint-community/eslint-utils': 4.4.1([email protected])
ci-info: 4.1.0
clean-regexp: 1.0.0
core-js-compat: 3.39.0
- eslint: 9.17.0([email protected])
+ eslint: 9.17.0
esquery: 1.6.0
globals: 15.14.0
indent-string: 4.0.0
@@ -12668,9 +12556,9 @@ snapshots:
dependencies:
- '@eslint-community/eslint-utils': 4.4.1([email protected]([email protected]))
+ '@eslint-community/eslint-utils': 4.4.1([email protected])
'@eslint-community/regexpp': 4.12.1
'@eslint/config-array': 0.19.1
'@eslint/core': 0.9.1
@@ -12704,8 +12592,6 @@ snapshots:
minimatch: 3.1.2
natural-compare: 1.4.0
optionator: 0.9.4
- optionalDependencies:
- jiti: 1.19.1
transitivePeerDependencies:
- supports-color
@@ -13026,15 +12912,6 @@ snapshots:
minipass: 7.0.4
path-scurry: 1.10.1
- dependencies:
- fs.realpath: 1.0.0
- inflight: 1.0.6
- inherits: 2.0.4
- minimatch: 3.1.2
- once: 1.4.0
- path-is-absolute: 1.0.1
-
dependencies:
fs.realpath: 1.0.0
@@ -13398,8 +13275,6 @@ snapshots:
-
@@ -14332,12 +14207,6 @@ snapshots:
- dependencies:
- any-promise: 1.3.0
- object-assign: 4.1.1
- thenify-all: 1.6.0
-
dependencies:
picocolors: 1.0.0
@@ -14419,8 +14288,6 @@ snapshots:
-
@@ -14628,10 +14495,6 @@ snapshots:
-
-
dependencies:
jsonc-parser: 3.2.0
@@ -14652,25 +14515,6 @@ snapshots:
dependencies:
postcss: 8.4.47
- dependencies:
- postcss: 8.4.27
- postcss-value-parser: 4.2.0
- read-cache: 1.0.0
- resolve: 1.22.3
-
- dependencies:
- camelcase-css: 2.0.1
- postcss: 8.4.27
-
- dependencies:
- lilconfig: 2.1.0
- yaml: 2.2.1
- optionalDependencies:
- postcss: 8.4.27
-
dependencies:
lilconfig: 2.1.0
@@ -14711,11 +14555,6 @@ snapshots:
postcss-modules-values: 4.0.0([email protected])
string-hash: 1.1.3
- dependencies:
- postcss: 8.4.27
- postcss-selector-parser: 6.0.11
-
dependencies:
cssesc: 3.0.0
@@ -14723,12 +14562,6 @@ snapshots:
- dependencies:
- nanoid: 3.3.7
- picocolors: 1.1.0
- source-map-js: 1.0.2
-
dependencies:
nanoid: 3.3.7
@@ -14969,10 +14802,6 @@ snapshots:
dependencies:
loose-envify: 1.4.0
- dependencies:
- pify: 2.3.0
-
dependencies:
find-up: 4.1.0
@@ -15137,12 +14966,6 @@ snapshots:
- dependencies:
- is-core-module: 2.13.0
- path-parse: 1.0.7
- supports-preserve-symlinks-flag: 1.0.0
-
dependencies:
is-core-module: 2.13.0
@@ -15327,8 +15150,6 @@ snapshots:
solid-js: 1.7.11
swr-store: 0.10.6
-
@@ -15459,16 +15280,6 @@ snapshots:
dependencies:
inline-style-parser: 0.1.1
- dependencies:
- '@jridgewell/gen-mapping': 0.3.2
- commander: 4.1.1
- glob: 7.1.6
- lines-and-columns: 1.2.4
- mz: 2.7.0
- pirates: 4.0.5
- ts-interface-checker: 0.1.13
-
dependencies:
has-flag: 3.0.0
@@ -15522,33 +15333,6 @@ snapshots:
optional: true
- dependencies:
- '@alloc/quick-lru': 5.2.0
- arg: 5.0.2
- chokidar: 3.5.3
- didyoumean: 1.2.2
- dlv: 1.1.3
- fast-glob: 3.3.2
- glob-parent: 6.0.2
- is-glob: 4.0.3
- jiti: 1.19.1
- lilconfig: 2.1.0
- micromatch: 4.0.5
- normalize-path: 3.0.0
- object-hash: 3.0.0
- picocolors: 1.1.0
- postcss: 8.4.27
- postcss-import: 15.1.0([email protected])
- postcss-js: 4.0.1([email protected])
- postcss-load-config: 4.0.1([email protected])
- postcss-nested: 6.0.1([email protected])
- postcss-selector-parser: 6.0.11
- resolve: 1.22.3
- sucrase: 3.34.0
- transitivePeerDependencies:
- - ts-node
-
dependencies:
chownr: 1.1.4
@@ -15573,14 +15357,6 @@ snapshots:
mkdirp: 1.0.4
yallist: 4.0.0
- dependencies:
- thenify: 3.3.1
-
- dependencies:
- any-promise: 1.3.0
-
dependencies:
readable-stream: 2.3.8
@@ -15645,8 +15421,6 @@ snapshots:
-
dependencies:
'@ts-morph/common': 0.11.1
@@ -15694,12 +15468,12 @@ snapshots:
media-typer: 0.3.0
mime-types: 2.1.35
dependencies:
- '@typescript-eslint/parser': 8.18.2([email protected]([email protected]))([email protected])
- '@typescript-eslint/utils': 8.18.2([email protected]([email protected]))([email protected])
- eslint: 9.17.0([email protected])
+ '@typescript-eslint/eslint-plugin': 8.18.2(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
+ '@typescript-eslint/parser': 8.18.2([email protected])([email protected])
+ '@typescript-eslint/utils': 8.18.2([email protected])([email protected])
+ eslint: 9.17.0
typescript: 5.7.2
transitivePeerDependencies:
- supports-color