├── .changeset ├── README.md └── config.json ├── .github └── workflows │ ├── ci.yml │ ├── deploy.yml │ └── release.yml ├── .gitignore ├── .npmrc ├── .prettierrc.cjs ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── apps └── docs │ ├── .eslintrc.cjs │ ├── CHANGELOG.md │ ├── astro.config.mjs │ ├── package.json │ ├── public │ ├── favicon.svg │ ├── material.svg │ ├── solid.svg │ └── tailwindcss.svg │ ├── src │ ├── components │ │ ├── examples │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── checkbox.tsx │ │ │ ├── divider.tsx │ │ │ ├── fab.tsx │ │ │ ├── icon-button.tsx │ │ │ ├── navigation-drawer.tsx │ │ │ ├── navigation-rail.tsx │ │ │ ├── switch.tsx │ │ │ ├── tabs.tsx │ │ │ └── text-field.tsx │ │ ├── footer.astro │ │ ├── header.tsx │ │ ├── playground.astro │ │ ├── sidebar.tsx │ │ └── toc.astro │ ├── env.d.ts │ ├── layouts │ │ ├── docs.astro │ │ └── layout.astro │ ├── pages │ │ ├── components │ │ │ ├── button.mdx │ │ │ ├── card.mdx │ │ │ ├── checkbox.mdx │ │ │ ├── divider.mdx │ │ │ ├── fab.mdx │ │ │ ├── icon-button.mdx │ │ │ ├── navigation-drawer.mdx │ │ │ ├── navigation-rail.mdx │ │ │ ├── switch.mdx │ │ │ ├── tabs.mdx │ │ │ └── text-field.mdx │ │ ├── guide │ │ │ ├── index.mdx │ │ │ └── usage.mdx │ │ └── index.astro │ └── utils │ │ └── click-outside.ts │ ├── tailwind.config.cjs │ └── tsconfig.json ├── package.json ├── packages ├── configuration │ ├── CHANGELOG.md │ ├── eslint.astro.cjs │ ├── eslint.base.cjs │ ├── eslint.solid.cjs │ ├── package.json │ ├── tsconfig.base.json │ └── utils.ts ├── core │ ├── .eslintrc.cjs │ ├── CHANGELOG.md │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── button │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── card │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── checkbox │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── dialog │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── divider │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── fab │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── icon-button │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── index.ts │ │ │ ├── navigation-drawer-item │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── navigation-drawer │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── navigation-item │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── navigation-rail │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── switch │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── tabs │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── text-field │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ └── top-bar │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ ├── index.tsx │ │ ├── primitives │ │ │ ├── index.ts │ │ │ └── ripple │ │ │ │ ├── index.ts │ │ │ │ ├── styles.ts │ │ │ │ └── utils.ts │ │ └── utils │ │ │ ├── dom.ts │ │ │ └── refs.ts │ ├── test │ │ ├── components │ │ │ ├── __snapshots__ │ │ │ │ ├── button.spec.tsx.snap │ │ │ │ ├── card.spec.tsx.snap │ │ │ │ ├── divider.spec.tsx.snap │ │ │ │ ├── fab.spec.tsx.snap │ │ │ │ └── icon-button.spec.tsx.snap │ │ │ ├── button.spec.tsx │ │ │ ├── card.spec.tsx │ │ │ ├── divider.spec.tsx │ │ │ ├── fab.spec.tsx │ │ │ └── icon-button.spec.tsx │ │ ├── setup.ts │ │ └── utils │ │ │ └── dom.spec.ts │ ├── tsconfig.json │ ├── tsup.config.ts │ └── vite.config.ts └── tailwind │ ├── .eslintrc.cjs │ ├── CHANGELOG.md │ ├── package.json │ ├── src │ ├── index.ts │ ├── tokens │ │ ├── index.ts │ │ ├── palette.ts │ │ ├── shape.ts │ │ ├── transition.ts │ │ └── typography.ts │ ├── typescript │ │ └── kobalte.d.ts │ └── utils │ │ ├── index.ts │ │ ├── object.ts │ │ └── string.ts │ ├── tsconfig.json │ └── tsup.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── turbo.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "access": "public", 6 | "baseBranch": "main", 7 | "updateInternalDependencies": "patch" 8 | } 9 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize] 6 | branches: [main] 7 | 8 | env: 9 | PNPM_CACHE_FOLDER: .pnpm-store 10 | 11 | jobs: 12 | build: 13 | name: Build and Test 14 | timeout-minutes: 15 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout Repository 19 | uses: actions/checkout@v3 20 | with: 21 | fetch-depth: 2 22 | 23 | - name: Setup Caching 24 | uses: actions/cache@v2 25 | with: 26 | path: ${{ env.PNPM_CACHE_FOLDER }} 27 | key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} 28 | restore-keys: | 29 | ${{ runner.os }}-pnpm- 30 | 31 | - name: Setup PNPM 32 | uses: pnpm/action-setup@v2 33 | with: 34 | version: 7.x.x 35 | 36 | - name: Setup Node.js 37 | uses: actions/setup-node@v3 38 | with: 39 | node-version: 16.x 40 | cache: "pnpm" 41 | 42 | - name: Setup PNPM Config 43 | run: pnpm config set store-dir $PNPM_CACHE_FOLDER 44 | 45 | - name: Install Dependencies 46 | run: pnpm i 47 | 48 | - name: Build 49 | run: pnpm build 50 | 51 | - name: Test 52 | run: pnpm test 53 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy on GH Pages 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | paths: 7 | - "**/CHANGELOG.md" 8 | 9 | workflow_dispatch: 10 | 11 | permissions: 12 | contents: read 13 | pages: write 14 | id-token: write 15 | 16 | env: 17 | PNPM_CACHE_FOLDER: .pnpm-store 18 | 19 | jobs: 20 | build: 21 | name: Build 22 | runs-on: ubuntu-latest 23 | steps: 24 | - name: Checkout Repository 25 | uses: actions/checkout@v3 26 | with: 27 | fetch-depth: 2 28 | 29 | - name: Setup Caching 30 | uses: actions/cache@v2 31 | with: 32 | path: ${{ env.PNPM_CACHE_FOLDER }} 33 | key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} 34 | restore-keys: | 35 | ${{ runner.os }}-pnpm- 36 | 37 | - name: Setup PNPM 38 | uses: pnpm/action-setup@v2 39 | with: 40 | version: 7.x.x 41 | 42 | - name: Setup Node.js 43 | uses: actions/setup-node@v3 44 | with: 45 | node-version: 16.x 46 | cache: "pnpm" 47 | 48 | - name: Setup PNPM Config 49 | run: pnpm config set store-dir $PNPM_CACHE_FOLDER 50 | 51 | - name: Install Dependencies 52 | run: pnpm i 53 | 54 | - name: Build 55 | run: pnpm build 56 | 57 | - name: Install and Build 58 | uses: withastro/action@v0 59 | with: 60 | path: ./apps/docs 61 | package-manager: pnpm 62 | resolve-dep-from-path: false 63 | 64 | deploy: 65 | name: Deploy 66 | needs: build 67 | runs-on: ubuntu-latest 68 | environment: 69 | name: github-pages 70 | url: ${{ steps.deployment.outputs.page_url }} 71 | steps: 72 | - name: deploy 73 | id: deployment 74 | uses: actions/deploy-pages@v1 75 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release on NPM 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | 7 | env: 8 | PNPM_CACHE_FOLDER: .pnpm-store 9 | 10 | jobs: 11 | version: 12 | name: Release 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout Repository 16 | uses: actions/checkout@v3 17 | with: 18 | fetch-depth: 0 19 | 20 | - name: Setup Caching 21 | uses: actions/cache@v2 22 | with: 23 | path: ${{ env.PNPM_CACHE_FOLDER }} 24 | key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} 25 | restore-keys: | 26 | ${{ runner.os }}-pnpm- 27 | 28 | - name: Setup PNPM 29 | uses: pnpm/action-setup@v2 30 | with: 31 | version: 7.x.x 32 | 33 | - name: Setup Node.js 34 | uses: actions/setup-node@v3 35 | with: 36 | node-version: 16.x 37 | cache: "pnpm" 38 | 39 | - name: Setup .npmrc 40 | run: | 41 | cat << EOF > "$HOME/.npmrc" 42 | //registry.npmjs.org/:_authToken=$NPM_TOKEN 43 | EOF 44 | env: 45 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 46 | 47 | - name: Setup PNPM Config 48 | run: pnpm config set store-dir $PNPM_CACHE_FOLDER 49 | 50 | - name: Install Dependencies 51 | run: pnpm i 52 | 53 | - name: Create Version PR & Prepare Publish 54 | uses: changesets/action@v1 55 | with: 56 | version: pnpm ci:version 57 | publish: pnpm ci:publish 58 | commit: "chore(deploy): release" 59 | title: "chore(deploy): release" 60 | env: 61 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 62 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ci 2 | .pnpm-store 3 | 4 | # turbo 5 | .turbo 6 | 7 | # generated types 8 | .astro/ 9 | 10 | # dependencies 11 | node_modules/ 12 | 13 | # build output 14 | dist/ 15 | 16 | # logs 17 | npm-debug.log* 18 | yarn-debug.log* 19 | yarn-error.log* 20 | pnpm-debug.log* 21 | 22 | # environment variables 23 | .env 24 | .env.production 25 | 26 | # macOS-specific files 27 | .DS_Store 28 | 29 | # coverage 30 | coverage/ -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true -------------------------------------------------------------------------------- /.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 120, 3 | trailingComma: "all", 4 | plugins: [require.resolve("prettier-plugin-packagejson"), require.resolve("prettier-plugin-astro")], 5 | overrides: [ 6 | { 7 | files: "*.astro", 8 | options: { 9 | parser: "astro", 10 | }, 11 | }, 12 | ], 13 | }; 14 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "tailwindCSS.experimental.configFile": "apps/docs/tailwind.config.cjs", 3 | "tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]], 4 | 5 | "eslint.workingDirectories": ["packages/*", "apps/*"], 6 | "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "astro"], 7 | 8 | "editor.codeActionsOnSave": { 9 | "source.fixAll": true 10 | }, 11 | 12 | "prettier.documentSelectors": ["**/*.astro", "**/*.mdx"] 13 | } 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Carlos Eduardo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Solid Material 2 | 3 | Moved to a new solution called [nen-ui](https://github.com/ceopaludetto/nen) 4 | -------------------------------------------------------------------------------- /apps/docs/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-extraneous-dependencies */ 2 | const { resolve } = require("path"); 3 | 4 | require("@rushstack/eslint-patch/modern-module-resolution"); 5 | 6 | module.exports = { 7 | extends: [require.resolve("@solidjs-material/configuration/eslint.astro.cjs")], 8 | parserOptions: { project: resolve(__dirname, "tsconfig.json") }, 9 | }; 10 | -------------------------------------------------------------------------------- /apps/docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @solidjs-material/docs 2 | 3 | ## 0.0.6 4 | 5 | ### Patch Changes 6 | 7 | - 423f693: Fix CI 8 | - Updated dependencies [423f693] 9 | - @solidjs-material/core@0.0.12 10 | 11 | ## 0.0.5 12 | 13 | ### Patch Changes 14 | 15 | - Updated dependencies [986c180] 16 | - @solidjs-material/core@0.0.11 17 | 18 | ## 0.0.4 19 | 20 | ### Patch Changes 21 | 22 | - Add tabs component 23 | Add tests 24 | Bump kobalte version 25 | Fix components interactions 26 | - Updated dependencies 27 | - @solidjs-material/core@0.0.10 28 | 29 | ## 0.0.3 30 | 31 | ### Patch Changes 32 | 33 | - d544306: Add topbar component 34 | - Updated dependencies [d544306] 35 | - @solidjs-material/core@0.0.9 36 | 37 | ## 0.0.2 38 | 39 | ### Patch Changes 40 | 41 | - f7f74e3: Add new docs 42 | - 0d52623: Remove unecessary capitalize class in sidebar 43 | - Updated dependencies [f7f74e3] 44 | - Updated dependencies [62ac49f] 45 | - Updated dependencies [62ac49f] 46 | - Updated dependencies [5a012bf] 47 | - @solidjs-material/core@0.0.8 48 | -------------------------------------------------------------------------------- /apps/docs/astro.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-unresolved, import/no-extraneous-dependencies */ 2 | import mdx from "@astrojs/mdx"; 3 | import solid from "@astrojs/solid-js"; 4 | import tailwind from "@astrojs/tailwind"; 5 | import { defineConfig } from "astro/config"; 6 | 7 | export default defineConfig({ 8 | site: "https://solid-material.dev", 9 | markdown: { 10 | shikiConfig: { 11 | theme: "css-variables", 12 | }, 13 | }, 14 | integrations: [solid(), tailwind(), mdx()], 15 | }); 16 | -------------------------------------------------------------------------------- /apps/docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@solidjs-material/docs", 3 | "version": "0.0.6", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "astro": "astro", 8 | "build": "astro build", 9 | "dev": "astro dev", 10 | "lint": "eslint \"src/**/*.{ts,tsx,astro}\" --fix", 11 | "preview": "astro preview", 12 | "start": "astro dev" 13 | }, 14 | "dependencies": { 15 | "@fontsource/poppins": "^4.5.10", 16 | "@solidjs-material/core": "workspace:^0.0.12", 17 | "solid-icons": "^1.0.4", 18 | "solid-js": "^1.6.11", 19 | "tailwindcss": "^3.2.7" 20 | }, 21 | "devDependencies": { 22 | "@astrojs/mdx": "^0.17.0", 23 | "@astrojs/solid-js": "^2.0.2", 24 | "@astrojs/tailwind": "^3.0.1", 25 | "@solidjs-material/configuration": "workspace:^0.0.7", 26 | "@solidjs-material/tailwind": "workspace:^0.0.8", 27 | "@tailwindcss/typography": "^0.5.9", 28 | "astro": "^2.0.14" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/docs/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /apps/docs/public/material.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/public/solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/public/tailwindcss.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/button.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from "@solidjs-material/core"; 2 | import { AiOutlineHeart } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ( 6 | <> 7 | 8 | 9 | 10 | 11 | 12 | ); 13 | } 14 | 15 | export function IconsExample() { 16 | return ( 17 | <> 18 | 19 | 20 | 21 | ); 22 | } 23 | 24 | export function DisabledExample() { 25 | return ( 26 | <> 27 | 28 | 31 | 34 | 37 | 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/card.tsx: -------------------------------------------------------------------------------- 1 | import { Button, Card } from "@solidjs-material/core"; 2 | 3 | export function BasicExample() { 4 | return ( 5 | <> 6 | Some content 7 | 8 | Some content 9 | 10 | 11 | ); 12 | } 13 | 14 | export function CompositionExample() { 15 | return ( 16 | 17 | Some content 18 |
19 | 20 | 21 |
22 |
23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/checkbox.tsx: -------------------------------------------------------------------------------- 1 | import { Checkbox } from "@solidjs-material/core"; 2 | import { AiOutlineCheck, AiOutlineMinus } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ( 6 | } indeterminateIcon={() => } /> 7 | ); 8 | } 9 | 10 | export function IndeterminateExample() { 11 | return ( 12 | } 15 | indeterminateIcon={() => } 16 | isIndeterminate 17 | /> 18 | ); 19 | } 20 | 21 | export function DisabledExample() { 22 | return ( 23 | <> 24 | } 27 | indeterminateIcon={() => } 28 | isDisabled 29 | /> 30 | } 33 | indeterminateIcon={() => } 34 | defaultIsChecked 35 | isDisabled 36 | /> 37 | 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/divider.tsx: -------------------------------------------------------------------------------- 1 | import { Divider } from "@solidjs-material/core"; 2 | 3 | export function BasicExample() { 4 | return ; 5 | } 6 | 7 | export function VerticalExample() { 8 | return ( 9 |
10 | 11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/fab.tsx: -------------------------------------------------------------------------------- 1 | import { FAB } from "@solidjs-material/core"; 2 | import { AiOutlinePlus } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ( 6 | <> 7 | } aria-label="Add" /> 8 | } aria-label="Add" variant="secondary" /> 9 | } aria-label="Add" variant="tertiary" /> 10 | 11 | ); 12 | } 13 | 14 | export function SizeExample() { 15 | return ( 16 | <> 17 | } aria-label="Add" size="small" /> 18 | } aria-label="Add" size="medium" /> 19 | } aria-label="Add" size="large" /> 20 | 21 | ); 22 | } 23 | 24 | export function ExtendedExample() { 25 | return }>Add; 26 | } 27 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/icon-button.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton } from "@solidjs-material/core"; 2 | import { AiOutlineHeart } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ( 6 | <> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ); 21 | } 22 | 23 | export function DisabledExample() { 24 | return ( 25 | <> 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/navigation-drawer.tsx: -------------------------------------------------------------------------------- 1 | import { FAB, IconButton, NavigationDrawer, NavigationDrawerItem } from "@solidjs-material/core"; 2 | import { AiOutlineHome, AiOutlineMenu, AiOutlinePlus, AiOutlineSetting } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ( 6 | 7 | }>Home 8 | }>Settings 9 | 10 | ); 11 | } 12 | 13 | export function ActiveExample() { 14 | return ( 15 | 16 | }> 17 | Home 18 | 19 | }>Settings 20 | 21 | ); 22 | } 23 | 24 | export function AdornmentExample() { 25 | return ( 26 | ( 29 | <> 30 | 31 | 32 | 33 | }> 34 | Add 35 | 36 | 37 | )} 38 | > 39 | }>Home 40 | }>Settings 41 | 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/navigation-rail.tsx: -------------------------------------------------------------------------------- 1 | import { FAB, IconButton, NavigationItem, NavigationRail } from "@solidjs-material/core"; 2 | import { AiOutlineHome, AiOutlineMenu, AiOutlinePlus, AiOutlineSetting } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ( 6 | 7 | }>Home 8 | }>Settings 9 | 10 | ); 11 | } 12 | 13 | export function ActiveExample() { 14 | return ( 15 | 16 | }> 17 | Home 18 | 19 | }>Settings 20 | 21 | ); 22 | } 23 | 24 | export function AdornmentExample() { 25 | return ( 26 | ( 28 | <> 29 | 30 | 31 | 32 | } /> 33 | 34 | )} 35 | > 36 | }>Home 37 | }>Settings 38 | 39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/switch.tsx: -------------------------------------------------------------------------------- 1 | import { Switch } from "@solidjs-material/core"; 2 | 3 | export function BasicExample() { 4 | return ; 5 | } 6 | 7 | export function DisabledExample() { 8 | return ( 9 | <> 10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/tabs.tsx: -------------------------------------------------------------------------------- 1 | import { Tabs } from "@solidjs-material/core"; 2 | import { AiOutlineCompass, AiOutlineShopping } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ( 6 | ( 9 | <> 10 | } value="shop"> 11 | Shop 12 | 13 | } value="explore"> 14 | Explore 15 | 16 | 17 | )} 18 | > 19 | Shop content 20 | Explore content 21 | 22 | ); 23 | } 24 | 25 | export function WithoutIconsExample() { 26 | return ( 27 | ( 29 | <> 30 | Shop 31 | Explore 32 | 33 | )} 34 | > 35 | Shop content 36 | Explore content 37 | 38 | ); 39 | } 40 | 41 | export function SecondaryExample() { 42 | return ( 43 | ( 46 | <> 47 | Shop 48 | Explore 49 | 50 | )} 51 | > 52 | Shop content 53 | Explore content 54 | 55 | ); 56 | } 57 | -------------------------------------------------------------------------------- /apps/docs/src/components/examples/text-field.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, TextField } from "@solidjs-material/core"; 2 | import { AiOutlineEye, AiOutlineUser } from "solid-icons/ai"; 3 | 4 | export function BasicExample() { 5 | return ; 6 | } 7 | 8 | export function AdornmentExample() { 9 | return ( 10 | <> 11 | } /> 12 | ( 15 | 16 | 17 | 18 | )} 19 | /> 20 | 21 | ); 22 | } 23 | 24 | export function DescriptionExample() { 25 | return ; 26 | } 27 | 28 | export function ErrorExample() { 29 | return ; 30 | } 31 | 32 | export function DisabledExample() { 33 | return ; 34 | } 35 | -------------------------------------------------------------------------------- /apps/docs/src/components/footer.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Divider } from "@solidjs-material/core"; 3 | 4 | export interface Props { 5 | tight?: boolean; 6 | } 7 | 8 | const { tight } = Astro.props; 9 | --- 10 | 11 | 12 |
13 |

