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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Drop unused radix modules (#1851)
Bogdan Chadkinf8f2c91a35d6
diff --git a/packages/design-system/package.json b/packages/design-system/package.jsonindex ed2b0ff87b..f86f121f6c 100644--- a/packages/design-system/package.json+++ b/packages/design-system/package.json@@ -41,12 +41,9 @@"dependencies": {"@radix-ui/colors": "^0.1.8","@radix-ui/react-accessible-icon": "^1.0.0",- "@radix-ui/react-accordion": "^1.0.0",- "@radix-ui/react-alert-dialog": "^1.0.0","@radix-ui/react-avatar": "^1.0.0","@radix-ui/react-checkbox": "^1.0.0","@radix-ui/react-collapsible": "^1.0.0",- "@radix-ui/react-context-menu": "^1.0.0","@radix-ui/react-dialog": "^1.0.0","@radix-ui/react-dropdown-menu": "^1.0.0","@radix-ui/react-id": "^1.0.0",@@ -59,7 +56,6 @@"@radix-ui/react-scroll-area": "^1.0.3","@radix-ui/react-select": "^1.0.0","@radix-ui/react-separator": "^1.0.0",- "@radix-ui/react-slider": "^1.0.0","@radix-ui/react-switch": "^1.0.0","@radix-ui/react-tabs": "^1.0.0","@radix-ui/react-toast": "^1.0.0",@@ -67,7 +63,6 @@"@radix-ui/react-toggle-group": "^1.0.0","@radix-ui/react-toolbar": "^1.0.2","@radix-ui/react-tooltip": "^1.0.0",- "@radix-ui/react-use-layout-effect": "^1.0.0","@react-aria/focus": "^3.11.0","@react-aria/interactions": "^3.11.0","@react-aria/utils": "^3.13.3",diff --git a/packages/design-system/src/components/link.tsx b/packages/design-system/src/components/link.tsxdeleted file mode 100644index 2aa5e31b64..0000000000--- a/packages/design-system/src/components/link.tsx+++ /dev/null@@ -1,63 +0,0 @@-import { styled } from "../stitches.config";-import { DeprecatedText } from "./__DEPRECATED__/text";-import { theme } from "../stitches.config";--export const Link = styled("a", {- alignItems: "center",- gap: theme.spacing[3],- flexShrink: 0,- outline: "none",- textDecorationLine: "none",- textUnderlineOffset: "3px",- textDecorationColor: theme.colors.slate4,- WebkitTapHighlightColor: "rgba(0,0,0,0)",- lineHeight: "inherit",- "@hover": {- "&:hover": {- textDecorationLine: "underline",- },- },- "&:focus": {- outlineWidth: "2px",- outlineStyle: "solid",- outlineOffset: "2px",- textDecorationLine: "none",- },- [`& ${DeprecatedText}`]: {- color: "inherit",- },- variants: {- variant: {- blue: {- color: theme.colors.blue11,- textDecorationColor: theme.colors.blue4,- "&:focus": {- outlineColor: theme.colors.blue8,- },- },- subtle: {- color: theme.colors.slate11,- textDecorationColor: theme.colors.slate4,- "&:focus": {- outlineColor: theme.colors.slate8,- },- },- contrast: {- color: theme.colors.hiContrast,- textDecoration: "underline",- textDecorationColor: theme.colors.slate4,- "@hover": {- "&:hover": {- textDecorationColor: theme.colors.slate7,- },- },- "&:focus": {- outlineColor: theme.colors.slate8,- },- },- },- },- defaultVariants: {- variant: "contrast",- },-});diff --git a/packages/design-system/src/components/slider.tsx b/packages/design-system/src/components/slider.tsxdeleted file mode 100644index 625ba18aa9..0000000000--- a/packages/design-system/src/components/slider.tsx+++ /dev/null@@ -1,129 +0,0 @@-import { type ComponentProps, type ElementRef, forwardRef } from "react";-import { styled, type CSS } from "../stitches.config";-import * as SliderPrimitive from "@radix-ui/react-slider";-import { theme } from "../stitches.config";--const SliderTrack = styled(SliderPrimitive.Track, {- position: "relative",- flexGrow: 1,- backgroundColor: theme.colors.slate7,- borderRadius: theme.borderRadius.pill,- '&[data-orientation="horizontal"]': {- height: 2,- },- '&[data-orientation="vertical"]': {- width: 2,- height: 100,- },-});--const SliderRange = styled(SliderPrimitive.Range, {- position: "absolute",- background: theme.colors.blue9,- borderRadius: "inherit",- '&[data-orientation="horizontal"]': {- height: "100%",- },- '&[data-orientation="vertical"]': {- width: "100%",- },-});--const SliderThumb = styled(SliderPrimitive.Thumb, {- position: "relative",- display: "block",- width: 15,- height: 15,- outline: "none",- backgroundColor: "white",- boxShadow: "0 0 1px rgba(0,0,0,.3), 0 1px 4px rgba(0,0,0,.15)",- borderRadius: theme.borderRadius.round,-- "&::after": {- content: '""',- position: "absolute",- top: 0,- right: 0,- bottom: 0,- left: 0,- zIndex: -2,- backgroundColor: "hsla(0,0%,0%,.035)",- transform: "scale(1)",- borderRadius: theme.borderRadius.round,- transition: "transform 200ms cubic-bezier(0.22, 1, 0.36, 1)",- },-- "&:focus": {- "&::after": {- transform: "scale(2)",- },- },-});--export const StyledSlider = styled(SliderPrimitive.Root, {- position: "relative",- display: "flex",- alignItems: "center",- flexShrink: 0,- userSelect: "none",- touchAction: "none",- height: 15,- flexGrow: 1,-- '&[data-orientation="vertical"]': {- flexDirection: "column",- width: 15,- },-- "@hover": {- "&:hover": {- [`& ${SliderTrack}`]: {- backgroundColor: theme.colors.slate8,- },- },- },-});--type SliderPrimitiveProps = Omit<- ComponentProps<typeof SliderPrimitive.Root>,- "value" | "defaultValue"-> & {- value?: number | number[];- defaultValue?: number | number[];-};-type SliderProps = SliderPrimitiveProps & { css?: CSS };--const toArrayValue = (value?: Array<number> | number) => {- if (Array.isArray(value)) {- return value;- }- if (value === undefined) {- return;- }- return [value];-};--export const Slider = forwardRef<ElementRef<typeof StyledSlider>, SliderProps>(- ({ value, defaultValue, ...props }, forwardedRef) => {- const realValue = value || defaultValue || 0;- const hasRange = Array.isArray(realValue);- const thumbsArray = hasRange ? realValue : [realValue];-- return (- <StyledSlider- {...props}- ref={forwardedRef}- value={toArrayValue(value)}- defaultValue={toArrayValue(defaultValue)}- >- <SliderTrack>- <SliderRange />- </SliderTrack>- {thumbsArray?.map((_, i: number) => (- <SliderThumb key={i} />- ))}- </StyledSlider>- );- }-);-Slider.displayName = "Slider";diff --git a/packages/design-system/src/index.ts b/packages/design-system/src/index.tsindex 26334dd0b2..552de49c86 100644--- a/packages/design-system/src/index.ts+++ b/packages/design-system/src/index.ts@@ -61,9 +61,6 @@ export {EnhancedTooltipProvider,useEnhancedTooltipProps,} from "./components/enhanced-tooltip";-export { Link } from "./components/link";-export { Panel } from "./components/panel";-export * from "./components/slider";export * from "./components/avatar";export * from "./components/icon-button-with-menu";export * from "./components/tree";diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 9202085461..cfd65352cc 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -617,12 +617,6 @@ importers:'@radix-ui/react-accessible-icon':specifier: ^1.0.0version: 1.0.0([email protected])([email protected])- '@radix-ui/react-accordion':- specifier: ^1.0.0- version: 1.0.0([email protected])([email protected])- '@radix-ui/react-alert-dialog':- specifier: ^1.0.0'@radix-ui/react-avatar':specifier: ^1.0.0version: 1.0.0([email protected])([email protected])@@ -632,9 +626,6 @@ importers:'@radix-ui/react-collapsible':specifier: ^1.0.0version: 1.0.0([email protected])([email protected])- '@radix-ui/react-context-menu':- specifier: ^1.0.0'@radix-ui/react-dialog':specifier: ^1.0.0@@ -671,9 +662,6 @@ importers:'@radix-ui/react-separator':specifier: ^1.0.0version: 1.0.0([email protected])([email protected])- '@radix-ui/react-slider':- specifier: ^1.0.0- version: 1.0.0([email protected])([email protected])'@radix-ui/react-switch':specifier: ^1.0.0version: 1.0.0([email protected])([email protected])@@ -695,9 +683,6 @@ importers:'@radix-ui/react-tooltip':specifier: ^1.0.0- '@radix-ui/react-use-layout-effect':- specifier: ^1.0.0- version: 1.0.0([email protected])'@react-aria/focus':specifier: ^3.11.0version: 3.11.0([email protected])@@ -5703,44 +5688,6 @@ packages:react-dom: 18.2.0([email protected])dev: false- resolution: {integrity: sha512-F4vrzev+f1gjrWiU+IFQIzN43fYyvQ+AN0OicHYoDddis53xnPC0DKm16Ks4/XjvmqbISAR/FscYX0vymEHxcA==}- peerDependencies:- react: ^16.8 || ^17.0 || ^18.0- react-dom: ^16.8 || ^17.0 || ^18.0- dependencies:- '@babel/runtime': 7.20.13- '@radix-ui/primitive': 1.0.0- '@radix-ui/react-collapsible': 1.0.0([email protected])([email protected])- '@radix-ui/react-collection': 1.0.0([email protected])([email protected])- '@radix-ui/react-compose-refs': 1.0.0([email protected])- '@radix-ui/react-context': 1.0.0([email protected])- '@radix-ui/react-id': 1.0.0([email protected])- '@radix-ui/react-primitive': 1.0.0([email protected])([email protected])- '@radix-ui/react-use-controllable-state': 1.0.0([email protected])- react: 18.2.0- react-dom: 18.2.0([email protected])- dev: false-- resolution: {integrity: sha512-E2N5klf4Mi1QjTIPqSfAPXFPeZG5ZnnBZJ80lcTzJ0fSp8dqLG6bcxrkCrSU4Gm+HVZxxuCPkUHBfntd9aZUcw==}- peerDependencies:- react: ^16.8 || ^17.0 || ^18.0- react-dom: ^16.8 || ^17.0 || ^18.0- dependencies:- '@babel/runtime': 7.20.13- '@radix-ui/primitive': 1.0.0- '@radix-ui/react-compose-refs': 1.0.0([email protected])- '@radix-ui/react-context': 1.0.0([email protected])- '@radix-ui/react-primitive': 1.0.0([email protected])([email protected])- '@radix-ui/react-slot': 1.0.0([email protected])- react: 18.2.0- react-dom: 18.2.0([email protected])- transitivePeerDependencies:- - '@types/react'- dev: false-resolution: {integrity: sha512-1MUuv24HCdepi41+qfv125EwMuxgQ+U+h0A9K3BjCO/J8nVRREKHHpkD9clwfnjEDk9hgGzCnff4aUKCPiRepw==}peerDependencies:@@ -5846,25 +5793,6 @@ packages:react: 18.2.0dev: false- resolution: {integrity: sha512-JkwOgdXwErwEEpsmgu0Ob8zD3gzWS1brPXnNGPyZEtR6/EYyDgruQYKiihXVsCrPCdrNUHawop9I1+6JTdXPTA==}- peerDependencies:- react: ^16.8 || ^17.0 || ^18.0- react-dom: ^16.8 || ^17.0 || ^18.0- dependencies:- '@babel/runtime': 7.20.13- '@radix-ui/primitive': 1.0.0- '@radix-ui/react-context': 1.0.0([email protected])- '@radix-ui/react-primitive': 1.0.0([email protected])([email protected])- '@radix-ui/react-use-callback-ref': 1.0.0([email protected])- '@radix-ui/react-use-controllable-state': 1.0.0([email protected])- react: 18.2.0- react-dom: 18.2.0([email protected])- transitivePeerDependencies:- - '@types/react'- dev: false-/@radix-ui/[email protected]([email protected]):resolution: {integrity: sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg==}peerDependencies:@@ -6289,28 +6217,6 @@ packages:react-dom: 18.2.0([email protected])dev: false- resolution: {integrity: sha512-LMZET7vn7HYwYSjsc9Jcen8Vn4cJXZZxQT7T+lGlqp+F+FofX+H86TBF2yDq+L51d99f1KLEsflTGBz9WRLSig==}- peerDependencies:- react: ^16.8 || ^17.0 || ^18.0- react-dom: ^16.8 || ^17.0 || ^18.0- dependencies:- '@babel/runtime': 7.20.13- '@radix-ui/number': 1.0.0- '@radix-ui/primitive': 1.0.0- '@radix-ui/react-collection': 1.0.0([email protected])([email protected])- '@radix-ui/react-compose-refs': 1.0.0([email protected])- '@radix-ui/react-context': 1.0.0([email protected])- '@radix-ui/react-direction': 1.0.0([email protected])- '@radix-ui/react-primitive': 1.0.0([email protected])([email protected])- '@radix-ui/react-use-controllable-state': 1.0.0([email protected])- '@radix-ui/react-use-layout-effect': 1.0.0([email protected])- '@radix-ui/react-use-previous': 1.0.0([email protected])- '@radix-ui/react-use-size': 1.0.0([email protected])- react: 18.2.0- react-dom: 18.2.0([email protected])- dev: false-/@radix-ui/[email protected]([email protected]):resolution: {integrity: sha512-3mrKauI/tWXo1Ll+gN5dHcxDPdm/Df1ufcDLCecn+pnCIVcdWE7CujXo8QaXOWRJyZyQWWbpB8eFwHzWXlv5mQ==}peerDependencies: