diff --git a/.gitignore b/.gitignore index 6f2652816..212e79223 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ dist lib node_modules temp -vite.config.js.timestamp* \ No newline at end of file +vite.config.js.timestamp* +.idea diff --git a/package.json b/package.json index 7b2549067..008bb2a71 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "suid", "version": "1.0.0", "private": true, - "description": "A port of Materia-UI (MUI) built with SolidJS.", + "description": "A port of Material-UI (MUI) built with SolidJS.", "keywords": [ "best_ecosystem", "components", diff --git a/packages/lab/CHANGELOG.md b/packages/lab/CHANGELOG.md new file mode 100644 index 000000000..d7684a224 --- /dev/null +++ b/packages/lab/CHANGELOG.md @@ -0,0 +1 @@ +# @suid/lab diff --git a/packages/lab/LICENSE b/packages/lab/LICENSE new file mode 100644 index 000000000..43f64a44b --- /dev/null +++ b/packages/lab/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2022 Juanra GM +Copyright (c) 2014 Call-Em-All + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/lab/README.md b/packages/lab/README.md new file mode 100644 index 000000000..51a87782d --- /dev/null +++ b/packages/lab/README.md @@ -0,0 +1,20 @@ +# @suid/lab + +[![workflow-badge]](https://github.com/swordev/suid/actions/workflows/ci.yaml) [![npm-badge]](https://www.npmjs.com/package/@suid/material) + +[workflow-badge]: https://img.shields.io/github/actions/workflow/status/swordev/suid/ci.yaml?branch=main +[npm-badge]: https://img.shields.io/npm/v/@suid/lab?label=@suid/lab + +## Installation + +```sh +npm install @suid/lab +``` + +## Documentation + +https://suid.io + +## License + +Distributed under the MIT License. See LICENSE for more information. diff --git a/packages/lab/package.json b/packages/lab/package.json new file mode 100644 index 000000000..76d46f0a5 --- /dev/null +++ b/packages/lab/package.json @@ -0,0 +1,36 @@ +{ + "name": "@suid/lab", + "version": "0.0.1", + "description": "A port of Material-UI (MUI) built with SolidJS.", + "keywords": [ + "solid", + "solidjs", + "components", + "mui", + "material", + "material-ui", + "material design", + "ui" + ], + "main": "index.jsx", + "scripts": { + "build": "tsc --build tsconfig.build.json", + "clean": "tsc --build --clean tsconfig.build.json", + "watch": "tsc --build -w tsconfig.build.json" + }, + "dependencies": { + "@suid/base": "workspace:*", + "@suid/css": "workspace:*", + "@suid/material": "workspace:*", + "@suid/system": "workspace:*", + "@suid/types": "workspace:*", + "@suid/utils": "workspace:*", + "clsx": "^1.2.1" + }, + "peerDependencies": { + "solid-js": "^1.7.11" + }, + "publishConfig": { + "directory": "lib" + } +} diff --git a/packages/lab/src/LoadingButton/LoadingButton.tsx b/packages/lab/src/LoadingButton/LoadingButton.tsx new file mode 100644 index 000000000..78e46b160 --- /dev/null +++ b/packages/lab/src/LoadingButton/LoadingButton.tsx @@ -0,0 +1,223 @@ +import { LoadingButtonTypeMap } from "."; +import { getLoadingButtonUtilityClass } from "./loadingButtonClasses"; +import loadingButtonClasses from "./loadingButtonClasses"; +import createComponentFactory from "@suid/base/createComponentFactory"; +import Button from "@suid/material/Button"; +import CircularProgress from "@suid/material/CircularProgress"; +import { styled } from "@suid/material/styles"; +import { InPropsOf } from "@suid/types"; +import { capitalize } from "@suid/utils"; +import clsx from "clsx"; +import { JSXElement } from "solid-js"; + +type OwnerState = InPropsOf; + +const $ = createComponentFactory()({ + name: "MuiLoadingButton", + selfPropNames: [ + "classes", + "loading", + "disabled", + "loadingIndicator", + "loadingPosition", + ], + utilityClass: getLoadingButtonUtilityClass, + propDefaults: ({ set }) => { + return set({ + get disabled() { + return false; + }, + get loading() { + return false; + }, + loadingIndicator: () => , + loadingPosition: "center", + variant: "text", + }); + }, + slotClasses: (ownerState) => ({ + root: ["root", ownerState.loading && "loading"], + startIcon: [ + ownerState.loading && + `startIconLoading${capitalize(ownerState.loadingPosition)}`, + ], + endIcon: [ + ownerState.loading && + `endIconLoading${capitalize(ownerState.loadingPosition)}`, + ], + loadingIndicator: [ + "loadingIndicator", + ownerState.loading && + `loadingIndicator${capitalize(ownerState.loadingPosition)}`, + ], + }), +}); + +const LoadingButtonRoot = styled(Button, { + name: "MuiLoadingButton", + slot: "Root", + overridesResolver: (props, styles) => { + return [ + styles.root, + styles.startIconLoadingStart && { + [`& .${loadingButtonClasses.startIconLoadingStart}`]: + styles.startIconLoadingStart, + }, + styles.endIconLoadingEnd && { + [`& .${loadingButtonClasses.endIconLoadingEnd}`]: + styles.endIconLoadingEnd, + }, + ]; + }, +})(({ ownerState, theme }) => ({ + [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: + { + transition: theme.transitions.create(["opacity"], { + duration: theme.transitions.duration.short, + }), + opacity: 0, + }, + ...(ownerState.loadingPosition === "center" && { + transition: theme.transitions.create( + ["background-color", "box-shadow", "border-color"], + { + duration: theme.transitions.duration.short, + } + ), + [`&.${loadingButtonClasses.loading} >:not(.${loadingButtonClasses.loadingIndicator})`]: + { + color: "transparent", + }, + }), + ...(ownerState.loadingPosition === "start" && + ownerState.fullWidth && { + [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: + { + transition: theme.transitions.create(["opacity"], { + duration: theme.transitions.duration.short, + }), + opacity: 0, + marginRight: -8, + }, + }), + ...(ownerState.loadingPosition === "end" && + ownerState.fullWidth && { + [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: + { + transition: theme.transitions.create(["opacity"], { + duration: theme.transitions.duration.short, + }), + opacity: 0, + marginLeft: -8, + }, + }), +})); + +const LoadingButtonLoadingIndicator = styled("div", { + name: "MuiLoadingButton", + slot: "LoadingIndicator", + overridesResolver: (props, styles) => { + const { ownerState } = props; + return [ + styles.loadingIndicator, + styles[`loadingIndicator${capitalize(ownerState.loadingPosition)}`], + ]; + }, +})(({ ownerState }) => ({ + position: "absolute", + visibility: "visible", + display: "flex", + ...(ownerState.loadingPosition === "start" && + (ownerState.variant === "outlined" || + ownerState.variant === "contained") && { + left: ownerState.size === "small" ? 10 : 14, + }), + ...(ownerState.loadingPosition === "start" && + ownerState.variant === "text" && { + left: 6, + }), + ...(ownerState.loadingPosition === "center" && { + left: "50%", + transform: "translate(-50%)", + }), + ...(ownerState.loadingPosition === "end" && + (ownerState.variant === "outlined" || + ownerState.variant === "contained") && { + right: ownerState.size === "small" ? 10 : 14, + }), + ...(ownerState.loadingPosition === "end" && + ownerState.variant === "text" && { + right: 6, + }), + ...(ownerState.loadingPosition === "start" && + ownerState.fullWidth && { + position: "relative", + left: -10, + }), + ...(ownerState.loadingPosition === "end" && + ownerState.fullWidth && { + position: "relative", + right: -10, + }), +})); + +/** + * + * Demos: + * + * - [Buttons](https://mui.com/components/buttons/) + * + * API: + * + * - [LoadingButton API](https://mui.com/api/loading-button/) + * - inherits [Button API](https://mui.com/api/button/) + */ +const LoadingButton = $.component(function LoadingButton({ + allProps, + otherProps, + props, + classes, +}) { + // todo: wait for https://github.com/solidjs/solid/discussions/1860 + // this could improve efficiency + + const getChildren = () => {allProps.children}; + + return ( + + {allProps.loadingPosition === "end" ? ( + <> + {getChildren()} + {props.loading && ( + + {props.loadingIndicator as JSXElement} + + )} + + ) : ( + <> + {props.loading && ( + + {props.loadingIndicator as JSXElement} + + )} + {getChildren()} + + )} + + ); +}); + +export default LoadingButton; diff --git a/packages/lab/src/LoadingButton/LoadingButtonProps.tsx b/packages/lab/src/LoadingButton/LoadingButtonProps.tsx new file mode 100644 index 000000000..c8ae162e1 --- /dev/null +++ b/packages/lab/src/LoadingButton/LoadingButtonProps.tsx @@ -0,0 +1,81 @@ +import { ButtonClasses, ExtendButtonTypeMap } from "@suid/material/Button"; +import { Theme } from "@suid/material/styles"; +import { SxProps } from "@suid/system"; +import * as ST from "@suid/types"; +import { JSXElement } from "solid-js"; + +export type LoadingButtonTypeMap< + P = {}, + D extends ST.ElementType = "button", +> = { + name: "MuiLoadingButton"; + defaultPropNames: + | "loading" + | "loadingIndicator" + | "loadingPosition" + | "disabled"; + selfProps: { + /** + * Override or extend the styles applied to the component. + */ + classes?: Partial & { + /** Styles applied to the root element. */ + root?: string; + /** Styles applied to the root element if `loading={true}`. */ + loading?: string; + /** Styles applied to the loadingIndicator element. */ + loadingIndicator?: string; + /** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */ + loadingIndicatorCenter?: string; + /** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */ + loadingIndicatorStart?: string; + /** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */ + loadingIndicatorEnd?: string; + /** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */ + endIconLoadingEnd?: string; + /** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */ + startIconLoadingStart?: string; + }; + + /** + * If `true` or if `loading`, the component is disabled. + * @default false + */ + disabled?: boolean; + + /** + * If `true`, the loading indicator is shown. + * @default false + */ + loading?: boolean; + + /** + * Element placed before the children if the button is in loading state. + * The node should contain an element with `role="progressbar"` with an accessible name. + * By default, we render a `CircularProgress` that is labelled by the button itself. + * @default + */ + loadingIndicator?: JSXElement | (() => JSXElement); + + /** + * The loading indicator can be positioned on the start, end, or the center of the button. + * @default 'center' + */ + loadingPosition?: "start" | "end" | "center"; + + /** + * The system prop that allows defining system overrides as well as additional CSS styles. + */ + sx?: SxProps; + }; +} & ExtendButtonTypeMap<{ + props: P & LoadingButtonTypeMap["selfProps"]; + defaultComponent: D; +}>; + +export type LoadingButtonProps< + D extends ST.ElementType = LoadingButtonTypeMap["defaultComponent"], + P = {}, +> = ST.OverrideProps, D>; + +export default LoadingButtonProps; diff --git a/packages/lab/src/LoadingButton/index.tsx b/packages/lab/src/LoadingButton/index.tsx new file mode 100644 index 000000000..1484d8463 --- /dev/null +++ b/packages/lab/src/LoadingButton/index.tsx @@ -0,0 +1,7 @@ +export { default } from "./LoadingButton"; +export * from "./LoadingButton"; + +export { default as loadingButtonClasses } from "./loadingButtonClasses"; +export * from "./loadingButtonClasses"; + +export * from "./LoadingButtonProps"; diff --git a/packages/lab/src/LoadingButton/loadingButtonClasses.ts b/packages/lab/src/LoadingButton/loadingButtonClasses.ts new file mode 100644 index 000000000..35e2e3120 --- /dev/null +++ b/packages/lab/src/LoadingButton/loadingButtonClasses.ts @@ -0,0 +1,43 @@ +import generateUtilityClass from "@suid/base/generateUtilityClass"; +import generateUtilityClasses from "@suid/base/generateUtilityClasses"; + +export interface LoadingButtonClasses { + /** Styles applied to the root element. */ + root: string; + /** Styles applied to the root element if `loading={true}`. */ + loading: string; + /** Styles applied to the loadingIndicator element. */ + loadingIndicator: string; + /** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */ + loadingIndicatorCenter: string; + /** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */ + loadingIndicatorStart: string; + /** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */ + loadingIndicatorEnd: string; + /** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */ + endIconLoadingEnd: string; + /** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */ + startIconLoadingStart: string; +} + +export type LoadingButtonClassKey = keyof LoadingButtonClasses; + +export function getLoadingButtonUtilityClass(slot: string): string { + return generateUtilityClass("MuiLoadingButton", slot); +} + +const loadingButtonClasses: LoadingButtonClasses = generateUtilityClasses( + "MuiLoadingButton", + [ + "root", + "loading", + "loadingIndicator", + "loadingIndicatorCenter", + "loadingIndicatorStart", + "loadingIndicatorEnd", + "endIconLoadingEnd", + "startIconLoadingStart", + ] +); + +export default loadingButtonClasses; diff --git a/packages/lab/src/index.tsx b/packages/lab/src/index.tsx new file mode 100644 index 000000000..30786aa32 --- /dev/null +++ b/packages/lab/src/index.tsx @@ -0,0 +1 @@ +export { default as LoadingButton } from "./LoadingButton"; diff --git a/packages/lab/tsconfig.build.json b/packages/lab/tsconfig.build.json new file mode 100644 index 000000000..70aac7239 --- /dev/null +++ b/packages/lab/tsconfig.build.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "outDir": "lib", + "rootDir": "src", + "paths": { + "@suid/types": ["./../types/src"], + "@suid/types/*": ["./../types/src/*"], + "@suid/utils": ["./../utils/src"], + "@suid/utils/*": ["./../utils/src/*"], + "@suid/material": ["./../material/src"], + "@suid/material/*": ["./../material/src/*"] + } + }, + "exclude": ["src/**/*.test.*"], + "extends": "./tsconfig.json", + "include": ["src"], + "references": [ + { "path": "./../types/tsconfig.build.json" }, + { "path": "./../utils/tsconfig.build.json" }, + { "path": "./../material/tsconfig.build.json" } + ] +} diff --git a/packages/lab/tsconfig.json b/packages/lab/tsconfig.json new file mode 100644 index 000000000..425ea6d39 --- /dev/null +++ b/packages/lab/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "paths": { + "@suid/types": ["./../types/src"], + "@suid/types/*": ["./../types/src/*"], + "@suid/utils": ["./../utils/src"], + "@suid/utils/*": ["./../utils/src/*"], + "@suid/material": ["./../material/src"], + "@suid/material/*": ["./../material/src/*"] + } + }, + "extends": "./../../tsconfig.json", + "include": ["src", "test"], + "references": [ + { "path": "./../types/tsconfig.build.json" }, + { "path": "./../utils/tsconfig.build.json" }, + { "path": "./../material/tsconfig.build.json" } + ] +} diff --git a/packages/material/package.json b/packages/material/package.json index f37a9c9ed..b2832b946 100644 --- a/packages/material/package.json +++ b/packages/material/package.json @@ -26,6 +26,9 @@ "@suid/utils": "workspace:*", "clsx": "^2.0.0" }, + "devDependencies": { + "solid-testing-library": "^0.5.1" + }, "peerDependencies": { "solid-js": "^1.7.12" }, diff --git a/packages/material/src/Checkbox/CheckboxProps.tsx b/packages/material/src/Checkbox/CheckboxProps.tsx index 6c51d9f35..e8d5eda80 100644 --- a/packages/material/src/Checkbox/CheckboxProps.tsx +++ b/packages/material/src/Checkbox/CheckboxProps.tsx @@ -112,6 +112,7 @@ export interface CheckboxTypeMap

{ /** * The value of the component. The DOM API casts this to a string. * The browser uses "on" as the default value. + * @deprecated Use the `checked` prop instead. */ value?: SwitchBaseProps["value"]; }; diff --git a/packages/site/package.json b/packages/site/package.json index d506494fb..6ba3fb419 100644 --- a/packages/site/package.json +++ b/packages/site/package.json @@ -16,6 +16,7 @@ "@suid/base": "workspace:*", "@suid/codemod": "workspace:*", "@suid/icons-material": "workspace:*", + "@suid/lab": "workspace:*", "@suid/material": "workspace:*", "@suid/system": "workspace:*", "@suid/types": "workspace:*", diff --git a/packages/site/src/layouts/MainLayout/Nav.tsx b/packages/site/src/layouts/MainLayout/Nav.tsx index 55000bd40..b618dc202 100644 --- a/packages/site/src/layouts/MainLayout/Nav.tsx +++ b/packages/site/src/layouts/MainLayout/Nav.tsx @@ -1,4 +1,5 @@ import { useLocation, Link as RouterLink } from "@solidjs/router"; +import { Science } from "@suid/icons-material"; import CodeIcon from "@suid/icons-material/Code"; import EditRoundedIcon from "@suid/icons-material/EditRounded"; import HandymanIcon from "@suid/icons-material/Handyman"; @@ -283,6 +284,20 @@ export const navConfig: Config[] = [ }, ], }, + { + type: "section", + text: "Laboratory Components", + icon: Science, + items: [ + { + type: "section", + text: "Input", + items: ["Loading Button"].map((text) => + createLinkConfig(text, `/lab-components/${toFolder(text)}`) + ), + }, + ], + }, ]; function NavSection(props: { diff --git a/packages/site/src/pages/labComponents/LoadingButtonPage/BasicButtonsExample.tsx b/packages/site/src/pages/labComponents/LoadingButtonPage/BasicButtonsExample.tsx new file mode 100644 index 000000000..54861764e --- /dev/null +++ b/packages/site/src/pages/labComponents/LoadingButtonPage/BasicButtonsExample.tsx @@ -0,0 +1,38 @@ +import { LoadingButton } from "@suid/lab"; +import { Checkbox, FormControlLabel, Stack } from "@suid/material"; +import { createSignal } from "solid-js"; + +export default function BasicButtons() { + const [isLoading, setIsLoading] = createSignal(true); + return ( + <> + + + + Text + + + Contained + + + Outlined + + + Outlined + + + + setIsLoading(value)} + /> + } + /> + + + + ); +} diff --git a/packages/site/src/pages/labComponents/LoadingButtonPage/ButtonSizesExample.tsx b/packages/site/src/pages/labComponents/LoadingButtonPage/ButtonSizesExample.tsx new file mode 100644 index 000000000..e8295ac99 --- /dev/null +++ b/packages/site/src/pages/labComponents/LoadingButtonPage/ButtonSizesExample.tsx @@ -0,0 +1,61 @@ +import { LoadingButton } from "@suid/lab"; +import { Box, Checkbox, FormControlLabel, Stack } from "@suid/material"; +import { createSignal } from "solid-js"; + +export default function ButtonSizes() { + const [isLoading, setIsLoading] = createSignal(false); + return ( + + +

+ + Small + + + Medium + + + Large + +
+
+ + Small + + + Medium + + + Large + +
+
+ + Small + + + Medium + + + Large + +
+ + + setIsLoading(value)} + /> + } + /> + + + ); +} diff --git a/packages/site/src/pages/labComponents/LoadingButtonPage/ColorLoadingButtonsExample.tsx b/packages/site/src/pages/labComponents/LoadingButtonPage/ColorLoadingButtonsExample.tsx new file mode 100644 index 000000000..c2d274682 --- /dev/null +++ b/packages/site/src/pages/labComponents/LoadingButtonPage/ColorLoadingButtonsExample.tsx @@ -0,0 +1,37 @@ +import { LoadingButton } from "@suid/lab"; +import { Checkbox, FormControlLabel, Stack } from "@suid/material"; +import { createSignal } from "solid-js"; + +export default function ColorLoadingButtonsExample() { + const [isLoading, setIsLoading] = createSignal(false); + return ( + + + + Secondary + + + Success + + + Error + + + + setIsLoading(value)} + /> + } + /> + + + ); +} diff --git a/packages/site/src/pages/labComponents/LoadingButtonPage/LoadingButtonPage.tsx b/packages/site/src/pages/labComponents/LoadingButtonPage/LoadingButtonPage.tsx new file mode 100644 index 000000000..45792927a --- /dev/null +++ b/packages/site/src/pages/labComponents/LoadingButtonPage/LoadingButtonPage.tsx @@ -0,0 +1,20 @@ +import { LoadingButton } from "@suid/lab"; +import ComponentInfo from "~/components/ComponentInfo"; +import BasicLoadingButtonsExample from "./BasicButtonsExample"; +import ButtonSizesExample from "./ButtonSizesExample"; +import ColorLoadingButtonsExample from "./ColorLoadingButtonsExample"; + +export default function LoadingButtonPage() { + return ( + + ); +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 237647caf..4ee048d7c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -183,6 +183,34 @@ importers: version: 1.7.12 publishDirectory: lib + packages/lab: + dependencies: + '@suid/base': + specifier: workspace:* + version: link:../base/lib + '@suid/css': + specifier: workspace:* + version: link:../css/lib + '@suid/material': + specifier: workspace:* + version: link:../material/lib + '@suid/system': + specifier: workspace:* + version: link:../system/lib + '@suid/types': + specifier: workspace:* + version: link:../types/lib + '@suid/utils': + specifier: workspace:* + version: link:../utils/lib + clsx: + specifier: ^1.2.1 + version: 1.2.1 + solid-js: + specifier: ^1.7.11 + version: 1.7.11 + publishDirectory: lib + packages/material: dependencies: '@suid/base': @@ -206,6 +234,10 @@ importers: solid-js: specifier: ^1.7.12 version: 1.7.12 + devDependencies: + solid-testing-library: + specifier: ^0.5.1 + version: 0.5.1(solid-js@1.7.12) publishDirectory: lib packages/site: @@ -228,6 +260,9 @@ importers: '@suid/icons-material': specifier: workspace:* version: link:../icons-material/lib + '@suid/lab': + specifier: workspace:* + version: link:../lab/lib '@suid/material': specifier: workspace:* version: link:../material/lib @@ -432,13 +467,6 @@ packages: grapheme-splitter: 1.0.4 dev: true - /@babel/code-frame@7.21.4: - resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.18.6 - dev: true - /@babel/code-frame@7.22.13: resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} @@ -755,15 +783,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.20 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/highlight@7.22.20: resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} engines: {node: '>=6.9.0'} @@ -1632,13 +1651,6 @@ packages: /@babel/regjsgen@0.8.0: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - /@babel/runtime@7.19.0: - resolution: {integrity: sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.9 - dev: true - /@babel/runtime@7.20.7: resolution: {integrity: sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==} engines: {node: '>=6.9.0'} @@ -3906,8 +3918,8 @@ packages: resolution: {integrity: sha512-6YWYPPpxG3e/xOo6HIWwB/58HukkwIVTOaZ0VwdMVjhRUX/01E4FtQbck9GazOOj7MXHc5RBzMrU86iBJHbI+A==} engines: {node: '>=12'} dependencies: - '@babel/code-frame': 7.21.4 - '@babel/runtime': 7.19.0 + '@babel/code-frame': 7.22.13 + '@babel/runtime': 7.20.7 '@types/aria-query': 4.2.2 aria-query: 5.1.3 chalk: 4.1.2 @@ -5247,7 +5259,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /callsites@3.1.0: @@ -5467,6 +5479,11 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + /clsx@1.2.1: + resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} + engines: {node: '>=6'} + dev: false + /clsx@2.0.0: resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} engines: {node: '>=6'} @@ -5820,7 +5837,7 @@ packages: dependencies: call-bind: 1.0.2 es-get-iterator: 1.1.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 is-arguments: 1.1.1 is-date-object: 1.0.5 is-regex: 1.1.4 @@ -6216,7 +6233,7 @@ packages: resolution: {integrity: sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 @@ -7019,14 +7036,6 @@ packages: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} dev: true - /get-intrinsic@1.1.3: - resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 - dev: true - /get-intrinsic@1.2.0: resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} dependencies: @@ -7204,7 +7213,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /got@11.8.5: @@ -7286,7 +7295,7 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /has-proto@1.0.1: @@ -7895,7 +7904,7 @@ packages: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 dev: true /is-what@4.1.8: @@ -8954,10 +8963,6 @@ packages: resolution: {integrity: sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g==} dev: true - /object-inspect@1.12.2: - resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} - dev: true - /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} dev: true @@ -9792,10 +9797,6 @@ packages: /regenerator-runtime@0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - /regenerator-runtime@0.13.9: - resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} - dev: true - /regenerator-transform@0.15.2: resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: @@ -10215,8 +10216,8 @@ packages: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 - object-inspect: 1.12.2 + get-intrinsic: 1.2.0 + object-inspect: 1.12.3 dev: true /siginfo@2.0.0: @@ -10325,6 +10326,13 @@ packages: smart-buffer: 4.2.0 dev: true + /solid-js@1.7.11: + resolution: {integrity: sha512-JkuvsHt8jqy7USsy9xJtT18aF9r2pFO+GB8JQ2XGTvtF49rGTObB46iebD25sE3qVNvIbwglXOXdALnJq9IHtQ==} + dependencies: + csstype: 3.1.2 + seroval: 0.5.1 + dev: false + /solid-js@1.7.12: resolution: {integrity: sha512-QoyoOUKu14iLoGxjxWFIU8+/1kLT4edQ7mZESFPonsEXZ//VJtPKD8Ud1aTKzotj+MNWmSs9YzK6TdY+fO9Eww==} dependencies: @@ -10439,6 +10447,18 @@ packages: /solid-testing-library@0.5.0(solid-js@1.7.12): resolution: {integrity: sha512-vr4Ke9Dq3bUFLaXOcN8/IVn2e9Q37w4vdmoIOmFBIPs7iCJX9IxuC0IdQqK8nzBZMQqceijkfyCE3Qc407KmaA==} engines: {node: '>= 14'} + deprecated: This package is now available at @solidjs/testing-library + peerDependencies: + solid-js: '>=1.0.0' + dependencies: + '@testing-library/dom': 8.19.0 + solid-js: 1.7.12 + dev: true + + /solid-testing-library@0.5.1(solid-js@1.7.12): + resolution: {integrity: sha512-CfcCWsI5zIJz2zcyZQz2weq+6cCS5QrcmWeEmUEy03fElJ/BV5Ly4MMTsmwdOK803zY3wJP5pPf026C40VrE1Q==} + engines: {node: '>= 14'} + deprecated: This package is now available at @solidjs/testing-library peerDependencies: solid-js: '>=1.0.0' dependencies: diff --git a/scripts/actions/extractMaterialSource.ts b/scripts/actions/extractMaterialSource.ts index 1ddde3a1a..df7ba71cf 100644 --- a/scripts/actions/extractMaterialSource.ts +++ b/scripts/actions/extractMaterialSource.ts @@ -1,5 +1,5 @@ -import { safeStat } from "./../util/fs"; -import { muiSourcePath } from "./../util/material-ui"; +import { safeStat } from "../util/fs"; +import { muiSourcePath } from "../util/material-ui"; import { spawn } from "child_process"; import { dirname } from "path"; @@ -11,7 +11,7 @@ async function extractMaterialSource(options: { version: string }) { console.log(`[${name}] Source code is already extracted`); } else { console.log(`[name] Extracting into ${targetPath}`); - const p = spawn("7z", ["x", "-y", zipPath, `-o${dirname(targetPath)}`], { + const p = spawn("tar", ["-xf", zipPath, "-C", dirname(targetPath)], { stdio: "inherit", }); await new Promise((resolve, reject) => { diff --git a/tsconfig.build.json b/tsconfig.build.json index 1966cb717..517a397a4 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -5,6 +5,7 @@ { "path": "packages/codemod/tsconfig.build.json" }, { "path": "packages/create-suid/tsconfig.build.json" }, { "path": "packages/css/tsconfig.build.json" }, + { "path": "packages/lab/tsconfig.build.json" }, { "path": "packages/material/tsconfig.build.json" }, { "path": "packages/styled-engine/tsconfig.build.json" }, { "path": "packages/system/tsconfig.build.json" },