Released under the MIT License.

14 |

Copyright © 2023-PRESENT Carlos Paludetto and Solid Material contributors

15 |
16 | -------------------------------------------------------------------------------- /apps/docs/src/components/header.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, TopBar } from "@solidjs-material/core"; 2 | import { AiOutlineGithub, AiOutlineMenu } from "solid-icons/ai"; 3 | 4 | export function Header() { 5 | return ( 6 | ( 10 | 18 | {() => } 19 | 20 | )} 21 | > 22 | {/* eslint-disable-next-line tailwindcss/no-custom-classname */} 23 | 24 | 25 | 26 | 27 | SolidMaterial 28 | 29 | 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /apps/docs/src/components/playground.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Card } from "@solidjs-material/core"; 3 | --- 4 | 5 | 6 |
7 | 8 |
9 | {/* eslint-disable-next-line tailwindcss/no-custom-classname */} 10 |
11 | 12 |
13 |
14 | 15 | 24 | -------------------------------------------------------------------------------- /apps/docs/src/components/sidebar.tsx: -------------------------------------------------------------------------------- 1 | import type { MDXInstance } from "astro"; 2 | import type { JSX } from "solid-js"; 3 | 4 | import { IconButton, NavigationDrawer, NavigationDrawerItem } from "@solidjs-material/core"; 5 | import { AiOutlineMenu } from "solid-icons/ai"; 6 | import { BsCardText, BsToggleOff } from "solid-icons/bs"; 7 | import { createSignal, For } from "solid-js"; 8 | 9 | import { createClickOutside } from "~/utils/click-outside"; 10 | 11 | type Section = "Components" | "Guide"; 12 | export type SidebarEntry = [section: Section, items: MDXInstance>[]]; 13 | 14 | export type SidebarProps = { 15 | currentURL: string; 16 | entries: SidebarEntry[]; 17 | }; 18 | 19 | const icons: Record = { 20 | Guide: () => , 21 | Components: () => , 22 | }; 23 | 24 | export function Sidebar(props: SidebarProps) { 25 | const [ref, setRef] = createSignal(); 26 | 27 | createClickOutside({ 28 | ref, 29 | isDisabled: () => ref()?.classList.contains("max-lg:-translate-x-full"), 30 | callback: (sidebar) => { 31 | if (!sidebar) return; 32 | 33 | if (sidebar.classList.contains("max-lg:-translate-x-full")) { 34 | sidebar.classList.remove("max-lg:-translate-x-full"); 35 | return; 36 | } 37 | 38 | sidebar.classList.add("max-lg:-translate-x-full"); 39 | }, 40 | }); 41 | 42 | return ( 43 | 79 | ); 80 | } 81 | -------------------------------------------------------------------------------- /apps/docs/src/components/toc.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | headings: { depth: number; text: string; slug: string }[]; 4 | } 5 | 6 | const { headings } = Astro.props; 7 | --- 8 | 9 |

On this page

10 |
    11 | { 12 | headings 13 | .filter((item) => item.depth !== 1) 14 | .map((item) => ( 15 |
  • 19 | 20 | {item.text} 21 | 22 |
  • 23 | )) 24 | } 25 |
26 | -------------------------------------------------------------------------------- /apps/docs/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /apps/docs/src/layouts/docs.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import "@fontsource/poppins/300.css"; 3 | import "@fontsource/poppins/400.css"; 4 | import "@fontsource/poppins/500.css"; 5 | 6 | import type { SidebarEntry } from "~/components/sidebar"; 7 | 8 | import Footer from "~/components/footer.astro"; 9 | import { Header } from "~/components/header"; 10 | import { Sidebar } from "~/components/sidebar"; 11 | import TOC from "~/components/toc.astro"; 12 | 13 | export interface Props { 14 | title: string; 15 | } 16 | 17 | const { frontmatter, headings } = Astro.props; 18 | 19 | const entries = [ 20 | ["Guide", await Astro.glob("../pages/guide/*.mdx")], 21 | ["Components", await Astro.glob("../pages/components/*.mdx")], 22 | ] satisfies SidebarEntry[]; 23 | --- 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {frontmatter.title} - Solid Material 33 | 34 | 35 |
36 |
37 | 38 | 41 |
44 | 45 |
46 |
47 | 50 |
51 | 52 | 53 | 54 | 71 | 72 | 89 | -------------------------------------------------------------------------------- /apps/docs/src/layouts/layout.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import "@fontsource/poppins/300.css"; 3 | import "@fontsource/poppins/400.css"; 4 | import "@fontsource/poppins/500.css"; 5 | 6 | import Footer from "../components/footer.astro"; 7 | 8 | export interface Props { 9 | title: string; 10 | description: string; 11 | } 12 | 13 | const { title, description } = Astro.props; 14 | --- 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {title} 25 | 26 | 27 | 28 |